summaryrefslogtreecommitdiff
path: root/gnu/packages/qt.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/qt.scm')
-rw-r--r--gnu/packages/qt.scm174
1 files changed, 165 insertions, 9 deletions
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index e8654eee44..20f29cf706 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -28,6 +28,7 @@
;;; Copyright © 2022 Petr Hodina <[email protected]>
;;; Copyright © 2022 Yash Tiwari <[email protected]>
;;; Copyright © 2023 Sharlatan Hellseher <[email protected]>
+;;; Copyright © 2022 Zheng Junjie <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -128,6 +129,31 @@
(define %qt-version "5.15.8")
+(define-public qcoro-qt5
+ (package
+ (name "qcoro-qt5")
+ (version "0.9.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/danvratil/qcoro")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0pk5ybk6zv7m0wnkl6m3m8sjybmfk6wcn22mmgj942hrc3yrdzci"))))
+ (build-system qt-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list "-DUSE_QT_VERSION=5")))
+ (native-inputs (list dbus)) ;for tests
+ (inputs (list qtbase-5 qtdeclarative-5 qtwebsockets-5))
+ (home-page "https://qcoro.dvratil.cz/")
+ (synopsis "C++ Coroutine Library for Qt5")
+ (description "QCoro is a C++ library that provide set of tools to make use
+of C++20 coroutines in connection with certain asynchronous Qt actions.")
+ (license license:expat)))
+
(define-public qite
(let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
(revision "74"))
@@ -285,7 +311,7 @@ applications on Wayland.")
(define-public grantlee
(package
(name "grantlee")
- (version "5.2.0")
+ (version "5.3.1")
(source
(origin
(method git-fetch)
@@ -294,7 +320,8 @@ applications on Wayland.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
+ (base32 "1ipnkdi8wgv519mvwa5zxlz20wipbypyfixjv2qdfd9vl1pznwvs"))
+ (patches (search-patches "grantlee-fix-i586-precision.patch"))))
(native-inputs
;; Optional: lcov and cccc, both are for code coverage
(list doxygen))
@@ -302,12 +329,11 @@ applications on Wayland.")
(list qtbase-5 qtdeclarative-5 qtscript))
(build-system cmake-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'check 'check-setup
- (lambda _
- ;; make Qt render "offscreen", required for tests
- (setenv "QT_QPA_PLATFORM" "offscreen"))))))
+ (list #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'check-setup
+ (lambda _
+ ;; make Qt render "offscreen", required for tests
+ (setenv "QT_QPA_PLATFORM" "offscreen"))))))
(home-page "https://github.com/steveire/grantlee")
(synopsis "Libraries for text templating with Qt")
(description "Grantlee Templates can be used for theming and generation of
@@ -609,7 +635,11 @@ developers using C++ or QML, a CSS & JavaScript like language.")
;; are required by some internal bootstrap target
;; used for the tools.
(list "double-conversion" "freetype" "harfbuzz-ng"
- "libpng" "libjpeg" "sqlite" "xcb" "zlib"))))))
+ "libpng" "libjpeg" "sqlite" "xcb" "zlib"))))
+ (patches (search-patches "qtbase-use-TZDIR.patch"
+ "qtbase-moc-ignore-gcc-macro.patch"
+ "qtbase-absolute-runpath.patch"
+ "qtbase-qmake-use-libname.patch"))))
(build-system cmake-build-system)
(arguments
(substitute-keyword-arguments (package-arguments qtbase-5)
@@ -623,6 +653,11 @@ developers using C++ or QML, a CSS & JavaScript like language.")
(string-append "-DINSTALL_EXAMPLESDIR=" out
"/share/doc/qt6/examples")
(string-append "-DINSTALL_INCLUDEDIR=" out "/include/qt6")
+
+ ;; Do not embed an absolute reference to compilers, to reduce
+ ;; the closure size.
+ "-DQT_EMBED_TOOLCHAIN_COMPILER=OFF"
+
;; Link with DBus and OpenSSL so they don't get dlopen'ed.
"-DINPUT_dbus=linked"
"-DINPUT_openssl=linked"
@@ -716,6 +751,11 @@ developers using C++ or QML, a CSS & JavaScript like language.")
(string-append #$output
":" (getenv "CMAKE_PREFIX_PATH")))
(setenv "QMAKEPATH" (string-append #$output "/lib/qt6"))
+ ;; It is necessary to augment LIBRARY_PATH with that of the
+ ;; freshly installed qtbase because of the
+ ;; 'qtbase-qmake-use-libname.patch' patch.
+ (setenv "LIBRARY_PATH" (string-append #$output "/lib:"
+ (getenv "LIBRARY_PATH")))
(setenv "QML2_IMPORT_PATH"
(string-append #$output "/lib/qt6/qml"))
(setenv "QT_PLUGIN_PATH"
@@ -2356,6 +2396,50 @@ the end-user is driving and cannot attend the incoming messages on the phone.
In such a scenario, the messaging application can read out the incoming
message.")))
+(define-public qtvirtualkeyboard-5
+ (package
+ (inherit qtsvg-5)
+ (name "qtvirtualkeyboard")
+ (version %qt-version)
+ (source (origin
+ (method url-fetch)
+ (uri (qt-urls name version))
+ (sha256
+ (base32
+ "1skdjh9q4m438wwl8hwx3jc5hg22dmi5pwm3vd2yksxw6ny67rd7"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments qtsvg-5)
+ ((#:tests? _ #f) #f) ; TODO: pass 2 fail test
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'check 'set-display
+ (lambda _
+ ;; Make Qt render "offscreen", required for tests.
+ (setenv "QT_QPA_PLATFORM" "offscreen")
+ (setenv "DISPLAY" ":1")
+ (system "Xvfb +extension GLX :1 &")))
+ (delete 'check) ;move after the install phase
+ (add-after 'install 'check
+ (assoc-ref %standard-phases 'check))
+ (add-before 'check 'prepare-for-tests
+ (lambda* (#:key outputs #:allow-other-keys)
+ (setenv "QML2_IMPORT_PATH"
+ (string-append (assoc-ref outputs "out")
+ "/lib/qt5/qml:"
+ (getenv "QML2_IMPORT_PATH")))
+ (setenv "QT_PLUGIN_PATH"
+ (string-append (assoc-ref outputs "out")
+ "/lib/qt6/plugins:"
+ (getenv "QT_PLUGIN_PATH")))))))))
+ (native-inputs (list perl xorg-server-for-tests))
+ (inputs (list qtbase-5 qtdeclarative-5))
+ (propagated-inputs
+ (list qtquickcontrols-5 qtsvg-5))
+ (synopsis "QtQuick virtual keyboard")
+ (description "The Qt Speech module provides a virtual keyboard framework
+that consists of a C++ backend supporting custom input methods as well as a UI
+frontend implemented in QML.")))
+
(define-public qtspell
(package
(name "qtspell")
@@ -3201,6 +3285,78 @@ instances and can send data to the primary instance from secondary
instances.")
(license license:expat))))
+(define-public pyotherside
+ (package
+ (name "pyotherside")
+ (version "1.6.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/thp/pyotherside")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vwl088p8zjkh2rwmzwpz5mkjs2rfyb80018dq4r571c9vpwp2r0"))))
+ (build-system qt-build-system)
+ (arguments
+ (list
+ #:qtbase qtbase
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-installation-prefix
+ (lambda _
+ ;; The QT_INSTALL_QML property points to the qtbase
+ ;; installation prefix.
+ (substitute* "src/src.pro"
+ (("\\$\\$\\[QT_INSTALL_QML]")
+ (string-append #$output "/lib/qt"
+ #$(version-major (package-version qtbase))
+ "/qml")))))
+ (replace 'configure
+ (lambda _
+ (invoke "qmake")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "./tests/tests"))))
+ (replace 'install
+ ;; Specify a specific install target, otherwise the build fails
+ ;; attempting to install the qtquicktests target to the qtbase
+ ;; installation prefix.
+ (lambda _
+ (invoke "make" "sub-src-install_subtargets"))))))
+ (inputs (list python qtdeclarative qtquickcontrols2 qtsvg))
+ (home-page "https://thp.io/2011/pyotherside/")
+ (synopsis "Qt plugin providing access to a Python 3 interpreter from QML")
+ (description "Pyotherside is a Qt plugin providing access to a Python 3
+interpreter from QML for creating asynchronous mobile and desktop UIs with
+Python.")
+ (license license:isc)))
+
+(define-public pyotherside-for-qt5
+ (package/inherit pyotherside
+ (name "pyotherside-for-qt5")
+ (arguments
+ (substitute-keyword-arguments (package-arguments pyotherside)
+ ((#:qtbase _ #f)
+ qtbase-5)
+ ((#:phases phases '%standard-phases)
+ #~(modify-phases #$phases
+ (replace 'fix-installation-prefix
+ (lambda _
+ ;; The QT_INSTALL_QML property points to the qtbase
+ ;; installation prefix.
+ (substitute* "src/src.pro"
+ (("\\$\\$\\[QT_INSTALL_QML]")
+ (string-append #$output "/lib/qt"
+ #$(version-major (package-version qtbase-5))
+ "/qml")))))))))
+ (inputs (modify-inputs (package-inputs pyotherside)
+ (replace "qtdeclarative" qtdeclarative-5)
+ (replace "qtquickcontrols2" qtquickcontrols-5)
+ (replace "qtsvg" qtsvg-5)))))
+
(define-public python-sip
(package
(name "python-sip")