1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
10 ;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018, 2020, 2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
12 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
13 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
15 ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
16 ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
17 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
18 ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
19 ;;; Copyright © 2020 TomZ <tomz@freedommail.ch>
20 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
21 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
22 ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
23 ;;; Copyright © 2021, 2022 Brendan Tildesley <mail@brendan.scot>
24 ;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
25 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
26 ;;; Copyright © 2022 Foo Chuan Wei <chuanwei.foo@hotmail.com>
28 ;;; This file is part of GNU Guix.
30 ;;; GNU Guix is free software; you can redistribute it and/or modify it
31 ;;; under the terms of the GNU General Public License as published by
32 ;;; the Free Software Foundation; either version 3 of the License, or (at
33 ;;; your option) any later version.
35 ;;; GNU Guix is distributed in the hope that it will be useful, but
36 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;;; GNU General Public License for more details.
40 ;;; You should have received a copy of the GNU General Public License
41 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43 (define-module (gnu packages qt)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix packages)
46 #:use-module (guix download)
47 #:use-module (guix git-download)
48 #:use-module (guix build-system cmake)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system trivial)
51 #:use-module (guix build-system python)
52 #:use-module (guix build-system qt)
53 #:use-module (guix gexp)
54 #:use-module (guix packages)
55 #:use-module (guix deprecation)
56 #:use-module (guix utils)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages bash)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages bison)
61 #:use-module (gnu packages cmake)
62 #:use-module (gnu packages compression)
63 #:use-module (gnu packages cups)
64 #:use-module (gnu packages curl)
65 #:use-module (gnu packages databases)
66 #:use-module (gnu packages documentation)
67 #:use-module (gnu packages enchant)
68 #:use-module (gnu packages fontutils)
69 #:use-module (gnu packages flex)
70 #:use-module (gnu packages freedesktop)
71 #:use-module (gnu packages gcc)
72 #:use-module (gnu packages ghostscript)
73 #:use-module (gnu packages gl)
74 #:use-module (gnu packages glib)
75 #:use-module (gnu packages gnome)
76 #:use-module (gnu packages gnupg)
77 #:use-module (gnu packages gperf)
78 #:use-module (gnu packages graphics)
79 #:use-module (gnu packages gstreamer)
80 #:use-module (gnu packages gtk)
81 #:use-module (gnu packages icu4c)
82 #:use-module (gnu packages image)
83 #:use-module (gnu packages kde-frameworks)
84 #:use-module (gnu packages libevent)
85 #:use-module (gnu packages linux)
86 #:use-module (gnu packages llvm)
87 #:use-module (gnu packages maths)
88 #:use-module (gnu packages markup)
89 #:use-module (gnu packages networking)
90 #:use-module (gnu packages ninja)
91 #:use-module (gnu packages node)
92 #:use-module (gnu packages nss)
93 #:use-module (gnu packages pciutils)
94 #:use-module (gnu packages pcre)
95 #:use-module (gnu packages perl)
96 #:use-module (gnu packages pkg-config)
97 #:use-module (gnu packages pulseaudio)
98 #:use-module (gnu packages protobuf)
99 #:use-module (gnu packages python)
100 #:use-module (gnu packages python-build)
101 #:use-module (gnu packages python-xyz)
102 #:use-module (gnu packages python-web)
103 #:use-module (gnu packages regex)
104 #:use-module (gnu packages ruby)
105 #:use-module (gnu packages sdl)
106 #:use-module (gnu packages serialization)
107 #:use-module (gnu packages sqlite)
108 #:use-module (gnu packages telephony)
109 #:use-module (gnu packages tls)
110 #:use-module (gnu packages valgrind)
111 #:use-module (gnu packages video)
112 #:use-module (gnu packages vulkan)
113 #:use-module (gnu packages xdisorg)
114 #:use-module (gnu packages xiph)
115 #:use-module (gnu packages xorg)
116 #:use-module (gnu packages xml)
117 #:use-module (srfi srfi-1))
120 (let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
124 (version (git-version "0" revision commit))
130 (url "https://github.com/Ri0n/qite")
132 (file-name (git-file-name name version))
134 (base32 "0jmmgy9pvk9hwwph1nwy7hxhczy8drhl4ymhnjjn6yx7bckssvsq"))))
135 (build-system qt-build-system)
137 `(#:tests? #f ; no target
139 (modify-phases %standard-phases
140 (add-after 'unpack 'chdir
145 (list qtbase-5 qtmultimedia-5))
146 (home-page "https://github.com/Ri0n/qite/")
147 (synopsis "Qt Interactive Text Elements")
148 (description "Qite manages interactive elements on QTextEdit.")
149 (license license:asl2.0))))
159 (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
161 (base32 "14742vs32m98nbfb5mad0i8ciff5f45gfcb5v03p4hh2dvhhqgfn"))))
162 (build-system qt-build-system)
165 #:tests? #f ; No target
167 #~(modify-phases %standard-phases
168 (add-after 'unpack 'patch
170 (substitute* '("src/qt5ct-qtplugin/CMakeLists.txt"
171 "src/qt5ct-style/CMakeLists.txt")
172 (("\\$\\{PLUGINDIR\\}")
173 (string-append #$output "/lib/qt5/plugins"))))))))
178 (synopsis "Qt5 Configuration Tool")
179 (description "Qt5CT is a program that allows users to configure Qt5
180 settings (such as icons, themes, and fonts) in desktop environments or
181 window managers, that don't provide Qt integration by themselves.")
182 (home-page "https://qt5ct.sourceforge.io/")
183 (license license:bsd-2)))
185 (define-public materialdecoration
186 (let ((commit "6a5de23f2e5162fbee39d16f938473ff970a2ec0")
189 (name "materialdecoration")
191 (git-version "1.1.0" revision commit))
197 (url "https://github.com/lirios/materialdecoration.git")
200 (git-file-name name version))
202 (base32 "1zdrcb39fhhmn76w8anv1dnspz26pdl6izmj1mlm02aza4y8ffp4"))
203 (modules '((guix build utils)
208 (delete-file-recursively "cmake/3rdparty")))))
209 (build-system qt-build-system)
211 `(#:tests? #f ; No target
214 (string-append "-DCMAKE_CXX_FLAGS=-I"
215 #$(this-package-input "qtbase")
216 "/include/qt5/QtXkbCommonSupport/"
217 #$(package-version qtbase-5)))))
219 (list cmake-shared extra-cmake-modules pkg-config))
221 `(("qtbase" ,qtbase-5)
222 ("qtwayland" ,qtwayland)
224 ("xkbcommon" ,libxkbcommon)))
225 (synopsis "Material Decoration for Qt")
226 (description "MaterialDecoration is a client-side decoration for Qt
227 applications on Wayland.")
228 (home-page "https://github.com/lirios/materialdecoration")
229 (license license:lgpl3+))))
231 (define-public grantlee
239 (url "https://github.com/steveire/grantlee")
240 (commit (string-append "v" version))))
241 (file-name (git-file-name name version))
243 (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
245 ;; Optional: lcov and cccc, both are for code coverage
248 (list qtbase-5 qtdeclarative-5 qtscript))
249 (build-system cmake-build-system)
252 (modify-phases %standard-phases
253 (add-before 'check 'check-setup
255 ;; make Qt render "offscreen", required for tests
256 (setenv "QT_QPA_PLATFORM" "offscreen")
258 (home-page "https://github.com/steveire/grantlee")
259 (synopsis "Libraries for text templating with Qt")
260 (description "Grantlee Templates can be used for theming and generation of
261 other text such as code. The syntax uses the syntax of the Django template
262 system, and the core design of Django is reused in Grantlee.")
263 (license license:lgpl2.1+)))
265 (define (qt-urls component version)
266 "Return a list of URLs for VERSION of the Qt5 COMPONENT."
267 ;; We can't use a mirror:// scheme because these URLs are not exact copies:
268 ;; the layout differs between them.
269 (list (string-append "https://download.qt.io/official_releases/qt/"
270 (version-major+minor version) "/" version
271 "/submodules/" component "-everywhere-opensource-src-"
273 (string-append "https://download.qt.io/official_releases/qt/"
274 (version-major+minor version) "/" version
275 "/submodules/" component "-everywhere-src-"
277 (string-append "https://download.qt.io/archive/qt/"
278 (version-major+minor version) "/" version
279 "/submodules/" component "-everywhere-opensource-src-"
281 (let ((directory (string-append "qt5" (string-drop component 2))))
282 (string-append "http://sources.buildroot.net/" directory "/"
283 component "-everywhere-opensource-src-" version ".tar.xz"))
284 (string-append "https://distfiles.macports.org/qt5/"
285 component "-everywhere-opensource-src-" version ".tar.xz")))
287 (define-public qtbase-5
293 (uri (qt-urls name version))
296 "1p2fa94m1y8qzhdfi2d7dck93qh1lgsinibwl1wy92bwmacwfhhc"))
297 ;; Use TZDIR to avoid depending on package "tzdata".
298 (patches (search-patches "qtbase-use-TZDIR.patch"
299 "qtbase-moc-ignore-gcc-macro.patch"
300 "qtbase-absolute-runpath.patch"))
301 (modules '((guix build utils)))
303 ;; corelib uses bundled harfbuzz, md4, md5, sha3
305 (with-directory-excursion "src/3rdparty"
306 (for-each delete-file-recursively
307 (list "double-conversion" "freetype" "harfbuzz-ng"
308 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
310 (build-system gnu-build-system)
311 (outputs '("out" "debug"))
314 ;; Use which the package, not the function
315 (@ (gnu packages base) which)))
317 `(("alsa-lib" ,alsa-lib)
320 ("double-conversion" ,double-conversion)
323 ("fontconfig" ,fontconfig)
324 ("freetype" ,freetype)
326 ("gtk+" ,gtk+) ;for GTK theme support
327 ("harfbuzz" ,harfbuzz)
329 ("libinput" ,libinput-minimal)
330 ("libjpeg" ,libjpeg-turbo)
334 ("libxcomposite" ,libxcomposite)
335 ("libxcursor" ,libxcursor)
336 ("libxfixes" ,libxfixes)
338 ("libxinerama" ,libxinerama)
339 ("libxkbcommon" ,libxkbcommon)
341 ("libxrandr" ,libxrandr)
342 ("libxrender" ,libxrender)
346 ("mariadb-dev" ,mariadb "dev")
350 ("postgresql" ,postgresql)
351 ("pulseaudio" ,pulseaudio)
353 ("unixodbc" ,unixodbc)
354 ("xcb-util" ,xcb-util)
355 ("xcb-util-image" ,xcb-util-image)
356 ("xcb-util-keysyms" ,xcb-util-keysyms)
357 ("xcb-util-renderutil" ,xcb-util-renderutil)
358 ("xcb-util-wm" ,xcb-util-wm)
359 ("xdg-utils" ,xdg-utils)
372 (let ((out (assoc-ref %outputs "out")))
375 "-docdir" (string-append out "/share/doc/qt5")
376 "-headerdir" (string-append out "/include/qt5")
377 "-archdatadir" (string-append out "/lib/qt5")
378 "-datadir" (string-append out "/share/qt5")
379 "-examplesdir" (string-append
380 out "/share/doc/qt5/examples")
384 ;; Later stripped into the :debug output.
387 ;; These features require higher versions of Linux than the
388 ;; minimum version of the glibc. See
389 ;; src/corelib/global/minimum-linux_p.h. By disabling these
390 ;; features Qt5 applications can be used on the oldest
391 ;; kernels that the glibc supports, including the RHEL6
392 ;; (2.6.32) and RHEL7 (3.10) kernels.
393 "-no-feature-getentropy" ; requires Linux 3.17
394 "-no-feature-renameat2" ; requires Linux 3.16
396 ;; Do not build examples; if desired, these could go
397 ;; into a separate output, but for the time being, we
398 ;; prefer to save the space and build time.
399 "-no-compile-examples"
400 ;; Most "-system-..." are automatic, but some use
401 ;; the bundled copy by default.
405 ;; explicitly link with openssl instead of dlopening it
407 ;; explicitly link with dbus instead of dlopening it
409 ;; don't use the precompiled headers
411 ;; drop special machine instructions that do not have
413 ,@(if (string-prefix? "x86_64"
414 (or (%current-target-system)
421 (modify-phases %standard-phases
422 (add-after 'configure 'patch-bin-sh
424 (substitute* '("config.status"
426 "mkspecs/features/qt_functions.prf"
427 "qmake/library/qmakebuiltins.cpp")
428 (("/bin/sh") (which "sh")))))
429 (add-after 'configure 'patch-xdg-open
431 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
432 (("^.*const char \\*browsers.*$" all)
433 (string-append "*browser = QStringLiteral(\""
435 "\"); return true; \n" all)))))
437 ;; Overridden to not pass "--enable-fast-install", which makes the
438 ;; configure process fail.
439 (lambda* (#:key outputs configure-flags #:allow-other-keys)
440 (let ((out (assoc-ref outputs "out")))
441 (substitute* "configure"
442 (("/bin/pwd") (which "pwd")))
443 (substitute* "src/corelib/global/global.pri"
444 (("/bin/ls") (which "ls")))
445 ;; The configuration files for other Qt5 packages are searched
446 ;; through a call to "find_package" in Qt5Config.cmake, which
447 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
448 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
449 ;; components can be installed in different places.
450 (substitute* (find-files "." ".*\\.cmake")
451 (("NO_DEFAULT_PATH") ""))
452 (format #t "build directory: ~s~%" (getcwd))
453 (format #t "configure flags: ~s~%" configure-flags)
454 (apply invoke "./configure" configure-flags))))
455 (add-after 'install 'patch-mkspecs
456 (lambda* (#:key outputs #:allow-other-keys)
457 (let* ((out (assoc-ref outputs "out"))
458 (archdata (string-append out "/lib/qt5"))
459 (mkspecs (string-append archdata "/mkspecs"))
460 (qt_config.prf (string-append
461 mkspecs "/features/qt_config.prf")))
462 ;; For each Qt module, let `qmake' uses search paths in the
463 ;; module directory instead of all in QT_INSTALL_PREFIX.
464 (substitute* qt_config.prf
465 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
466 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
467 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
468 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
469 (("\\$\\$\\[QT_HOST_LIBS\\]")
470 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
471 (("\\$\\$\\[QT_INSTALL_BINS\\]")
472 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
474 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
475 (substitute* (string-append mkspecs "/features/qt_functions.prf")
476 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
477 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
479 ;; Resolve qmake spec files within qtbase by absolute paths.
482 (string-append mkspecs "/features/" file))
483 '("device_config.prf" "moc.prf" "qt_build_config.prf"
484 "qt_config.prf" "winrt/package_manifest.prf"))
485 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
486 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))
487 (add-after 'patch-mkspecs 'patch-prl-files
488 (lambda* (#:key outputs #:allow-other-keys)
489 (let ((out (assoc-ref outputs "out")))
490 ;; Insert absolute references to the qtbase libraries because
491 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
492 ;; on context. See <https://bugs.gnu.org/38405>
493 (substitute* (find-files (string-append out "/lib") "\\.prl$")
494 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
495 (string-append out "/lib"))))))
496 (add-after 'unpack 'patch-paths
497 ;; Use the absolute paths for dynamically loaded libs, otherwise
498 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
500 (lambda* (#:key inputs #:allow-other-keys)
502 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
503 "cross-libc" "libc"))))
504 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
505 "src/network/kernel/qhostinfo_unix.cpp")
506 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
507 (string-append a glibc "/lib/lib" b))))
509 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
510 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
511 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
513 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
514 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
515 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
516 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
517 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))))))))
519 (list (search-path-specification
520 (variable "QMAKEPATH")
521 (files '("lib/qt5")))
522 (search-path-specification
523 (variable "QML2_IMPORT_PATH")
524 (files '("lib/qt5/qml")))
525 (search-path-specification
526 (variable "QT_PLUGIN_PATH")
527 (files '("lib/qt5/plugins")))
528 (search-path-specification
529 (variable "XDG_DATA_DIRS")
531 (search-path-specification
532 (variable "XDG_CONFIG_DIRS")
533 (files '("etc/xdg")))))
534 (home-page "https://www.qt.io/")
535 (synopsis "Cross-platform GUI library")
536 (description "Qt is a cross-platform application and UI framework for
537 developers using C++ or QML, a CSS & JavaScript like language.")
538 (license (list license:lgpl2.1 license:lgpl3))))
540 (define-public qtbase
541 (package/inherit qtbase-5
545 (inherit (package-source qtbase-5))
546 (uri (qt-urls name version))
549 "00sfya41ihqb0zwg6wf1kiy02iymj6mk584hhk2c4s94khfl4r0a"))
550 (modules '((guix build utils)))
552 ;; corelib uses bundled harfbuzz, md4, md5, sha3
553 '(with-directory-excursion "src/3rdparty"
554 (for-each delete-file-recursively
555 ;; The bundled pcre2 copy is kept, as its headers
556 ;; are required by some internal bootstrap target
557 ;; used for the tools.
558 (list "double-conversion" "freetype" "harfbuzz-ng"
559 "libpng" "libjpeg" "sqlite" "xcb" "zlib"))))))
560 (build-system cmake-build-system)
562 (substitute-keyword-arguments (package-arguments qtbase-5)
563 ((#:configure-flags _ ''())
564 `(let ((out (assoc-ref %outputs "out")))
565 (list "-GNinja" ;the build fails otherwise
566 "-DQT_BUILD_TESTS=ON"
567 (string-append "-DINSTALL_ARCHDATADIR=" out "/lib/qt6")
568 (string-append "-DINSTALL_DATADIR=" out "/share/qt6")
569 (string-append "-DINSTALL_DOCDIR=" out "/share/doc/qt6")
570 (string-append "-DINSTALL_MKSPECSDIR=" out "/lib/qt6/mkspecs")
571 (string-append "-DINSTALL_EXAMPLESDIR=" out
572 "/share/doc/qt6/examples")
573 (string-append "-DINSTALL_INCLUDEDIR=" out "/include/qt6")
574 ;; Link with DBus and OpenSSL so they don't get dlopen'ed.
575 "-DINPUT_dbus=linked"
576 "-DINPUT_openssl=linked"
577 ;; These features require higher versions of Linux than the
578 ;; minimum version of the glibc. See
579 ;; src/corelib/global/minimum-linux_p.h. By disabling these
580 ;; features Qt applications can be used on the oldest kernels
581 ;; that the glibc supports, including the RHEL6 (2.6.32) and
582 ;; RHEL7 (3.10) kernels.
583 "-DFEATURE_getentropy=OFF" ; requires Linux 3.17
584 "-DFEATURE_renameat2=OFF" ; requires Linux 3.16
585 ;; Most system libraries are used by default, except in some
586 ;; cases such as for those below.
587 "-DFEATURE_system_pcre2=ON"
588 "-DFEATURE_system_sqlite=ON"
589 "-DFEATURE_system_xcb_xinput=ON"
590 ;; Don't use the precompiled headers.
591 "-DBUILD_WITH_PCH=OFF"
592 ;; Drop special machine instructions that do not have runtime
594 ,@(if (string-prefix? "x86_64"
595 (or (%current-target-system)
597 '() ;implicitly enabled
598 '("-DFEATURE_sse2=OFF"
600 "-DFEATURE_ssse3=OFF"
601 "-DFEATURE_sse4_1=OFF"
602 "-DFEATURE_sse4_2=OFF"))
603 "-DFEATURE_mips_dsp=OFF"
604 "-DFEATURE_mips_dspr2=OFF")))
606 #~(modify-phases #$phases
607 (add-after 'unpack 'honor-CMAKE_PREFIX_PATH
609 ;; The configuration files for other Qt packages are searched
610 ;; through a call to "find_package" in Qt5Config.cmake, which
611 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
612 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
613 ;; components can be installed in different places.
614 (substitute* (find-files "." "\\.cmake(\\.in)?$")
615 (("\\bNO_DEFAULT_PATH\\b") ""))
616 ;; Because Qt goes against the grain of CMake and set
617 ;; NO_DEFAULT_PATH, it needs to invent yet another variable
618 ;; to do what CMAKE_PREFIX_PATH could have done:
619 ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH. Since we patch out
620 ;; the NO_DEFAULT_PATH, we can set the default value of
621 ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH to that of
622 ;; CMAKE_PREFIX_PATH to ensure tools such as
623 ;; 'qmlimportscanner' from qtdeclarative work out of the
625 (substitute* "cmake/QtConfig.cmake.in"
626 (("(set\\(QT_ADDITIONAL_PACKAGES_PREFIX_PATH )\"\"" _ head)
627 (string-append head "\"$ENV{CMAKE_PREFIX_PATH}\"")))))
628 (delete 'patch-bin-sh)
629 (delete 'patch-xdg-open)
630 (add-after 'patch-paths 'patch-more-paths
631 (lambda* (#:key inputs #:allow-other-keys)
632 (substitute* (find-files "bin" "\\.in$")
634 (search-input-file inputs "bin/pwd")))
635 (substitute* "src/gui/platform/unix/qgenericunixservices.cpp"
637 (format #f "~s" (search-input-file inputs "bin/xdg-open"))))
638 (substitute* '("mkspecs/features/qt_functions.prf"
639 "qmake/library/qmakebuiltins.cpp")
641 (search-input-file inputs "bin/bash")))
642 (substitute* "src/corelib/CMakeLists.txt"
644 (search-input-file inputs "bin/ls")))))
646 (assoc-ref %standard-phases 'configure))
648 (lambda* (#:key parallel-build? #:allow-other-keys)
649 (apply invoke "cmake" "--build" "."
651 `("--parallel" ,(number->string (parallel-job-count)))
653 (delete 'check) ;move after patch-prl-files
654 (add-after 'patch-prl-files 'check
655 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
657 ;; The tests expect to find the modules provided by this
658 ;; package; extend the environment variables needed to do so.
659 (setenv "CMAKE_PREFIX_PATH"
660 (string-append #$output
661 ":" (getenv "CMAKE_PREFIX_PATH")))
662 (setenv "QMAKEPATH" (string-append #$output "/lib/qt6"))
663 (setenv "QML2_IMPORT_PATH"
664 (string-append #$output "/lib/qt6/qml"))
665 (setenv "QT_PLUGIN_PATH"
666 (string-append #$output "/lib/qt6/plugins"))
667 (setenv "QT_QPA_PLATFORM" "offscreen")
668 ;; Skip tests known to fail on GNU/Linux, in a CI context or
669 ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
670 ;; /tree/src/testlib/qtestblacklist.cpp).
671 (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
672 (setenv "HOME" "/tmp") ;some tests require a writable HOME
674 "xvfb-run" "ctest" "--output-on-failure"
675 "-j" (if parallel-tests?
676 (number->string (parallel-job-count))
678 "-E" ;disable problematic tests
683 ;; The 'tst_moc' test fails with "'fi.exists()' returned FALSE".
685 ;; The 'test_rcc' test fails on a comparison:
687 ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xe8,
689 ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
692 ;; The 'tst_qtemporarydir' and 'tst_qtemporaryfile'
693 ;; tests depend on '/home' not being writable.
696 ;; The 'tst_qdir' compares two directories which are
697 ;; unexpectedly different when inside the build
700 ;; This checks the last modified time of '/', and fails
701 ;; because Epoch 0 is considered to be invalid.
702 "tst_qresourceengine"
703 ;; The 'tst_qfilesystemwatcher' installs a watcher on
704 ;; '/home', which doesn't exist in the build container.
705 "tst_qfilesystemwatcher"
706 ;; The 'mockplugins' test fail following error: "Unknown
707 ;; platform linux-g++", and the other plugin tests
710 "test_plugin_flavor.*"
711 ;; The 'test_import_plugins' fails with "Could NOT find
713 "test_import_plugins"
714 ;; The 'tst_QTimeZone::systemZone' validates the
715 ;; currently set timezone and fails.
717 ;; The 'tst_qdatetime' fails with:
718 ;; FAIL! : tst_QDateTime::offsetFromUtc() Compared values are not the same
719 ;; Actual (dt5.offsetFromUtc()): 0
720 ;; Expected (46800) : 46800
722 ;; The 'tst_QSettings::fromFile' assumes the data
723 ;; location to be relative to the root directory and
726 ;; The 'tst_qaddpreroutine',
727 ;; 'test_generating_cpp_exports' and
728 ;; 'test_static_resources' tests fail with: "Unknown
729 ;; platform linux-g++.
731 "test_generating_cpp_exports"
732 "test_static_resources"
733 ;; The 'tst_qfile' fails since there is no /home in the
736 ;; The 'tst_QGlyphRun::mixedScripts' test fails with:
737 ;; Actual (glyphRuns.size()): 1
740 ;; The 'tst_qx11info' test fails with "Internal error:
741 ;; QPA plugin doesn't implement generatePeekerId",
742 ;; likely requires a real display.
744 ;; The 'tst_qgraphicswidget' test fails because "This
745 ;; plugin does not support propagateSizeHints".
746 "tst_qgraphicswidget"
747 ;; The 'tst_qdnslookup' test requires networking.
749 ;; The 'tst_qcompleter' and 'tst_QFiledialog::completer'
750 ;; attempt to complete paths they assume exist, such as
751 ;; "/home", "/etc" or "/root" and fail.
753 "tst_qfiledialog") "|")
757 (invoke "cmake" "--install" ".")))
758 (replace 'patch-mkspecs
759 (lambda* (#:key outputs #:allow-other-keys)
760 (let* ((archdata (search-input-directory outputs "lib/qt6"))
761 (mkspecs (search-input-directory outputs
765 outputs "lib/qt6/mkspecs/features/qt_config.prf"))
768 outputs "lib/qt6/mkspecs/features/qt_functions.prf")))
769 ;; For each Qt module, let `qmake' uses search paths in the
770 ;; module directory instead of all in QT_INSTALL_PREFIX.
771 (substitute* qt_config.prf
772 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
773 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt6))")
774 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
775 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
776 (("\\$\\$\\[QT_HOST_LIBS\\]")
777 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
778 (("\\$\\$\\[QT_INSTALL_BINS\\]")
779 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
781 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
782 (substitute* qt_functions.prf
783 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
784 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
786 ;; Resolve qmake spec files within qtbase by absolute paths.
791 (string-append "lib/qt6/mkspecs/features/" file)))
792 '("device_config.prf" "moc.prf" "qt_build_config.prf"
794 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
795 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))))))
797 (modify-inputs (package-native-inputs qtbase-5)
802 (modify-inputs (package-inputs qtbase-5)
803 (prepend bash-minimal coreutils-minimal libxcb md4c)
804 (replace "postgresql" postgresql))) ;use latest postgresql
806 (list (search-path-specification
807 (variable "QMAKEPATH")
808 (files '("lib/qt6")))
809 (search-path-specification
810 (variable "QML2_IMPORT_PATH")
811 (files '("lib/qt6/qml")))
812 (search-path-specification
813 (variable "QT_PLUGIN_PATH")
814 (files '("lib/qt6/plugins")))
815 (search-path-specification
816 (variable "XDG_DATA_DIRS")
818 (search-path-specification
819 (variable "XDG_CONFIG_DIRS")
820 (files '("etc/xdg")))))))
822 (define-public qt5compat
828 (uri (qt-urls name version))
831 "1zbcaswpl79ixcxzj85qzjq73962s4c7316pibwfrskqswmwcgm4"))))
832 (build-system cmake-build-system)
835 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
836 #:phases #~(modify-phases %standard-phases
837 (add-after 'install 'delete-installed-tests
839 (delete-file-recursively
840 (string-append #$output "/tests")))))))
841 (native-inputs (list perl))
842 (inputs (list icu4c libxkbcommon qtbase qtdeclarative qtshadertools))
843 (home-page (package-home-page qtbase))
844 (synopsis "Legacy Qt 5 APIs ported to Qt 6")
845 (description "The @code{qt5compat} package includes application
846 programming interfaces (APIs) from Qt 5 that were ported to Qt 6, to ease
847 migration. It provides for example the @code{GraphicalEffects} module that
848 came with the @{qtgraphicaleffects} Qt 5 package.")
849 (license (list license:gpl2+ license:lgpl3+)))) ;dual licensed
851 (define-public qtsvg-5
858 (uri (qt-urls name version))
861 "0cdhmhxngv4y7kl5vbcii4l4anbz0hj7dvhlddy1agyl19j9xky4"))))
862 (propagated-inputs `())
863 (native-inputs (list perl))
865 (list mesa qtbase-5 zlib))
868 (modify-phases %standard-phases
869 (add-before 'configure 'configure-qmake
870 (lambda* (#:key inputs outputs #:allow-other-keys)
871 (let* ((out (assoc-ref outputs "out"))
872 (qtbase (assoc-ref inputs "qtbase"))
873 (tmpdir (string-append (getenv "TMPDIR")))
874 (qmake (string-append tmpdir "/qmake"))
875 (qt.conf (string-append tmpdir "/qt.conf")))
876 ;; Use qmake with a customized qt.conf to override install
878 (symlink (which "qmake") qmake)
879 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
880 (with-output-to-file qt.conf
886 Documentation=share/doc/qt5
889 LibraryExecutables=lib/qt5/libexec
892 Plugins=lib/qt5/plugins
893 Imports=lib/qt5/imports
894 Qml2Imports=lib/qt5/qml
895 Translations=share/qt5/translations
897 Examples=share/doc/qt5/examples
903 [EffectiveSourcePaths]
906 " out out qtbase))))))
908 (lambda* (#:key inputs outputs #:allow-other-keys)
909 ;; Valid QT_BUILD_PARTS variables are:
910 ;; libs tools tests examples demos docs translations
911 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
912 (add-before 'check 'set-display
914 ;; make Qt render "offscreen", required for tests
915 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
916 (synopsis "Qt module for displaying SVGs")
917 (description "The QtSvg module provides classes for displaying the
918 contents of SVG files.")))
926 (uri (qt-urls name version))
929 "1xvxz2jfpr1al85rhwss7ji5vkxa812d0b888hry5f7pwqcg86bv"))))
930 (build-system cmake-build-system)
933 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
935 #~(modify-phases %standard-phases
936 (add-before 'check 'set-display
938 ;; Make Qt render "offscreen", required for tests.
939 (setenv "QT_QPA_PLATFORM" "offscreen")))
940 (add-after 'install 'delete-installed-tests
942 (delete-file-recursively (string-append #$output "/tests")))))))
943 (native-inputs (list perl))
944 (inputs (list libxkbcommon mesa qtbase zlib))
945 (synopsis "Qt module for displaying SVGs")
946 (description "The QtSvg module provides classes for displaying the
947 contents of SVG files.")
948 (home-page (package-home-page qtbase))
949 (license (package-license qtbase))))
951 (define-public qtimageformats
952 (package (inherit qtsvg-5)
953 (name "qtimageformats")
957 (uri (qt-urls name version))
960 "1xjb2z2h1ajw7z9cwq8djpdvjwalpnmirwcwrlbjqv5r4ghmi82a"))
961 (modules '((guix build utils)))
964 (delete-file-recursively "src/3rdparty")))))
974 (synopsis "Additional Image Format plugins for Qt")
975 (description "The QtImageFormats module contains plugins for adding
976 support for MNG, TGA, TIFF and WBMP image formats.")))
978 (define-public qtx11extras
979 (package (inherit qtsvg-5)
984 (uri (qt-urls name version))
987 "0wxsrnnkkn68myy211rfz98brs7j3qmx3hmy097vh5avgsmw11bn"))))
989 (substitute-keyword-arguments (package-arguments qtsvg-5)
990 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
991 (native-inputs (list perl))
993 (list mesa qtbase-5))
994 (synopsis "Qt Extras for X11")
995 (description "The QtX11Extras module includes the library to access X11
996 from within Qt 5.")))
998 (define-public qtxmlpatterns
999 (package (inherit qtsvg-5)
1000 (name "qtxmlpatterns")
1004 (uri (qt-urls name version))
1007 "065vj1gk5i4cg0f9spksyb9ps4px0vssx262y77aakvw408vfmq5"))))
1009 (substitute-keyword-arguments (package-arguments qtsvg-5)
1011 `(modify-phases ,phases
1012 (add-after 'unpack 'disable-network-tests
1013 (lambda _ (substitute* "tests/auto/auto.pro"
1014 (("qxmlquery") "# qxmlquery")
1015 (("xmlpatterns ") "# xmlpatterns"))))
1016 (add-after 'unpack 'skip-qquickxmllistmodel-test
1017 (lambda _ (substitute* "tests/auto/auto.pro"
1018 ((".*qquickxmllistmodel.*") ""))))))))
1019 (native-inputs (list perl qtdeclarative-5))
1020 (inputs (list qtbase-5))
1021 (synopsis "Qt XML patterns module")
1022 (description "The QtXmlPatterns module is a XQuery and XPath engine for
1023 XML and custom data models. It contains programs such as xmlpatterns and
1024 xmlpatternsvalidator.")))
1026 (define-public qtdeclarative-5
1027 (package (inherit qtsvg-5)
1028 (name "qtdeclarative")
1032 (uri (qt-urls name version))
1035 "0ji5131g7h2mrgxw1wxc5mcvmsn3fbw64j28gzpa25gv3vcnkhaw"))))
1037 (substitute-keyword-arguments (package-arguments qtsvg-5)
1038 ((#:tests? _ #f) #f) ;TODO: Enable the tests
1040 `(modify-phases ,phases
1041 (add-after 'build 'fix-qt5core-install-prefix
1042 (lambda* (#:key outputs #:allow-other-keys)
1043 (let ((out (assoc-ref outputs "out")))
1044 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
1045 ;; is provided by qtdeclarative-5.
1047 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
1048 (("\\$\\{_qt5Core_install_prefix\\}") out)))))))))
1057 (list mesa qtbase-5))
1058 (synopsis "Qt QML module (Quick 2)")
1059 (description "The Qt QML module provides a framework for developing
1060 applications and libraries with the QML language. It defines and implements the
1061 language and engine infrastructure, and provides an API to enable application
1062 developers to extend the QML language with custom types and integrate QML code
1063 with JavaScript and C++.")))
1065 (define-public qtdeclarative
1067 (name "qtdeclarative")
1069 ;; TODO: Package 'masm' and unbundle from sources.
1072 (uri (qt-urls name version))
1075 "1s268fha3650dn1lqxf8jfa07wxpw09f6p7rjyiwq3w24d0nkrq3"))))
1076 (build-system cmake-build-system)
1079 #:configure-flags #~(list "-GNinja" ;about twice as fast!
1080 "-DQT_BUILD_TESTS=ON")
1082 #~(modify-phases %standard-phases
1083 (add-after 'unpack 'honor-cmake-install-rpath
1084 ;; The build system goes out of its way to compute a runpath it
1085 ;; thinks makes more sense, and fails. Revert to the default
1086 ;; behavior, which is to honor CMAKE_INSTALL_RPATH.
1088 (substitute* "src/qml/Qt6QmlMacros.cmake"
1089 (("set_target_properties.*PROPERTIES.*INSTALL_RPATH.*" all)
1090 (string-append "# " all)))))
1091 (add-after 'unpack 'patch-qlibraryinfo-paths
1093 ;; The QLibraryInfo paths are hard-coded to point to the qtbase
1094 ;; installation, but all the tools used in the test suite come
1095 ;; from this package.
1096 (substitute* (find-files "tests" "\\.cpp$")
1097 (("QLibraryInfo::path\\(QLibraryInfo::BinariesPath)")
1098 (string-append "QStringLiteral(\"" #$output "/bin\")"))
1099 (("QLibraryInfo::path\\(QLibraryInfo::LibraryExecutablesPath)")
1100 (string-append "QStringLiteral(\"" #$output
1101 "/lib/qt6/libexec\")"))
1102 (("QLibraryInfo::path\\(QLibraryInfo::QmlImportsPath)")
1103 (string-append "QStringLiteral(\"" #$output
1104 "/lib/qt6/qml\")")))))
1106 (lambda* (#:key parallel-build? #:allow-other-keys)
1107 (apply invoke "cmake" "--build" "."
1109 `("--parallel" ,(number->string (parallel-job-count)))
1111 (delete 'check) ;move after the install phase
1114 (invoke "cmake" "--install" ".")))
1115 (add-after 'install 'check
1116 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
1118 ;; The tests expect to find the modules provided by this
1119 ;; package; extend the environment variables needed to do so.
1120 ;(setenv "CMAKE_PREFIX_PATH" #$output)
1121 (setenv "QML2_IMPORT_PATH"
1122 (string-append #$output "/lib/qt6/qml"))
1123 (setenv "QT_PLUGIN_PATH"
1124 (string-append #$output "/lib/qt6/plugins:"
1125 (getenv "QT_PLUGIN_PATH")))
1126 (setenv "QT_QPA_PLATFORM" "offscreen")
1127 ;; Skip tests known to fail on GNU/Linux, in a CI context or
1128 ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
1129 ;; /tree/src/testlib/qtestblacklist.cpp).
1130 (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
1131 (setenv "HOME" "/tmp") ;a few tests require a writable HOME
1133 "ctest" "--output-on-failure"
1134 "-j" (if parallel-tests?
1135 (number->string (parallel-job-count))
1137 "-E" ;exclude some tests by regex
1142 ;; This test is marked as flaky upstream (see:
1143 ;; https://bugreports.qt.io/browse/QTBUG-101488).
1144 "tst_qquickfiledialogimpl"
1145 ;; These tests all fail because 'test_overlappingHandles'
1146 ;; (see: https://bugreports.qt.io/browse/QTBUG-95750).
1152 ;; Fails due to using the wrong lib/qt6/qml prefix:
1153 ;; "Warning: Failed to find the following builtins:
1154 ;; builtins.qmltypes, jsroot.qmltypes (so will use
1155 ;; qrc). Import paths used:
1156 ;; /gnu/store/...-qtbase-6.3.1/lib/qt6/qml"
1157 "tst_qmltc_qprocess"
1158 ;; These test fail when running qmlimportscanner; perhaps
1159 ;; an extra CMAKE_PREFIX_PATH location is missing to
1160 ;; correctly locate the imports.
1163 "cmake_tooling_imports"
1164 ;; This test seems to hangs for a long time, possibly
1165 ;; waiting for a killed process, which becomes a zombie in
1166 ;; the build container (perhaps solved after
1167 ;; fixing/applying #30948).
1168 "tst_qqmlpreview") "|")
1170 (add-after 'install 'delete-installed-tests
1172 (delete-file-recursively (string-append #$output "/tests")))))))
1184 (home-page (package-home-page qtbase))
1185 (synopsis "Qt QML module (Quick 2)")
1186 (description "The Qt QML module provides a framework for developing
1187 applications and libraries with the QML language. It defines and implements
1188 the language and engine infrastructure, and provides an API to enable
1189 application developers to extend the QML language with custom types and
1190 integrate QML code with JavaScript and C++.")
1191 (license (package-license qtbase))))
1193 (define-public qtconnectivity
1194 (package (inherit qtsvg-5)
1195 (name "qtconnectivity")
1199 (uri (qt-urls name version))
1202 "0b2dnxw1rjbp1srhgns148cwl99f50mx29588dal3avv0f73s597"))))
1204 (list perl pkg-config qtdeclarative-5))
1206 (list bluez qtbase-5))
1207 (synopsis "Qt Connectivity module")
1208 (description "The Qt Connectivity modules provides modules for interacting
1209 with Bluetooth and NFC.")))
1211 (define-public qtwebsockets-5
1212 (package (inherit qtsvg-5)
1213 (name "qtwebsockets")
1217 (uri (qt-urls name version))
1220 "0f120rfqnmlffjhrm5jbpipk1qsbzp1a2v3q8gz94hz6n9dqpav6"))))
1222 (substitute-keyword-arguments (package-arguments qtsvg-5)
1223 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1225 (list perl qtdeclarative-5))
1226 (inputs (list qtbase-5))
1227 (synopsis "Qt Web Sockets module")
1228 (description "WebSocket is a web-based protocol designed to enable two-way
1229 communication between a client application and a remote host. The Qt
1230 WebSockets module provides C++ and QML interfaces that enable Qt applications
1231 to act as a server that can process WebSocket requests, or a client that can
1232 consume data received from the server, or both.")))
1234 (define-public qtwebsockets
1236 (name "qtwebsockets")
1240 (uri (qt-urls name version))
1243 "06hj0pkdzjicmbiinjp1dk1ziz8cb3fgcwy7a0dxxjvzr680v64z"))))
1244 (build-system cmake-build-system)
1247 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1248 #:phases #~(modify-phases %standard-phases
1249 (delete 'check) ;move after install
1250 (add-after 'install 'prepare-for-tests
1252 (setenv "QT_QPA_PLATFORM" "offscreen")
1253 (setenv "QML2_IMPORT_PATH"
1254 (string-append #$output "/lib/qt6/qml:"
1255 (getenv "QML2_IMPORT_PATH")))))
1256 (add-after 'prepare-for-tests 'check
1257 (assoc-ref %standard-phases 'check))
1258 (add-after 'check 'delete-installed-tests
1260 (delete-file-recursively
1261 (string-append #$output "/tests")))))))
1262 (native-inputs (list perl))
1263 (inputs (list qtbase qtdeclarative))
1264 (synopsis "Qt Web Sockets module")
1265 (description "WebSocket is a web-based protocol designed to enable two-way
1266 communication between a client application and a remote host. The Qt
1267 WebSockets module provides C++ and QML interfaces that enable Qt applications
1268 to act as a server that can process WebSocket requests, or a client that can
1269 consume data received from the server, or both.")
1270 (home-page (package-home-page qtbase))
1271 (license (package-license qtbase))))
1273 (define-public qtsensors
1274 (package (inherit qtsvg-5)
1279 (uri (qt-urls name version))
1282 "0zlhm4js02niibb23rw87wf4ik0gy4ai08fwprnwy7zf4rm1ss3d"))))
1284 (substitute-keyword-arguments (package-arguments qtsvg-5)
1285 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
1287 `(modify-phases ,phases
1288 (add-after 'unpack 'fix-tests
1290 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
1291 (("2000") "5000") ;lengthen test timeout
1292 (("QTest::newRow(\"twist\") << \"twist\"") "")))))))) ;failing test
1294 (list perl qtdeclarative-5))
1295 (inputs (list qtbase-5))
1296 (synopsis "Qt Sensors module")
1297 (description "The Qt Sensors API provides access to sensor hardware via QML
1298 and C++ interfaces. The Qt Sensors API also provides a motion gesture
1299 recognition API for devices.")))
1301 (define-public qtmultimedia-5
1304 (name "qtmultimedia")
1308 (uri (qt-urls name version))
1311 "0q76iy1frcgm85mid17lh4p6gnn04n19n6zklgpv4w3md1ng97xw"))
1312 (modules '((guix build utils)))
1315 (delete-file-recursively
1316 "examples/multimedia/spectrum/3rdparty")
1317 ;; We also prevent the spectrum example from being built.
1318 (substitute* "examples/multimedia/multimedia.pro"
1319 (("spectrum") "#"))))))
1321 (substitute-keyword-arguments (package-arguments qtsvg-5)
1323 `(modify-phases ,phases
1325 (lambda* (#:key outputs #:allow-other-keys)
1326 (let ((out (assoc-ref outputs "out")))
1327 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
1328 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
1329 (string-append "PREFIX=" out)))))))
1330 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1332 (list perl pkg-config python qtdeclarative-5))
1338 ;; Gstreamer is needed for the mediaplayer plugin
1341 (synopsis "Qt Multimedia module")
1342 (description "The Qt Multimedia module provides set of APIs to play and
1343 record media, and manage a collection of media content. It also contains a
1344 set of plugins for interacting with pulseaudio and GStreamer.")))
1346 (define-public qtshadertools
1348 (name "qtshadertools")
1352 (uri (qt-urls name version))
1353 ;; Note: the source bundles *patched* glslang and SPIRV-Cross
1357 "0nj35s2z5n438q7nqf6bnj3slwz2am3169ck1ixwqa0mjrv73dsr"))))
1358 (build-system cmake-build-system)
1361 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1362 #:phases #~(modify-phases %standard-phases
1363 (add-before 'check 'prepare-for-tests
1365 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
1366 (native-inputs (list perl))
1367 (inputs (list glslang libxkbcommon qtbase))
1368 (home-page (package-home-page qtbase))
1369 (synopsis "Shader pipeline API and and tools for Qt")
1370 (description "The @code{qtshadertools} module provides APIs and tools
1371 supporting shader pipeline functionality as offered in Qt Quick to operate on
1372 Vulkan, OpenGL and other main graphic APIs.")
1373 (license (package-home-page qtbase))))
1375 (define-public qtmultimedia
1377 (name "qtmultimedia")
1381 (uri (qt-urls name version))
1384 "0dkk3lmzi2fs13cnj8q1lpcs6gghj219826gkwnzyd6nmlm280vy"))
1385 (modules '((guix build utils)))
1388 (delete-file-recursively
1389 "examples/multimedia/spectrum/3rdparty")
1390 ;; We also prevent the spectrum example from being built.
1391 (substitute* "examples/multimedia/multimedia.pro"
1392 (("spectrum") "#"))))))
1393 (build-system cmake-build-system)
1396 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON"
1397 "-DQT_FEATURE_pulseaudio=ON")
1399 #~(modify-phases %standard-phases
1400 (add-after 'unpack 'disable-integration-tests
1402 ;; XXX: The tst_qaudiodecoderbackend, tst_qaudiodevice,
1403 ;; tst_qaudiosource, tst_qmediaplayerbackend and
1404 ;; tst_qcamerabackend tests fail, presumably because they
1405 ;; require a functional pulseaudio daemon (which requires a dbus
1406 ;; session bus, which requires an X11 server, and then is still
1408 (substitute* "tests/auto/CMakeLists.txt"
1409 (("add_subdirectory\\(integration)") ""))))
1410 (add-before 'check 'prepare-for-tests
1412 (setenv "QT_QPA_PLATFORM" "offscreen")))
1413 (add-after 'install 'delete-installed-tests
1415 (delete-file-recursively (string-append #$output "/tests")))))))
1425 gst-plugins-base ;gstreamer-gl
1426 gst-plugins-good ;camera support, additional plugins
1427 gst-libav ;ffmpeg plugin
1433 (home-page (package-home-page qtbase))
1434 (synopsis "Qt Multimedia module")
1435 (description "The Qt Multimedia module provides set of APIs to play and
1436 record media, and manage a collection of media content. It also contains a
1437 set of plugins for interacting with pulseaudio and GStreamer.")
1438 (license (package-license qtbase))))
1440 (define-public qtwayland
1441 (package (inherit qtsvg-5)
1446 (uri (qt-urls name version))
1447 (patches (search-patches "qtwayland-gcc-11.patch"))
1450 "0yy8qf9kn15iqsxi2r7jbcsc0vsdyfz7bbxmfn4i9qmz1yvg0jgr"))))
1452 (substitute-keyword-arguments (package-arguments qtsvg-5)
1454 `(modify-phases ,phases
1455 (add-after 'unpack 'disable-failing-tests
1457 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
1458 ;; reason and breaks these two tests.
1459 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
1460 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
1461 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
1463 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
1465 (add-before 'check 'set-test-environment
1467 ;; Do not fail just because /etc/machine-id is missing.
1468 (setenv "DBUS_FATAL_WARNINGS" "0")))))))
1470 (list glib perl pkg-config qtdeclarative-5))
1484 (synopsis "Qt Wayland module")
1485 (description "The Qt Wayland module provides the QtWayland client and
1486 compositor libraries.")))
1488 (define-public qtserialport
1489 (package (inherit qtsvg-5)
1490 (name "qtserialport")
1494 (uri (qt-urls name version))
1497 "0xg2djwhrj5jqamawlp75g70nmwbp2ph2hh1pm45s36jkxm0k7al"))))
1498 (native-inputs (list perl))
1500 (list qtbase-5 eudev))
1502 (substitute-keyword-arguments (package-arguments qtsvg-5)
1504 `(modify-phases ,phases
1505 (add-after 'unpack 'patch-dlopen-paths
1506 (lambda* (#:key inputs #:allow-other-keys)
1507 (substitute* "src/serialport/qtudev_p.h"
1508 ;; Use the absolute paths for dynamically loaded libs,
1509 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1510 ;; typically is not set in guix.
1511 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1512 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))))))))
1513 (synopsis "Qt Serial Port module")
1514 (description "The Qt Serial Port module provides the library for
1515 interacting with serial ports from within Qt.")))
1517 (define-public qtserialbus
1518 (package (inherit qtsvg-5)
1519 (name "qtserialbus")
1523 (uri (qt-urls name version))
1526 "180gm1jvqfn0h3251zafdd1wd3af00phwaa5qljsbrj6s6ywj79j"))))
1528 (substitute-keyword-arguments (package-arguments qtsvg-5)
1529 ((#:phases phases '%standard-phases)
1530 `(modify-phases ,phases
1531 (add-after 'unpack 'patch-libsocketcan-reference
1532 (lambda* (#:key inputs #:allow-other-keys)
1533 (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
1534 (libcansocket.so (string-append libcansocket
1535 "/lib/libsocketcan.so")))
1536 (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
1537 (("QStringLiteral\\(\"socketcan\"\\)")
1538 (format #f "QStringLiteral(~s)" libcansocket.so))))))))))
1540 (list libsocketcan qtbase-5 qtserialport))
1541 (synopsis "Qt Serial Bus module")
1542 (description "The Qt Serial Bus API provides classes and functions to
1543 access the various industrial serial buses and protocols, such as CAN, ModBus,
1546 (define-public qtwebchannel-5
1547 (package (inherit qtsvg-5)
1548 (name "qtwebchannel")
1552 (uri (qt-urls name version))
1555 "1w8mcpdqlphgg3a6yfq18liwlj2nkwrafv0n80h242x5l2mk3ljf"))))
1557 (list perl qtdeclarative-5 qtwebsockets-5))
1558 (inputs (list qtbase-5))
1559 (synopsis "Web communication library for Qt")
1560 (description "The Qt WebChannel module enables peer-to-peer communication
1561 between the host (QML/C++ application) and the client (HTML/JavaScript
1562 application). The transport mechanism is supported out of the box by the two
1563 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1565 (define-public qtwebchannel
1567 (name "qtwebchannel")
1571 (uri (qt-urls name version))
1574 "0s16zx3qn3byldvhmsnwijm8rmizk8vpqj7fnwhjg6c67z10m8ma"))))
1575 (build-system cmake-build-system)
1578 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1579 #:phases #~(modify-phases %standard-phases
1580 (delete 'check) ;move after install
1581 (add-after 'install 'prepare-for-tests
1583 (setenv "QT_QPA_PLATFORM" "offscreen")
1584 (setenv "QML2_IMPORT_PATH"
1585 (string-append #$output "/lib/qt6/qml:"
1586 (getenv "QML2_IMPORT_PATH")))))
1587 (add-after 'prepare-for-tests 'check
1588 (assoc-ref %standard-phases 'check))
1589 (add-after 'check 'delete-installed-tests
1591 (delete-file-recursively
1592 (string-append #$output "/tests")))))))
1593 (native-inputs (list perl))
1594 (inputs (list qtbase qtdeclarative qtwebsockets))
1595 (home-page (package-home-page qtbase))
1596 (synopsis "Web communication library for Qt")
1597 (description "The Qt WebChannel module enables peer-to-peer communication
1598 between the host (QML/C++ application) and the client (HTML/JavaScript
1600 (license (package-license qtbase))))
1602 (define-public qtwebglplugin
1603 (package (inherit qtsvg-5)
1604 (name "qtwebglplugin")
1608 (uri (qt-urls name version))
1611 "1m0p4ssykw07lbip2qyv6w34f8ng13bxb63j0w446f5w0492nn9f"))))
1613 (substitute-keyword-arguments (package-arguments qtsvg-5)
1615 `(modify-phases ,phases
1616 (add-after 'unpack 'disable-network-tests
1617 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1618 (("webgl") "# webgl"))))))))
1621 (list mesa qtbase-5 qtdeclarative-5 qtwebsockets-5 zlib))
1622 (synopsis "QPA plugin for running an application via a browser using
1623 streamed WebGL commands")
1624 (description "Qt back end that uses WebGL for rendering. It allows Qt
1625 applications (with some limitations) to run in a web browser that supports
1626 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1627 compatible web browser without the use of plug-ins. The API is similar to
1628 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1630 (define-public qtwebview
1631 (package (inherit qtsvg-5)
1636 (uri (qt-urls name version))
1639 "0arwaky3jy5ql3z4d8f7k7diidzb1kncdans7pn50hsa1bzacfal"))))
1643 (list qtbase-5 qtdeclarative-5))
1644 (synopsis "Display web content in a QML application")
1645 (description "Qt WebView provides a way to display web content in a QML
1646 application without necessarily including a full web browser stack by using
1647 native APIs where it makes sense.")))
1649 (define-public qtlocation
1650 (package (inherit qtsvg-5)
1655 (uri (qt-urls name version))
1658 "0mlhhhcxx3gpr9kh04c6fljxcj50c2j21r0wb9f7d7nk4flip7b2"))))
1660 (substitute-keyword-arguments (package-arguments qtsvg-5)
1661 ((#:tests? _ #f) #f) ; TODO: Enable the tests
1663 `(modify-phases ,phases
1664 (add-before 'check 'pre-check
1666 (setenv "HOME" "/tmp")))))))
1668 (list perl qtdeclarative-5 qtquickcontrols-5 qtserialport))
1670 (list icu4c openssl qtbase-5 zlib))
1671 (synopsis "Qt Location and Positioning modules")
1672 (description "The Qt Location module provides an interface for location,
1673 positioning and geolocation plugins.")))
1675 (define-public qtlottie
1681 (uri (qt-urls name version))
1684 "1x8wmc6gwmxk92zjcsrbhrbqbfvnk7302ggghld5wk8jk5lsf2vl"))))
1685 (build-system cmake-build-system)
1688 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1690 #~(modify-phases %standard-phases
1691 (delete 'check) ;move after install
1692 (add-after 'install 'prepare-for-tests
1694 (setenv "QT_QPA_PLATFORM" "offscreen")
1695 (setenv "QML2_IMPORT_PATH"
1696 (string-append #$output "/lib/qt6/qml:"
1697 (getenv "QML2_IMPORT_PATH"))))))))
1698 (native-inputs (list perl))
1699 (inputs (list libxkbcommon qtbase qtdeclarative))
1700 (home-page (package-home-page qtbase))
1701 (synopsis "QML API for rendering Bodymovin graphics and animations")
1702 (description "Qt Lottie Animation provides a QML API for rendering
1703 graphics and animations that are exported in JSON format by the Bodymovin
1704 plugin for Adobe After Effects.")
1705 (license (package-license qtbase))))
1707 (define-public qttools-5
1708 (package (inherit qtsvg-5)
1713 (uri (qt-urls name version))
1716 "0v7wkzq9i8w3qrw0z8al7lb6clr57lfisyb1fm9cnhi73fvph1vd"))))
1718 (substitute-keyword-arguments (package-arguments qtsvg-5)
1719 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1721 (list perl qtdeclarative-5 vulkan-headers))
1723 (list mesa qtbase-5))
1724 (synopsis "Qt Tools and Designer modules")
1725 (description "The Qt Tools module provides a set of applications to browse
1726 the documentation, translate applications, generate help files and other stuff
1727 that helps in Qt development.")))
1729 (define-public qttools
1735 (uri (qt-urls name version))
1738 "1h96w4bzkbd80vr7lh6hnypdlmbzc1y52c2zrqzvkgm3587pa4n4"))))
1739 (build-system cmake-build-system)
1742 ;; The build system attempts to fetch online resources and fails when
1743 ;; building the test suite.
1744 #:configure-flags #~(list "-DQT_BUILD_TESTS=OFF")))
1745 (native-inputs (list perl qtdeclarative vulkan-headers))
1746 (inputs (list libxkbcommon mesa qtbase))
1747 (home-page (package-home-page qtbase))
1748 (synopsis "Qt Tools and Designer modules")
1749 (description "The Qt Tools module provides a set of applications to browse
1750 the documentation, translate applications, generate help files and other stuff
1751 that helps in Qt development.")
1752 ;; GPL 3 only with Qt GPL exception 1.0 (see:
1753 ;; LICENSES/Qt-GPL-exception-1.0.txt).
1754 (license (list license:gpl3))))
1756 (define-public qtscript
1757 (package (inherit qtsvg-5)
1762 (uri (qt-urls name version))
1765 "17yk0p8ci47xlfpllc17arlycng47wrnnskimskzz85bspabc8pm"))
1766 (patches (search-patches "qtscript-disable-tests.patch"))))
1768 (list perl qttools-5))
1771 (synopsis "Qt Script module")
1772 (description "Qt provides support for application scripting with ECMAScript.
1773 The following guides and references cover aspects of programming with
1774 ECMAScript and Qt.")))
1776 (define-public qtquickcontrols-5
1777 (package (inherit qtsvg-5)
1778 (name "qtquickcontrols")
1782 (uri (qt-urls name version))
1785 "0mjw25wcgd2bvjz9rr4qjydb423c63615rcx1vws4jmydqdihssr"))))
1787 (substitute-keyword-arguments (package-arguments qtsvg-5)
1788 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1790 (list qtbase-5 qtdeclarative-5))
1791 (synopsis "Qt Quick Controls and other Quick modules")
1792 (description "The QtScript module provides classes for making Qt
1793 applications scriptable. This module provides a set of extra components that
1794 can be used to build complete interfaces in Qt Quick.")))
1796 (define-public qtquickcontrols2-5
1797 (package (inherit qtsvg-5)
1798 (name "qtquickcontrols2")
1802 (uri (qt-urls name version))
1805 "1cxg4ml07k1zcyi5m4lx06sz8f5l67isb5vhk7nakxm0wnn7p8y4"))))
1807 (substitute-keyword-arguments (package-arguments qtsvg-5)
1808 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1810 (list qtbase-5 qtdeclarative-5))
1811 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1812 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1813 module that provides platform integration: native dialogs, menus and menu bars,
1814 and tray icons. It falls back to Qt Widgets when a native implementation is
1817 (define-public qtquickcontrols2
1818 ;; qtquickcontrols2 still exist, but was merged into qtdeclarative.
1819 ;; Unfortunately that hasn't been well communicated at all (see:
1820 ;; https://bugreports.qt.io/browse/QTBUG-79454).
1821 (deprecated-package "qtquickcontrols2" qtdeclarative))
1823 (define-public qtgraphicaleffects
1824 (package (inherit qtsvg-5)
1825 (name "qtgraphicaleffects")
1829 (uri (qt-urls name version))
1832 "0xznn5zqp6xrqfgl54l8cig9asqf9m2hz0p3ga514rh8spmdazr3"))))
1834 (substitute-keyword-arguments (package-arguments qtsvg-5)
1835 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1837 (list qtbase-5 qtdeclarative-5))
1838 (synopsis "Qt Graphical Effects module")
1839 (description "The Qt Graphical Effects module provides a set of QML types
1840 for adding visually impressive and configurable effects to user interfaces.
1841 Effects are visual items that can be added to Qt Quick user interface as UI
1842 components. The API consists of over 20 effects provided as separate QML
1843 types. The effects cover functional areas such as blending, masking, blurring,
1844 coloring, and many more.")))
1846 (define-public qtgamepad
1847 (package (inherit qtsvg-5)
1852 (uri (qt-urls name version))
1855 "0wa4d8f025hlp4bmdzdy5wcahm9wjg6bkwig8dpw9nrsj3idz5b0"))))
1857 (list perl pkg-config))
1859 `(("fontconfig" ,fontconfig)
1860 ("freetype" ,freetype)
1861 ("libxrender" ,libxrender)
1863 ("qtbase" ,qtbase-5)
1864 ("qtdeclarative-5" ,qtdeclarative-5)))
1865 (synopsis "Qt Gamepad module")
1866 (description "The Qt Gamepad module is an add-on library that enables Qt
1867 applications to support the use of gamepad hardware and in some cases remote
1868 control equipment. The module provides both QML and C++ interfaces. The
1869 primary target audience are embedded devices with fullscreen user interfaces,
1870 and mobile applications targeting TV-like form factors.")))
1872 (define-public qtscxml
1873 (package (inherit qtsvg-5)
1878 (uri (qt-urls name version))
1881 "0xf5mqsrw16h8xjglymgfc8qg2qa5bi4fgdl4j3dkhvvpr7vrphp"))
1882 (modules '((guix build utils)))
1885 (delete-file-recursively "tests/3rdparty")
1886 ;; the scion test refers to the bundled 3rd party test code.
1887 (substitute* "tests/auto/auto.pro"
1888 (("scion") "#"))))))
1890 (substitute-keyword-arguments (package-arguments qtsvg-5)
1891 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1893 (list qtbase-5 qtdeclarative-5))
1894 (synopsis "Qt SCXML module")
1895 (description "The Qt SCXML module provides functionality to create state
1896 machines from SCXML files. This includes both dynamically creating state
1897 machines (loading the SCXML file and instantiating states and transitions) and
1898 generating a C++ file that has a class implementing the state machine. It
1899 also contains functionality to support data models and executable content.")))
1901 (define-public qtpositioning
1903 (name "qtpositioning")
1907 (uri (qt-urls name version))
1910 "0v78wamvdw02kf9rq7m5v24q2g6jmgq4ch0fnfa014p1r978wy06"))))
1911 (build-system cmake-build-system)
1914 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1915 #:phases #~(modify-phases %standard-phases
1916 (add-after 'install 'delete-installed-tests
1918 (delete-file-recursively
1919 (string-append #$output "/tests")))))))
1920 (inputs (list perl qtbase))
1921 (home-page (package-home-page qtbase))
1922 (synopsis "QML and C++ positioning information API")
1923 (description "The Qt Positioning API provides positioning information via
1924 QML and C++ interfaces. The Qt Positioning API lets you to determine a
1925 position by using a variety of possible sources, including satellite, wifi, or
1926 text files. That information can then be used to, for example, determine a
1927 position on a map. In addition, you can use to the API to retrieve satellite
1928 information and perform area based monitoring.")
1929 (license (package-license qtbase))))
1931 (define-public qtpurchasing
1932 (package (inherit qtsvg-5)
1933 (name "qtpurchasing")
1937 (uri (qt-urls name version))
1940 "04z6mwzn73gg56hgs7gividinfgndx4kmcnp7w6h3wamrdlkfdx7"))))
1942 (list qtbase-5 qtdeclarative-5))
1943 (synopsis "Qt Purchasing module")
1944 (description "The Qt Purchasing module provides and in-app API for
1945 purchasing goods and services.")))
1947 (define-public qtcharts
1948 (package (inherit qtsvg-5)
1953 (uri (qt-urls name version))
1956 "0y051i1837bfybkf8cm7cx8k5wjmbi47pxawaaz6wm0hd2z5b4qi"))))
1958 (substitute-keyword-arguments (package-arguments qtsvg-5)
1960 `(modify-phases ,phases
1961 (add-after 'unpack 'remove-failing-test
1963 (substitute* "tests/auto/auto.pro"
1965 (("qml-qtquicktest") "# qml-qtquicktest"))))))))
1967 (list qtbase-5 qtdeclarative-5))
1968 (synopsis "Qt Charts module")
1969 (description "The Qt Charts module provides a set of easy to use chart
1970 components. It uses the Qt Graphics View Framework, therefore charts can be
1971 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1972 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1973 selecting one of the charts themes.")
1974 (license license:gpl3)))
1976 (define-public qtdatavis3d
1977 (package (inherit qtsvg-5)
1978 (name "qtdatavis3d")
1982 (uri (qt-urls name version))
1985 "0sczwqlc36jdywf7bqxz0hm6mr7fn8p1fsnc33jliiqzn9yrg77x"))))
1987 (substitute-keyword-arguments (package-arguments qtsvg-5)
1988 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1990 (list qtbase-5 qtdeclarative-5))
1991 (synopsis "Qt Data Visualization module")
1992 (description "The Qt Data Visualization module provides a way to visualize
1993 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1994 visualizing depth maps and large quantities of rapidly changing data, such as
1995 data received from multiple sensors. The look and feel of graphs can be
1996 customized by using themes or by adding custom items and labels to them.")
1997 (license license:gpl3)))
1999 (define-public qtnetworkauth-5
2000 (package (inherit qtsvg-5)
2001 (name "qtnetworkauth")
2005 (uri (qt-urls name version))
2008 "0c7mz715rlpg0cqgs6s0aszmslyamkhnpamc1iij6i571sj5j2f1"))))
2011 (synopsis "Qt Network Authorization module")
2012 (description "The Qt Network Authorization module provides an
2013 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
2015 (define-public qtnetworkauth
2017 (name "qtnetworkauth")
2021 (uri (qt-urls name version))
2024 "0apvsb2ip1m3kw8vi9spvf6f6q72ys8vr40rpyysi7shsjwm83yn"))))
2025 (build-system cmake-build-system)
2026 (arguments (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")))
2027 (native-inputs (list perl))
2028 (inputs (list qtbase))
2029 (home-page (package-home-page qtbase))
2030 (synopsis "Qt Network Authorization module")
2031 (description "The Qt Network Authorization module provides an
2032 implementation of OAuth and OAuth2 authenticathon methods for Qt.")
2033 (license (package-license qtbase))))
2035 (define-public qtremoteobjects
2036 (package (inherit qtsvg-5)
2037 (name "qtremoteobjects")
2041 (uri (qt-urls name version))
2044 "1m0xcqlbxsfn0cd4ajin1h3i4l51dajmkw91v0r4a61xi14i0kks"))))
2046 (substitute-keyword-arguments (package-arguments qtsvg-5)
2048 `(modify-phases ,phases
2049 (add-after 'unpack 'remove-failing-test
2051 ;; This test can't find its imports.
2052 (substitute* "tests/auto/qml/qml.pro"
2053 (("integration") "# integration")
2054 (("usertypes") "# usertypes"))
2055 ;; disable failing tests: they need network
2056 (substitute* "tests/auto/auto.pro"
2057 (("integration_multiprocess proxy_multiprocess integration_external restart")
2058 "integration_multiprocess"))))))))
2060 (list qtbase-5 qtdeclarative-5))
2061 (synopsis "Qt Remote Objects module")
2062 (description "The Qt Remote Objects module is an @dfn{inter-process
2063 communication} (IPC) module developed for Qt. The idea is to extend existing
2064 Qt's functionalities to enable an easy exchange of information between
2065 processes or computers.")))
2067 (define-public qtspeech
2068 (package (inherit qtsvg-5)
2073 (uri (qt-urls name version))
2076 "0xskp9dzjy5nqszygk8gwvjyiylgynx5sq3nk2vi3zwgfdh5jpm4"))))
2078 (substitute-keyword-arguments (package-arguments qtsvg-5)
2079 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2083 (list perl qtdeclarative-5 qtmultimedia-5 qtxmlpatterns))
2084 (synopsis "Qt Speech module")
2085 (description "The Qt Speech module enables a Qt application to support
2086 accessibility features such as text-to-speech, which is useful for end-users
2087 who are visually challenged or cannot access the application for whatever
2088 reason. The most common use case where text-to-speech comes in handy is when
2089 the end-user is driving and cannot attend the incoming messages on the phone.
2090 In such a scenario, the messaging application can read out the incoming
2093 (define-public qtspell
2101 (url "https://github.com/manisandro/qtspell")
2103 (file-name (git-file-name name version))
2105 (base32 "19ff6jzm699wrxrk57w3d4kl9qxgdipdikpwls9n4aqv4mw7g969"))))
2106 (build-system cmake-build-system)
2108 `(#:tests? #f)) ;no test
2110 (list pkg-config qttools-5))
2112 (list enchant qtbase-5))
2113 (home-page "https://github.com/manisandro/qtspell")
2114 (synopsis "Spell checking for Qt text widgets")
2116 "QtSpell adds spell-checking functionality to Qt's text widgets,
2117 using the Enchant spell-checking library.")
2118 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
2119 (license license:gpl2+)))
2121 (define-public qtwebengine-5
2124 (name "qtwebengine")
2129 (uri (qt-urls name version))
2132 "0zahr9w6rqdxwh2whsgk3fhcszs7wa9j95lq4sqi8xzin2wcgl17"))
2133 (modules '((ice-9 ftw)
2137 (guix build utils)))
2140 (let ((preserved-third-party-files
2141 '("base/third_party/double_conversion"
2142 "base/third_party/cityhash"
2143 "base/third_party/cityhash_v103"
2144 "base/third_party/dynamic_annotations"
2145 "base/third_party/icu"
2146 "base/third_party/libevent"
2147 "base/third_party/nspr"
2148 "base/third_party/superfasthash"
2149 "base/third_party/symbolize"
2150 "base/third_party/xdg_mime"
2151 "base/third_party/xdg_user_dirs"
2152 "net/third_party/mozilla_security_manager"
2153 "net/third_party/nss"
2154 "net/third_party/quiche"
2155 "net/third_party/uri_template"
2156 "third_party/abseil-cpp"
2158 "third_party/angle/src/common/third_party/base"
2159 "third_party/angle/src/common/third_party/smhasher"
2160 "third_party/angle/src/common/third_party/xxhash"
2161 "third_party/angle/src/third_party/compiler"
2162 "third_party/axe-core"
2164 "third_party/boringssl"
2165 "third_party/boringssl/src/third_party/fiat"
2166 "third_party/breakpad"
2167 "third_party/brotli"
2168 "third_party/catapult/common/py_vulcanize/py_vulcanize"
2169 "third_party/catapult/common/py_vulcanize/third_party"
2170 "third_party/catapult/third_party/beautifulsoup4"
2171 "third_party/catapult/third_party/html5lib-python"
2172 "third_party/catapult/third_party/polymer/components"
2173 "third_party/catapult/tracing"
2174 "third_party/catapult/tracing/third_party"
2177 "third_party/closure_compiler"
2178 "third_party/crashpad"
2179 "third_party/crashpad/crashpad/third_party/lss"
2180 "third_party/crashpad/crashpad/third_party/zlib"
2181 "third_party/crc32c"
2184 "third_party/devtools-frontend"
2185 "third_party/devtools-frontend/src/front_end/third_party"
2186 "third_party/devtools-frontend/src/third_party/typescript"
2187 "third_party/emoji-segmenter"
2188 "third_party/ffmpeg"
2189 "third_party/googletest"
2190 "third_party/harfbuzz-ng/utils"
2191 "third_party/hunspell"
2192 "third_party/iccjpeg"
2194 "third_party/inspector_protocol"
2195 "third_party/jinja2"
2196 "third_party/jsoncpp"
2197 "third_party/jstemplate"
2198 "third_party/khronos"
2199 "third_party/leveldatabase"
2200 "third_party/libaddressinput"
2201 "third_party/libavif"
2202 "third_party/libgifcodec"
2203 "third_party/libjingle_xmpp"
2204 "third_party/libjpeg_turbo"
2205 "third_party/libpng"
2206 "third_party/libsrtp"
2207 "third_party/libsync"
2208 "third_party/libudev"
2209 "third_party/libvpx"
2210 "third_party/libwebm"
2211 "third_party/libwebp"
2212 "third_party/libxml"
2213 "third_party/libxslt"
2214 "third_party/libyuv"
2215 "third_party/lottie"
2218 "third_party/markupsafe"
2219 "third_party/mesa_headers"
2220 "third_party/metrics_proto"
2221 "third_party/modp_b64"
2224 "third_party/one_euro_filter"
2225 "third_party/openh264/src/codec/api/svc"
2228 "third_party/pdfium"
2229 "third_party/pdfium/third_party/agg23"
2230 "third_party/pdfium/third_party/base"
2231 "third_party/pdfium/third_party/freetype"
2232 "third_party/pdfium/third_party/lcms"
2233 "third_party/pdfium/third_party/libopenjpeg20"
2234 "third_party/pdfium/third_party/skia_shared"
2235 "third_party/perfetto"
2238 "third_party/polymer"
2239 "third_party/protobuf"
2240 "third_party/protobuf/third_party/six"
2241 "third_party/pyjson5"
2243 "third_party/rnnoise"
2245 "third_party/skia/include/third_party/skcms/skcms.h"
2246 "third_party/skia/include/third_party/vulkan"
2247 "third_party/skia/third_party/skcms"
2248 "third_party/smhasher"
2249 "third_party/snappy"
2250 "third_party/sqlite"
2251 "third_party/usb_ids"
2252 "third_party/usrsctp"
2253 "third_party/vulkan_memory_allocator"
2254 "third_party/web-animations-js"
2255 "third_party/webrtc"
2256 "third_party/webrtc/common_audio/third_party/ooura/fft_size_128"
2257 "third_party/webrtc/common_audio/third_party/ooura/fft_size_256"
2258 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2259 "third_party/webrtc/modules/third_party/fft"
2260 "third_party/webrtc/modules/third_party/g711"
2261 "third_party/webrtc/modules/third_party/g722"
2262 "third_party/webrtc/rtc_base/third_party/base64"
2263 "third_party/webrtc/rtc_base/third_party/sigslot"
2264 "third_party/webrtc_overrides"
2265 "third_party/widevine/cdm/widevine_cdm_common.h"
2266 "third_party/widevine/cdm/widevine_cdm_version.h"
2268 "third_party/xcbproto"
2270 "url/third_party/mozilla"
2271 "v8/src/third_party/utf8-decoder"
2272 "v8/src/third_party/valgrind"
2273 "v8/src/third_party/siphash"
2274 "v8/third_party/v8/builtins"
2275 "v8/third_party/inspector_protocol"))
2276 (protected (make-regexp "\\.(gn|gyp)i?$")))
2277 (define preserved-club
2278 (map (lambda (member)
2279 (string-append "./" member))
2280 preserved-third-party-files))
2281 (define (empty? dir)
2282 (equal? (scandir dir) '("." "..")))
2283 (define (third-party? file)
2284 (string-contains file "third_party/"))
2285 (define (useless? file)
2286 (any (cute string-suffix? <> file)
2287 '(".zip" ".so" ".dll" ".exe" ".jar")))
2288 (define (parents child)
2289 ;; Return all parent directories of CHILD up to and including
2290 ;; the closest "third_party".
2291 (let* ((dirs (match (string-split child #\/)
2292 ((dirs ... last) dirs)))
2293 (closest (list-index (lambda (dir)
2294 (string=? "third_party" dir))
2296 (delim (- (length dirs) closest)))
2297 (fold (lambda (dir prev)
2298 (cons (string-append (car prev) "/" dir)
2300 (list (string-join (list-head dirs delim) "/"))
2301 (list-tail dirs delim))))
2302 (define (remove-loudly file)
2303 (format #t "deleting ~a...~%" file)
2306 (define (delete-unwanted-files child stat flag base level)
2308 ((or 'regular 'symlink 'stale-symlink)
2309 (when (third-party? child)
2310 (unless (or (member child preserved-club)
2311 (any (cute member <> preserved-club)
2313 (regexp-exec protected child))
2314 (remove-loudly child)))
2315 (when (and (useless? child) (file-exists? child))
2316 (remove-loudly child))
2318 ('directory-processed
2319 (when (empty? child)
2324 (with-directory-excursion "src/3rdparty"
2325 ;; TODO: Try removing "gn" too for future versions of qtwebengine-5.
2326 (delete-file-recursively "ninja")
2328 (with-directory-excursion "chromium"
2329 ;; Delete bundled software and binaries that were not explicitly
2331 (nftw "." delete-unwanted-files 'depth 'physical)
2333 ;; Assert that each preserved item is present to catch removals.
2334 (for-each (lambda (third-party)
2335 (unless (file-exists? third-party)
2336 (error (format #f "~s does not exist!~%" third-party))))
2339 ;; Use relative header locations instead of hard coded ones.
2341 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2342 (("base/third_party/valgrind") "valgrind"))
2344 '("third_party/breakpad/breakpad/src/common/linux/http_upload.cc"
2345 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h")
2346 (("third_party/curl") "curl"))
2348 '("components/viz/common/gpu/vulkan_context_provider.h"
2349 "components/viz/common/resources/resource_format_utils.h"
2350 "gpu/config/gpu_info_collector_win.cc"
2351 "gpu/config/gpu_util.cc"
2352 "gpu/config/vulkan_info.h")
2353 (("third_party/vulkan_headers/include/")
2356 ;; Replace Google Analytics bundle with an empty file and hope
2358 (mkdir-p "third_party/analytics")
2359 (call-with-output-file
2360 "third_party/analytics/google-analytics-bundle.js"
2363 ;; Do not enable support for loading the Widevine DRM plugin.
2364 (substitute* "src/buildtools/config/common.pri"
2365 (("enable_widevine=true")
2366 "enable_widevine=false")))))))
2367 (build-system gnu-build-system)
2404 ;; FIXME: libxml2 needs to built with icu support though it links to
2405 ;; libxml2 configure summary still states "Checking for compatible
2406 ;; system libxml2... no"
2431 (substitute-keyword-arguments (package-arguments qtsvg-5)
2432 ((#:modules modules '())
2433 `((guix build gnu-build-system)
2435 (ice-9 textual-ports)))
2437 `(modify-phases ,phases
2438 (add-before 'configure 'substitute-source
2439 (lambda* (#:key inputs outputs #:allow-other-keys)
2440 (let ((out (assoc-ref outputs "out")))
2441 (with-atomic-file-replacement
2442 "src/buildtools/config/linux.pri"
2444 (display (get-string-all in) out)
2445 (display "\ngn_args += use_system_openh264=true\n" out)))
2446 ;; Qtwebengine is not installed into the same prefix as
2447 ;; qtbase. Some qtbase QTLibraryInfo constants will not
2448 ;; work. Replace with the full path to the qtwebengine-5
2449 ;; translations and locales in the store.
2450 (substitute* "src/core/web_engine_library_info.cpp"
2451 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
2452 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
2453 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
2454 (string-append "QLatin1String(\"" out "/share/qt5\")")))
2455 ;; Substitute full dynamic library path for nss.
2456 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2458 (search-input-file inputs "lib/nss/libnssckbi.so")))
2459 ;; Substitute full dynamic library path for udev.
2460 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2462 (search-input-file inputs "lib/libudev.so.1"))))))
2463 (add-before 'configure 'set-env
2465 ;; Avoids potential race conditions.
2466 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2467 (setenv "NINJAFLAGS"
2468 (string-append "-k1" ;less verbose build output
2469 ;; Respect the '--cores' option of 'guix build'.
2470 " -j" (number->string (parallel-job-count))))))
2473 ;; Valid QT_BUILD_PARTS variables are:
2474 ;; libs tools tests examples demos docs translations
2475 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
2476 "--webengine-printing-and-pdf=no"
2477 "--webengine-ffmpeg=system"
2478 ;; FIXME: Building qtwebengine-5 5.12.2 with
2479 ;; icu4c >= 68 fails.
2480 ;;"--webengine-icu=system"
2481 "--webengine-pepper-plugins=no"
2482 "-webengine-proprietary-codecs")))))
2483 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
2484 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
2485 ;; before running tests.
2486 ((#:tests? _ #f) #f)))
2487 (native-search-paths
2488 (list (search-path-specification
2489 (file-type 'regular)
2491 (variable "QTWEBENGINEPROCESS_PATH")
2492 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
2493 (home-page "https://wiki.qt.io/QtWebEngine")
2494 (synopsis "Qt WebEngine module")
2495 (description "The Qt5WebEngine module provides support for web applications
2496 using the Chromium browser project. The Chromium source code has Google services
2497 and binaries removed, and adds modular support for using system libraries.")
2498 (license license:lgpl2.1+)))
2500 (define-public qtwebengine
2502 (name "qtwebengine")
2507 (uri (qt-urls name version))
2510 "0ivfsqd5c0cxsnssj6z37901cf6a47w50zaqgjiysvcm3ar36ymd"))
2511 (modules '((ice-9 ftw)
2515 (guix build utils)))
2518 (let ((preserved-third-party-files
2519 '("base/third_party/double_conversion"
2520 "base/third_party/cityhash"
2521 "base/third_party/cityhash_v103"
2522 "base/third_party/dynamic_annotations"
2523 "base/third_party/icu"
2524 "base/third_party/libevent"
2525 "base/third_party/nspr"
2526 "base/third_party/superfasthash"
2527 "base/third_party/symbolize"
2528 "base/third_party/xdg_mime"
2529 "base/third_party/xdg_user_dirs"
2530 "net/third_party/mozilla_security_manager"
2531 "net/third_party/nss"
2532 "net/third_party/quiche"
2533 "net/third_party/uri_template"
2534 "third_party/abseil-cpp"
2536 "third_party/angle/src/common/third_party/base"
2537 "third_party/angle/src/common/third_party/smhasher"
2538 "third_party/angle/src/common/third_party/xxhash"
2539 "third_party/axe-core"
2541 "third_party/boringssl"
2542 "third_party/boringssl/src/third_party/fiat"
2543 "third_party/breakpad"
2544 "third_party/brotli"
2547 "third_party/closure_compiler"
2548 "third_party/crashpad"
2549 "third_party/crashpad/crashpad/third_party/lss"
2550 "third_party/crashpad/crashpad/third_party/zlib"
2551 "third_party/crc32c"
2554 "third_party/devtools-frontend"
2555 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
2556 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
2557 "third_party/emoji-segmenter"
2558 "third_party/ffmpeg"
2559 "third_party/googletest"
2560 "third_party/harfbuzz-ng/utils"
2561 "third_party/hunspell"
2562 "third_party/iccjpeg"
2564 "third_party/inspector_protocol"
2565 "third_party/jinja2"
2566 "third_party/jsoncpp"
2567 "third_party/jstemplate"
2568 "third_party/khronos"
2569 "third_party/leveldatabase"
2570 "third_party/libaddressinput"
2571 "third_party/libgifcodec"
2572 "third_party/libjingle_xmpp"
2573 "third_party/libjpeg_turbo"
2574 "third_party/libpng"
2575 "third_party/libsrtp"
2576 "third_party/libsync"
2577 "third_party/libudev"
2578 "third_party/libvpx"
2579 "third_party/libwebm"
2580 "third_party/libwebp"
2581 "third_party/libxml"
2582 "third_party/libxslt"
2583 "third_party/libyuv"
2586 "third_party/markupsafe"
2587 "third_party/mesa_headers"
2588 "third_party/metrics_proto"
2589 "third_party/modp_b64"
2591 "third_party/one_euro_filter"
2592 "third_party/openh264/src/codec/api/svc"
2595 "third_party/pdfium"
2596 "third_party/pdfium/third_party/agg23"
2597 "third_party/pdfium/third_party/base"
2598 "third_party/pdfium/third_party/freetype"
2599 "third_party/pdfium/third_party/lcms"
2600 "third_party/pdfium/third_party/libopenjpeg20"
2601 "third_party/pdfium/third_party/skia_shared"
2602 "third_party/perfetto"
2605 "third_party/polymer"
2606 "third_party/protobuf"
2607 "third_party/protobuf/third_party/six"
2608 "third_party/pyjson5"
2610 "third_party/rnnoise"
2612 "third_party/skia/include/third_party/skcms/skcms.h"
2613 "third_party/skia/include/third_party/vulkan"
2614 "third_party/skia/third_party/skcms"
2615 "third_party/skia/third_party/vulkanmemoryallocator"
2616 "third_party/smhasher"
2617 "third_party/snappy"
2618 "third_party/sqlite"
2619 "third_party/usb_ids"
2620 "third_party/usrsctp"
2621 "third_party/web-animations-js"
2622 "third_party/webrtc"
2623 "third_party/webrtc/common_audio/third_party/ooura"
2624 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2625 "third_party/webrtc/modules/third_party/fft"
2626 "third_party/webrtc/modules/third_party/g711"
2627 "third_party/webrtc/modules/third_party/g722"
2628 "third_party/webrtc/rtc_base/third_party/base64"
2629 "third_party/webrtc/rtc_base/third_party/sigslot"
2630 "third_party/webrtc_overrides"
2631 "third_party/widevine/cdm/widevine_cdm_common.h"
2632 "third_party/widevine/cdm/widevine_cdm_version.h"
2635 "url/third_party/mozilla"
2636 "v8/src/third_party/utf8-decoder"
2637 "v8/src/third_party/valgrind"
2638 "v8/src/third_party/siphash"
2639 "v8/third_party/v8/builtins"
2640 "v8/third_party/inspector_protocol"))
2641 (protected (make-regexp "\\.(gn|gyp)i?$")))
2642 (define preserved-club
2643 (map (lambda (member)
2644 (string-append "./" member))
2645 preserved-third-party-files))
2646 (define (empty? dir)
2647 (equal? (scandir dir) '("." "..")))
2648 (define (third-party? file)
2649 (string-contains file "third_party/"))
2650 (define (useless? file)
2651 (any (cute string-suffix? <> file)
2652 '(".zip" ".so" ".dll" ".exe" ".jar")))
2653 (define (parents child)
2654 ;; Return all parent directories of CHILD up to and including
2655 ;; the closest "third_party".
2656 (let* ((dirs (match (string-split child #\/)
2657 ((dirs ... last) dirs)))
2658 (closest (list-index (lambda (dir)
2659 (string=? "third_party" dir))
2661 (delim (- (length dirs) closest)))
2662 (fold (lambda (dir prev)
2663 (cons (string-append (car prev) "/" dir)
2665 (list (string-join (list-head dirs delim) "/"))
2666 (list-tail dirs delim))))
2667 (define (remove-loudly file)
2668 (format #t "deleting ~a...~%" file)
2671 (define (delete-unwanted-files child stat flag base level)
2673 ((or 'regular 'symlink 'stale-symlink)
2674 (when (third-party? child)
2675 (unless (or (member child preserved-club)
2676 (any (cute member <> preserved-club)
2678 (regexp-exec protected child))
2679 (remove-loudly child)))
2680 (when (and (useless? child) (file-exists? child))
2681 (remove-loudly child)))
2682 ('directory-processed
2683 (when (empty? child)
2687 (with-directory-excursion "src/3rdparty"
2688 (delete-file-recursively "ninja")
2690 (with-directory-excursion "chromium"
2691 ;; Delete bundled software and binaries that were not
2692 ;; explicitly preserved above.
2693 (nftw "." delete-unwanted-files 'depth 'physical)
2695 ;; Assert that each preserved item is present to catch
2697 (for-each (lambda (third-party)
2698 (unless (file-exists? third-party)
2699 (error (format #f "~s does not exist!~%"
2703 ;; Use relative header locations instead of hard coded ones.
2705 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2706 (("base/third_party/valgrind") "valgrind"))
2707 (substitute* "third_party/breakpad/breakpad/src/common/\
2708 linux/libcurl_wrapper.h"
2709 (("third_party/curl") "curl"))
2711 '("components/viz/common/gpu/vulkan_context_provider.h"
2712 "gpu/config/gpu_util.cc")
2713 (("third_party/vulkan/include/")
2716 ;; Replace Google Analytics bundle with an empty file and
2717 ;; hope no one notices.
2718 (mkdir-p "third_party/analytics")
2719 (call-with-output-file
2720 "third_party/analytics/google-analytics-bundle.js"
2723 ;; Do not enable support for loading the Widevine DRM plugin.
2724 (substitute* "src/core/CMakeLists.txt"
2725 (("enable_widevine=true")
2726 "enable_widevine=false")))))))
2727 (build-system cmake-build-system)
2730 ;; XXX: The test suite is not built by default; leave it off to save
2731 ;; some build time and resources.
2734 ;; Use the CMake ninja generator, otherwise the build fails (see:
2735 ;; https://bugreports.qt.io/browse/QTBUG-96897).
2737 ;; Manually add the NSS library prefix to the linker
2738 ;; search path, otherwise it fails to be linked (see:
2739 ;; https://bugreports.qt.io/browse/QTBUG-105053).
2740 (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-L"
2741 (search-input-directory %build-inputs "lib/nss"))
2743 ;; The PDF renderer plugin fails to build with errors such as
2744 ;; "src/3rdparty/chromium/components/pdf
2745 ;; /renderer/pdf_accessibility_tree.cc:1373:39:
2746 ;; error: use of undeclared identifier 'IDS_PDF_PAGE_INDEX'";
2748 "-DQT_FEATURE_webengine_printing_and_pdf=OFF"
2749 "-DQT_FEATURE_webengine_pepper_plugins=OFF" ;widevine
2750 "-DQT_FEATURE_system_ffmpeg=ON"
2751 ;; Do not artificially limit codec support; video decoding is
2753 "-DQT_FEATURE_webengine_proprietary_codecs=ON"
2754 "-DQT_FEATURE_webengine_system_alsa=ON"
2755 "-DQT_FEATURE_webengine_system_icu=ON"
2756 "-DQT_FEATURE_webengine_system_libxml=ON"
2757 "-DQT_FEATURE_webengine_system_libpci=ON"
2758 "-DQT_FEATURE_webengine_system_libpng=ON"
2759 "-DQT_FEATURE_webengine_system_pulseaudio=ON"
2760 "-DQT_FEATURE_webengine_system_zlib=ON")
2762 #~(modify-phases %standard-phases
2763 (add-after 'unpack 'patch-paths
2764 (lambda* (#:key inputs #:allow-other-keys)
2765 ;; Qtwebengine is not installed into the same prefix as qtbase.
2766 ;; Some qtbase QTLibraryInfo constants will not work. Replace
2767 ;; with the full path to the qtwebengine translations and
2768 ;; locales in the store.
2769 (substitute* "src/core/web_engine_library_info.cpp"
2770 (("QLibraryInfo::path\\(QLibraryInfo::TranslationsPath)")
2771 (string-append "QLatin1String(\"" #$output
2772 "/share/qt6/translations\")"))
2773 (("QLibraryInfo::path\\(QLibraryInfo::DataPath)")
2774 (string-append "QLatin1String(\"" #$output
2776 ;; Substitute full dynamic library path for nss.
2777 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2779 (search-input-file inputs "lib/nss/libnssckbi.so")))
2780 ;; Substitute full dynamic library path for udev.
2781 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2783 (search-input-file inputs "lib/libudev.so.1")))
2784 ;; Patch the location of the X11 keywoard layouts, otherwise
2785 ;; webengine *crashes* at run time when the default directory,
2786 ;; '/usr/share/X11/xkb' is empty (see:
2787 ;; https://bugreports.qt.io/browse/QTBUG-105124).
2788 (substitute* "src/3rdparty/chromium/ui/events/ozone/layout/xkb\
2789 /xkb_keyboard_layout_engine.cc"
2790 (("/usr/share/X11/xkb")
2791 (search-input-directory inputs "share/X11/xkb")))))
2792 (add-before 'configure 'prepare-build-environment
2794 ;; Avoids potential race conditions.
2795 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2796 (setenv "NINJAFLAGS"
2798 "-k1" ;less verbose build output
2799 ;; Respect the '--cores' option of 'guix build'.
2800 " -j" (number->string (parallel-job-count))))
2801 ;; Use Clang/LDD to help tame the memory requirements and hasten
2803 (setenv "AR" "llvm-ar") (setenv "NM" "llvm-nm")
2804 (setenv "CC" "clang") (setenv "CXX" "clang++")))
2806 (lambda* (#:key parallel-build? #:allow-other-keys)
2807 (apply invoke "cmake" "--build" "."
2809 `("--parallel" ,(number->string (parallel-job-count)))
2813 (invoke "cmake" "--install" "."))))))
2815 (modify-inputs (package-native-inputs qtwebengine-5)
2816 (delete "python2" "python2-six")
2823 (modify-inputs (package-inputs qtwebengine-5)
2824 (replace "qtbase" qtbase)
2825 (replace "qtdeclarative" qtdeclarative)
2826 (replace "qtmultimedia" qtmultimedia)
2827 (replace "qtwebchannel" qtwebchannel)
2828 (append libxkbfile xkeyboard-config)))
2829 (native-search-paths
2830 (list (search-path-specification
2831 (file-type 'regular)
2833 (variable "QTWEBENGINEPROCESS_PATH")
2834 (files '("lib/qt6/libexec/QtWebEngineProcess")))))
2835 (home-page "https://wiki.qt.io/QtWebEngine")
2836 (synopsis "Qt WebEngine module")
2837 (description "The Qt WebEngine module provides support for web
2838 applications using the Chromium browser project. The Chromium source code has
2839 Google services and binaries removed, and adds modular support for using
2841 (license license:lgpl2.1+)))
2843 (define-public single-application-qt5
2844 ;; Change in function signature, nheko requires at least this commit
2845 (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053"))
2847 (name "single-application-qt5")
2848 (version (string-append "3.2.0-" (string-take commit 7)))
2854 (url "https://github.com/itay-grudev/SingleApplication")
2856 (file-name (git-file-name name version))
2859 "163aa2x2qb0h8w26si5ql833ilj427jjbdwlz1p2p8iaq6dh0vq1"))))
2860 (build-system cmake-build-system)
2862 `(#:tests? #f ; no check target
2863 ;; Projects can decide how to build this library. You might need to
2864 ;; override this flag (QApplication, QGuiApplication or
2865 ;; QCoreApplication).
2866 #:configure-flags '("-DQAPPLICATION_CLASS=QApplication")
2868 (modify-phases %standard-phases
2869 ;; No install target, install things manually
2871 (lambda* (#:key inputs outputs source #:allow-other-keys)
2872 (let* ((qt (assoc-ref inputs "qtbase"))
2873 (qt-version ,(version-major (package-version qtbase-5)))
2874 (out (assoc-ref outputs "out")))
2876 "libSingleApplication.a" (string-append out "/lib"))
2880 (string-append source "/" file)
2881 (string-append out "/include")))
2882 '("SingleApplication"
2883 "singleapplication.h" "singleapplication_p.h"))
2887 (home-page "https://github.com/itay-grudev/SingleApplication")
2888 (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6")
2890 "SingleApplication is a replacement of the QtSingleApplication for Qt5 and Qt6.
2892 It keeps the Primary Instance of your Application and kills each subsequent
2893 instances. It can (if enabled) spawn secondary (non-related to the primary)
2894 instances and can send data to the primary instance from secondary
2896 (license license:expat))))
2898 (define-public python-sip
2905 (uri (list (pypi-uri "sip" version)
2906 (string-append "https://www.riverbankcomputing.com/static/"
2907 "Downloads/sip/" version
2908 "/sip-" version ".tar.gz")))
2911 "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"))))
2912 (build-system python-build-system)
2914 (list python-wrapper))
2916 (list python-toml python-packaging))
2917 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
2918 (synopsis "Python binding creator for C and C++ libraries")
2920 "SIP is a tool to create Python bindings for C and C++ libraries. It
2921 was originally developed to create PyQt, the Python bindings for the Qt
2922 toolkit, but can be used to create bindings for any C or C++ library.
2924 SIP comprises a code generator and a Python module. The code generator
2925 processes a set of specification files and generates C or C++ code, which
2926 is then compiled to create the bindings extension module. The SIP Python
2927 module provides support functions to the automatically generated code.")
2928 ;; There is a choice between a python like license, gpl2 and gpl3.
2929 ;; For compatibility with pyqt, we need gpl3.
2930 (license license:gpl3)))
2932 (define-public python-sip-4
2934 (inherit python-sip)
2940 (uri (list (pypi-uri "sip" version)
2941 (string-append "https://www.riverbankcomputing.com/static/"
2942 "Downloads/sip/" version
2943 "/sip-" version ".tar.gz")))
2946 "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"))))
2947 (build-system gnu-build-system)
2949 `(("python" ,python-wrapper)))
2950 (propagated-inputs `())
2952 `(#:tests? #f ; no check target
2953 #:imported-modules ((guix build python-build-system)
2954 ,@%gnu-build-system-modules)
2955 #:modules ((srfi srfi-1)
2956 ((guix build python-build-system) #:select (python-version))
2957 ,@%gnu-build-system-modules)
2959 (modify-phases %standard-phases
2961 (lambda* (#:key inputs outputs #:allow-other-keys)
2962 (let* ((out (assoc-ref outputs "out"))
2963 (bin (string-append out "/bin"))
2964 (include (string-append out "/include"))
2965 (python (assoc-ref inputs "python"))
2966 (lib (string-append out "/lib/python"
2967 (python-version python)
2969 (invoke "python" "configure.py"
2972 "--incdir" include)))))))
2973 (license license:gpl3)))
2975 (define-public python-pyqt
2977 (name "python-pyqt")
2982 ;; PyPI is the canonical distribution point of PyQt. Older
2983 ;; releases are available from the web site.
2984 (uri (list (pypi-uri "PyQt5" version)
2985 (string-append "https://www.riverbankcomputing.com/static/"
2986 "Downloads/PyQt5/" version "/PyQt5-"
2987 version ".tar.gz")))
2988 (file-name (string-append "PyQt5-" version ".tar.gz"))
2991 "0aya963kkmbwfwmpd0p6k85y4g7wl5zarjqxxfgir403zalbf4dl"))
2992 (patches (search-patches "pyqt-configure.patch"))))
2993 (build-system gnu-build-system)
2995 (list qtbase-5)) ; for qmake
2997 (list python-sip python-pyqt5-sip))
2999 `(("python" ,python-wrapper)
3000 ("qtbase" ,qtbase-5)
3001 ("qtconnectivity" ,qtconnectivity)
3002 ("qtdeclarative-5" ,qtdeclarative-5)
3003 ("qtlocation" ,qtlocation)
3004 ("qtmultimedia-5" ,qtmultimedia-5)
3005 ("qtsensors" ,qtsensors)
3006 ("qtserialport" ,qtserialport)
3007 ("qtsvg-5" ,qtsvg-5)
3008 ("qttools-5" ,qttools-5)
3009 ("qtwebchannel-5" ,qtwebchannel-5)
3010 ("qtwebkit" ,qtwebkit)
3011 ("qtwebsockets-5" ,qtwebsockets-5)
3012 ("qtx11extras" ,qtx11extras)
3013 ("qtxmlpatterns" ,qtxmlpatterns)))
3015 `(#:modules ((srfi srfi-1)
3016 ((guix build python-build-system) #:select (python-version))
3017 ,@%gnu-build-system-modules)
3018 #:imported-modules ((guix build python-build-system)
3019 ,@%gnu-build-system-modules)
3021 (modify-phases %standard-phases
3022 ;; When building python-pyqtwebengine, <qprinter.h> can not be
3023 ;; included. Here we substitute the full path to the header in the
3025 (add-before 'configure 'substitute-source
3026 (lambda* (#:key inputs #:allow-other-keys)
3027 (let* ((qtbase (assoc-ref inputs "qtbase"))
3028 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
3029 (substitute* "sip/QtPrintSupport/qprinter.sip"
3034 (lambda* (#:key inputs outputs #:allow-other-keys)
3035 (let* ((out (assoc-ref outputs "out"))
3036 (bin (string-append out "/bin"))
3037 (sip (string-append out "/share/sip"))
3038 (plugins (string-append out "/lib/qt5/plugins"))
3039 (designer (string-append plugins "/designer"))
3040 (qml (string-append plugins "/PyQt5"))
3041 (python (assoc-ref inputs "python"))
3042 (lib (string-append out "/lib/python"
3043 (python-version python)
3045 (stubs (string-append lib "/PyQt5")))
3046 (invoke "python" "configure.py"
3050 "--designer-plugindir" designer
3051 "--qml-plugindir" qml
3052 ; Where to install the PEP 484 Type Hints stub
3053 ; files. Without this the stubs are tried to be
3054 ; installed into the python package's
3055 ; site-package directory, which is read-only.
3057 "--sipdir" sip)))))))
3058 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
3059 (synopsis "Python bindings for Qt")
3061 "PyQt is a set of Python v2 and v3 bindings for the Qt application
3062 framework. The bindings are implemented as a set of Python modules and
3063 contain over 620 classes.")
3064 (license license:gpl3)))
3066 (define-public python-pyqt5-sip
3068 (name "python-pyqt5-sip")
3073 (uri (pypi-uri "PyQt5_sip" version))
3076 "09771b6fdn0rx34l5a0wzcd899yd57zxp5sw3bsqhd25biwhiq4p"))))
3077 (build-system python-build-system)
3079 `(#:tests? #f)) ;; No test code.
3080 (home-page "https://www.riverbankcomputing.com/software/sip/")
3081 (synopsis "Sip module support for PyQt5")
3082 (description "Sip module support for PyQt5")
3083 (license license:lgpl2.1+)))
3085 (define-public python-pyqtwebengine
3087 (name "python-pyqtwebengine")
3092 ;; The newest releases are only available on PyPI. Older ones
3093 ;; are mirrored at the upstream home page.
3094 (uri (list (pypi-uri "PyQtWebEngine" version)
3095 (string-append "https://www.riverbankcomputing.com/static"
3096 "/Downloads/PyQtWebEngine/" version
3097 "/PyQtWebEngine-" version ".tar.gz")))
3100 "0hdr0g0rzlhsnylhfk826pq1lw8p9dqcr8yma2wy9dgjrj6n0ixb"))))
3101 (build-system gnu-build-system)
3103 (list python python-sip
3104 ;; qtbase is required for qmake
3107 `(("python" ,python-wrapper)
3108 ("python-sip" ,python-sip)
3109 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3110 ("qtbase" ,qtbase-5)
3111 ("qtsvg-5" ,qtsvg-5)
3112 ("qtdeclarative-5" ,qtdeclarative-5)
3113 ("qtwebchannel-5" ,qtwebchannel-5)
3114 ("qtwebengine-5" ,qtwebengine-5)))
3116 `(#:modules ((srfi srfi-1)
3117 ((guix build python-build-system) #:select (python-version))
3118 ,@%gnu-build-system-modules)
3119 #:imported-modules ((guix build python-build-system)
3120 ,@%gnu-build-system-modules)
3122 (modify-phases %standard-phases
3124 (lambda* (#:key inputs outputs #:allow-other-keys)
3125 (let* ((out (assoc-ref outputs "out"))
3126 (sipdir (string-append out "/share/sip"))
3127 (pyqt-sipdir (string-append
3128 (assoc-ref inputs "python-pyqt") "/share/sip"))
3129 (python (assoc-ref inputs "python"))
3130 (lib (string-append out "/lib/python"
3131 (python-version python)
3132 "/site-packages/PyQt5"))
3133 (stubs (string-append lib "/PyQt5")))
3136 (invoke "python" "configure.py"
3143 "--pyqt-sipdir" pyqt-sipdir))))
3144 ;; Because this has a different prefix than python-pyqt then we need
3145 ;; to make this a namespace of its own.
3146 (add-after 'install 'make-namespace
3147 (lambda* (#:key inputs outputs #:allow-other-keys)
3148 (let* ((__init__.py (string-append
3149 (assoc-ref outputs "out")
3151 (python-version (assoc-ref inputs "python"))
3152 "/site-packages/PyQt5/__init__.py")))
3153 (with-output-to-file __init__.py
3154 (lambda _ (display "
3155 from pkgutil import extend_path
3156 __path__ = extend_path(__path__, __name__)
3159 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
3160 (synopsis "Python bindings for QtWebEngine")
3162 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
3163 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
3164 set of three modules. Prior to v5.12 these bindings were part of PyQt
3166 (license license:gpl3)))
3168 ;; XXX: This is useful for removing qtwebkit from other packages' dependency
3169 ;; graphs, as well as for preventing python-pyqtwebengine from transitively
3170 ;; depending on qtwebkit.
3171 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
3172 ;; packages that could be used together.
3173 (define-public python-pyqt-without-qtwebkit
3174 (package/inherit python-pyqt
3175 (name "python-pyqt-without-qtwebkit")
3177 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
3179 (define-public python-pyqt-builder
3181 (name "python-pyqt-builder")
3186 (uri (pypi-uri "PyQt-builder" version))
3189 "0nh0054c54ji3sm6d268fccf0y5f613spswwgwqd3rnn816hnljl"))))
3190 (build-system python-build-system)
3193 (home-page "https://www.riverbankcomputing.com/static/Docs/PyQt-builder/")
3194 (synopsis "PEP 517 compliant PyQt build system")
3195 (description "PyQt-builder is a tool for generating Python bindings for C++
3196 libraries that use the Qt application framework. The bindings are built on
3197 top of the PyQt bindings for Qt. PyQt-builder is used to build PyQt itself.")
3198 ;; Either version 2 or 3, but no other version. See the file
3199 ;; 'pyqtbuild/builder.py' in the source distribution for more information.
3200 (license (list license:gpl2 license:gpl3))))
3202 (define-public python-qtpy
3204 (name "python-qtpy")
3209 (uri (pypi-uri "QtPy" version))
3212 "051rj10lbv2ny48lz34zhclcbdxxdbk4di2mdk91m9143w91npyq"))))
3213 (build-system python-build-system)
3214 (propagated-inputs (list python-packaging))
3216 `(;; Not all supported bindings are packaged. Especially PyQt4.
3218 (home-page "https://github.com/spyder-ide/qtpy")
3220 "Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets")
3222 "Provides an abstraction layer on top of the various Qt bindings
3223 (PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
3224 (license license:expat)))
3226 (define-public qscintilla
3232 (uri (string-append "https://www.riverbankcomputing.com/static"
3233 "/Downloads/QScintilla/" version
3234 "/QScintilla-" version ".tar.gz"))
3237 "19r0vpqb4m9bqwxmjp9w6x0hgahkrg7zryk78hwgplj7vdbn0d77"))))
3238 (build-system gnu-build-system)
3241 (modify-phases %standard-phases
3243 (lambda* (#:key outputs #:allow-other-keys)
3244 (let ((out (assoc-ref outputs "out")))
3246 (substitute* "qscintilla.pro"
3247 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
3248 (string-append out "/lib"))
3249 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
3250 (string-append out "/include"))
3251 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
3252 (string-append out "/translations"))
3253 (("\\$\\$\\[QT_INSTALL_DATA\\]")
3254 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
3255 (("\\$\\$\\[QT_HOST_DATA\\]")
3256 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
3257 (invoke "qmake")))))))
3258 (native-inputs (list qtbase-5))
3259 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
3260 (synopsis "Qt port of the Scintilla C++ editor control")
3261 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3262 editor control. QScintilla includes features especially useful when editing
3263 and debugging source code. These include support for syntax styling, error
3264 indicators, code completion and call tips.")
3265 (license license:gpl3+)))
3267 (define-public python-qscintilla
3268 (package/inherit qscintilla
3269 (name "python-qscintilla")
3272 (list "--pyqt=PyQt5"
3273 (string-append "--pyqt-sipdir="
3274 (assoc-ref %build-inputs "python-pyqt")
3276 (string-append "--qsci-incdir="
3277 (assoc-ref %build-inputs "qscintilla")
3279 (string-append "--qsci-libdir="
3280 (assoc-ref %build-inputs "qscintilla")
3283 (modify-phases %standard-phases
3285 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
3286 (let ((out (assoc-ref outputs "out"))
3287 (python (assoc-ref inputs "python")))
3289 (apply invoke "python3" "configure.py"
3291 ;; Install to the right directory
3292 (substitute* '("Makefile"
3294 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
3295 (((string-append python "/lib"))
3296 (string-append out "/lib")))
3297 ;; And fix the installed.txt file
3298 (substitute* "installed.txt"
3299 (("/gnu/store/[^/]+") out)))
3302 `(("qscintilla" ,qscintilla)
3304 ("python-pyqt" ,python-pyqt)))
3305 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3306 editor control. QScintilla includes features especially useful when editing
3307 and debugging source code. These include support for syntax styling, error
3308 indicators, code completion and call tips.
3310 This package provides the Python bindings.")))
3312 ;; PyQt only looks for modules in its own directory. It ignores environment
3313 ;; variables such as PYTHONPATH, so we need to build a union package to make
3315 (define-public python-pyqt+qscintilla
3316 (package/inherit python-pyqt
3317 (name "python-pyqt+qscintilla")
3319 (build-system trivial-build-system)
3321 '(#:modules ((guix build union))
3323 (use-modules (ice-9 match)
3325 (match %build-inputs
3326 (((names . directories) ...)
3327 (union-build (assoc-ref %outputs "out")
3331 `(("python-pyqt" ,python-pyqt)
3332 ("python-qscintilla" ,python-qscintilla)))
3333 (synopsis "Union of PyQt and the Qscintilla extension")
3335 "This package contains the union of PyQt and the Qscintilla extension.")))
3337 (define-public qtkeychain
3345 (url "https://github.com/frankosterfeld/qtkeychain/")
3346 (commit (string-append "v" version))))
3347 (file-name (git-file-name name version))
3350 "1zk6r2vc1q48qs7mw2h47bpgrfbb9r7lf9cwq4sb1a4nls87zznk"))))
3351 (build-system cmake-build-system)
3353 (list pkg-config qttools-5))
3355 (list libsecret qtbase-5))
3357 `(#:tests? #f ; No tests included
3359 (modify-phases %standard-phases
3360 (add-before 'configure 'set-qt-trans-dir
3362 (substitute* "CMakeLists.txt"
3363 (("\\$\\{qt_translations_dir\\}")
3364 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations")))))))
3365 (home-page "https://github.com/frankosterfeld/qtkeychain")
3366 (synopsis "Qt API to store passwords")
3368 "QtKeychain is a Qt library to store passwords and other secret data
3369 securely. It will not store any data unencrypted unless explicitly requested.")
3370 (license license:bsd-3)))
3372 (define-public qtsolutions
3373 (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
3376 (name "qtsolutions")
3377 (version (git-version "0" revision commit))
3382 (url "https://github.com/qtproject/qt-solutions")
3384 (file-name (git-file-name name version))
3386 (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
3387 (modules '((guix build utils)
3391 ;; Unvendor QtLockFile from QtSingleApplication.
3393 (with-directory-excursion "qtsingleapplication/src"
3394 (for-each delete-file
3395 (find-files "." "qtlockedfile.*\\.(h|cpp)"))
3396 (substitute* "qtsingleapplication.pri"
3397 ;; Add include path of LockedFile.
3398 (("INCLUDEPATH \\+=")
3399 "INCLUDEPATH += ../../qtlockedfile/src")
3400 ;; Link library of LockedFile.
3402 "LIBS += -lQtSolutions_LockedFile"))
3403 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
3404 (("#include \"qtlockedfile.*\\.cpp\"") "")
3405 ;; Unwrap namespace added in the vendoring process.
3406 (("QtLP_Private::QtLockedFile")
3409 (build-system gnu-build-system)
3411 `(#:tests? #f ; No target
3413 ((guix build copy-build-system)
3414 ,@%gnu-build-system-modules)
3416 (((guix build copy-build-system) #:prefix copy:)
3417 (guix build gnu-build-system)
3420 (modify-phases %standard-phases
3421 (add-after 'unpack 'patch-source
3422 (lambda* (#:key outputs #:allow-other-keys)
3423 (substitute* (find-files "." "common.pri")
3424 ;; Remove unnecessary prefixes/suffixes in library names.
3427 ;; Disable building of examples.
3428 (substitute* (find-files "." "\\.pro$")
3429 (("SUBDIRS\\+=examples") ""))
3430 ;; Fix deprecated functions.
3431 (substitute* "qtsoap/src/qtsoap.cpp"
3432 (("toAscii") "toUtf8"))
3436 (for-each (lambda (solution)
3437 (with-directory-excursion solution
3438 (invoke "./configure" "-library")
3440 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3441 "qtsingleapplication" "qtsoap"))
3445 (for-each (lambda (solution)
3446 (with-directory-excursion solution
3448 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3449 "qtsingleapplication" "qtsoap"))
3453 (for-each (lambda (solution)
3454 (with-directory-excursion solution
3456 (assoc-ref copy:%standard-phases 'install)
3458 '(("src" "include" #:include-regexp ("\\.h$"))
3461 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3462 "qtsingleapplication" "qtsoap")))))))
3465 (synopsis "Collection of Qt extensions")
3466 (description "QtSolutions is a set of components extending Qt.
3468 @item QtLockedFile: A class that extends QFile with advisory locking functions.
3469 @item QtPropertyBrowser: A framework that enables the user to edit a set of
3471 @item QtService: A helper for writing services such as Unix daemons.
3472 @item QtSingleApplication: A component that provides support for applications
3473 that can be only started once per user.
3474 @item QtSoap: A component that provides basic web service support with version
3475 1.1 of the SOAP protocol.
3477 (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
3478 (license (list license:bsd-3
3479 ;; QScriptParser and QScriptGrammar specifically allow
3480 ;; redistribution under GPL3 or LGPL2.1
3481 license:gpl3 license:lgpl2.1)))))
3491 (string-append "mirror://sourceforge/qwt/qwt/"
3492 version "/qwt-" version ".tar.bz2"))
3494 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
3495 (build-system gnu-build-system)
3497 (list qtbase-5 qtsvg-5 qttools-5))
3500 (modify-phases %standard-phases
3502 (lambda* (#:key outputs #:allow-other-keys)
3503 (let* ((out (assoc-ref outputs "out"))
3504 (docdir (string-append out "/share/doc/qwt"))
3505 (incdir (string-append out "/include/qwt"))
3506 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
3507 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
3508 (substitute* '("qwtconfig.pri")
3509 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
3510 (format #f "~a = ~a\n" x out))
3511 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
3512 (format #f "~a = ~a\n" x docdir))
3513 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
3514 (format #f "~a = ~a\n" x incdir))
3515 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
3516 (format #f "~a = ~a\n" x pluginsdir))
3517 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
3518 (format #f "~a = ~a\n" x featuresdir)))
3519 (substitute* '("doc/doc.pro")
3520 ;; We'll install them in the 'install-man-pages' phase.
3521 (("^unix:doc\\.files.*") ""))
3523 (add-after 'install 'install-man-pages
3524 (lambda* (#:key outputs #:allow-other-keys)
3525 (let* ((out (assoc-ref outputs "out"))
3526 (man (string-append out "/share/man")))
3527 ;; Remove some incomplete manual pages.
3528 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
3530 (copy-recursively "doc/man" man)
3532 (home-page "http://qwt.sourceforge.net")
3533 (synopsis "Qt widgets for plots, scales, dials and other technical software
3536 "The Qwt library contains widgets and components which are primarily useful
3537 for technical and scientific purposes. It includes a 2-D plotting widget,
3538 different kinds of sliders, and much more.")
3541 ;; The Qwt license is LGPL2.1 with some exceptions.
3542 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
3543 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
3544 license:lgpl2.1 license:gpl3))))
3546 (define-public qtwebkit
3549 (version "5.212.0-alpha4")
3553 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
3554 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
3557 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
3558 (patches (search-patches "qtwebkit-pbutils-include.patch"
3559 "qtwebkit-fix-building-with-bison-3.7.patch"
3560 "qtwebkit-fix-building-with-glib-2.68.patch"
3561 "qtwebkit-fix-building-with-icu-68.patch"
3562 "qtwebkit-fix-building-with-python-3.9.patch"))))
3563 (build-system cmake-build-system)
3575 ("gst-plugins-base" ,gst-plugins-base)
3576 ("libjpeg" ,libjpeg-turbo)
3578 ("libwebp" ,libwebp)
3580 ("fontconfig" ,fontconfig)
3581 ("libxrender" ,libxrender)
3582 ("qtbase" ,qtbase-5)
3583 ("qtdeclarative-5" ,qtdeclarative-5)
3584 ("qtlocation" ,qtlocation)
3585 ("qtmultimedia-5" ,qtmultimedia-5)
3586 ("qtsensors" ,qtsensors)
3587 ("qtwebchannel-5" ,qtwebchannel-5)
3588 ("libxml2" ,libxml2)
3589 ("libxslt" ,libxslt)
3591 ("libxcomposite" ,libxcomposite)))
3593 `(#:tests? #f ; no apparent tests; it might be necessary to set
3594 ; ENABLE_API_TESTS, see CMakeLists.txt
3596 ;; Parallel builds fail due to a race condition:
3597 ;; <https://bugs.gnu.org/34062>.
3598 #:parallel-build? #f
3600 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
3602 "-DUSE_LIBHYPHEN=OFF"
3603 "-DUSE_SYSTEM_MALLOC=ON"
3604 ;; XXX: relative dir installs to build dir?
3605 (string-append "-DECM_MKSPECS_INSTALL_DIR="
3606 %output "/lib/qt5/mkspecs/modules")
3607 ;; Sacrifice a little speed in order to link
3608 ;; libraries and test executables in a
3609 ;; reasonable amount of memory.
3610 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
3611 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
3612 (home-page "https://www.webkit.org")
3613 (synopsis "Web browser engine and classes to render and interact with web
3615 (description "QtWebKit provides a Web browser engine that makes it easy to
3616 embed content from the World Wide Web into your Qt application. At the same
3617 time Web content can be enhanced with native controls.")
3618 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
3619 ;; room for slower or busy hardware.
3620 (properties '((timeout . 64800))) ;18 hours
3622 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
3623 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
3624 ;; disable it on non-Intel platforms.
3625 (supported-systems '("x86_64-linux" "i686-linux"))
3627 (license license:lgpl2.1+)))
3629 (define-public dotherside
3637 (url "https://github.com/filcuc/DOtherSide")
3638 (commit (string-append "v" version))))
3639 (file-name (git-file-name name version))
3642 "13n2qb8q9jz4ihwlbs7y15lw90w9113gb1bgnb1dggpxkj64r953"))))
3643 (build-system cmake-build-system)
3647 ;; TODO: Support Qt 6 (requires qtdeclarative of Qt6).
3648 (list qtbase-5 qtdeclarative-5))
3649 (home-page "https://filcuc.github.io/DOtherSide/index.html")
3650 (synopsis "C language library for creating bindings for the Qt QML language")
3652 "DOtherSide is a C language library for creating bindings for the
3653 QT QML language. The following features are implementable from
3656 @item Creating custom QObject
3657 @item Creating custom QAbstractListModels
3658 @item Creating custom properties, signals and slots
3659 @item Creating from QML QObject defined in the binded language
3660 @item Creating from Singleton QML QObject defined in the binded language
3662 (license license:lgpl3))) ;version 3 only (+ exception)
3664 ;; There have been no public releases yet.
3665 (define-public qtcolorwidgets
3666 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
3669 (name "qtcolorwidgets")
3670 (version (git-version "0" revision commit))
3674 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3676 (file-name (git-file-name name version))
3679 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
3680 (build-system cmake-build-system)
3681 (arguments `(#:tests? #f)) ; There are no tests
3686 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3687 (synopsis "Color management widgets")
3688 (description "QtColorWidgets provides a Qt color dialog that is more
3689 user-friendly than the default @code{QColorDialog} and several other
3690 color-related widgets.")
3691 ;; Includes a license exception for combining with GPL2 code.
3692 (license license:lgpl3+))))
3694 (define-public qcustomplot
3696 (name "qcustomplot")
3701 (uri (string-append "https://www.qcustomplot.com/release/"
3702 version "fixed" "/QCustomPlot.tar.gz"))
3704 (base32 "1324kqyj1v1f8k8d7b15gc3apwz9qxx52p86hvchg33hjdlqhskx"))))
3706 `(("qcustomplot-sharedlib"
3709 (uri (string-append "https://www.qcustomplot.com/release/"
3710 version "fixed" "/QCustomPlot-sharedlib.tar.gz"))
3712 (base32 "0vp8lpxvd1nlp4liqrlvslpqrgfn0wpiwizzdsjbj22zzb8vxikc"))))))
3715 (build-system gnu-build-system)
3718 (modify-phases %standard-phases
3719 (add-after 'unpack 'unpack-extra-files
3720 (lambda* (#:key inputs #:allow-other-keys)
3721 (invoke "tar" "-xvf" (assoc-ref inputs "qcustomplot-sharedlib"))))
3723 (lambda* (#:key outputs #:allow-other-keys)
3724 (chdir "qcustomplot-sharedlib/sharedlib-compilation")
3725 (substitute* "sharedlib-compilation.pro"
3726 ;; Don't build debug library.
3727 (("debug_and_release")
3730 (string-append "DESTDIR="
3731 (assoc-ref outputs "out")
3733 (add-after 'install 'install-header
3734 (lambda* (#:key outputs #:allow-other-keys)
3735 (install-file "../../qcustomplot.h"
3736 (string-append (assoc-ref outputs "out")
3738 (home-page "https://www.qcustomplot.com/")
3739 (synopsis "Qt widget for plotting and data visualization")
3741 "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts.")
3742 (license license:gpl3+)))
3744 (define-public python-shiboken-2
3746 (name "python-shiboken-2")
3750 (uri (string-append "https://download.qt.io/official_releases"
3751 "/QtForPython/pyside2/PySide2-" version
3752 "-src/pyside-setup-opensource-src-"
3756 "0cwvw6695215498rsbm2xzkwaxdr3w7zfvy4kc62c01k6pxs881r"))))
3757 (build-system cmake-build-system)
3759 (list clang-toolchain
3767 ;; FIXME: Building tests fails
3768 #:configure-flags '("-DBUILD_TESTS=off")
3770 (modify-phases %standard-phases
3771 (add-after 'unpack 'use-shiboken-dir-only
3772 (lambda _ (chdir "sources/shiboken2") #t))
3773 (add-before 'configure 'make-files-writable-and-update-timestamps
3775 ;; The build scripts need to modify some files in
3776 ;; the read-only source directory, and also attempts
3777 ;; to create Zip files which fails because the Zip
3778 ;; format does not support timestamps before 1980.
3779 (let ((circa-1980 (* 10 366 24 60 60)))
3780 (for-each (lambda (file)
3781 (make-file-writable file)
3782 (utime file circa-1980 circa-1980))
3785 (add-before 'configure 'set-build-env
3786 (lambda* (#:key inputs #:allow-other-keys)
3787 (let ((llvm (assoc-ref inputs "clang-toolchain")))
3788 (setenv "CLANG_INSTALL_DIR" llvm)
3790 (home-page "https://wiki.qt.io/Qt_for_Python")
3792 "Shiboken generates bindings for C++ libraries using CPython source code")
3794 "Shiboken generates bindings for C++ libraries using CPython source code")
3797 ;; The main code is GPL3 or LGPL3.
3798 ;; Examples are BSD-3.
3803 (define-public python-pyside-2
3805 (name "python-pyside-2")
3806 (version (package-version python-shiboken-2))
3807 (source (package-source python-shiboken-2))
3808 (build-system cmake-build-system)
3831 (list python-shiboken-2))
3833 `(("cmake" ,cmake-minimal)
3834 ("python" ,python-wrapper)
3835 ("qttools-5" ,qttools-5)
3839 ;; FIXME: Building tests fail.
3841 (list "-DBUILD_TESTS=FALSE"
3842 (string-append "-DPYTHON_EXECUTABLE="
3843 (assoc-ref %build-inputs "python")
3845 #:modules ((guix build cmake-build-system)
3849 (modify-phases %standard-phases
3850 (add-after 'unpack 'go-to-source-dir
3851 (lambda _ (chdir "sources/pyside2") #t))
3852 (add-after 'go-to-source-dir 'fix-qt-module-detection
3853 (lambda* (#:key inputs #:allow-other-keys)
3854 ;; Activate qt module support even if it not in the same
3855 ;; directory as qtbase.
3856 (substitute* "../cmake_helpers/helpers.cmake"
3857 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
3859 ;; Add include directories for qt modules.
3860 (let ((dirs (map (lambda (name)
3861 (string-append (assoc-ref inputs name)
3880 (substitute* "cmake/Macros/PySideModules.cmake"
3881 (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all)
3882 (fold (lambda (dir paths)
3883 (string-append paths "${PATH_SEP}" dir))
3886 (setenv "CXXFLAGS" (fold (lambda (dir paths)
3887 (string-append paths " -I" dir))
3890 (add-before 'configure 'set-clang-dir
3891 (lambda* (#:key inputs #:allow-other-keys)
3892 (let ((clang (assoc-ref inputs "clang-toolchain")))
3893 (setenv "CLANG_INSTALL_DIR" clang)
3895 (home-page "https://wiki.qt.io/Qt_for_Python")
3897 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
3899 "The Qt for Python product enables the use of Qt5 APIs in Python
3900 applications. It lets Python developers utilize the full potential of Qt,
3901 using the PySide2 module. The PySide2 module provides access to the
3902 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
3903 comes with the Shiboken2 CPython binding code generator, which can be used to
3904 generate Python bindings for your C or C++ code.")
3908 ;; this file may be used under the terms of the GNU General
3909 ;; Public License version 2.0 or (at your option) the GNU
3910 ;; General Public license version 3 or any later version
3911 ;; approved by the KDE Free Qt Foundation.
3912 ;; Thus, it is currently v2 or v3, but no "+".
3916 (define-public python-pyside-2-tools
3918 (name "python-pyside-2-tools")
3919 (version (package-version python-shiboken-2))
3920 (source (package-source python-shiboken-2))
3921 (build-system cmake-build-system)
3923 (list python-pyside-2 python-shiboken-2 qtbase-5))
3925 `(("python" ,python-wrapper)))
3929 (list "-DBUILD_TESTS=off"
3930 (string-append "-DPYTHON_EXECUTABLE="
3931 (assoc-ref %build-inputs "python")
3933 #:phases (modify-phases %standard-phases
3934 (add-after 'unpack 'go-to-source-dir
3935 (lambda _ (chdir "sources/pyside2-tools") #t)))))
3936 (home-page "https://wiki.qt.io/Qt_for_Python")
3938 "Contains command line tools for PySide2")
3940 "Contains lupdate, rcc and uic tools for PySide2")
3941 (license license:gpl2)))
3943 (define-public libqglviewer
3945 (name "libqglviewer")
3950 (string-append "http://libqglviewer.com/src/libQGLViewer-"
3954 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
3955 (build-system gnu-build-system)
3957 '(#:tests? #f ; no check target
3959 (list (string-append "PREFIX="
3960 (assoc-ref %outputs "out")))
3962 (modify-phases %standard-phases
3964 (lambda* (#:key make-flags #:allow-other-keys)
3965 (apply invoke (cons "qmake" make-flags)))))))
3967 (list qtbase-5 qttools-5))
3970 (home-page "http://libqglviewer.com")
3971 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
3973 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
3974 of OpenGL 3D viewers.
3976 It provides some of the typical 3D viewer functionalities, such as the
3977 possibility to move the camera using the mouse, which lacks in most of the
3978 other APIs. Other features include mouse manipulated frames, interpolated
3979 keyFrames, object selection, stereo display, screenshot saving and much more.
3980 It can be used by OpenGL beginners as well as to create complex applications,
3981 being fully customizable and easy to extend.")
3982 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
3984 (license (list license:gpl2 license:gpl3))))
3986 (define-public qhexedit
3994 (url "https://github.com/Simsys/qhexedit2")
3995 (commit (string-append "v" version))))
3996 (file-name (git-file-name name version))
3998 (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
3999 (build-system gnu-build-system)
4002 (modify-phases %standard-phases
4003 (add-after 'unpack 'fix-path
4004 (lambda* (#:key outputs #:allow-other-keys)
4005 (substitute* "src/qhexedit.pro"
4006 (("^unix:DESTDIR = /usr/lib")
4007 (string-append "unix:DESTDIR = "
4008 (assoc-ref outputs "out") "/lib")))))
4012 (invoke "qmake" "qhexedit.pro")))
4013 (add-after 'install 'install-headers
4014 (lambda* (#:key outputs #:allow-other-keys)
4015 (let* ((out (assoc-ref outputs "out"))
4016 (include-dir (string-append out "/include")))
4017 (mkdir-p include-dir)
4018 (for-each (lambda (file)
4019 (install-file file include-dir))
4020 (find-files "." "\\.h$"))))))))
4021 (inputs (list qtbase-5))
4022 (native-inputs (list qttools-5))
4023 (home-page "https://simsys.github.io")
4024 (synopsis "Binary editor widget for Qt")
4026 "@code{QHexEdit} is a hex editor widget for the Qt framework. It is a
4027 simple editor for binary data, just like @code{QPlainTextEdit} is for text
4029 (license license:lgpl2.1)))
4032 (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
4036 (version (git-version "1.6.0" revision commit-ref))
4041 (url "https://github.com/coin3d/soqt")
4044 (file-name (git-file-name name version))
4046 (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
4047 (build-system cmake-build-system)
4048 (arguments '(#:tests? #f)) ; There are no tests
4050 (list pkg-config cmake))
4052 (list qtbase-5 coin3D-4))
4053 (home-page "https://github.com/coin3d/soqt")
4054 (synopsis "Qt GUI component toolkit library for Coin")
4055 (description "SoQt is a Qt GUI component toolkit library for Coin. It is
4056 also compatible with SGI and TGS Open Inventor, and the API is based on the API
4057 of the InventorXt GUI component toolkit.")
4058 (license license:bsd-3))))
4060 (define-public libdbusmenu-qt
4062 (name "libdbusmenu-qt")
4063 (version "0.9.3+16.04.20160218-0ubuntu1")
4067 ;; Download from github rather than launchpad because launchpad trunk
4068 ;; tarball hash is not deterministic.
4070 (url "https://github.com/unity8-team/libdbusmenu-qt")
4072 (file-name (git-file-name name version))
4074 (base32 "0b7ii1cvmpcyl79gqal9c3va9m55h055s4hx7fpxkhhqs9463ggg"))))
4075 (build-system cmake-build-system)
4077 ;; XXX: Tests require a dbus session and some icons.
4083 (home-page "https://launchpad.net/libdbusmenu-qt")
4084 (synopsis "Qt implementation of the DBusMenu spec")
4085 (description "This library provides a Qt implementation of the DBusMenu
4086 protocol. The DBusMenu protocol makes it possible for applications to export
4087 and import their menus over DBus.")
4088 (license license:lgpl2.1+)))
4090 (define-public kdsoap
4097 (uri (string-append "https://github.com/KDAB/KDSoap/releases/download/"
4098 "kdsoap-" version "/kdsoap-" version ".tar.gz"))
4101 "1vh4rzb09kks1ilay1y60q7gf64gwzdwsca60hmx1xx69w8672fi"))))
4102 (build-system qt-build-system)
4103 (inputs `(("qtbase" ,qtbase-5)))
4105 '(#:configure-flags '("-DKDSoap_TESTS=true")
4107 (modify-phases %standard-phases
4109 (lambda* (#:key tests? #:allow-other-keys)
4111 (invoke "ctest" "-E" ;; These tests try connect to the internet.
4112 "(kdsoap-webcalls|kdsoap-webcalls_wsdl|kdsoap-test_calc)"))
4114 (home-page "https://www.kdab.com/development-resources/qt-tools/kd-soap/")
4115 (synopsis "Qt SOAP component")
4116 (description "KD SOAP is a tool for creating client applications for web
4117 services using the XML based SOAP protocol and without the need for a dedicated
4119 (license (list license:gpl2 license:gpl3))))