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>
27 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
29 ;;; This file is part of GNU Guix.
31 ;;; GNU Guix is free software; you can redistribute it and/or modify it
32 ;;; under the terms of the GNU General Public License as published by
33 ;;; the Free Software Foundation; either version 3 of the License, or (at
34 ;;; your option) any later version.
36 ;;; GNU Guix is distributed in the hope that it will be useful, but
37 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 ;;; GNU General Public License for more details.
41 ;;; You should have received a copy of the GNU General Public License
42 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44 (define-module (gnu packages qt)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix packages)
47 #:use-module (guix download)
48 #:use-module (guix git-download)
49 #:use-module (guix build-system cmake)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system trivial)
52 #:use-module (guix build-system python)
53 #:use-module (guix build-system qt)
54 #:use-module (guix gexp)
55 #:use-module (guix packages)
56 #:use-module (guix deprecation)
57 #:use-module (guix utils)
58 #:use-module (gnu packages)
59 #:use-module (gnu packages bash)
60 #:use-module (gnu packages base)
61 #:use-module (gnu packages bison)
62 #:use-module (gnu packages cmake)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages cups)
65 #:use-module (gnu packages curl)
66 #:use-module (gnu packages databases)
67 #:use-module (gnu packages documentation)
68 #:use-module (gnu packages enchant)
69 #:use-module (gnu packages fontutils)
70 #:use-module (gnu packages flex)
71 #:use-module (gnu packages freedesktop)
72 #:use-module (gnu packages gcc)
73 #:use-module (gnu packages ghostscript)
74 #:use-module (gnu packages gl)
75 #:use-module (gnu packages glib)
76 #:use-module (gnu packages gnome)
77 #:use-module (gnu packages gnupg)
78 #:use-module (gnu packages gperf)
79 #:use-module (gnu packages graphics)
80 #:use-module (gnu packages gstreamer)
81 #:use-module (gnu packages gtk)
82 #:use-module (gnu packages icu4c)
83 #:use-module (gnu packages image)
84 #:use-module (gnu packages kde-frameworks)
85 #:use-module (gnu packages libevent)
86 #:use-module (gnu packages linux)
87 #:use-module (gnu packages llvm)
88 #:use-module (gnu packages maths)
89 #:use-module (gnu packages markup)
90 #:use-module (gnu packages networking)
91 #:use-module (gnu packages ninja)
92 #:use-module (gnu packages node)
93 #:use-module (gnu packages nss)
94 #:use-module (gnu packages pciutils)
95 #:use-module (gnu packages pcre)
96 #:use-module (gnu packages perl)
97 #:use-module (gnu packages pkg-config)
98 #:use-module (gnu packages pulseaudio)
99 #:use-module (gnu packages protobuf)
100 #:use-module (gnu packages python)
101 #:use-module (gnu packages python-build)
102 #:use-module (gnu packages python-xyz)
103 #:use-module (gnu packages python-web)
104 #:use-module (gnu packages regex)
105 #:use-module (gnu packages ruby)
106 #:use-module (gnu packages sdl)
107 #:use-module (gnu packages serialization)
108 #:use-module (gnu packages sqlite)
109 #:use-module (gnu packages telephony)
110 #:use-module (gnu packages tls)
111 #:use-module (gnu packages valgrind)
112 #:use-module (gnu packages video)
113 #:use-module (gnu packages vulkan)
114 #:use-module (gnu packages xdisorg)
115 #:use-module (gnu packages xiph)
116 #:use-module (gnu packages xorg)
117 #:use-module (gnu packages xml)
118 #:use-module (srfi srfi-1))
121 (let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
125 (version (git-version "0" revision commit))
131 (url "https://github.com/Ri0n/qite")
133 (file-name (git-file-name name version))
135 (base32 "0jmmgy9pvk9hwwph1nwy7hxhczy8drhl4ymhnjjn6yx7bckssvsq"))))
136 (build-system qt-build-system)
138 `(#:tests? #f ; no target
140 (modify-phases %standard-phases
141 (add-after 'unpack 'chdir
146 (list qtbase-5 qtmultimedia-5))
147 (home-page "https://github.com/Ri0n/qite/")
148 (synopsis "Qt Interactive Text Elements")
149 (description "Qite manages interactive elements on QTextEdit.")
150 (license license:asl2.0))))
160 (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
162 (base32 "14742vs32m98nbfb5mad0i8ciff5f45gfcb5v03p4hh2dvhhqgfn"))))
163 (build-system qt-build-system)
166 #:tests? #f ; No target
168 #~(modify-phases %standard-phases
169 (add-after 'unpack 'patch
171 (substitute* '("src/qt5ct-qtplugin/CMakeLists.txt"
172 "src/qt5ct-style/CMakeLists.txt")
173 (("\\$\\{PLUGINDIR\\}")
174 (string-append #$output "/lib/qt5/plugins"))))))))
179 (synopsis "Qt5 Configuration Tool")
180 (description "Qt5CT is a program that allows users to configure Qt5
181 settings (such as icons, themes, and fonts) in desktop environments or
182 window managers, that don't provide Qt integration by themselves.")
183 (home-page "https://qt5ct.sourceforge.io/")
184 (license license:bsd-2)))
186 (define-public materialdecoration
187 (let ((commit "6a5de23f2e5162fbee39d16f938473ff970a2ec0")
190 (name "materialdecoration")
192 (git-version "1.1.0" revision commit))
198 (url "https://github.com/lirios/materialdecoration.git")
201 (git-file-name name version))
203 (base32 "1zdrcb39fhhmn76w8anv1dnspz26pdl6izmj1mlm02aza4y8ffp4"))
204 (modules '((guix build utils)
209 (delete-file-recursively "cmake/3rdparty")))))
210 (build-system qt-build-system)
212 `(#:tests? #f ; No target
215 (string-append "-DCMAKE_CXX_FLAGS=-I"
216 #$(this-package-input "qtbase")
217 "/include/qt5/QtXkbCommonSupport/"
218 #$(package-version qtbase-5)))))
220 (list cmake-shared extra-cmake-modules pkg-config))
222 `(("qtbase" ,qtbase-5)
223 ("qtwayland" ,qtwayland)
225 ("xkbcommon" ,libxkbcommon)))
226 (synopsis "Material Decoration for Qt")
227 (description "MaterialDecoration is a client-side decoration for Qt
228 applications on Wayland.")
229 (home-page "https://github.com/lirios/materialdecoration")
230 (license license:lgpl3+))))
232 (define-public grantlee
240 (url "https://github.com/steveire/grantlee")
241 (commit (string-append "v" version))))
242 (file-name (git-file-name name version))
244 (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
246 ;; Optional: lcov and cccc, both are for code coverage
249 (list qtbase-5 qtdeclarative-5 qtscript))
250 (build-system cmake-build-system)
253 (modify-phases %standard-phases
254 (add-before 'check 'check-setup
256 ;; make Qt render "offscreen", required for tests
257 (setenv "QT_QPA_PLATFORM" "offscreen")
259 (home-page "https://github.com/steveire/grantlee")
260 (synopsis "Libraries for text templating with Qt")
261 (description "Grantlee Templates can be used for theming and generation of
262 other text such as code. The syntax uses the syntax of the Django template
263 system, and the core design of Django is reused in Grantlee.")
264 (license license:lgpl2.1+)))
266 (define (qt-urls component version)
267 "Return a list of URLs for VERSION of the Qt5 COMPONENT."
268 ;; We can't use a mirror:// scheme because these URLs are not exact copies:
269 ;; the layout differs between them.
270 (list (string-append "https://download.qt.io/official_releases/qt/"
271 (version-major+minor version) "/" version
272 "/submodules/" component "-everywhere-src-"
274 (string-append "https://download.qt.io/archive/qt/"
275 (version-major+minor version) "/" version
276 "/submodules/" component "-everywhere-src-"
278 (let ((directory (string-append "qt5" (string-drop component 2))))
279 (string-append "http://sources.buildroot.net/" directory "/"
280 component "-everywhere-src-" version ".tar.xz"))
281 (string-append "https://distfiles.macports.org/qt5/"
282 component "-everywhere-src-" version ".tar.xz")))
284 (define-public qtbase-5
290 (uri (qt-urls name version))
293 "1y70libf2x52lpbqvhz10lpk7nyl1ajjwzjxly9pjdpfj4jsv7wh"))
294 ;; Use TZDIR to avoid depending on package "tzdata".
295 (patches (search-patches "qtbase-use-TZDIR.patch"
296 "qtbase-moc-ignore-gcc-macro.patch"
297 "qtbase-absolute-runpath.patch"))
298 (modules '((guix build utils)))
300 ;; corelib uses bundled harfbuzz, md4, md5, sha3
302 (with-directory-excursion "src/3rdparty"
303 (for-each delete-file-recursively
304 (list "double-conversion" "freetype" "harfbuzz-ng"
305 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
307 (build-system gnu-build-system)
308 (outputs '("out" "debug"))
311 ;; Use which the package, not the function
312 (@ (gnu packages base) which)))
314 `(("alsa-lib" ,alsa-lib)
317 ("double-conversion" ,double-conversion)
320 ("fontconfig" ,fontconfig)
321 ("freetype" ,freetype)
323 ("gtk+" ,gtk+) ;for GTK theme support
324 ("harfbuzz" ,harfbuzz)
326 ("libinput" ,libinput-minimal)
327 ("libjpeg" ,libjpeg-turbo)
331 ("libxcomposite" ,libxcomposite)
332 ("libxcursor" ,libxcursor)
333 ("libxfixes" ,libxfixes)
335 ("libxinerama" ,libxinerama)
336 ("libxkbcommon" ,libxkbcommon)
338 ("libxrandr" ,libxrandr)
339 ("libxrender" ,libxrender)
343 ("mariadb-dev" ,mariadb "dev")
347 ;; TODO: Switch to 'postgres' in the next rebuild cycle.
348 ("postgresql" ,postgresql-13)
349 ("pulseaudio" ,pulseaudio)
351 ("unixodbc" ,unixodbc)
352 ("xcb-util" ,xcb-util)
353 ("xcb-util-image" ,xcb-util-image)
354 ("xcb-util-keysyms" ,xcb-util-keysyms)
355 ("xcb-util-renderutil" ,xcb-util-renderutil)
356 ("xcb-util-wm" ,xcb-util-wm)
357 ("xdg-utils" ,xdg-utils)
370 (let ((out (assoc-ref %outputs "out")))
373 "-docdir" (string-append out "/share/doc/qt5")
374 "-headerdir" (string-append out "/include/qt5")
375 "-archdatadir" (string-append out "/lib/qt5")
376 "-datadir" (string-append out "/share/qt5")
377 "-examplesdir" (string-append
378 out "/share/doc/qt5/examples")
382 ;; Later stripped into the :debug output.
385 ;; These features require higher versions of Linux than the
386 ;; minimum version of the glibc. See
387 ;; src/corelib/global/minimum-linux_p.h. By disabling these
388 ;; features Qt5 applications can be used on the oldest
389 ;; kernels that the glibc supports, including the RHEL6
390 ;; (2.6.32) and RHEL7 (3.10) kernels.
391 "-no-feature-getentropy" ; requires Linux 3.17
392 "-no-feature-renameat2" ; requires Linux 3.16
394 ;; Do not build examples; if desired, these could go
395 ;; into a separate output, but for the time being, we
396 ;; prefer to save the space and build time.
397 "-no-compile-examples"
398 ;; Most "-system-..." are automatic, but some use
399 ;; the bundled copy by default.
403 ;; explicitly link with openssl instead of dlopening it
405 ;; explicitly link with dbus instead of dlopening it
407 ;; don't use the precompiled headers
409 ;; drop special machine instructions that do not have
411 ,@(if (string-prefix? "x86_64"
412 (or (%current-target-system)
419 (modify-phases %standard-phases
420 (add-after 'configure 'patch-bin-sh
422 (substitute* '("config.status"
424 "mkspecs/features/qt_functions.prf"
425 "qmake/library/qmakebuiltins.cpp")
426 (("/bin/sh") (which "sh")))))
427 (add-after 'configure 'patch-xdg-open
429 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
430 (("^.*const char \\*browsers.*$" all)
431 (string-append "*browser = QStringLiteral(\""
433 "\"); return true; \n" all)))))
435 ;; Overridden to not pass "--enable-fast-install", which makes the
436 ;; configure process fail.
437 (lambda* (#:key outputs configure-flags #:allow-other-keys)
438 (let ((out (assoc-ref outputs "out")))
439 (substitute* "configure"
440 (("/bin/pwd") (which "pwd")))
441 (substitute* "src/corelib/global/global.pri"
442 (("/bin/ls") (which "ls")))
443 ;; The configuration files for other Qt5 packages are searched
444 ;; through a call to "find_package" in Qt5Config.cmake, which
445 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
446 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
447 ;; components can be installed in different places.
448 (substitute* (find-files "." ".*\\.cmake")
449 (("NO_DEFAULT_PATH") ""))
450 (format #t "build directory: ~s~%" (getcwd))
451 (format #t "configure flags: ~s~%" configure-flags)
452 (apply invoke "./configure" configure-flags))))
453 (add-after 'install 'patch-mkspecs
454 (lambda* (#:key outputs #:allow-other-keys)
455 (let* ((out (assoc-ref outputs "out"))
456 (archdata (string-append out "/lib/qt5"))
457 (mkspecs (string-append archdata "/mkspecs"))
458 (qt_config.prf (string-append
459 mkspecs "/features/qt_config.prf")))
460 ;; For each Qt module, let `qmake' uses search paths in the
461 ;; module directory instead of all in QT_INSTALL_PREFIX.
462 (substitute* qt_config.prf
463 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
464 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
465 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
466 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
467 (("\\$\\$\\[QT_HOST_LIBS\\]")
468 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
469 (("\\$\\$\\[QT_INSTALL_BINS\\]")
470 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
472 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
473 (substitute* (string-append mkspecs "/features/qt_functions.prf")
474 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
475 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
477 ;; Resolve qmake spec files within qtbase by absolute paths.
480 (string-append mkspecs "/features/" file))
481 '("device_config.prf" "moc.prf" "qt_build_config.prf"
482 "qt_config.prf" "winrt/package_manifest.prf"))
483 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
484 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))
485 (add-after 'patch-mkspecs 'patch-prl-files
486 (lambda* (#:key outputs #:allow-other-keys)
487 (let ((out (assoc-ref outputs "out")))
488 ;; Insert absolute references to the qtbase libraries because
489 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
490 ;; on context. See <https://bugs.gnu.org/38405>
491 (substitute* (find-files (string-append out "/lib") "\\.prl$")
492 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
493 (string-append out "/lib"))))))
494 (add-after 'unpack 'patch-paths
495 ;; Use the absolute paths for dynamically loaded libs, otherwise
496 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
498 (lambda* (#:key inputs #:allow-other-keys)
500 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
501 "cross-libc" "libc"))))
502 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
503 "src/network/kernel/qhostinfo_unix.cpp")
504 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
505 (string-append a glibc "/lib/lib" b))))
507 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
508 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
509 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
511 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
512 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
513 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
514 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
515 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))))))))
517 (list (search-path-specification
518 (variable "QMAKEPATH")
519 (files '("lib/qt5")))
520 (search-path-specification
521 (variable "QML2_IMPORT_PATH")
522 (files '("lib/qt5/qml")))
523 (search-path-specification
524 (variable "QT_PLUGIN_PATH")
525 (files '("lib/qt5/plugins")))
526 (search-path-specification
527 (variable "XDG_DATA_DIRS")
529 (search-path-specification
530 (variable "XDG_CONFIG_DIRS")
531 (files '("etc/xdg")))))
532 (home-page "https://www.qt.io/")
533 (synopsis "Cross-platform GUI library")
534 (description "Qt is a cross-platform application and UI framework for
535 developers using C++ or QML, a CSS & JavaScript like language.")
536 (license (list license:lgpl2.1 license:lgpl3))))
538 (define-public qtbase
539 (package/inherit qtbase-5
543 (inherit (package-source qtbase-5))
544 (uri (qt-urls name version))
547 "00sfya41ihqb0zwg6wf1kiy02iymj6mk584hhk2c4s94khfl4r0a"))
548 (modules '((guix build utils)))
550 ;; corelib uses bundled harfbuzz, md4, md5, sha3
551 '(with-directory-excursion "src/3rdparty"
552 (for-each delete-file-recursively
553 ;; The bundled pcre2 copy is kept, as its headers
554 ;; are required by some internal bootstrap target
555 ;; used for the tools.
556 (list "double-conversion" "freetype" "harfbuzz-ng"
557 "libpng" "libjpeg" "sqlite" "xcb" "zlib"))))))
558 (build-system cmake-build-system)
560 (substitute-keyword-arguments (package-arguments qtbase-5)
561 ((#:configure-flags _ ''())
562 `(let ((out (assoc-ref %outputs "out")))
563 (list "-GNinja" ;the build fails otherwise
564 "-DQT_BUILD_TESTS=ON"
565 (string-append "-DINSTALL_ARCHDATADIR=" out "/lib/qt6")
566 (string-append "-DINSTALL_DATADIR=" out "/share/qt6")
567 (string-append "-DINSTALL_DOCDIR=" out "/share/doc/qt6")
568 (string-append "-DINSTALL_MKSPECSDIR=" out "/lib/qt6/mkspecs")
569 (string-append "-DINSTALL_EXAMPLESDIR=" out
570 "/share/doc/qt6/examples")
571 (string-append "-DINSTALL_INCLUDEDIR=" out "/include/qt6")
572 ;; Link with DBus and OpenSSL so they don't get dlopen'ed.
573 "-DINPUT_dbus=linked"
574 "-DINPUT_openssl=linked"
575 ;; These features require higher versions of Linux than the
576 ;; minimum version of the glibc. See
577 ;; src/corelib/global/minimum-linux_p.h. By disabling these
578 ;; features Qt applications can be used on the oldest kernels
579 ;; that the glibc supports, including the RHEL6 (2.6.32) and
580 ;; RHEL7 (3.10) kernels.
581 "-DFEATURE_getentropy=OFF" ; requires Linux 3.17
582 "-DFEATURE_renameat2=OFF" ; requires Linux 3.16
583 ;; Most system libraries are used by default, except in some
584 ;; cases such as for those below.
585 "-DFEATURE_system_pcre2=ON"
586 "-DFEATURE_system_sqlite=ON"
587 "-DFEATURE_system_xcb_xinput=ON"
588 ;; Don't use the precompiled headers.
589 "-DBUILD_WITH_PCH=OFF"
590 ;; Drop special machine instructions that do not have runtime
592 ,@(if (string-prefix? "x86_64"
593 (or (%current-target-system)
595 '() ;implicitly enabled
596 '("-DFEATURE_sse2=OFF"
598 "-DFEATURE_ssse3=OFF"
599 "-DFEATURE_sse4_1=OFF"
600 "-DFEATURE_sse4_2=OFF"))
601 "-DFEATURE_mips_dsp=OFF"
602 "-DFEATURE_mips_dspr2=OFF")))
604 #~(modify-phases #$phases
605 (add-after 'unpack 'honor-CMAKE_PREFIX_PATH
607 ;; The configuration files for other Qt packages are searched
608 ;; through a call to "find_package" in Qt5Config.cmake, which
609 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
610 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
611 ;; components can be installed in different places.
612 (substitute* (find-files "." "\\.cmake(\\.in)?$")
613 (("\\bNO_DEFAULT_PATH\\b") ""))
614 ;; Because Qt goes against the grain of CMake and set
615 ;; NO_DEFAULT_PATH, it needs to invent yet another variable
616 ;; to do what CMAKE_PREFIX_PATH could have done:
617 ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH. Since we patch out
618 ;; the NO_DEFAULT_PATH, we can set the default value of
619 ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH to that of
620 ;; CMAKE_PREFIX_PATH to ensure tools such as
621 ;; 'qmlimportscanner' from qtdeclarative work out of the
623 (substitute* "cmake/QtConfig.cmake.in"
624 (("(set\\(QT_ADDITIONAL_PACKAGES_PREFIX_PATH )\"\"" _ head)
625 (string-append head "\"$ENV{CMAKE_PREFIX_PATH}\"")))))
626 (delete 'patch-bin-sh)
627 (delete 'patch-xdg-open)
628 (add-after 'patch-paths 'patch-more-paths
629 (lambda* (#:key inputs #:allow-other-keys)
630 (substitute* (find-files "bin" "\\.in$")
632 (search-input-file inputs "bin/pwd")))
633 (substitute* "src/gui/platform/unix/qgenericunixservices.cpp"
635 (format #f "~s" (search-input-file inputs "bin/xdg-open"))))
636 (substitute* '("mkspecs/features/qt_functions.prf"
637 "qmake/library/qmakebuiltins.cpp")
639 (search-input-file inputs "bin/bash")))
640 (substitute* "src/corelib/CMakeLists.txt"
642 (search-input-file inputs "bin/ls")))))
644 (assoc-ref %standard-phases 'configure))
646 (lambda* (#:key parallel-build? #:allow-other-keys)
647 (apply invoke "cmake" "--build" "."
649 `("--parallel" ,(number->string (parallel-job-count)))
651 (delete 'check) ;move after patch-prl-files
652 (add-after 'patch-prl-files 'check
653 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
655 ;; The tests expect to find the modules provided by this
656 ;; package; extend the environment variables needed to do so.
657 (setenv "CMAKE_PREFIX_PATH"
658 (string-append #$output
659 ":" (getenv "CMAKE_PREFIX_PATH")))
660 (setenv "QMAKEPATH" (string-append #$output "/lib/qt6"))
661 (setenv "QML2_IMPORT_PATH"
662 (string-append #$output "/lib/qt6/qml"))
663 (setenv "QT_PLUGIN_PATH"
664 (string-append #$output "/lib/qt6/plugins"))
665 (setenv "QT_QPA_PLATFORM" "offscreen")
666 ;; Skip tests known to fail on GNU/Linux, in a CI context or
667 ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
668 ;; /tree/src/testlib/qtestblacklist.cpp).
669 (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
670 (setenv "HOME" "/tmp") ;some tests require a writable HOME
672 "xvfb-run" "ctest" "--output-on-failure"
673 "-j" (if parallel-tests?
674 (number->string (parallel-job-count))
676 "-E" ;disable problematic tests
681 ;; The 'tst_moc' test fails with "'fi.exists()' returned FALSE".
683 ;; The 'test_rcc' test fails on a comparison:
685 ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xe8,
687 ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
690 ;; The 'tst_qtemporarydir' and 'tst_qtemporaryfile'
691 ;; tests depend on '/home' not being writable.
694 ;; The 'tst_qdir' compares two directories which are
695 ;; unexpectedly different when inside the build
698 ;; This checks the last modified time of '/', and fails
699 ;; because Epoch 0 is considered to be invalid.
700 "tst_qresourceengine"
701 ;; The 'tst_qfilesystemwatcher' installs a watcher on
702 ;; '/home', which doesn't exist in the build container.
703 "tst_qfilesystemwatcher"
704 ;; The 'mockplugins' test fail following error: "Unknown
705 ;; platform linux-g++", and the other plugin tests
708 "test_plugin_flavor.*"
709 ;; The 'test_import_plugins' fails with "Could NOT find
711 "test_import_plugins"
712 ;; The 'tst_QTimeZone::systemZone' validates the
713 ;; currently set timezone and fails.
715 ;; The 'tst_qdatetime' fails with:
716 ;; FAIL! : tst_QDateTime::offsetFromUtc() Compared values are not the same
717 ;; Actual (dt5.offsetFromUtc()): 0
718 ;; Expected (46800) : 46800
720 ;; The 'tst_QSettings::fromFile' assumes the data
721 ;; location to be relative to the root directory and
724 ;; The 'tst_qaddpreroutine',
725 ;; 'test_generating_cpp_exports' and
726 ;; 'test_static_resources' tests fail with: "Unknown
727 ;; platform linux-g++.
729 "test_generating_cpp_exports"
730 "test_static_resources"
731 ;; The 'tst_qfile' fails since there is no /home in the
734 ;; The 'tst_QGlyphRun::mixedScripts' test fails with:
735 ;; Actual (glyphRuns.size()): 1
738 ;; The 'tst_qx11info' test fails with "Internal error:
739 ;; QPA plugin doesn't implement generatePeekerId",
740 ;; likely requires a real display.
742 ;; The 'tst_qgraphicswidget' test fails because "This
743 ;; plugin does not support propagateSizeHints".
744 "tst_qgraphicswidget"
745 ;; The 'tst_qdnslookup' test requires networking.
747 ;; The 'tst_qcompleter' and 'tst_QFiledialog::completer'
748 ;; attempt to complete paths they assume exist, such as
749 ;; "/home", "/etc" or "/root" and fail.
751 "tst_qfiledialog") "|")
755 (invoke "cmake" "--install" ".")))
756 (replace 'patch-mkspecs
757 (lambda* (#:key outputs #:allow-other-keys)
758 (let* ((archdata (search-input-directory outputs "lib/qt6"))
759 (mkspecs (search-input-directory outputs
763 outputs "lib/qt6/mkspecs/features/qt_config.prf"))
766 outputs "lib/qt6/mkspecs/features/qt_functions.prf")))
767 ;; For each Qt module, let `qmake' uses search paths in the
768 ;; module directory instead of all in QT_INSTALL_PREFIX.
769 (substitute* qt_config.prf
770 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
771 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt6))")
772 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
773 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
774 (("\\$\\$\\[QT_HOST_LIBS\\]")
775 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
776 (("\\$\\$\\[QT_INSTALL_BINS\\]")
777 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
779 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
780 (substitute* qt_functions.prf
781 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
782 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
784 ;; Resolve qmake spec files within qtbase by absolute paths.
789 (string-append "lib/qt6/mkspecs/features/" file)))
790 '("device_config.prf" "moc.prf" "qt_build_config.prf"
792 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
793 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))))))
795 (modify-inputs (package-native-inputs qtbase-5)
800 (modify-inputs (package-inputs qtbase-5)
801 (prepend bash-minimal coreutils-minimal libxcb md4c)
802 (replace "postgresql" postgresql))) ;use latest postgresql
804 (list (search-path-specification
805 (variable "QMAKEPATH")
806 (files '("lib/qt6")))
807 (search-path-specification
808 (variable "QML2_IMPORT_PATH")
809 (files '("lib/qt6/qml")))
810 (search-path-specification
811 (variable "QT_PLUGIN_PATH")
812 (files '("lib/qt6/plugins")))
813 (search-path-specification
814 (variable "XDG_DATA_DIRS")
816 (search-path-specification
817 (variable "XDG_CONFIG_DIRS")
818 (files '("etc/xdg")))))))
820 (define-public qt5compat
826 (uri (qt-urls name version))
829 "1zbcaswpl79ixcxzj85qzjq73962s4c7316pibwfrskqswmwcgm4"))))
830 (build-system cmake-build-system)
833 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
834 #:phases #~(modify-phases %standard-phases
835 (add-after 'install 'delete-installed-tests
837 (delete-file-recursively
838 (string-append #$output "/tests")))))))
839 (native-inputs (list perl))
840 (inputs (list icu4c libxkbcommon qtbase qtdeclarative qtshadertools))
841 (home-page (package-home-page qtbase))
842 (synopsis "Legacy Qt 5 APIs ported to Qt 6")
843 (description "The @code{qt5compat} package includes application
844 programming interfaces (APIs) from Qt 5 that were ported to Qt 6, to ease
845 migration. It provides for example the @code{GraphicalEffects} module that
846 came with the @{qtgraphicaleffects} Qt 5 package.")
847 (license (list license:gpl2+ license:lgpl3+)))) ;dual licensed
849 (define-public qtsvg-5
856 (uri (qt-urls name version))
859 "0pjqrdmd1991x9h4rl8sf81pkd89hfd5h1a2gp3fjw96pk0w5hwb"))))
860 (propagated-inputs `())
861 (native-inputs (list perl))
863 (list mesa qtbase-5 zlib))
866 (modify-phases %standard-phases
867 (add-before 'configure 'configure-qmake
868 (lambda* (#:key inputs outputs #:allow-other-keys)
869 (let* ((out (assoc-ref outputs "out"))
870 (qtbase (assoc-ref inputs "qtbase"))
871 (tmpdir (string-append (getenv "TMPDIR")))
872 (qmake (string-append tmpdir "/qmake"))
873 (qt.conf (string-append tmpdir "/qt.conf")))
874 ;; Use qmake with a customized qt.conf to override install
876 (symlink (which "qmake") qmake)
877 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
878 (with-output-to-file qt.conf
884 Documentation=share/doc/qt5
887 LibraryExecutables=lib/qt5/libexec
890 Plugins=lib/qt5/plugins
891 Imports=lib/qt5/imports
892 Qml2Imports=lib/qt5/qml
893 Translations=share/qt5/translations
895 Examples=share/doc/qt5/examples
901 [EffectiveSourcePaths]
907 (lambda* (#:key inputs outputs #:allow-other-keys)
908 ;; Valid QT_BUILD_PARTS variables are:
909 ;; libs tools tests examples demos docs translations
910 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
911 (add-before 'check 'set-display
913 ;; make Qt render "offscreen", required for tests
914 (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 "1msk8a0z8rr16hkp2fnv668vf6wayiydqgc2mcklaa04rv3qb0mz"))
961 (modules '((guix build utils)))
964 (delete-file-recursively "src/3rdparty")
967 (substitute-keyword-arguments (package-arguments qtsvg-5)
969 `(modify-phases ,phases
970 (add-after 'unpack 'fix-build
972 (substitute* "src/plugins/imageformats/jp2/qjp2handler.cpp"
973 (("^#include <jasper/jasper.h>")
974 "#include <jasper/jasper.h>\n#include <QtCore/qmath.h>"))
985 (synopsis "Additional Image Format plugins for Qt")
986 (description "The QtImageFormats module contains plugins for adding
987 support for MNG, TGA, TIFF and WBMP image formats.")))
989 (define-public qtx11extras
990 (package (inherit qtsvg-5)
995 (uri (qt-urls name version))
998 "0gkfzj195v9flwljnqpdz3a532618yn4h2577nlsai56x4p7053h"))))
1000 (substitute-keyword-arguments (package-arguments qtsvg-5)
1001 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1002 (native-inputs (list perl))
1004 (list mesa qtbase-5))
1005 (synopsis "Qt Extras for X11")
1006 (description "The QtX11Extras module includes the library to access X11
1007 from within Qt 5.")))
1009 (define-public qtxmlpatterns
1010 (package (inherit qtsvg-5)
1011 (name "qtxmlpatterns")
1015 (uri (qt-urls name version))
1018 "1ypj5jpa31rlx8yfw3y9jia212lfnxvnqkvygs6ihjf3lxi23skn"))))
1020 (substitute-keyword-arguments (package-arguments qtsvg-5)
1021 ((#:tests? _ #f) #f) ; TODO: Enable the tests
1023 `(modify-phases ,phases
1024 (add-after 'unpack 'disable-network-tests
1025 (lambda _ (substitute* "tests/auto/auto.pro"
1026 (("qxmlquery") "# qxmlquery")
1027 (("xmlpatterns ") "# xmlpatterns"))
1029 (native-inputs (list perl qtdeclarative-5))
1030 (inputs (list qtbase-5))
1031 (synopsis "Qt XML patterns module")
1032 (description "The QtXmlPatterns module is a XQuery and XPath engine for
1033 XML and custom data models. It contains programs such as xmlpatterns and
1034 xmlpatternsvalidator.")))
1036 (define-public qtdeclarative-5
1037 (package (inherit qtsvg-5)
1038 (name "qtdeclarative")
1042 (uri (qt-urls name version))
1045 "0lancdn7y0lrlmyn5cbdm0izd5yprvd5n77nhkb7a3wl2sbx0066"))))
1047 (substitute-keyword-arguments (package-arguments qtsvg-5)
1048 ((#:tests? _ #f) #f) ;TODO: Enable the tests
1050 `(modify-phases ,phases
1051 (add-after 'build 'fix-qt5core-install-prefix
1052 (lambda* (#:key outputs #:allow-other-keys)
1053 (let ((out (assoc-ref outputs "out")))
1054 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
1055 ;; is provided by qtdeclarative-5.
1057 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
1058 (("\\$\\{_qt5Core_install_prefix\\}") out)))
1068 (list mesa qtbase-5))
1069 (synopsis "Qt QML module (Quick 2)")
1070 (description "The Qt QML module provides a framework for developing
1071 applications and libraries with the QML language. It defines and implements the
1072 language and engine infrastructure, and provides an API to enable application
1073 developers to extend the QML language with custom types and integrate QML code
1074 with JavaScript and C++.")))
1076 (define-public qtdeclarative
1078 (name "qtdeclarative")
1080 ;; TODO: Package 'masm' and unbundle from sources.
1083 (uri (qt-urls name version))
1086 "1s268fha3650dn1lqxf8jfa07wxpw09f6p7rjyiwq3w24d0nkrq3"))))
1087 (build-system cmake-build-system)
1090 #:configure-flags #~(list "-GNinja" ;about twice as fast!
1091 "-DQT_BUILD_TESTS=ON")
1093 #~(modify-phases %standard-phases
1094 (add-after 'unpack 'honor-cmake-install-rpath
1095 ;; The build system goes out of its way to compute a runpath it
1096 ;; thinks makes more sense, and fails. Revert to the default
1097 ;; behavior, which is to honor CMAKE_INSTALL_RPATH.
1099 (substitute* "src/qml/Qt6QmlMacros.cmake"
1100 (("set_target_properties.*PROPERTIES.*INSTALL_RPATH.*" all)
1101 (string-append "# " all)))))
1102 (add-after 'unpack 'patch-qlibraryinfo-paths
1104 ;; The QLibraryInfo paths are hard-coded to point to the qtbase
1105 ;; installation, but all the tools used in the test suite come
1106 ;; from this package.
1107 (substitute* (find-files "tests" "\\.cpp$")
1108 (("QLibraryInfo::path\\(QLibraryInfo::BinariesPath)")
1109 (string-append "QStringLiteral(\"" #$output "/bin\")"))
1110 (("QLibraryInfo::path\\(QLibraryInfo::LibraryExecutablesPath)")
1111 (string-append "QStringLiteral(\"" #$output
1112 "/lib/qt6/libexec\")"))
1113 (("QLibraryInfo::path\\(QLibraryInfo::QmlImportsPath)")
1114 (string-append "QStringLiteral(\"" #$output
1115 "/lib/qt6/qml\")")))))
1117 (lambda* (#:key parallel-build? #:allow-other-keys)
1118 (apply invoke "cmake" "--build" "."
1120 `("--parallel" ,(number->string (parallel-job-count)))
1122 (delete 'check) ;move after the install phase
1125 (invoke "cmake" "--install" ".")))
1126 (add-after 'install 'check
1127 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
1129 ;; The tests expect to find the modules provided by this
1130 ;; package; extend the environment variables needed to do so.
1131 ;(setenv "CMAKE_PREFIX_PATH" #$output)
1132 (setenv "QML2_IMPORT_PATH"
1133 (string-append #$output "/lib/qt6/qml"))
1134 (setenv "QT_PLUGIN_PATH"
1135 (string-append #$output "/lib/qt6/plugins:"
1136 (getenv "QT_PLUGIN_PATH")))
1137 (setenv "QT_QPA_PLATFORM" "offscreen")
1138 ;; Skip tests known to fail on GNU/Linux, in a CI context or
1139 ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
1140 ;; /tree/src/testlib/qtestblacklist.cpp).
1141 (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
1142 (setenv "HOME" "/tmp") ;a few tests require a writable HOME
1144 "ctest" "--output-on-failure"
1145 "-j" (if parallel-tests?
1146 (number->string (parallel-job-count))
1148 "-E" ;exclude some tests by regex
1153 ;; This test is marked as flaky upstream (see:
1154 ;; https://bugreports.qt.io/browse/QTBUG-101488).
1155 "tst_qquickfiledialogimpl"
1156 ;; These tests all fail because 'test_overlappingHandles'
1157 ;; (see: https://bugreports.qt.io/browse/QTBUG-95750).
1163 ;; Fails due to using the wrong lib/qt6/qml prefix:
1164 ;; "Warning: Failed to find the following builtins:
1165 ;; builtins.qmltypes, jsroot.qmltypes (so will use
1166 ;; qrc). Import paths used:
1167 ;; /gnu/store/...-qtbase-6.3.1/lib/qt6/qml"
1168 "tst_qmltc_qprocess"
1169 ;; These test fail when running qmlimportscanner; perhaps
1170 ;; an extra CMAKE_PREFIX_PATH location is missing to
1171 ;; correctly locate the imports.
1174 "cmake_tooling_imports"
1175 ;; This test seems to hangs for a long time, possibly
1176 ;; waiting for a killed process, which becomes a zombie in
1177 ;; the build container (perhaps solved after
1178 ;; fixing/applying #30948).
1179 "tst_qqmlpreview") "|")
1181 (add-after 'install 'delete-installed-tests
1183 (delete-file-recursively (string-append #$output "/tests")))))))
1195 (home-page (package-home-page qtbase))
1196 (synopsis "Qt QML module (Quick 2)")
1197 (description "The Qt QML module provides a framework for developing
1198 applications and libraries with the QML language. It defines and implements
1199 the language and engine infrastructure, and provides an API to enable
1200 application developers to extend the QML language with custom types and
1201 integrate QML code with JavaScript and C++.")
1202 (license (package-license qtbase))))
1204 (define-public qtconnectivity
1205 (package (inherit qtsvg-5)
1206 (name "qtconnectivity")
1210 (uri (qt-urls name version))
1213 "185zci61ip1wpjrygcw2m6v55lvninc0b8y2p3jh6qgpf5w35003"))))
1215 (list perl pkg-config qtdeclarative-5))
1217 (list bluez qtbase-5))
1218 (synopsis "Qt Connectivity module")
1219 (description "The Qt Connectivity modules provides modules for interacting
1220 with Bluetooth and NFC.")))
1222 (define-public qtwebsockets-5
1223 (package (inherit qtsvg-5)
1224 (name "qtwebsockets")
1228 (uri (qt-urls name version))
1231 "0gr399fn5n8j3m9d3vv01vcbr1cb7pw043j04cnnxzrlvn2jvd50"))))
1233 (substitute-keyword-arguments (package-arguments qtsvg-5)
1234 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1236 (list perl qtdeclarative-5))
1237 (inputs (list qtbase-5))
1238 (synopsis "Qt Web Sockets module")
1239 (description "WebSocket is a web-based protocol designed to enable two-way
1240 communication between a client application and a remote host. The Qt
1241 WebSockets module provides C++ and QML interfaces that enable Qt applications
1242 to act as a server that can process WebSocket requests, or a client that can
1243 consume data received from the server, or both.")))
1245 (define-public qtwebsockets
1247 (name "qtwebsockets")
1251 (uri (qt-urls name version))
1254 "06hj0pkdzjicmbiinjp1dk1ziz8cb3fgcwy7a0dxxjvzr680v64z"))))
1255 (build-system cmake-build-system)
1258 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1259 #:phases #~(modify-phases %standard-phases
1260 (delete 'check) ;move after install
1261 (add-after 'install 'prepare-for-tests
1263 (setenv "QT_QPA_PLATFORM" "offscreen")
1264 (setenv "QML2_IMPORT_PATH"
1265 (string-append #$output "/lib/qt6/qml:"
1266 (getenv "QML2_IMPORT_PATH")))))
1267 (add-after 'prepare-for-tests 'check
1268 (assoc-ref %standard-phases 'check))
1269 (add-after 'check 'delete-installed-tests
1271 (delete-file-recursively
1272 (string-append #$output "/tests")))))))
1273 (native-inputs (list perl))
1274 (inputs (list qtbase qtdeclarative))
1275 (synopsis "Qt Web Sockets module")
1276 (description "WebSocket is a web-based protocol designed to enable two-way
1277 communication between a client application and a remote host. The Qt
1278 WebSockets module provides C++ and QML interfaces that enable Qt applications
1279 to act as a server that can process WebSocket requests, or a client that can
1280 consume data received from the server, or both.")
1281 (home-page (package-home-page qtbase))
1282 (license (package-license qtbase))))
1284 (define-public qtsensors
1285 (package (inherit qtsvg-5)
1290 (uri (qt-urls name version))
1293 "0fa81r7bn1mf9ynwsx524a55dx1q0jb4vda6j48ssb4lx7wi201z"))))
1295 (substitute-keyword-arguments (package-arguments qtsvg-5)
1296 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
1298 `(modify-phases ,phases
1299 (add-after 'unpack 'fix-tests
1301 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
1302 (("2000") "5000") ;lengthen test timeout
1303 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
1306 (list perl qtdeclarative-5))
1307 (inputs (list qtbase-5))
1308 (synopsis "Qt Sensors module")
1309 (description "The Qt Sensors API provides access to sensor hardware via QML
1310 and C++ interfaces. The Qt Sensors API also provides a motion gesture
1311 recognition API for devices.")))
1313 (define-public qtmultimedia-5
1316 (name "qtmultimedia")
1320 (uri (qt-urls name version))
1323 "1xbd6kc7i0iablqdkvfrajpi32cbq7j6ajbfyyyalcai1s0mhdqc"))
1324 (modules '((guix build utils)))
1327 (delete-file-recursively
1328 "examples/multimedia/spectrum/3rdparty")
1329 ;; We also prevent the spectrum example from being built.
1330 (substitute* "examples/multimedia/multimedia.pro"
1334 (substitute-keyword-arguments (package-arguments qtsvg-5)
1336 `(modify-phases ,phases
1338 (lambda* (#:key outputs #:allow-other-keys)
1339 (let ((out (assoc-ref outputs "out")))
1340 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
1341 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
1342 (string-append "PREFIX=" out)))))))
1343 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1345 (list perl pkg-config python qtdeclarative-5))
1351 ;; Gstreamer is needed for the mediaplayer plugin
1354 (synopsis "Qt Multimedia module")
1355 (description "The Qt Multimedia module provides set of APIs to play and
1356 record media, and manage a collection of media content. It also contains a
1357 set of plugins for interacting with pulseaudio and GStreamer.")))
1359 (define-public qtshadertools
1361 (name "qtshadertools")
1365 (uri (qt-urls name version))
1366 ;; Note: the source bundles *patched* glslang and SPIRV-Cross
1370 "0nj35s2z5n438q7nqf6bnj3slwz2am3169ck1ixwqa0mjrv73dsr"))))
1371 (build-system cmake-build-system)
1374 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1375 #:phases #~(modify-phases %standard-phases
1376 (add-before 'check 'prepare-for-tests
1378 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
1379 (native-inputs (list perl))
1380 (inputs (list glslang libxkbcommon qtbase))
1381 (home-page (package-home-page qtbase))
1382 (synopsis "Shader pipeline API and and tools for Qt")
1383 (description "The @code{qtshadertools} module provides APIs and tools
1384 supporting shader pipeline functionality as offered in Qt Quick to operate on
1385 Vulkan, OpenGL and other main graphic APIs.")
1386 (license (package-home-page qtbase))))
1388 (define-public qtmultimedia
1390 (name "qtmultimedia")
1394 (uri (qt-urls name version))
1397 "0dkk3lmzi2fs13cnj8q1lpcs6gghj219826gkwnzyd6nmlm280vy"))
1398 (modules '((guix build utils)))
1401 (delete-file-recursively
1402 "examples/multimedia/spectrum/3rdparty")
1403 ;; We also prevent the spectrum example from being built.
1404 (substitute* "examples/multimedia/multimedia.pro"
1405 (("spectrum") "#"))))))
1406 (build-system cmake-build-system)
1409 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON"
1410 "-DQT_FEATURE_pulseaudio=ON")
1412 #~(modify-phases %standard-phases
1413 (add-after 'unpack 'disable-integration-tests
1415 ;; XXX: The tst_qaudiodecoderbackend, tst_qaudiodevice,
1416 ;; tst_qaudiosource, tst_qmediaplayerbackend and
1417 ;; tst_qcamerabackend tests fail, presumably because they
1418 ;; require a functional pulseaudio daemon (which requires a dbus
1419 ;; session bus, which requires an X11 server, and then is still
1421 (substitute* "tests/auto/CMakeLists.txt"
1422 (("add_subdirectory\\(integration)") ""))))
1423 (add-before 'check 'prepare-for-tests
1425 (setenv "QT_QPA_PLATFORM" "offscreen")))
1426 (add-after 'install 'delete-installed-tests
1428 (delete-file-recursively (string-append #$output "/tests")))))))
1438 gst-plugins-base ;gstreamer-gl
1439 gst-plugins-good ;camera support, additional plugins
1440 gst-libav ;ffmpeg plugin
1446 (home-page (package-home-page qtbase))
1447 (synopsis "Qt Multimedia module")
1448 (description "The Qt Multimedia module provides set of APIs to play and
1449 record media, and manage a collection of media content. It also contains a
1450 set of plugins for interacting with pulseaudio and GStreamer.")
1451 (license (package-license qtbase))))
1453 (define-public qtwayland
1454 (package (inherit qtsvg-5)
1459 (uri (qt-urls name version))
1460 (patches (search-patches "qtwayland-gcc-11.patch"))
1463 "1ddfx4nak16xx0zh1kl836zxvpbixmmjyplsmfmg65pqkwi34dqr"))))
1465 (substitute-keyword-arguments (package-arguments qtsvg-5)
1467 `(modify-phases ,phases
1468 (add-after 'unpack 'disable-failing-tests
1470 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
1471 ;; reason and breaks these two tests.
1472 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
1473 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
1474 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
1476 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
1479 (add-before 'check 'set-test-environment
1481 ;; Do not fail just because /etc/machine-id is missing.
1482 (setenv "DBUS_FATAL_WARNINGS" "0")
1485 (list glib perl pkg-config qtdeclarative-5))
1499 (synopsis "Qt Wayland module")
1500 (description "The Qt Wayland module provides the QtWayland client and
1501 compositor libraries.")))
1503 (define-public qtserialport
1504 (package (inherit qtsvg-5)
1505 (name "qtserialport")
1509 (uri (qt-urls name version))
1512 "17gp5qzg4wdg8qlxk2p3mh8x1vk33rf33wic3fy0cws193bmkiar"))))
1513 (native-inputs (list perl))
1515 (list qtbase-5 eudev))
1517 (substitute-keyword-arguments (package-arguments qtsvg-5)
1519 `(modify-phases ,phases
1520 (add-after 'unpack 'patch-dlopen-paths
1521 (lambda* (#:key inputs #:allow-other-keys)
1522 (substitute* "src/serialport/qtudev_p.h"
1523 ;; Use the absolute paths for dynamically loaded libs,
1524 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1525 ;; typically is not set in guix.
1526 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1527 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1529 (synopsis "Qt Serial Port module")
1530 (description "The Qt Serial Port module provides the library for
1531 interacting with serial ports from within Qt.")))
1533 (define-public qtserialbus
1534 (package (inherit qtsvg-5)
1535 (name "qtserialbus")
1539 (uri (qt-urls name version))
1542 "125x6756fjpldqy6wbw6cg7ngjh2016aiq92bchh719z1mf7xsxf"))))
1544 (substitute-keyword-arguments (package-arguments qtsvg-5)
1545 ((#:phases phases '%standard-phases)
1546 `(modify-phases ,phases
1547 (add-after 'unpack 'patch-libsocketcan-reference
1548 (lambda* (#:key inputs #:allow-other-keys)
1549 (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
1550 (libcansocket.so (string-append libcansocket
1551 "/lib/libsocketcan.so")))
1552 (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
1553 (("QStringLiteral\\(\"socketcan\"\\)")
1554 (format #f "QStringLiteral(~s)" libcansocket.so)))
1557 (list libsocketcan qtbase-5 qtserialport))
1558 (synopsis "Qt Serial Bus module")
1559 (description "The Qt Serial Bus API provides classes and functions to
1560 access the various industrial serial buses and protocols, such as CAN, ModBus,
1563 (define-public qtwebchannel-5
1564 (package (inherit qtsvg-5)
1565 (name "qtwebchannel")
1569 (uri (qt-urls name version))
1572 "1h9y634phvvk557mhmf9z4lmxr41rl8x9mqy2lzp31mk8ffffzqj"))))
1574 (list perl qtdeclarative-5 qtwebsockets-5))
1575 (inputs (list qtbase-5))
1576 (synopsis "Web communication library for Qt")
1577 (description "The Qt WebChannel module enables peer-to-peer communication
1578 between the host (QML/C++ application) and the client (HTML/JavaScript
1579 application). The transport mechanism is supported out of the box by the two
1580 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1582 (define-public qtwebchannel
1584 (name "qtwebchannel")
1588 (uri (qt-urls name version))
1591 "0s16zx3qn3byldvhmsnwijm8rmizk8vpqj7fnwhjg6c67z10m8ma"))))
1592 (build-system cmake-build-system)
1595 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1596 #:phases #~(modify-phases %standard-phases
1597 (delete 'check) ;move after install
1598 (add-after 'install 'prepare-for-tests
1600 (setenv "QT_QPA_PLATFORM" "offscreen")
1601 (setenv "QML2_IMPORT_PATH"
1602 (string-append #$output "/lib/qt6/qml:"
1603 (getenv "QML2_IMPORT_PATH")))))
1604 (add-after 'prepare-for-tests 'check
1605 (assoc-ref %standard-phases 'check))
1606 (add-after 'check 'delete-installed-tests
1608 (delete-file-recursively
1609 (string-append #$output "/tests")))))))
1610 (native-inputs (list perl))
1611 (inputs (list qtbase qtdeclarative qtwebsockets))
1612 (home-page (package-home-page qtbase))
1613 (synopsis "Web communication library for Qt")
1614 (description "The Qt WebChannel module enables peer-to-peer communication
1615 between the host (QML/C++ application) and the client (HTML/JavaScript
1617 (license (package-license qtbase))))
1619 (define-public qtwebglplugin
1620 (package (inherit qtsvg-5)
1621 (name "qtwebglplugin")
1625 (uri (qt-urls name version))
1628 "0ihlnhv8ldkqz82v3j7j22lrhk17b6ghra8sx85y2agd2ysq5rw1"))))
1630 (substitute-keyword-arguments (package-arguments qtsvg-5)
1632 `(modify-phases ,phases
1633 (add-after 'unpack 'disable-network-tests
1634 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1635 (("webgl") "# webgl"))
1639 (list mesa qtbase-5 qtdeclarative-5 qtwebsockets-5 zlib))
1640 (synopsis "QPA plugin for running an application via a browser using
1641 streamed WebGL commands")
1642 (description "Qt back end that uses WebGL for rendering. It allows Qt
1643 applications (with some limitations) to run in a web browser that supports
1644 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1645 compatible web browser without the use of plug-ins. The API is similar to
1646 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1648 (define-public qtwebview
1649 (package (inherit qtsvg-5)
1654 (uri (qt-urls name version))
1657 "1rw1wibmbxlj6xc86qs3y8h42al1vczqiksyxzaylxs9gqb4d7xy"))))
1661 (list qtbase-5 qtdeclarative-5))
1662 (synopsis "Display web content in a QML application")
1663 (description "Qt WebView provides a way to display web content in a QML
1664 application without necessarily including a full web browser stack by using
1665 native APIs where it makes sense.")))
1667 (define-public qtlocation
1668 (package (inherit qtsvg-5)
1673 (uri (string-append "https://download.qt.io/official_releases/qt/"
1674 (version-major+minor version) "/" version
1675 "/submodules/" name "-everywhere-src-"
1679 "184jychnlfhplpwc5cdcsapwljgwvzk5qpf3val4kpq8w44wnkwq"))))
1681 (substitute-keyword-arguments (package-arguments qtsvg-5)
1682 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1684 (list perl qtdeclarative-5 qtquickcontrols-5 qtserialport))
1686 (list icu4c openssl qtbase-5 zlib))
1687 (synopsis "Qt Location and Positioning modules")
1688 (description "The Qt Location module provides an interface for location,
1689 positioning and geolocation plugins.")))
1691 (define-public qtlottie
1697 (uri (qt-urls name version))
1700 "1x8wmc6gwmxk92zjcsrbhrbqbfvnk7302ggghld5wk8jk5lsf2vl"))))
1701 (build-system cmake-build-system)
1704 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1706 #~(modify-phases %standard-phases
1707 (delete 'check) ;move after install
1708 (add-after 'install 'prepare-for-tests
1710 (setenv "QT_QPA_PLATFORM" "offscreen")
1711 (setenv "QML2_IMPORT_PATH"
1712 (string-append #$output "/lib/qt6/qml:"
1713 (getenv "QML2_IMPORT_PATH"))))))))
1714 (native-inputs (list perl))
1715 (inputs (list libxkbcommon qtbase qtdeclarative))
1716 (home-page (package-home-page qtbase))
1717 (synopsis "QML API for rendering Bodymovin graphics and animations")
1718 (description "Qt Lottie Animation provides a QML API for rendering
1719 graphics and animations that are exported in JSON format by the Bodymovin
1720 plugin for Adobe After Effects.")
1721 (license (package-license qtbase))))
1723 (define-public qttools-5
1724 (package (inherit qtsvg-5)
1729 (uri (qt-urls name version))
1732 "1k618f7v6jaj0ygy8d7jvgb8zjr47sn55kiskbdkkizp3z7d12f1"))))
1734 (substitute-keyword-arguments (package-arguments qtsvg-5)
1735 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1737 (list perl qtdeclarative-5 vulkan-headers))
1739 (list mesa qtbase-5))
1740 (synopsis "Qt Tools and Designer modules")
1741 (description "The Qt Tools module provides a set of applications to browse
1742 the documentation, translate applications, generate help files and other stuff
1743 that helps in Qt development.")))
1745 (define-public qttools
1751 (uri (qt-urls name version))
1754 "1h96w4bzkbd80vr7lh6hnypdlmbzc1y52c2zrqzvkgm3587pa4n4"))))
1755 (build-system cmake-build-system)
1758 ;; The build system attempts to fetch online resources and fails when
1759 ;; building the test suite.
1760 #:configure-flags #~(list "-DQT_BUILD_TESTS=OFF")))
1761 (native-inputs (list perl qtdeclarative vulkan-headers))
1762 (inputs (list libxkbcommon mesa qtbase))
1763 (home-page (package-home-page qtbase))
1764 (synopsis "Qt Tools and Designer modules")
1765 (description "The Qt Tools module provides a set of applications to browse
1766 the documentation, translate applications, generate help files and other stuff
1767 that helps in Qt development.")
1768 ;; GPL 3 only with Qt GPL exception 1.0 (see:
1769 ;; LICENSES/Qt-GPL-exception-1.0.txt).
1770 (license (list license:gpl3))))
1772 (define-public qtscript
1773 (package (inherit qtsvg-5)
1778 (uri (qt-urls name version))
1781 "0gk74hk488k9ldacxbxcranr3arf8ifqg8kz9nm1rgdgd59p36d2"))
1782 (patches (search-patches "qtscript-disable-tests.patch"))))
1784 (list perl qttools-5))
1787 (synopsis "Qt Script module")
1788 (description "Qt provides support for application scripting with ECMAScript.
1789 The following guides and references cover aspects of programming with
1790 ECMAScript and Qt.")))
1792 (define-public qtquickcontrols-5
1793 (package (inherit qtsvg-5)
1794 (name "qtquickcontrols")
1798 (uri (qt-urls name version))
1801 "1dczakl868mg0lnwpf082jjc5976ycn879li1vqlgw5ihirzp4y3"))))
1803 (substitute-keyword-arguments (package-arguments qtsvg-5)
1804 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1806 (list qtbase-5 qtdeclarative-5))
1807 (synopsis "Qt Quick Controls and other Quick modules")
1808 (description "The QtScript module provides classes for making Qt
1809 applications scriptable. This module provides a set of extra components that
1810 can be used to build complete interfaces in Qt Quick.")))
1812 (define-public qtquickcontrols2-5
1813 (package (inherit qtsvg-5)
1814 (name "qtquickcontrols2")
1818 (uri (qt-urls name version))
1821 "06c9vrwvbjmzapmfa25y34lgjkzg57xxbm92nr6wkv5qykjnq6v7"))))
1823 (substitute-keyword-arguments (package-arguments qtsvg-5)
1824 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1826 (list qtbase-5 qtdeclarative-5))
1827 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1828 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1829 module that provides platform integration: native dialogs, menus and menu bars,
1830 and tray icons. It falls back to Qt Widgets when a native implementation is
1833 (define-public qtquickcontrols2
1834 ;; qtquickcontrols2 still exist, but was merged into qtdeclarative.
1835 ;; Unfortunately that hasn't been well communicated at all (see:
1836 ;; https://bugreports.qt.io/browse/QTBUG-79454).
1837 (deprecated-package "qtquickcontrols2" qtdeclarative))
1839 (define-public qtgraphicaleffects
1840 (package (inherit qtsvg-5)
1841 (name "qtgraphicaleffects")
1845 (uri (qt-urls name version))
1848 "1r6zfc0qga2ax155js7c8y5rx6vgayf582s921j09mb797v6g3gc"))))
1850 (substitute-keyword-arguments (package-arguments qtsvg-5)
1851 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1853 (list qtbase-5 qtdeclarative-5))
1854 (synopsis "Qt Graphical Effects module")
1855 (description "The Qt Graphical Effects module provides a set of QML types
1856 for adding visually impressive and configurable effects to user interfaces.
1857 Effects are visual items that can be added to Qt Quick user interface as UI
1858 components. The API consists of over 20 effects provided as separate QML
1859 types. The effects cover functional areas such as blending, masking, blurring,
1860 coloring, and many more.")))
1862 (define-public qtgamepad
1863 (package (inherit qtsvg-5)
1868 (uri (qt-urls name version))
1871 "0p07bg93fdfn4gr2kv38qgnws5znhswajrxdfs8xc9l3i7vi2xn7"))))
1873 (list perl pkg-config))
1875 `(("fontconfig" ,fontconfig)
1876 ("freetype" ,freetype)
1877 ("libxrender" ,libxrender)
1879 ("qtbase" ,qtbase-5)
1880 ("qtdeclarative-5" ,qtdeclarative-5)))
1881 (synopsis "Qt Gamepad module")
1882 (description "The Qt Gamepad module is an add-on library that enables Qt
1883 applications to support the use of gamepad hardware and in some cases remote
1884 control equipment. The module provides both QML and C++ interfaces. The
1885 primary target audience are embedded devices with fullscreen user interfaces,
1886 and mobile applications targeting TV-like form factors.")))
1888 (define-public qtscxml
1889 (package (inherit qtsvg-5)
1894 (uri (qt-urls name version))
1897 "1p5771b9hnpchfcdgy0zkhwg09a6xq88934aggp0rij1k85mkfb0"))
1898 (modules '((guix build utils)))
1901 (delete-file-recursively "tests/3rdparty")
1902 ;; the scion test refers to the bundled 3rd party test code.
1903 (substitute* "tests/auto/auto.pro"
1907 (list qtbase-5 qtdeclarative-5))
1908 (synopsis "Qt SCXML module")
1909 (description "The Qt SCXML module provides functionality to create state
1910 machines from SCXML files. This includes both dynamically creating state
1911 machines (loading the SCXML file and instantiating states and transitions) and
1912 generating a C++ file that has a class implementing the state machine. It
1913 also contains functionality to support data models and executable content.")))
1915 (define-public qtpositioning
1917 (name "qtpositioning")
1921 (uri (qt-urls name version))
1924 "0v78wamvdw02kf9rq7m5v24q2g6jmgq4ch0fnfa014p1r978wy06"))))
1925 (build-system cmake-build-system)
1928 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1929 #:phases #~(modify-phases %standard-phases
1930 (add-after 'install 'delete-installed-tests
1932 (delete-file-recursively
1933 (string-append #$output "/tests")))))))
1934 (inputs (list perl qtbase))
1935 (home-page (package-home-page qtbase))
1936 (synopsis "QML and C++ positioning information API")
1937 (description "The Qt Positioning API provides positioning information via
1938 QML and C++ interfaces. The Qt Positioning API lets you to determine a
1939 position by using a variety of possible sources, including satellite, wifi, or
1940 text files. That information can then be used to, for example, determine a
1941 position on a map. In addition, you can use to the API to retrieve satellite
1942 information and perform area based monitoring.")
1943 (license (package-license qtbase))))
1945 (define-public qtpurchasing
1946 (package (inherit qtsvg-5)
1947 (name "qtpurchasing")
1951 (uri (qt-urls name version))
1954 "09rjx53519dfk4qj2gbn3vlxyriasyb747wpg1p11y7jkwqhs4l7"))))
1956 (list qtbase-5 qtdeclarative-5))
1957 (synopsis "Qt Purchasing module")
1958 (description "The Qt Purchasing module provides and in-app API for
1959 purchasing goods and services.")))
1961 (define-public qtcharts
1962 (package (inherit qtsvg-5)
1967 (uri (qt-urls name version))
1970 "049x7z8zcp9jixmdv2fjscy2ggpd6za9hkdbb2bqp2mxjm0hwxg0"))))
1972 (substitute-keyword-arguments (package-arguments qtsvg-5)
1973 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1975 (list qtbase-5 qtdeclarative-5))
1976 (synopsis "Qt Charts module")
1977 (description "The Qt Charts module provides a set of easy to use chart
1978 components. It uses the Qt Graphics View Framework, therefore charts can be
1979 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1980 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1981 selecting one of the charts themes.")
1982 (license license:gpl3)))
1984 (define-public qtdatavis3d
1985 (package (inherit qtsvg-5)
1986 (name "qtdatavis3d")
1990 (uri (qt-urls name version))
1993 "1zdn3vm0nfy9ny7c783aabp3mhlnqhi9fw2rljn7ibbksmsnasi2"))))
1995 (substitute-keyword-arguments (package-arguments qtsvg-5)
1996 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1998 (list qtbase-5 qtdeclarative-5))
1999 (synopsis "Qt Data Visualization module")
2000 (description "The Qt Data Visualization module provides a way to visualize
2001 data in 3D as bar, scatter, and surface graphs. It is especially useful for
2002 visualizing depth maps and large quantities of rapidly changing data, such as
2003 data received from multiple sensors. The look and feel of graphs can be
2004 customized by using themes or by adding custom items and labels to them.")
2005 (license license:gpl3)))
2007 (define-public qtnetworkauth-5
2008 (package (inherit qtsvg-5)
2009 (name "qtnetworkauth")
2013 (uri (qt-urls name version))
2016 "11fdgacv4syr8bff2vdw7rb0dg1gcqpdf37hm3pn31d6z91frhpw"))))
2018 (substitute-keyword-arguments (package-arguments qtsvg-5)
2020 `(modify-phases ,phases
2021 (add-after 'unpack 'remove-failing-test
2023 ;; These tests can't find their test data.
2024 (substitute* "tests/auto/auto.pro"
2025 (("oauth1 ") "# oauth1 "))
2029 (synopsis "Qt Network Authorization module")
2030 (description "The Qt Network Authorization module provides an
2031 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
2033 (define-public qtnetworkauth
2035 (name "qtnetworkauth")
2039 (uri (qt-urls name version))
2042 "0apvsb2ip1m3kw8vi9spvf6f6q72ys8vr40rpyysi7shsjwm83yn"))))
2043 (build-system cmake-build-system)
2044 (arguments (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")))
2045 (native-inputs (list perl))
2046 (inputs (list qtbase))
2047 (home-page (package-home-page qtbase))
2048 (synopsis "Qt Network Authorization module")
2049 (description "The Qt Network Authorization module provides an
2050 implementation of OAuth and OAuth2 authenticathon methods for Qt.")
2051 (license (package-license qtbase))))
2053 (define-public qtremoteobjects
2054 (package (inherit qtsvg-5)
2055 (name "qtremoteobjects")
2059 (uri (qt-urls name version))
2062 "1hngbp0vkr35rpsrac7b9vx6f360v8v2g0fffzm590l8j2ybd0b7"))))
2064 (substitute-keyword-arguments (package-arguments qtsvg-5)
2066 `(modify-phases ,phases
2067 (add-after 'unpack 'remove-failing-test
2069 ;; This test can't find its imports.
2070 (substitute* "tests/auto/qml/qml.pro"
2071 (("integration") "# integration")
2072 (("usertypes") "# usertypes"))
2073 ;; disable failing tests: they need network
2074 (substitute* "tests/auto/auto.pro"
2075 (("integration_multiprocess proxy_multiprocess integration_external restart")
2076 "integration_multiprocess"))
2079 (list qtbase-5 qtdeclarative-5))
2080 (synopsis "Qt Remote Objects module")
2081 (description "The Qt Remote Objects module is an @dfn{inter-process
2082 communication} (IPC) module developed for Qt. The idea is to extend existing
2083 Qt's functionalities to enable an easy exchange of information between
2084 processes or computers.")))
2086 (define-public qtspeech
2087 (package (inherit qtsvg-5)
2092 (uri (qt-urls name version))
2095 "1xc3x3ghnhgchsg1kgj156yg69wn4rwjx8r28i1jd05hxjggn468"))))
2098 (substitute-keyword-arguments (package-arguments qtsvg-5)
2099 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2103 (list perl qtdeclarative-5 qtmultimedia-5 qtxmlpatterns))
2104 (synopsis "Qt Speech module")
2105 (description "The Qt Speech module enables a Qt application to support
2106 accessibility features such as text-to-speech, which is useful for end-users
2107 who are visually challenged or cannot access the application for whatever
2108 reason. The most common use case where text-to-speech comes in handy is when
2109 the end-user is driving and cannot attend the incoming messages on the phone.
2110 In such a scenario, the messaging application can read out the incoming
2113 (define-public qtspell
2121 (url "https://github.com/manisandro/qtspell")
2123 (file-name (git-file-name name version))
2125 (base32 "19ff6jzm699wrxrk57w3d4kl9qxgdipdikpwls9n4aqv4mw7g969"))))
2126 (build-system cmake-build-system)
2128 `(#:tests? #f)) ;no test
2130 (list pkg-config qttools-5))
2132 (list enchant qtbase-5))
2133 (home-page "https://github.com/manisandro/qtspell")
2134 (synopsis "Spell checking for Qt text widgets")
2136 "QtSpell adds spell-checking functionality to Qt's text widgets,
2137 using the Enchant spell-checking library.")
2138 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
2139 (license license:gpl2+)))
2141 (define-public qtwebengine-5
2144 (name "qtwebengine")
2145 (version (package-version qtbase-5))
2149 (uri (qt-urls name version))
2152 "1q4idxdm81sx102xc12ixj0xpfx52d6vwvs3jpapnkyq8c7cmby8"))
2153 (modules '((ice-9 ftw)
2157 (guix build utils)))
2160 (let ((preserved-third-party-files
2161 '("base/third_party/double_conversion"
2162 "base/third_party/cityhash"
2163 "base/third_party/cityhash_v103"
2164 "base/third_party/dynamic_annotations"
2165 "base/third_party/icu"
2166 "base/third_party/libevent"
2167 "base/third_party/nspr"
2168 "base/third_party/superfasthash"
2169 "base/third_party/symbolize"
2170 "base/third_party/xdg_mime"
2171 "base/third_party/xdg_user_dirs"
2172 "net/third_party/mozilla_security_manager"
2173 "net/third_party/nss"
2174 "net/third_party/quiche"
2175 "net/third_party/uri_template"
2176 "third_party/abseil-cpp"
2178 "third_party/angle/src/common/third_party/base"
2179 "third_party/angle/src/common/third_party/smhasher"
2180 "third_party/angle/src/common/third_party/xxhash"
2181 "third_party/angle/src/third_party/compiler"
2182 "third_party/axe-core"
2184 "third_party/boringssl"
2185 "third_party/boringssl/src/third_party/fiat"
2186 "third_party/breakpad"
2187 "third_party/brotli"
2190 "third_party/closure_compiler"
2191 "third_party/crashpad"
2192 "third_party/crashpad/crashpad/third_party/lss"
2193 "third_party/crashpad/crashpad/third_party/zlib"
2194 "third_party/crc32c"
2197 "third_party/devtools-frontend"
2198 "third_party/devtools-frontend/src/front_end/third_party/fabricjs"
2199 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
2200 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
2201 "third_party/devtools-frontend/src/third_party/axe-core"
2202 "third_party/emoji-segmenter"
2203 "third_party/ffmpeg"
2204 "third_party/googletest"
2205 "third_party/harfbuzz-ng/utils"
2206 "third_party/hunspell"
2207 "third_party/iccjpeg"
2209 "third_party/inspector_protocol"
2210 "third_party/jinja2"
2211 "third_party/jsoncpp"
2212 "third_party/jstemplate"
2213 "third_party/khronos"
2214 "third_party/leveldatabase"
2215 "third_party/libaddressinput"
2216 "third_party/libgifcodec"
2217 "third_party/libjingle_xmpp"
2218 "third_party/libjpeg_turbo"
2219 "third_party/libpng"
2220 "third_party/libsrtp"
2221 "third_party/libsync"
2222 "third_party/libudev"
2223 "third_party/libvpx"
2224 "third_party/libwebm"
2225 "third_party/libwebp"
2226 "third_party/libxml"
2227 "third_party/libxslt"
2228 "third_party/libyuv"
2231 "third_party/markupsafe"
2232 "third_party/mesa_headers"
2233 "third_party/metrics_proto"
2234 "third_party/modp_b64"
2236 "third_party/one_euro_filter"
2237 "third_party/openh264/src/codec/api/svc"
2240 "third_party/pdfium"
2241 "third_party/pdfium/third_party/agg23"
2242 "third_party/pdfium/third_party/base"
2243 "third_party/pdfium/third_party/freetype"
2244 "third_party/pdfium/third_party/lcms"
2245 "third_party/pdfium/third_party/libopenjpeg20"
2246 "third_party/pdfium/third_party/skia_shared"
2247 "third_party/perfetto"
2250 "third_party/polymer"
2251 "third_party/protobuf"
2252 "third_party/protobuf/third_party/six"
2253 "third_party/pyjson5"
2255 "third_party/rnnoise"
2257 "third_party/skia/include/third_party/skcms/skcms.h"
2258 "third_party/skia/include/third_party/vulkan"
2259 "third_party/skia/third_party/skcms"
2260 "third_party/skia/third_party/vulkanmemoryallocator"
2261 "third_party/smhasher"
2262 "third_party/snappy"
2263 "third_party/sqlite"
2264 "third_party/usb_ids"
2265 "third_party/usrsctp"
2266 "third_party/web-animations-js"
2267 "third_party/webrtc"
2268 "third_party/webrtc/common_audio/third_party/fft4g"
2269 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2270 "third_party/webrtc/modules/third_party/fft"
2271 "third_party/webrtc/modules/third_party/g711"
2272 "third_party/webrtc/modules/third_party/g722"
2273 "third_party/webrtc/rtc_base/third_party/base64"
2274 "third_party/webrtc/rtc_base/third_party/sigslot"
2275 "third_party/webrtc_overrides"
2276 "third_party/widevine/cdm/widevine_cdm_common.h"
2277 "third_party/widevine/cdm/widevine_cdm_version.h"
2281 "url/third_party/mozilla"
2282 "v8/src/third_party/utf8-decoder"
2283 "v8/src/third_party/valgrind"
2284 "v8/src/third_party/siphash"
2285 "v8/third_party/v8/builtins"
2286 "v8/third_party/inspector_protocol"))
2287 (protected (make-regexp "\\.(gn|gyp)i?$")))
2288 (define preserved-club
2289 (map (lambda (member)
2290 (string-append "./" member))
2291 preserved-third-party-files))
2292 (define (empty? dir)
2293 (equal? (scandir dir) '("." "..")))
2294 (define (third-party? file)
2295 (string-contains file "third_party/"))
2296 (define (useless? file)
2297 (any (cute string-suffix? <> file)
2298 '(".zip" ".so" ".dll" ".exe" ".jar")))
2299 (define (parents child)
2300 ;; Return all parent directories of CHILD up to and including
2301 ;; the closest "third_party".
2302 (let* ((dirs (match (string-split child #\/)
2303 ((dirs ... last) dirs)))
2304 (closest (list-index (lambda (dir)
2305 (string=? "third_party" dir))
2307 (delim (- (length dirs) closest)))
2308 (fold (lambda (dir prev)
2309 (cons (string-append (car prev) "/" dir)
2311 (list (string-join (list-head dirs delim) "/"))
2312 (list-tail dirs delim))))
2313 (define (remove-loudly file)
2314 (format #t "deleting ~a...~%" file)
2317 (define (delete-unwanted-files child stat flag base level)
2319 ((or 'regular 'symlink 'stale-symlink)
2320 (when (third-party? child)
2321 (unless (or (member child preserved-club)
2322 (any (cute member <> preserved-club)
2324 (regexp-exec protected child))
2325 (remove-loudly child)))
2326 (when (and (useless? child) (file-exists? child))
2327 (remove-loudly child))
2329 ('directory-processed
2330 (when (empty? child)
2335 (with-directory-excursion "src/3rdparty"
2336 ;; TODO: Try removing "gn" too for future versions of qtwebengine-5.
2337 (delete-file-recursively "ninja")
2339 (with-directory-excursion "chromium"
2340 ;; Delete bundled software and binaries that were not explicitly
2342 (nftw "." delete-unwanted-files 'depth 'physical)
2344 ;; Assert that each preserved item is present to catch removals.
2345 (for-each (lambda (third-party)
2346 (unless (file-exists? third-party)
2347 (error (format #f "~s does not exist!~%" third-party))))
2350 ;; Use relative header locations instead of hard coded ones.
2352 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2353 (("base/third_party/valgrind") "valgrind"))
2355 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
2356 (("third_party/curl") "curl"))
2358 '("components/viz/common/gpu/vulkan_context_provider.h"
2359 "components/viz/common/resources/resource_format_utils_vulkan.h"
2360 "gpu/config/gpu_util.cc")
2361 (("third_party/vulkan/include/")
2364 ;; Replace Google Analytics bundle with an empty file and hope
2366 (mkdir-p "third_party/analytics")
2367 (call-with-output-file
2368 "third_party/analytics/google-analytics-bundle.js"
2371 ;; Do not enable support for loading the Widevine DRM plugin.
2372 (substitute* "src/buildtools/config/common.pri"
2373 (("enable_widevine=true")
2374 "enable_widevine=false")))))))
2375 (build-system gnu-build-system)
2410 ;; FIXME: libxml2 needs to built with icu support though it links to
2411 ;; libxml2 configure summary still states "Checking for compatible
2412 ;; system libxml2... no"
2437 (substitute-keyword-arguments (package-arguments qtsvg-5)
2438 ((#:modules modules '())
2439 `((guix build gnu-build-system)
2441 (ice-9 textual-ports)))
2443 `(modify-phases ,phases
2444 (add-before 'configure 'substitute-source
2445 (lambda* (#:key inputs outputs #:allow-other-keys)
2446 (let ((out (assoc-ref outputs "out")))
2447 (with-atomic-file-replacement
2448 "src/buildtools/config/linux.pri"
2450 (display (get-string-all in) out)
2451 (display "\ngn_args += use_system_openh264=true\n" out)))
2452 ;; Qtwebengine is not installed into the same prefix as
2453 ;; qtbase. Some qtbase QTLibraryInfo constants will not
2454 ;; work. Replace with the full path to the qtwebengine-5
2455 ;; translations and locales in the store.
2456 (substitute* "src/core/web_engine_library_info.cpp"
2457 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
2458 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
2459 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
2460 (string-append "QLatin1String(\"" out "/share/qt5\")")))
2461 ;; Substitute full dynamic library path for nss.
2462 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2464 (search-input-file inputs "lib/nss/libnssckbi.so")))
2465 ;; Substitute full dynamic library path for udev.
2466 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2468 (search-input-file inputs "lib/libudev.so.1"))))))
2469 (add-before 'configure 'set-env
2471 ;; Avoids potential race conditions.
2472 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2473 (setenv "NINJAFLAGS"
2474 (string-append "-k1" ;less verbose build output
2475 ;; Respect the '--cores' option of 'guix build'.
2476 " -j" (number->string (parallel-job-count))))))
2479 ;; Valid QT_BUILD_PARTS variables are:
2480 ;; libs tools tests examples demos docs translations
2481 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
2482 "--webengine-printing-and-pdf=no"
2483 "--webengine-ffmpeg=system"
2484 ;; FIXME: Building qtwebengine-5 5.12.2 with
2485 ;; icu4c >= 68 fails.
2486 ;;"--webengine-icu=system"
2487 "--webengine-pepper-plugins=no"
2488 "-webengine-proprietary-codecs")))))
2489 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
2490 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
2491 ;; before running tests.
2492 ((#:tests? _ #f) #f)))
2493 (native-search-paths
2494 (list (search-path-specification
2495 (file-type 'regular)
2497 (variable "QTWEBENGINEPROCESS_PATH")
2498 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
2499 (home-page "https://wiki.qt.io/QtWebEngine")
2500 (synopsis "Qt WebEngine module")
2501 (description "The Qt5WebEngine module provides support for web applications
2502 using the Chromium browser project. The Chromium source code has Google services
2503 and binaries removed, and adds modular support for using system libraries.")
2504 (license license:lgpl2.1+)))
2506 (define-public qtwebengine
2508 (name "qtwebengine")
2513 (uri (qt-urls name version))
2516 "0ivfsqd5c0cxsnssj6z37901cf6a47w50zaqgjiysvcm3ar36ymd"))
2517 (modules '((ice-9 ftw)
2521 (guix build utils)))
2524 (let ((preserved-third-party-files
2525 '("base/third_party/double_conversion"
2526 "base/third_party/cityhash"
2527 "base/third_party/cityhash_v103"
2528 "base/third_party/dynamic_annotations"
2529 "base/third_party/icu"
2530 "base/third_party/libevent"
2531 "base/third_party/nspr"
2532 "base/third_party/superfasthash"
2533 "base/third_party/symbolize"
2534 "base/third_party/xdg_mime"
2535 "base/third_party/xdg_user_dirs"
2536 "net/third_party/mozilla_security_manager"
2537 "net/third_party/nss"
2538 "net/third_party/quiche"
2539 "net/third_party/uri_template"
2540 "third_party/abseil-cpp"
2542 "third_party/angle/src/common/third_party/base"
2543 "third_party/angle/src/common/third_party/smhasher"
2544 "third_party/angle/src/common/third_party/xxhash"
2545 "third_party/axe-core"
2547 "third_party/boringssl"
2548 "third_party/boringssl/src/third_party/fiat"
2549 "third_party/breakpad"
2550 "third_party/brotli"
2553 "third_party/closure_compiler"
2554 "third_party/crashpad"
2555 "third_party/crashpad/crashpad/third_party/lss"
2556 "third_party/crashpad/crashpad/third_party/zlib"
2557 "third_party/crc32c"
2560 "third_party/devtools-frontend"
2561 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
2562 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
2563 "third_party/emoji-segmenter"
2564 "third_party/ffmpeg"
2565 "third_party/googletest"
2566 "third_party/harfbuzz-ng/utils"
2567 "third_party/hunspell"
2568 "third_party/iccjpeg"
2570 "third_party/inspector_protocol"
2571 "third_party/jinja2"
2572 "third_party/jsoncpp"
2573 "third_party/jstemplate"
2574 "third_party/khronos"
2575 "third_party/leveldatabase"
2576 "third_party/libaddressinput"
2577 "third_party/libgifcodec"
2578 "third_party/libjingle_xmpp"
2579 "third_party/libjpeg_turbo"
2580 "third_party/libpng"
2581 "third_party/libsrtp"
2582 "third_party/libsync"
2583 "third_party/libudev"
2584 "third_party/libvpx"
2585 "third_party/libwebm"
2586 "third_party/libwebp"
2587 "third_party/libxml"
2588 "third_party/libxslt"
2589 "third_party/libyuv"
2592 "third_party/markupsafe"
2593 "third_party/mesa_headers"
2594 "third_party/metrics_proto"
2595 "third_party/modp_b64"
2597 "third_party/one_euro_filter"
2598 "third_party/openh264/src/codec/api/svc"
2601 "third_party/pdfium"
2602 "third_party/pdfium/third_party/agg23"
2603 "third_party/pdfium/third_party/base"
2604 "third_party/pdfium/third_party/freetype"
2605 "third_party/pdfium/third_party/lcms"
2606 "third_party/pdfium/third_party/libopenjpeg20"
2607 "third_party/pdfium/third_party/skia_shared"
2608 "third_party/perfetto"
2611 "third_party/polymer"
2612 "third_party/protobuf"
2613 "third_party/protobuf/third_party/six"
2614 "third_party/pyjson5"
2616 "third_party/rnnoise"
2618 "third_party/skia/include/third_party/skcms/skcms.h"
2619 "third_party/skia/include/third_party/vulkan"
2620 "third_party/skia/third_party/skcms"
2621 "third_party/skia/third_party/vulkanmemoryallocator"
2622 "third_party/smhasher"
2623 "third_party/snappy"
2624 "third_party/sqlite"
2625 "third_party/usb_ids"
2626 "third_party/usrsctp"
2627 "third_party/web-animations-js"
2628 "third_party/webrtc"
2629 "third_party/webrtc/common_audio/third_party/ooura"
2630 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2631 "third_party/webrtc/modules/third_party/fft"
2632 "third_party/webrtc/modules/third_party/g711"
2633 "third_party/webrtc/modules/third_party/g722"
2634 "third_party/webrtc/rtc_base/third_party/base64"
2635 "third_party/webrtc/rtc_base/third_party/sigslot"
2636 "third_party/webrtc_overrides"
2637 "third_party/widevine/cdm/widevine_cdm_common.h"
2638 "third_party/widevine/cdm/widevine_cdm_version.h"
2641 "url/third_party/mozilla"
2642 "v8/src/third_party/utf8-decoder"
2643 "v8/src/third_party/valgrind"
2644 "v8/src/third_party/siphash"
2645 "v8/third_party/v8/builtins"
2646 "v8/third_party/inspector_protocol"))
2647 (protected (make-regexp "\\.(gn|gyp)i?$")))
2648 (define preserved-club
2649 (map (lambda (member)
2650 (string-append "./" member))
2651 preserved-third-party-files))
2652 (define (empty? dir)
2653 (equal? (scandir dir) '("." "..")))
2654 (define (third-party? file)
2655 (string-contains file "third_party/"))
2656 (define (useless? file)
2657 (any (cute string-suffix? <> file)
2658 '(".zip" ".so" ".dll" ".exe" ".jar")))
2659 (define (parents child)
2660 ;; Return all parent directories of CHILD up to and including
2661 ;; the closest "third_party".
2662 (let* ((dirs (match (string-split child #\/)
2663 ((dirs ... last) dirs)))
2664 (closest (list-index (lambda (dir)
2665 (string=? "third_party" dir))
2667 (delim (- (length dirs) closest)))
2668 (fold (lambda (dir prev)
2669 (cons (string-append (car prev) "/" dir)
2671 (list (string-join (list-head dirs delim) "/"))
2672 (list-tail dirs delim))))
2673 (define (remove-loudly file)
2674 (format #t "deleting ~a...~%" file)
2677 (define (delete-unwanted-files child stat flag base level)
2679 ((or 'regular 'symlink 'stale-symlink)
2680 (when (third-party? child)
2681 (unless (or (member child preserved-club)
2682 (any (cute member <> preserved-club)
2684 (regexp-exec protected child))
2685 (remove-loudly child)))
2686 (when (and (useless? child) (file-exists? child))
2687 (remove-loudly child)))
2688 ('directory-processed
2689 (when (empty? child)
2693 (with-directory-excursion "src/3rdparty"
2694 (delete-file-recursively "ninja")
2696 (with-directory-excursion "chromium"
2697 ;; Delete bundled software and binaries that were not
2698 ;; explicitly preserved above.
2699 (nftw "." delete-unwanted-files 'depth 'physical)
2701 ;; Assert that each preserved item is present to catch
2703 (for-each (lambda (third-party)
2704 (unless (file-exists? third-party)
2705 (error (format #f "~s does not exist!~%"
2709 ;; Use relative header locations instead of hard coded ones.
2711 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2712 (("base/third_party/valgrind") "valgrind"))
2713 (substitute* "third_party/breakpad/breakpad/src/common/\
2714 linux/libcurl_wrapper.h"
2715 (("third_party/curl") "curl"))
2717 '("components/viz/common/gpu/vulkan_context_provider.h"
2718 "gpu/config/gpu_util.cc")
2719 (("third_party/vulkan/include/")
2722 ;; Replace Google Analytics bundle with an empty file and
2723 ;; hope no one notices.
2724 (mkdir-p "third_party/analytics")
2725 (call-with-output-file
2726 "third_party/analytics/google-analytics-bundle.js"
2729 ;; Do not enable support for loading the Widevine DRM plugin.
2730 (substitute* "src/core/CMakeLists.txt"
2731 (("enable_widevine=true")
2732 "enable_widevine=false")))))))
2733 (build-system cmake-build-system)
2736 ;; XXX: The test suite is not built by default; leave it off to save
2737 ;; some build time and resources.
2740 ;; Use the CMake ninja generator, otherwise the build fails (see:
2741 ;; https://bugreports.qt.io/browse/QTBUG-96897).
2743 ;; Manually add the NSS library prefix to the linker
2744 ;; search path, otherwise it fails to be linked (see:
2745 ;; https://bugreports.qt.io/browse/QTBUG-105053).
2746 (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-L"
2747 (search-input-directory %build-inputs "lib/nss"))
2749 ;; The PDF renderer plugin fails to build with errors such as
2750 ;; "src/3rdparty/chromium/components/pdf
2751 ;; /renderer/pdf_accessibility_tree.cc:1373:39:
2752 ;; error: use of undeclared identifier 'IDS_PDF_PAGE_INDEX'";
2754 "-DQT_FEATURE_webengine_printing_and_pdf=OFF"
2755 "-DQT_FEATURE_webengine_pepper_plugins=OFF" ;widevine
2756 "-DQT_FEATURE_system_ffmpeg=ON"
2757 ;; Do not artificially limit codec support; video decoding is
2759 "-DQT_FEATURE_webengine_proprietary_codecs=ON"
2760 "-DQT_FEATURE_webengine_system_alsa=ON"
2761 "-DQT_FEATURE_webengine_system_icu=ON"
2762 "-DQT_FEATURE_webengine_system_libxml=ON"
2763 "-DQT_FEATURE_webengine_system_libpci=ON"
2764 "-DQT_FEATURE_webengine_system_libpng=ON"
2765 "-DQT_FEATURE_webengine_system_pulseaudio=ON"
2766 "-DQT_FEATURE_webengine_system_zlib=ON")
2768 #~(modify-phases %standard-phases
2769 (add-after 'unpack 'patch-paths
2770 (lambda* (#:key inputs #:allow-other-keys)
2771 ;; Qtwebengine is not installed into the same prefix as qtbase.
2772 ;; Some qtbase QTLibraryInfo constants will not work. Replace
2773 ;; with the full path to the qtwebengine translations and
2774 ;; locales in the store.
2775 (substitute* "src/core/web_engine_library_info.cpp"
2776 (("QLibraryInfo::path\\(QLibraryInfo::TranslationsPath)")
2777 (string-append "QLatin1String(\"" #$output
2778 "/share/qt6/translations\")"))
2779 (("QLibraryInfo::path\\(QLibraryInfo::DataPath)")
2780 (string-append "QLatin1String(\"" #$output
2782 ;; Substitute full dynamic library path for nss.
2783 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2785 (search-input-file inputs "lib/nss/libnssckbi.so")))
2786 ;; Substitute full dynamic library path for udev.
2787 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2789 (search-input-file inputs "lib/libudev.so.1")))
2790 ;; Patch the location of the X11 keywoard layouts, otherwise
2791 ;; webengine *crashes* at run time when the default directory,
2792 ;; '/usr/share/X11/xkb' is empty (see:
2793 ;; https://bugreports.qt.io/browse/QTBUG-105124).
2794 (substitute* "src/3rdparty/chromium/ui/events/ozone/layout/xkb\
2795 /xkb_keyboard_layout_engine.cc"
2796 (("/usr/share/X11/xkb")
2797 (search-input-directory inputs "share/X11/xkb")))))
2798 (add-before 'configure 'prepare-build-environment
2800 ;; Avoids potential race conditions.
2801 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2802 (setenv "NINJAFLAGS"
2804 "-k1" ;less verbose build output
2805 ;; Respect the '--cores' option of 'guix build'.
2806 " -j" (number->string (parallel-job-count))))
2807 ;; Use Clang/LDD to help tame the memory requirements and hasten
2809 (setenv "AR" "llvm-ar") (setenv "NM" "llvm-nm")
2810 (setenv "CC" "clang") (setenv "CXX" "clang++")))
2812 (lambda* (#:key parallel-build? #:allow-other-keys)
2813 (apply invoke "cmake" "--build" "."
2815 `("--parallel" ,(number->string (parallel-job-count)))
2819 (invoke "cmake" "--install" "."))))))
2821 (modify-inputs (package-native-inputs qtwebengine-5)
2822 (delete "python2" "python2-six")
2829 (modify-inputs (package-inputs qtwebengine-5)
2830 (replace "qtbase" qtbase)
2831 (replace "qtdeclarative" qtdeclarative)
2832 (replace "qtmultimedia" qtmultimedia)
2833 (replace "qtwebchannel" qtwebchannel)
2834 (append libxkbfile xkeyboard-config)))
2835 (native-search-paths
2836 (list (search-path-specification
2837 (file-type 'regular)
2839 (variable "QTWEBENGINEPROCESS_PATH")
2840 (files '("lib/qt6/libexec/QtWebEngineProcess")))))
2841 (home-page "https://wiki.qt.io/QtWebEngine")
2842 (synopsis "Qt WebEngine module")
2843 (description "The Qt WebEngine module provides support for web
2844 applications using the Chromium browser project. The Chromium source code has
2845 Google services and binaries removed, and adds modular support for using
2847 (license license:lgpl2.1+)))
2849 (define-public single-application-qt5
2850 ;; Change in function signature, nheko requires at least this commit
2851 (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053"))
2853 (name "single-application-qt5")
2854 (version (string-append "3.2.0-" (string-take commit 7)))
2860 (url "https://github.com/itay-grudev/SingleApplication")
2862 (file-name (git-file-name name version))
2865 "163aa2x2qb0h8w26si5ql833ilj427jjbdwlz1p2p8iaq6dh0vq1"))))
2866 (build-system cmake-build-system)
2868 `(#:tests? #f ; no check target
2869 ;; Projects can decide how to build this library. You might need to
2870 ;; override this flag (QApplication, QGuiApplication or
2871 ;; QCoreApplication).
2872 #:configure-flags '("-DQAPPLICATION_CLASS=QApplication")
2874 (modify-phases %standard-phases
2875 ;; No install target, install things manually
2877 (lambda* (#:key inputs outputs source #:allow-other-keys)
2878 (let* ((qt (assoc-ref inputs "qtbase"))
2879 (qt-version ,(version-major (package-version qtbase-5)))
2880 (out (assoc-ref outputs "out")))
2882 "libSingleApplication.a" (string-append out "/lib"))
2886 (string-append source "/" file)
2887 (string-append out "/include")))
2888 '("SingleApplication"
2889 "singleapplication.h" "singleapplication_p.h"))
2893 (home-page "https://github.com/itay-grudev/SingleApplication")
2894 (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6")
2896 "SingleApplication is a replacement of the QtSingleApplication for Qt5 and Qt6.
2898 It keeps the Primary Instance of your Application and kills each subsequent
2899 instances. It can (if enabled) spawn secondary (non-related to the primary)
2900 instances and can send data to the primary instance from secondary
2902 (license license:expat))))
2904 (define-public python-sip
2911 (uri (list (pypi-uri "sip" version)
2912 (string-append "https://www.riverbankcomputing.com/static/"
2913 "Downloads/sip/" version
2914 "/sip-" version ".tar.gz")))
2917 "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"))))
2918 (build-system python-build-system)
2920 (list python-wrapper))
2922 (list python-toml python-packaging))
2923 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
2924 (synopsis "Python binding creator for C and C++ libraries")
2926 "SIP is a tool to create Python bindings for C and C++ libraries. It
2927 was originally developed to create PyQt, the Python bindings for the Qt
2928 toolkit, but can be used to create bindings for any C or C++ library.
2930 SIP comprises a code generator and a Python module. The code generator
2931 processes a set of specification files and generates C or C++ code, which
2932 is then compiled to create the bindings extension module. The SIP Python
2933 module provides support functions to the automatically generated code.")
2934 ;; There is a choice between a python like license, gpl2 and gpl3.
2935 ;; For compatibility with pyqt, we need gpl3.
2936 (license license:gpl3)))
2938 (define-public python-sip-4
2940 (inherit python-sip)
2946 (uri (list (pypi-uri "sip" version)
2947 (string-append "https://www.riverbankcomputing.com/static/"
2948 "Downloads/sip/" version
2949 "/sip-" version ".tar.gz")))
2952 "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"))))
2953 (build-system gnu-build-system)
2955 `(("python" ,python-wrapper)))
2956 (propagated-inputs `())
2958 `(#:tests? #f ; no check target
2959 #:imported-modules ((guix build python-build-system)
2960 ,@%gnu-build-system-modules)
2961 #:modules ((srfi srfi-1)
2962 ((guix build python-build-system) #:select (python-version))
2963 ,@%gnu-build-system-modules)
2965 (modify-phases %standard-phases
2967 (lambda* (#:key inputs outputs #:allow-other-keys)
2968 (let* ((out (assoc-ref outputs "out"))
2969 (bin (string-append out "/bin"))
2970 (include (string-append out "/include"))
2971 (python (assoc-ref inputs "python"))
2972 (lib (string-append out "/lib/python"
2973 (python-version python)
2975 (invoke "python" "configure.py"
2978 "--incdir" include)))))))
2979 (license license:gpl3)))
2981 (define-public python-pyqt
2983 (name "python-pyqt")
2988 ;; PyPI is the canonical distribution point of PyQt. Older
2989 ;; releases are available from the web site.
2990 (uri (list (pypi-uri "PyQt5" version)
2991 (string-append "https://www.riverbankcomputing.com/static/"
2992 "Downloads/PyQt5/" version "/PyQt5-"
2993 version ".tar.gz")))
2994 (file-name (string-append "PyQt5-" version ".tar.gz"))
2997 "1z74295i69cha52llsqffzhb5zz7qnbjc64h8qg21l91jgf0harp"))
2998 (patches (search-patches "pyqt-configure.patch"))))
2999 (build-system gnu-build-system)
3001 (list qtbase-5)) ; for qmake
3003 (list python-sip python-pyqt5-sip))
3005 `(("python" ,python-wrapper)
3006 ("qtbase" ,qtbase-5)
3007 ("qtconnectivity" ,qtconnectivity)
3008 ("qtdeclarative-5" ,qtdeclarative-5)
3009 ("qtlocation" ,qtlocation)
3010 ("qtmultimedia-5" ,qtmultimedia-5)
3011 ("qtsensors" ,qtsensors)
3012 ("qtserialport" ,qtserialport)
3013 ("qtsvg-5" ,qtsvg-5)
3014 ("qttools-5" ,qttools-5)
3015 ("qtwebchannel-5" ,qtwebchannel-5)
3016 ("qtwebkit" ,qtwebkit)
3017 ("qtwebsockets-5" ,qtwebsockets-5)
3018 ("qtx11extras" ,qtx11extras)
3019 ("qtxmlpatterns" ,qtxmlpatterns)))
3021 `(#:modules ((srfi srfi-1)
3022 ((guix build python-build-system) #:select (python-version))
3023 ,@%gnu-build-system-modules)
3024 #:imported-modules ((guix build python-build-system)
3025 ,@%gnu-build-system-modules)
3027 (modify-phases %standard-phases
3028 ;; When building python-pyqtwebengine, <qprinter.h> can not be
3029 ;; included. Here we substitute the full path to the header in the
3031 (add-before 'configure 'substitute-source
3032 (lambda* (#:key inputs #:allow-other-keys)
3033 (let* ((qtbase (assoc-ref inputs "qtbase"))
3034 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
3035 (substitute* "sip/QtPrintSupport/qprinter.sip"
3040 (lambda* (#:key inputs outputs #:allow-other-keys)
3041 (let* ((out (assoc-ref outputs "out"))
3042 (bin (string-append out "/bin"))
3043 (sip (string-append out "/share/sip"))
3044 (plugins (string-append out "/lib/qt5/plugins"))
3045 (designer (string-append plugins "/designer"))
3046 (qml (string-append plugins "/PyQt5"))
3047 (python (assoc-ref inputs "python"))
3048 (lib (string-append out "/lib/python"
3049 (python-version python)
3051 (stubs (string-append lib "/PyQt5")))
3052 (invoke "python" "configure.py"
3056 "--designer-plugindir" designer
3057 "--qml-plugindir" qml
3058 ; Where to install the PEP 484 Type Hints stub
3059 ; files. Without this the stubs are tried to be
3060 ; installed into the python package's
3061 ; site-package directory, which is read-only.
3063 "--sipdir" sip)))))))
3064 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
3065 (synopsis "Python bindings for Qt")
3067 "PyQt is a set of Python v2 and v3 bindings for the Qt application
3068 framework. The bindings are implemented as a set of Python modules and
3069 contain over 620 classes.")
3070 (license license:gpl3)))
3072 (define-public python-pyqt5-sip
3074 (name "python-pyqt5-sip")
3079 (uri (pypi-uri "PyQt5_sip" version))
3082 "1gg032ys4pccwkdzmdryadc9a4lq85nr05pag9swrsdykbdl9s9h"))))
3083 (build-system python-build-system)
3085 `(#:tests? #f)) ;; No test code.
3086 (home-page "https://www.riverbankcomputing.com/software/sip/")
3087 (synopsis "Sip module support for PyQt5")
3088 (description "Sip module support for PyQt5")
3089 (license license:lgpl2.1+)))
3091 (define-public python-pyqtwebengine
3093 (name "python-pyqtwebengine")
3098 ;; The newest releases are only available on PyPI. Older ones
3099 ;; are mirrored at the upstream home page.
3100 (uri (list (pypi-uri "PyQtWebEngine" version)
3101 (string-append "https://www.riverbankcomputing.com/static"
3102 "/Downloads/PyQtWebEngine/" version
3103 "/PyQtWebEngine-" version ".tar.gz")))
3106 "0d56ak71r14w4f9r96vaj34qcn2rbln3s6ildvvyc707fjkzwwjd"))))
3107 (build-system gnu-build-system)
3109 (list python python-sip
3110 ;; qtbase is required for qmake
3113 `(("python" ,python-wrapper)
3114 ("python-sip" ,python-sip)
3115 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3116 ("qtbase" ,qtbase-5)
3117 ("qtsvg-5" ,qtsvg-5)
3118 ("qtdeclarative-5" ,qtdeclarative-5)
3119 ("qtwebchannel-5" ,qtwebchannel-5)
3120 ("qtwebengine-5" ,qtwebengine-5)))
3122 `(#:modules ((srfi srfi-1)
3123 ((guix build python-build-system) #:select (python-version))
3124 ,@%gnu-build-system-modules)
3125 #:imported-modules ((guix build python-build-system)
3126 ,@%gnu-build-system-modules)
3128 (modify-phases %standard-phases
3130 (lambda* (#:key inputs outputs #:allow-other-keys)
3131 (let* ((out (assoc-ref outputs "out"))
3132 (sipdir (string-append out "/share/sip"))
3133 (pyqt-sipdir (string-append
3134 (assoc-ref inputs "python-pyqt") "/share/sip"))
3135 (python (assoc-ref inputs "python"))
3136 (lib (string-append out "/lib/python"
3137 (python-version python)
3138 "/site-packages/PyQt5"))
3139 (stubs (string-append lib "/PyQt5")))
3142 (invoke "python" "configure.py"
3149 "--pyqt-sipdir" pyqt-sipdir))))
3150 ;; Because this has a different prefix than python-pyqt then we need
3151 ;; to make this a namespace of its own.
3152 (add-after 'install 'make-namespace
3153 (lambda* (#:key inputs outputs #:allow-other-keys)
3154 (let* ((__init__.py (string-append
3155 (assoc-ref outputs "out")
3157 (python-version (assoc-ref inputs "python"))
3158 "/site-packages/PyQt5/__init__.py")))
3159 (with-output-to-file __init__.py
3160 (lambda _ (display "
3161 from pkgutil import extend_path
3162 __path__ = extend_path(__path__, __name__)
3165 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
3166 (synopsis "Python bindings for QtWebEngine")
3168 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
3169 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
3170 set of three modules. Prior to v5.12 these bindings were part of PyQt
3172 (license license:gpl3)))
3174 ;; XXX: This is useful for removing qtwebkit from other packages' dependency
3175 ;; graphs, as well as for preventing python-pyqtwebengine from transitively
3176 ;; depending on qtwebkit.
3177 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
3178 ;; packages that could be used together.
3179 (define-public python-pyqt-without-qtwebkit
3180 (package/inherit python-pyqt
3181 (name "python-pyqt-without-qtwebkit")
3183 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
3185 (define-public python-pyqt-builder
3187 (name "python-pyqt-builder")
3192 (uri (pypi-uri "PyQt-builder" version))
3195 "0nh0054c54ji3sm6d268fccf0y5f613spswwgwqd3rnn816hnljl"))))
3196 (build-system python-build-system)
3199 (home-page "https://www.riverbankcomputing.com/static/Docs/PyQt-builder/")
3200 (synopsis "PEP 517 compliant PyQt build system")
3201 (description "PyQt-builder is a tool for generating Python bindings for C++
3202 libraries that use the Qt application framework. The bindings are built on
3203 top of the PyQt bindings for Qt. PyQt-builder is used to build PyQt itself.")
3204 ;; Either version 2 or 3, but no other version. See the file
3205 ;; 'pyqtbuild/builder.py' in the source distribution for more information.
3206 (license (list license:gpl2 license:gpl3))))
3208 (define-public python-qtpy
3210 (name "python-qtpy")
3215 (uri (pypi-uri "QtPy" version))
3218 "051rj10lbv2ny48lz34zhclcbdxxdbk4di2mdk91m9143w91npyq"))))
3219 (build-system python-build-system)
3220 (propagated-inputs (list python-packaging))
3222 `(;; Not all supported bindings are packaged. Especially PyQt4.
3224 (home-page "https://github.com/spyder-ide/qtpy")
3226 "Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets")
3228 "Provides an abstraction layer on top of the various Qt bindings
3229 (PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
3230 (license license:expat)))
3232 (define-public qscintilla
3238 (uri (string-append "https://www.riverbankcomputing.com/static"
3239 "/Downloads/QScintilla/" version
3240 "/QScintilla-" version ".tar.gz"))
3243 "19r0vpqb4m9bqwxmjp9w6x0hgahkrg7zryk78hwgplj7vdbn0d77"))))
3244 (build-system gnu-build-system)
3247 (modify-phases %standard-phases
3249 (lambda* (#:key outputs #:allow-other-keys)
3250 (let ((out (assoc-ref outputs "out")))
3252 (substitute* "qscintilla.pro"
3253 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
3254 (string-append out "/lib"))
3255 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
3256 (string-append out "/include"))
3257 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
3258 (string-append out "/translations"))
3259 (("\\$\\$\\[QT_INSTALL_DATA\\]")
3260 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
3261 (("\\$\\$\\[QT_HOST_DATA\\]")
3262 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
3263 (invoke "qmake")))))))
3264 (native-inputs (list qtbase-5))
3265 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
3266 (synopsis "Qt port of the Scintilla C++ editor control")
3267 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3268 editor control. QScintilla includes features especially useful when editing
3269 and debugging source code. These include support for syntax styling, error
3270 indicators, code completion and call tips.")
3271 (license license:gpl3+)))
3273 (define-public python-qscintilla
3274 (package/inherit qscintilla
3275 (name "python-qscintilla")
3278 (list "--pyqt=PyQt5"
3279 (string-append "--pyqt-sipdir="
3280 (assoc-ref %build-inputs "python-pyqt")
3282 (string-append "--qsci-incdir="
3283 (assoc-ref %build-inputs "qscintilla")
3285 (string-append "--qsci-libdir="
3286 (assoc-ref %build-inputs "qscintilla")
3289 (modify-phases %standard-phases
3291 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
3292 (let ((out (assoc-ref outputs "out"))
3293 (python (assoc-ref inputs "python")))
3295 (apply invoke "python3" "configure.py"
3297 ;; Install to the right directory
3298 (substitute* '("Makefile"
3300 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
3301 (((string-append python "/lib"))
3302 (string-append out "/lib")))
3303 ;; And fix the installed.txt file
3304 (substitute* "installed.txt"
3305 (("/gnu/store/[^/]+") out)))
3308 `(("qscintilla" ,qscintilla)
3310 ("python-pyqt" ,python-pyqt)))
3311 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3312 editor control. QScintilla includes features especially useful when editing
3313 and debugging source code. These include support for syntax styling, error
3314 indicators, code completion and call tips.
3316 This package provides the Python bindings.")))
3318 ;; PyQt only looks for modules in its own directory. It ignores environment
3319 ;; variables such as PYTHONPATH, so we need to build a union package to make
3321 (define-public python-pyqt+qscintilla
3322 (package/inherit python-pyqt
3323 (name "python-pyqt+qscintilla")
3325 (build-system trivial-build-system)
3327 '(#:modules ((guix build union))
3329 (use-modules (ice-9 match)
3331 (match %build-inputs
3332 (((names . directories) ...)
3333 (union-build (assoc-ref %outputs "out")
3337 `(("python-pyqt" ,python-pyqt)
3338 ("python-qscintilla" ,python-qscintilla)))
3339 (synopsis "Union of PyQt and the Qscintilla extension")
3341 "This package contains the union of PyQt and the Qscintilla extension.")))
3343 (define-public qtkeychain
3351 (url "https://github.com/frankosterfeld/qtkeychain/")
3352 (commit (string-append "v" version))))
3353 (file-name (git-file-name name version))
3356 "1zk6r2vc1q48qs7mw2h47bpgrfbb9r7lf9cwq4sb1a4nls87zznk"))))
3357 (build-system cmake-build-system)
3359 (list pkg-config qttools-5))
3361 (list libsecret qtbase-5))
3363 `(#:tests? #f ; No tests included
3365 (modify-phases %standard-phases
3366 (add-before 'configure 'set-qt-trans-dir
3368 (substitute* "CMakeLists.txt"
3369 (("\\$\\{qt_translations_dir\\}")
3370 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations")))))))
3371 (home-page "https://github.com/frankosterfeld/qtkeychain")
3372 (synopsis "Qt API to store passwords")
3374 "QtKeychain is a Qt library to store passwords and other secret data
3375 securely. It will not store any data unencrypted unless explicitly requested.")
3376 (license license:bsd-3)))
3378 (define-public qtsolutions
3379 (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
3382 (name "qtsolutions")
3383 (version (git-version "0" revision commit))
3388 (url "https://github.com/qtproject/qt-solutions")
3390 (file-name (git-file-name name version))
3392 (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
3393 (modules '((guix build utils)
3397 ;; Unvendor QtLockFile from QtSingleApplication.
3399 (with-directory-excursion "qtsingleapplication/src"
3400 (for-each delete-file
3401 (find-files "." "qtlockedfile.*\\.(h|cpp)"))
3402 (substitute* "qtsingleapplication.pri"
3403 ;; Add include path of LockedFile.
3404 (("INCLUDEPATH \\+=")
3405 "INCLUDEPATH += ../../qtlockedfile/src")
3406 ;; Link library of LockedFile.
3408 "LIBS += -lQtSolutions_LockedFile"))
3409 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
3410 (("#include \"qtlockedfile.*\\.cpp\"") "")
3411 ;; Unwrap namespace added in the vendoring process.
3412 (("QtLP_Private::QtLockedFile")
3415 (build-system gnu-build-system)
3417 `(#:tests? #f ; No target
3419 ((guix build copy-build-system)
3420 ,@%gnu-build-system-modules)
3422 (((guix build copy-build-system) #:prefix copy:)
3423 (guix build gnu-build-system)
3426 (modify-phases %standard-phases
3427 (add-after 'unpack 'patch-source
3428 (lambda* (#:key outputs #:allow-other-keys)
3429 (substitute* (find-files "." "common.pri")
3430 ;; Remove unnecessary prefixes/suffixes in library names.
3433 ;; Disable building of examples.
3434 (substitute* (find-files "." "\\.pro$")
3435 (("SUBDIRS\\+=examples") ""))
3436 ;; Fix deprecated functions.
3437 (substitute* "qtsoap/src/qtsoap.cpp"
3438 (("toAscii") "toUtf8"))
3442 (for-each (lambda (solution)
3443 (with-directory-excursion solution
3444 (invoke "./configure" "-library")
3446 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3447 "qtsingleapplication" "qtsoap"))
3451 (for-each (lambda (solution)
3452 (with-directory-excursion solution
3454 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3455 "qtsingleapplication" "qtsoap"))
3459 (for-each (lambda (solution)
3460 (with-directory-excursion solution
3462 (assoc-ref copy:%standard-phases 'install)
3464 '(("src" "include" #:include-regexp ("\\.h$"))
3467 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3468 "qtsingleapplication" "qtsoap")))))))
3471 (synopsis "Collection of Qt extensions")
3472 (description "QtSolutions is a set of components extending Qt.
3474 @item QtLockedFile: A class that extends QFile with advisory locking functions.
3475 @item QtPropertyBrowser: A framework that enables the user to edit a set of
3477 @item QtService: A helper for writing services such as Unix daemons.
3478 @item QtSingleApplication: A component that provides support for applications
3479 that can be only started once per user.
3480 @item QtSoap: A component that provides basic web service support with version
3481 1.1 of the SOAP protocol.
3483 (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
3484 (license (list license:bsd-3
3485 ;; QScriptParser and QScriptGrammar specifically allow
3486 ;; redistribution under GPL3 or LGPL2.1
3487 license:gpl3 license:lgpl2.1)))))
3497 (string-append "mirror://sourceforge/qwt/qwt/"
3498 version "/qwt-" version ".tar.bz2"))
3500 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
3501 (build-system gnu-build-system)
3503 (list qtbase-5 qtsvg-5 qttools-5))
3506 (modify-phases %standard-phases
3508 (lambda* (#:key outputs #:allow-other-keys)
3509 (let* ((out (assoc-ref outputs "out"))
3510 (docdir (string-append out "/share/doc/qwt"))
3511 (incdir (string-append out "/include/qwt"))
3512 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
3513 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
3514 (substitute* '("qwtconfig.pri")
3515 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
3516 (format #f "~a = ~a\n" x out))
3517 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
3518 (format #f "~a = ~a\n" x docdir))
3519 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
3520 (format #f "~a = ~a\n" x incdir))
3521 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
3522 (format #f "~a = ~a\n" x pluginsdir))
3523 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
3524 (format #f "~a = ~a\n" x featuresdir)))
3525 (substitute* '("doc/doc.pro")
3526 ;; We'll install them in the 'install-man-pages' phase.
3527 (("^unix:doc\\.files.*") ""))
3529 (add-after 'install 'install-man-pages
3530 (lambda* (#:key outputs #:allow-other-keys)
3531 (let* ((out (assoc-ref outputs "out"))
3532 (man (string-append out "/share/man")))
3533 ;; Remove some incomplete manual pages.
3534 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
3536 (copy-recursively "doc/man" man)
3538 (home-page "http://qwt.sourceforge.net")
3539 (synopsis "Qt widgets for plots, scales, dials and other technical software
3542 "The Qwt library contains widgets and components which are primarily useful
3543 for technical and scientific purposes. It includes a 2-D plotting widget,
3544 different kinds of sliders, and much more.")
3547 ;; The Qwt license is LGPL2.1 with some exceptions.
3548 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
3549 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
3550 license:lgpl2.1 license:gpl3))))
3552 (define-public qtwebkit
3555 (version "5.212.0-alpha4")
3559 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
3560 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
3563 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
3564 (patches (search-patches "qtwebkit-pbutils-include.patch"
3565 "qtwebkit-fix-building-with-bison-3.7.patch"
3566 "qtwebkit-fix-building-with-glib-2.68.patch"
3567 "qtwebkit-fix-building-with-icu-68.patch"
3568 "qtwebkit-fix-building-with-python-3.9.patch"))))
3569 (build-system cmake-build-system)
3581 ("gst-plugins-base" ,gst-plugins-base)
3582 ("libjpeg" ,libjpeg-turbo)
3584 ("libwebp" ,libwebp)
3586 ("fontconfig" ,fontconfig)
3587 ("libxrender" ,libxrender)
3588 ("qtbase" ,qtbase-5)
3589 ("qtdeclarative-5" ,qtdeclarative-5)
3590 ("qtlocation" ,qtlocation)
3591 ("qtmultimedia-5" ,qtmultimedia-5)
3592 ("qtsensors" ,qtsensors)
3593 ("qtwebchannel-5" ,qtwebchannel-5)
3594 ("libxml2" ,libxml2)
3595 ("libxslt" ,libxslt)
3597 ("libxcomposite" ,libxcomposite)))
3599 `(#:tests? #f ; no apparent tests; it might be necessary to set
3600 ; ENABLE_API_TESTS, see CMakeLists.txt
3602 ;; Parallel builds fail due to a race condition:
3603 ;; <https://bugs.gnu.org/34062>.
3604 #:parallel-build? #f
3606 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
3608 "-DUSE_LIBHYPHEN=OFF"
3609 "-DUSE_SYSTEM_MALLOC=ON"
3610 ;; XXX: relative dir installs to build dir?
3611 (string-append "-DECM_MKSPECS_INSTALL_DIR="
3612 %output "/lib/qt5/mkspecs/modules")
3613 ;; Sacrifice a little speed in order to link
3614 ;; libraries and test executables in a
3615 ;; reasonable amount of memory.
3616 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
3617 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
3618 (home-page "https://www.webkit.org")
3619 (synopsis "Web browser engine and classes to render and interact with web
3621 (description "QtWebKit provides a Web browser engine that makes it easy to
3622 embed content from the World Wide Web into your Qt application. At the same
3623 time Web content can be enhanced with native controls.")
3624 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
3625 ;; room for slower or busy hardware.
3626 (properties '((timeout . 64800))) ;18 hours
3628 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
3629 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
3630 ;; disable it on non-Intel platforms.
3631 (supported-systems '("x86_64-linux" "i686-linux"))
3633 (license license:lgpl2.1+)))
3635 (define-public dotherside
3643 (url "https://github.com/filcuc/DOtherSide")
3644 (commit (string-append "v" version))))
3645 (file-name (git-file-name name version))
3648 "13n2qb8q9jz4ihwlbs7y15lw90w9113gb1bgnb1dggpxkj64r953"))))
3649 (build-system cmake-build-system)
3653 ;; TODO: Support Qt 6 (requires qtdeclarative of Qt6).
3654 (list qtbase-5 qtdeclarative-5))
3655 (home-page "https://filcuc.github.io/DOtherSide/index.html")
3656 (synopsis "C language library for creating bindings for the Qt QML language")
3658 "DOtherSide is a C language library for creating bindings for the
3659 QT QML language. The following features are implementable from
3662 @item Creating custom QObject
3663 @item Creating custom QAbstractListModels
3664 @item Creating custom properties, signals and slots
3665 @item Creating from QML QObject defined in the binded language
3666 @item Creating from Singleton QML QObject defined in the binded language
3668 (license license:lgpl3))) ;version 3 only (+ exception)
3670 ;; There have been no public releases yet.
3671 (define-public qtcolorwidgets
3672 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
3675 (name "qtcolorwidgets")
3676 (version (git-version "0" revision commit))
3680 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3682 (file-name (git-file-name name version))
3685 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
3686 (build-system cmake-build-system)
3687 (arguments `(#:tests? #f)) ; There are no tests
3692 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3693 (synopsis "Color management widgets")
3694 (description "QtColorWidgets provides a Qt color dialog that is more
3695 user-friendly than the default @code{QColorDialog} and several other
3696 color-related widgets.")
3697 ;; Includes a license exception for combining with GPL2 code.
3698 (license license:lgpl3+))))
3700 (define-public qcustomplot
3702 (name "qcustomplot")
3707 (uri (string-append "https://www.qcustomplot.com/release/"
3708 version "fixed" "/QCustomPlot.tar.gz"))
3710 (base32 "1324kqyj1v1f8k8d7b15gc3apwz9qxx52p86hvchg33hjdlqhskx"))))
3712 `(("qcustomplot-sharedlib"
3715 (uri (string-append "https://www.qcustomplot.com/release/"
3716 version "fixed" "/QCustomPlot-sharedlib.tar.gz"))
3718 (base32 "0vp8lpxvd1nlp4liqrlvslpqrgfn0wpiwizzdsjbj22zzb8vxikc"))))))
3721 (build-system gnu-build-system)
3724 (modify-phases %standard-phases
3725 (add-after 'unpack 'unpack-extra-files
3726 (lambda* (#:key inputs #:allow-other-keys)
3727 (invoke "tar" "-xvf" (assoc-ref inputs "qcustomplot-sharedlib"))))
3729 (lambda* (#:key outputs #:allow-other-keys)
3730 (chdir "qcustomplot-sharedlib/sharedlib-compilation")
3731 (substitute* "sharedlib-compilation.pro"
3732 ;; Don't build debug library.
3733 (("debug_and_release")
3736 (string-append "DESTDIR="
3737 (assoc-ref outputs "out")
3739 (add-after 'install 'install-header
3740 (lambda* (#:key outputs #:allow-other-keys)
3741 (install-file "../../qcustomplot.h"
3742 (string-append (assoc-ref outputs "out")
3744 (home-page "https://www.qcustomplot.com/")
3745 (synopsis "Qt widget for plotting and data visualization")
3747 "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts.")
3748 (license license:gpl3+)))
3750 ;; TODO: Split shiboken2 binding generator into a dedicated output.
3751 ;; This executable requires libxml2, libxslt, clang-toolchain at runtime.
3752 ;; The libshiboken library only requires Qt and Python at runtime.
3753 (define-public python-shiboken-2
3755 (name "python-shiboken-2")
3759 (uri (string-append "https://download.qt.io/official_releases"
3760 "/QtForPython/pyside2/PySide2-" version
3761 "-src/pyside-setup-opensource-src-"
3765 "060ljj1nzyp4zfz2vasbv2i7gs5rfkkjwxxbisd0fdw01d5m01mk"))))
3766 (build-system cmake-build-system)
3768 (list clang-toolchain
3777 ;; FIXME: Building tests fails
3778 #:configure-flags #~(list "-DBUILD_TESTS=off")
3780 #~(modify-phases %standard-phases
3781 (add-after 'unpack 'use-shiboken-dir-only
3782 (lambda _ (chdir "sources/shiboken2") #t))
3783 (add-before 'configure 'make-files-writable-and-update-timestamps
3785 ;; The build scripts need to modify some files in
3786 ;; the read-only source directory, and also attempts
3787 ;; to create Zip files which fails because the Zip
3788 ;; format does not support timestamps before 1980.
3789 (let ((circa-1980 (* 10 366 24 60 60)))
3790 (for-each (lambda (file)
3791 (make-file-writable file)
3792 (utime file circa-1980 circa-1980))
3795 (add-before 'configure 'set-build-env
3797 (let ((llvm #$(this-package-input "clang-toolchain")))
3798 (setenv "CLANG_INSTALL_DIR" llvm)
3800 (home-page "https://wiki.qt.io/Qt_for_Python")
3802 "Shiboken generates bindings for C++ libraries using CPython source code")
3804 "Shiboken generates bindings for C++ libraries using CPython source code")
3807 ;; The main code is GPL3 or LGPL3.
3808 ;; Examples are BSD-3.
3813 (define-public python-pyside-2
3815 (name "python-pyside-2")
3816 (version (package-version python-shiboken-2))
3817 (source (package-source python-shiboken-2))
3818 (build-system cmake-build-system)
3841 (list python-shiboken-2))
3843 `(("cmake" ,cmake-minimal)
3844 ("python" ,python-wrapper)
3845 ("qttools-5" ,qttools-5)
3849 ;; FIXME: Building tests fail.
3851 (list "-DBUILD_TESTS=FALSE"
3852 (string-append "-DPYTHON_EXECUTABLE="
3853 (assoc-ref %build-inputs "python")
3855 #:modules ((guix build cmake-build-system)
3859 (modify-phases %standard-phases
3860 (add-after 'unpack 'go-to-source-dir
3861 (lambda _ (chdir "sources/pyside2") #t))
3862 (add-after 'go-to-source-dir 'fix-qt-module-detection
3863 (lambda* (#:key inputs #:allow-other-keys)
3864 ;; Activate qt module support even if it not in the same
3865 ;; directory as qtbase.
3866 (substitute* "../cmake_helpers/helpers.cmake"
3867 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
3869 ;; Add include directories for qt modules.
3870 (let ((dirs (map (lambda (name)
3871 (string-append (assoc-ref inputs name)
3890 (substitute* "cmake/Macros/PySideModules.cmake"
3891 (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all)
3892 (fold (lambda (dir paths)
3893 (string-append paths "${PATH_SEP}" dir))
3896 (setenv "CXXFLAGS" (fold (lambda (dir paths)
3897 (string-append paths " -I" dir))
3900 (add-before 'configure 'set-clang-dir
3901 (lambda* (#:key inputs #:allow-other-keys)
3902 (let ((clang (assoc-ref inputs "clang-toolchain")))
3903 (setenv "CLANG_INSTALL_DIR" clang)
3905 (home-page "https://wiki.qt.io/Qt_for_Python")
3907 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
3909 "The Qt for Python product enables the use of Qt5 APIs in Python
3910 applications. It lets Python developers utilize the full potential of Qt,
3911 using the PySide2 module. The PySide2 module provides access to the
3912 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
3913 comes with the Shiboken2 CPython binding code generator, which can be used to
3914 generate Python bindings for your C or C++ code.")
3918 ;; this file may be used under the terms of the GNU General
3919 ;; Public License version 2.0 or (at your option) the GNU
3920 ;; General Public license version 3 or any later version
3921 ;; approved by the KDE Free Qt Foundation.
3922 ;; Thus, it is currently v2 or v3, but no "+".
3926 (define-public python-pyside-2-tools
3928 (name "python-pyside-2-tools")
3929 (version (package-version python-shiboken-2))
3930 (source (package-source python-shiboken-2))
3931 (build-system cmake-build-system)
3933 (list python-pyside-2 python-shiboken-2 qtbase-5))
3935 `(("python" ,python-wrapper)))
3939 (list "-DBUILD_TESTS=off"
3940 (string-append "-DPYTHON_EXECUTABLE="
3941 (assoc-ref %build-inputs "python")
3943 #:phases (modify-phases %standard-phases
3944 (add-after 'unpack 'go-to-source-dir
3945 (lambda _ (chdir "sources/pyside2-tools") #t)))))
3946 (home-page "https://wiki.qt.io/Qt_for_Python")
3948 "Contains command line tools for PySide2")
3950 "Contains lupdate, rcc and uic tools for PySide2")
3951 (license license:gpl2)))
3953 (define-public libqglviewer
3955 (name "libqglviewer")
3960 (string-append "http://libqglviewer.com/src/libQGLViewer-"
3964 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
3965 (build-system gnu-build-system)
3967 '(#:tests? #f ; no check target
3969 (list (string-append "PREFIX="
3970 (assoc-ref %outputs "out")))
3972 (modify-phases %standard-phases
3974 (lambda* (#:key make-flags #:allow-other-keys)
3975 (apply invoke (cons "qmake" make-flags)))))))
3977 (list qtbase-5 qttools-5))
3980 (home-page "http://libqglviewer.com")
3981 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
3983 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
3984 of OpenGL 3D viewers.
3986 It provides some of the typical 3D viewer functionalities, such as the
3987 possibility to move the camera using the mouse, which lacks in most of the
3988 other APIs. Other features include mouse manipulated frames, interpolated
3989 keyFrames, object selection, stereo display, screenshot saving and much more.
3990 It can be used by OpenGL beginners as well as to create complex applications,
3991 being fully customizable and easy to extend.")
3992 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
3994 (license (list license:gpl2 license:gpl3))))
3996 (define-public qhexedit
4004 (url "https://github.com/Simsys/qhexedit2")
4005 (commit (string-append "v" version))))
4006 (file-name (git-file-name name version))
4008 (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
4009 (build-system gnu-build-system)
4012 (modify-phases %standard-phases
4013 (add-after 'unpack 'fix-path
4014 (lambda* (#:key outputs #:allow-other-keys)
4015 (substitute* "src/qhexedit.pro"
4016 (("^unix:DESTDIR = /usr/lib")
4017 (string-append "unix:DESTDIR = "
4018 (assoc-ref outputs "out") "/lib")))))
4022 (invoke "qmake" "qhexedit.pro")))
4023 (add-after 'install 'install-headers
4024 (lambda* (#:key outputs #:allow-other-keys)
4025 (let* ((out (assoc-ref outputs "out"))
4026 (include-dir (string-append out "/include")))
4027 (mkdir-p include-dir)
4028 (for-each (lambda (file)
4029 (install-file file include-dir))
4030 (find-files "." "\\.h$"))))))))
4031 (inputs (list qtbase-5))
4032 (native-inputs (list qttools-5))
4033 (home-page "https://simsys.github.io")
4034 (synopsis "Binary editor widget for Qt")
4036 "@code{QHexEdit} is a hex editor widget for the Qt framework. It is a
4037 simple editor for binary data, just like @code{QPlainTextEdit} is for text
4039 (license license:lgpl2.1)))
4042 (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
4046 (version (git-version "1.6.0" revision commit-ref))
4051 (url "https://github.com/coin3d/soqt")
4054 (file-name (git-file-name name version))
4056 (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
4057 (build-system cmake-build-system)
4058 (arguments '(#:tests? #f)) ; There are no tests
4060 (list pkg-config cmake))
4062 (list qtbase-5 coin3D-4))
4063 (home-page "https://github.com/coin3d/soqt")
4064 (synopsis "Qt GUI component toolkit library for Coin")
4065 (description "SoQt is a Qt GUI component toolkit library for Coin. It is
4066 also compatible with SGI and TGS Open Inventor, and the API is based on the API
4067 of the InventorXt GUI component toolkit.")
4068 (license license:bsd-3))))
4070 (define-public libdbusmenu-qt
4072 (name "libdbusmenu-qt")
4073 (version "0.9.3+16.04.20160218-0ubuntu1")
4077 ;; Download from github rather than launchpad because launchpad trunk
4078 ;; tarball hash is not deterministic.
4080 (url "https://github.com/unity8-team/libdbusmenu-qt")
4082 (file-name (git-file-name name version))
4084 (base32 "0b7ii1cvmpcyl79gqal9c3va9m55h055s4hx7fpxkhhqs9463ggg"))))
4085 (build-system cmake-build-system)
4087 ;; XXX: Tests require a dbus session and some icons.
4093 (home-page "https://launchpad.net/libdbusmenu-qt")
4094 (synopsis "Qt implementation of the DBusMenu spec")
4095 (description "This library provides a Qt implementation of the DBusMenu
4096 protocol. The DBusMenu protocol makes it possible for applications to export
4097 and import their menus over DBus.")
4098 (license license:lgpl2.1+)))
4100 (define-public kdsoap
4107 (uri (string-append "https://github.com/KDAB/KDSoap/releases/download/"
4108 "kdsoap-" version "/kdsoap-" version ".tar.gz"))
4111 "1vh4rzb09kks1ilay1y60q7gf64gwzdwsca60hmx1xx69w8672fi"))))
4112 (build-system qt-build-system)
4113 (inputs `(("qtbase" ,qtbase-5)))
4115 '(#:configure-flags '("-DKDSoap_TESTS=true")
4117 (modify-phases %standard-phases
4119 (lambda* (#:key tests? #:allow-other-keys)
4121 (invoke "ctest" "-E" ;; These tests try connect to the internet.
4122 "(kdsoap-webcalls|kdsoap-webcalls_wsdl|kdsoap-test_calc)"))
4124 (home-page "https://www.kdab.com/development-resources/qt-tools/kd-soap/")
4125 (synopsis "Qt SOAP component")
4126 (description "KD SOAP is a tool for creating client applications for web
4127 services using the XML based SOAP protocol and without the need for a dedicated
4129 (license (list license:gpl2 license:gpl3))))