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-5)
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-license 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-5
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 qtwayland
1510 (uri (qt-urls name version))
1512 (base32 "1w60p1did7awdlzq5k8vnq2ncpskb07cpvz31cbv99bjs6igw53g"))))
1513 (build-system cmake-build-system)
1515 (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1517 #~(modify-phases %standard-phases
1518 (add-after 'unpack 'disable-failing-tests
1520 ;; FIXME: tst_seatv4::animatedCursor() fails here.
1521 ;; See also: <https://bugreports.qt.io/browse/QTBUG-78317>
1522 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
1524 "QVERIFY\\(!cursorSurface\\(\\)->"
1525 "m_waitingFrameCallbacks\\.empty\\(\\)\\);")) "")
1526 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);") ""))))
1527 (add-before 'check 'set-test-environment
1529 ;; Do not fail just because /etc/machine-id is missing.
1530 (setenv "DBUS_FATAL_WARNINGS" "0")
1531 ;; Make Qt render "offscreen", required for tests.
1532 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
1533 (native-inputs (list glib perl pkg-config qtdeclarative))
1547 (synopsis "Qt Wayland module")
1548 (description "The Qt Wayland module provides the QtWayland client and
1549 compositor libraries.")
1550 (home-page (package-home-page qtbase))
1551 (license (package-license qtbase))))
1553 (define-public qtserialport
1554 (package (inherit qtsvg-5)
1555 (name "qtserialport")
1559 (uri (qt-urls name version))
1562 "17gp5qzg4wdg8qlxk2p3mh8x1vk33rf33wic3fy0cws193bmkiar"))))
1563 (native-inputs (list perl))
1565 (list qtbase-5 eudev))
1567 (substitute-keyword-arguments (package-arguments qtsvg-5)
1569 `(modify-phases ,phases
1570 (add-after 'unpack 'patch-dlopen-paths
1571 (lambda* (#:key inputs #:allow-other-keys)
1572 (substitute* "src/serialport/qtudev_p.h"
1573 ;; Use the absolute paths for dynamically loaded libs,
1574 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1575 ;; typically is not set in guix.
1576 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1577 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1579 (synopsis "Qt Serial Port module")
1580 (description "The Qt Serial Port module provides the library for
1581 interacting with serial ports from within Qt.")))
1583 (define-public qtserialbus
1584 (package (inherit qtsvg-5)
1585 (name "qtserialbus")
1589 (uri (qt-urls name version))
1592 "125x6756fjpldqy6wbw6cg7ngjh2016aiq92bchh719z1mf7xsxf"))))
1594 (substitute-keyword-arguments (package-arguments qtsvg-5)
1595 ((#:phases phases '%standard-phases)
1596 `(modify-phases ,phases
1597 (add-after 'unpack 'patch-libsocketcan-reference
1598 (lambda* (#:key inputs #:allow-other-keys)
1599 (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
1600 (libcansocket.so (string-append libcansocket
1601 "/lib/libsocketcan.so")))
1602 (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
1603 (("QStringLiteral\\(\"socketcan\"\\)")
1604 (format #f "QStringLiteral(~s)" libcansocket.so)))
1607 (list libsocketcan qtbase-5 qtserialport))
1608 (synopsis "Qt Serial Bus module")
1609 (description "The Qt Serial Bus API provides classes and functions to
1610 access the various industrial serial buses and protocols, such as CAN, ModBus,
1613 (define-public qtwebchannel-5
1614 (package (inherit qtsvg-5)
1615 (name "qtwebchannel")
1619 (uri (qt-urls name version))
1622 "1h9y634phvvk557mhmf9z4lmxr41rl8x9mqy2lzp31mk8ffffzqj"))))
1624 (list perl qtdeclarative-5 qtwebsockets-5))
1625 (inputs (list qtbase-5))
1626 (synopsis "Web communication library for Qt")
1627 (description "The Qt WebChannel module enables peer-to-peer communication
1628 between the host (QML/C++ application) and the client (HTML/JavaScript
1629 application). The transport mechanism is supported out of the box by the two
1630 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1632 (define-public qtwebchannel
1634 (name "qtwebchannel")
1638 (uri (qt-urls name version))
1641 "0s16zx3qn3byldvhmsnwijm8rmizk8vpqj7fnwhjg6c67z10m8ma"))))
1642 (build-system cmake-build-system)
1645 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1646 #:phases #~(modify-phases %standard-phases
1647 (delete 'check) ;move after install
1648 (add-after 'install 'prepare-for-tests
1650 (setenv "QT_QPA_PLATFORM" "offscreen")
1651 (setenv "QML2_IMPORT_PATH"
1652 (string-append #$output "/lib/qt6/qml:"
1653 (getenv "QML2_IMPORT_PATH")))))
1654 (add-after 'prepare-for-tests 'check
1655 (assoc-ref %standard-phases 'check))
1656 (add-after 'check 'delete-installed-tests
1658 (delete-file-recursively
1659 (string-append #$output "/tests")))))))
1660 (native-inputs (list perl))
1661 (inputs (list qtbase qtdeclarative qtwebsockets))
1662 (home-page (package-home-page qtbase))
1663 (synopsis "Web communication library for Qt")
1664 (description "The Qt WebChannel module enables peer-to-peer communication
1665 between the host (QML/C++ application) and the client (HTML/JavaScript
1667 (license (package-license qtbase))))
1669 (define-public qtwebglplugin
1670 (package (inherit qtsvg-5)
1671 (name "qtwebglplugin")
1675 (uri (qt-urls name version))
1678 "0ihlnhv8ldkqz82v3j7j22lrhk17b6ghra8sx85y2agd2ysq5rw1"))))
1680 (substitute-keyword-arguments (package-arguments qtsvg-5)
1682 `(modify-phases ,phases
1683 (add-after 'unpack 'disable-network-tests
1684 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1685 (("webgl") "# webgl"))
1689 (list mesa qtbase-5 qtdeclarative-5 qtwebsockets-5 zlib))
1690 (synopsis "QPA plugin for running an application via a browser using
1691 streamed WebGL commands")
1692 (description "Qt back end that uses WebGL for rendering. It allows Qt
1693 applications (with some limitations) to run in a web browser that supports
1694 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1695 compatible web browser without the use of plug-ins. The API is similar to
1696 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1698 (define-public qtwebview
1699 (package (inherit qtsvg-5)
1704 (uri (qt-urls name version))
1707 "1rw1wibmbxlj6xc86qs3y8h42al1vczqiksyxzaylxs9gqb4d7xy"))))
1711 (list qtbase-5 qtdeclarative-5))
1712 (synopsis "Display web content in a QML application")
1713 (description "Qt WebView provides a way to display web content in a QML
1714 application without necessarily including a full web browser stack by using
1715 native APIs where it makes sense.")))
1717 (define-public qtlocation
1718 (package (inherit qtsvg-5)
1723 (uri (string-append "https://download.qt.io/official_releases/qt/"
1724 (version-major+minor version) "/" version
1725 "/submodules/" name "-everywhere-src-"
1729 "184jychnlfhplpwc5cdcsapwljgwvzk5qpf3val4kpq8w44wnkwq"))))
1731 (substitute-keyword-arguments (package-arguments qtsvg-5)
1732 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1734 (list perl qtdeclarative-5 qtquickcontrols-5 qtserialport))
1736 (list icu4c openssl qtbase-5 zlib))
1737 (synopsis "Qt Location and Positioning modules")
1738 (description "The Qt Location module provides an interface for location,
1739 positioning and geolocation plugins.")))
1741 (define-public qtlottie
1747 (uri (qt-urls name version))
1750 "1x8wmc6gwmxk92zjcsrbhrbqbfvnk7302ggghld5wk8jk5lsf2vl"))))
1751 (build-system cmake-build-system)
1754 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1756 #~(modify-phases %standard-phases
1757 (delete 'check) ;move after install
1758 (add-after 'install 'prepare-for-tests
1760 (setenv "QT_QPA_PLATFORM" "offscreen")
1761 (setenv "QML2_IMPORT_PATH"
1762 (string-append #$output "/lib/qt6/qml:"
1763 (getenv "QML2_IMPORT_PATH"))))))))
1764 (native-inputs (list perl))
1765 (inputs (list libxkbcommon qtbase qtdeclarative))
1766 (home-page (package-home-page qtbase))
1767 (synopsis "QML API for rendering Bodymovin graphics and animations")
1768 (description "Qt Lottie Animation provides a QML API for rendering
1769 graphics and animations that are exported in JSON format by the Bodymovin
1770 plugin for Adobe After Effects.")
1771 (license (package-license qtbase))))
1773 (define-public qttools-5
1774 (package (inherit qtsvg-5)
1779 (uri (qt-urls name version))
1782 "1k618f7v6jaj0ygy8d7jvgb8zjr47sn55kiskbdkkizp3z7d12f1"))))
1784 (substitute-keyword-arguments (package-arguments qtsvg-5)
1785 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1787 (list perl qtdeclarative-5 vulkan-headers))
1789 (list mesa qtbase-5))
1790 (synopsis "Qt Tools and Designer modules")
1791 (description "The Qt Tools module provides a set of applications to browse
1792 the documentation, translate applications, generate help files and other stuff
1793 that helps in Qt development.")))
1795 (define-public qttools
1801 (uri (qt-urls name version))
1804 "1h96w4bzkbd80vr7lh6hnypdlmbzc1y52c2zrqzvkgm3587pa4n4"))))
1805 (build-system cmake-build-system)
1808 ;; The build system attempts to fetch online resources and fails when
1809 ;; building the test suite.
1810 #:configure-flags #~(list "-DQT_BUILD_TESTS=OFF")))
1811 (native-inputs (list perl qtdeclarative vulkan-headers))
1812 (inputs (list libxkbcommon mesa qtbase))
1813 (home-page (package-home-page qtbase))
1814 (synopsis "Qt Tools and Designer modules")
1815 (description "The Qt Tools module provides a set of applications to browse
1816 the documentation, translate applications, generate help files and other stuff
1817 that helps in Qt development.")
1818 ;; GPL 3 only with Qt GPL exception 1.0 (see:
1819 ;; LICENSES/Qt-GPL-exception-1.0.txt).
1820 (license (list license:gpl3))))
1822 (define-public qtscript
1823 (package (inherit qtsvg-5)
1828 (uri (qt-urls name version))
1831 "0gk74hk488k9ldacxbxcranr3arf8ifqg8kz9nm1rgdgd59p36d2"))
1832 (patches (search-patches "qtscript-disable-tests.patch"))))
1834 (list perl qttools-5))
1837 (synopsis "Qt Script module")
1838 (description "Qt provides support for application scripting with ECMAScript.
1839 The following guides and references cover aspects of programming with
1840 ECMAScript and Qt.")))
1842 (define-public qtquickcontrols-5
1843 (package (inherit qtsvg-5)
1844 (name "qtquickcontrols")
1848 (uri (qt-urls name version))
1851 "1dczakl868mg0lnwpf082jjc5976ycn879li1vqlgw5ihirzp4y3"))))
1853 (substitute-keyword-arguments (package-arguments qtsvg-5)
1854 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1856 (list qtbase-5 qtdeclarative-5))
1857 (synopsis "Qt Quick Controls and other Quick modules")
1858 (description "The QtScript module provides classes for making Qt
1859 applications scriptable. This module provides a set of extra components that
1860 can be used to build complete interfaces in Qt Quick.")))
1862 (define-public qtquickcontrols2-5
1863 (package (inherit qtsvg-5)
1864 (name "qtquickcontrols2")
1868 (uri (qt-urls name version))
1871 "06c9vrwvbjmzapmfa25y34lgjkzg57xxbm92nr6wkv5qykjnq6v7"))))
1873 (substitute-keyword-arguments (package-arguments qtsvg-5)
1874 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1876 (list qtbase-5 qtdeclarative-5))
1877 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1878 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1879 module that provides platform integration: native dialogs, menus and menu bars,
1880 and tray icons. It falls back to Qt Widgets when a native implementation is
1883 (define-public qtquickcontrols2
1884 ;; qtquickcontrols2 still exist, but was merged into qtdeclarative.
1885 ;; Unfortunately that hasn't been well communicated at all (see:
1886 ;; https://bugreports.qt.io/browse/QTBUG-79454).
1887 (deprecated-package "qtquickcontrols2" qtdeclarative))
1889 (define-public qtgraphicaleffects
1890 (package (inherit qtsvg-5)
1891 (name "qtgraphicaleffects")
1895 (uri (qt-urls name version))
1898 "1r6zfc0qga2ax155js7c8y5rx6vgayf582s921j09mb797v6g3gc"))))
1900 (substitute-keyword-arguments (package-arguments qtsvg-5)
1901 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1903 (list qtbase-5 qtdeclarative-5))
1904 (synopsis "Qt Graphical Effects module")
1905 (description "The Qt Graphical Effects module provides a set of QML types
1906 for adding visually impressive and configurable effects to user interfaces.
1907 Effects are visual items that can be added to Qt Quick user interface as UI
1908 components. The API consists of over 20 effects provided as separate QML
1909 types. The effects cover functional areas such as blending, masking, blurring,
1910 coloring, and many more.")))
1912 (define-public qtgamepad
1913 (package (inherit qtsvg-5)
1918 (uri (qt-urls name version))
1921 "0p07bg93fdfn4gr2kv38qgnws5znhswajrxdfs8xc9l3i7vi2xn7"))))
1923 (list perl pkg-config))
1925 `(("fontconfig" ,fontconfig)
1926 ("freetype" ,freetype)
1927 ("libxrender" ,libxrender)
1929 ("qtbase" ,qtbase-5)
1930 ("qtdeclarative-5" ,qtdeclarative-5)))
1931 (synopsis "Qt Gamepad module")
1932 (description "The Qt Gamepad module is an add-on library that enables Qt
1933 applications to support the use of gamepad hardware and in some cases remote
1934 control equipment. The module provides both QML and C++ interfaces. The
1935 primary target audience are embedded devices with fullscreen user interfaces,
1936 and mobile applications targeting TV-like form factors.")))
1938 (define-public qtscxml
1939 (package (inherit qtsvg-5)
1944 (uri (qt-urls name version))
1947 "1p5771b9hnpchfcdgy0zkhwg09a6xq88934aggp0rij1k85mkfb0"))
1948 (modules '((guix build utils)))
1951 (delete-file-recursively "tests/3rdparty")
1952 ;; the scion test refers to the bundled 3rd party test code.
1953 (substitute* "tests/auto/auto.pro"
1957 (list qtbase-5 qtdeclarative-5))
1958 (synopsis "Qt SCXML module")
1959 (description "The Qt SCXML module provides functionality to create state
1960 machines from SCXML files. This includes both dynamically creating state
1961 machines (loading the SCXML file and instantiating states and transitions) and
1962 generating a C++ file that has a class implementing the state machine. It
1963 also contains functionality to support data models and executable content.")))
1965 (define-public qtpositioning
1967 (name "qtpositioning")
1971 (uri (qt-urls name version))
1974 "0v78wamvdw02kf9rq7m5v24q2g6jmgq4ch0fnfa014p1r978wy06"))))
1975 (build-system cmake-build-system)
1978 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1979 #:phases #~(modify-phases %standard-phases
1980 (add-after 'install 'delete-installed-tests
1982 (delete-file-recursively
1983 (string-append #$output "/tests")))))))
1984 (inputs (list perl qtbase))
1985 (home-page (package-home-page qtbase))
1986 (synopsis "QML and C++ positioning information API")
1987 (description "The Qt Positioning API provides positioning information via
1988 QML and C++ interfaces. The Qt Positioning API lets you to determine a
1989 position by using a variety of possible sources, including satellite, wifi, or
1990 text files. That information can then be used to, for example, determine a
1991 position on a map. In addition, you can use to the API to retrieve satellite
1992 information and perform area based monitoring.")
1993 (license (package-license qtbase))))
1995 (define-public qtpurchasing
1996 (package (inherit qtsvg-5)
1997 (name "qtpurchasing")
2001 (uri (qt-urls name version))
2004 "09rjx53519dfk4qj2gbn3vlxyriasyb747wpg1p11y7jkwqhs4l7"))))
2006 (list qtbase-5 qtdeclarative-5))
2007 (synopsis "Qt Purchasing module")
2008 (description "The Qt Purchasing module provides and in-app API for
2009 purchasing goods and services.")))
2011 (define-public qtcharts
2012 (package (inherit qtsvg-5)
2017 (uri (qt-urls name version))
2020 "049x7z8zcp9jixmdv2fjscy2ggpd6za9hkdbb2bqp2mxjm0hwxg0"))))
2022 (substitute-keyword-arguments (package-arguments qtsvg-5)
2023 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2025 (list qtbase-5 qtdeclarative-5))
2026 (synopsis "Qt Charts module")
2027 (description "The Qt Charts module provides a set of easy to use chart
2028 components. It uses the Qt Graphics View Framework, therefore charts can be
2029 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
2030 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
2031 selecting one of the charts themes.")
2032 (license license:gpl3)))
2034 (define-public qtdatavis3d
2035 (package (inherit qtsvg-5)
2036 (name "qtdatavis3d")
2040 (uri (qt-urls name version))
2043 "1zdn3vm0nfy9ny7c783aabp3mhlnqhi9fw2rljn7ibbksmsnasi2"))))
2045 (substitute-keyword-arguments (package-arguments qtsvg-5)
2046 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2048 (list qtbase-5 qtdeclarative-5))
2049 (synopsis "Qt Data Visualization module")
2050 (description "The Qt Data Visualization module provides a way to visualize
2051 data in 3D as bar, scatter, and surface graphs. It is especially useful for
2052 visualizing depth maps and large quantities of rapidly changing data, such as
2053 data received from multiple sensors. The look and feel of graphs can be
2054 customized by using themes or by adding custom items and labels to them.")
2055 (license license:gpl3)))
2057 (define-public qtnetworkauth-5
2058 (package (inherit qtsvg-5)
2059 (name "qtnetworkauth")
2063 (uri (qt-urls name version))
2066 "11fdgacv4syr8bff2vdw7rb0dg1gcqpdf37hm3pn31d6z91frhpw"))))
2068 (substitute-keyword-arguments (package-arguments qtsvg-5)
2070 `(modify-phases ,phases
2071 (add-after 'unpack 'remove-failing-test
2073 ;; These tests can't find their test data.
2074 (substitute* "tests/auto/auto.pro"
2075 (("oauth1 ") "# oauth1 "))
2079 (synopsis "Qt Network Authorization module")
2080 (description "The Qt Network Authorization module provides an
2081 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
2083 (define-public qtnetworkauth
2085 (name "qtnetworkauth")
2089 (uri (qt-urls name version))
2092 "0apvsb2ip1m3kw8vi9spvf6f6q72ys8vr40rpyysi7shsjwm83yn"))))
2093 (build-system cmake-build-system)
2094 (arguments (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")))
2095 (native-inputs (list perl))
2096 (inputs (list qtbase))
2097 (home-page (package-home-page qtbase))
2098 (synopsis "Qt Network Authorization module")
2099 (description "The Qt Network Authorization module provides an
2100 implementation of OAuth and OAuth2 authenticathon methods for Qt.")
2101 (license (package-license qtbase))))
2103 (define-public qtremoteobjects
2104 (package (inherit qtsvg-5)
2105 (name "qtremoteobjects")
2109 (uri (qt-urls name version))
2112 "1hngbp0vkr35rpsrac7b9vx6f360v8v2g0fffzm590l8j2ybd0b7"))))
2114 (substitute-keyword-arguments (package-arguments qtsvg-5)
2116 `(modify-phases ,phases
2117 (add-after 'unpack 'remove-failing-test
2119 ;; This test can't find its imports.
2120 (substitute* "tests/auto/qml/qml.pro"
2121 (("integration") "# integration")
2122 (("usertypes") "# usertypes"))
2123 ;; disable failing tests: they need network
2124 (substitute* "tests/auto/auto.pro"
2125 (("integration_multiprocess proxy_multiprocess integration_external restart")
2126 "integration_multiprocess"))
2129 (list qtbase-5 qtdeclarative-5))
2130 (synopsis "Qt Remote Objects module")
2131 (description "The Qt Remote Objects module is an @dfn{inter-process
2132 communication} (IPC) module developed for Qt. The idea is to extend existing
2133 Qt's functionalities to enable an easy exchange of information between
2134 processes or computers.")))
2136 (define-public qtspeech
2137 (package (inherit qtsvg-5)
2142 (uri (qt-urls name version))
2145 "1xc3x3ghnhgchsg1kgj156yg69wn4rwjx8r28i1jd05hxjggn468"))))
2148 (substitute-keyword-arguments (package-arguments qtsvg-5)
2149 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2153 (list perl qtdeclarative-5 qtmultimedia-5 qtxmlpatterns))
2154 (synopsis "Qt Speech module")
2155 (description "The Qt Speech module enables a Qt application to support
2156 accessibility features such as text-to-speech, which is useful for end-users
2157 who are visually challenged or cannot access the application for whatever
2158 reason. The most common use case where text-to-speech comes in handy is when
2159 the end-user is driving and cannot attend the incoming messages on the phone.
2160 In such a scenario, the messaging application can read out the incoming
2163 (define-public qtspell
2171 (url "https://github.com/manisandro/qtspell")
2173 (file-name (git-file-name name version))
2175 (base32 "19ff6jzm699wrxrk57w3d4kl9qxgdipdikpwls9n4aqv4mw7g969"))))
2176 (build-system cmake-build-system)
2178 `(#:tests? #f)) ;no test
2180 (list pkg-config qttools-5))
2182 (list enchant qtbase-5))
2183 (home-page "https://github.com/manisandro/qtspell")
2184 (synopsis "Spell checking for Qt text widgets")
2186 "QtSpell adds spell-checking functionality to Qt's text widgets,
2187 using the Enchant spell-checking library.")
2188 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
2189 (license license:gpl2+)))
2191 (define-public qtwebengine-5
2194 (name "qtwebengine")
2195 (version (package-version qtbase-5))
2199 (uri (qt-urls name version))
2202 "1q4idxdm81sx102xc12ixj0xpfx52d6vwvs3jpapnkyq8c7cmby8"))
2203 (modules '((ice-9 ftw)
2207 (guix build utils)))
2210 (let ((preserved-third-party-files
2211 '("base/third_party/double_conversion"
2212 "base/third_party/cityhash"
2213 "base/third_party/cityhash_v103"
2214 "base/third_party/dynamic_annotations"
2215 "base/third_party/icu"
2216 "base/third_party/libevent"
2217 "base/third_party/nspr"
2218 "base/third_party/superfasthash"
2219 "base/third_party/symbolize"
2220 "base/third_party/xdg_mime"
2221 "base/third_party/xdg_user_dirs"
2222 "net/third_party/mozilla_security_manager"
2223 "net/third_party/nss"
2224 "net/third_party/quiche"
2225 "net/third_party/uri_template"
2226 "third_party/abseil-cpp"
2228 "third_party/angle/src/common/third_party/base"
2229 "third_party/angle/src/common/third_party/smhasher"
2230 "third_party/angle/src/common/third_party/xxhash"
2231 "third_party/angle/src/third_party/compiler"
2232 "third_party/axe-core"
2234 "third_party/boringssl"
2235 "third_party/boringssl/src/third_party/fiat"
2236 "third_party/breakpad"
2237 "third_party/brotli"
2240 "third_party/closure_compiler"
2241 "third_party/crashpad"
2242 "third_party/crashpad/crashpad/third_party/lss"
2243 "third_party/crashpad/crashpad/third_party/zlib"
2244 "third_party/crc32c"
2247 "third_party/devtools-frontend"
2248 "third_party/devtools-frontend/src/front_end/third_party/fabricjs"
2249 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
2250 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
2251 "third_party/devtools-frontend/src/third_party/axe-core"
2252 "third_party/emoji-segmenter"
2253 "third_party/ffmpeg"
2254 "third_party/googletest"
2255 "third_party/harfbuzz-ng/utils"
2256 "third_party/hunspell"
2257 "third_party/iccjpeg"
2259 "third_party/inspector_protocol"
2260 "third_party/jinja2"
2261 "third_party/jsoncpp"
2262 "third_party/jstemplate"
2263 "third_party/khronos"
2264 "third_party/leveldatabase"
2265 "third_party/libaddressinput"
2266 "third_party/libgifcodec"
2267 "third_party/libjingle_xmpp"
2268 "third_party/libjpeg_turbo"
2269 "third_party/libpng"
2270 "third_party/libsrtp"
2271 "third_party/libsync"
2272 "third_party/libudev"
2273 "third_party/libvpx"
2274 "third_party/libwebm"
2275 "third_party/libwebp"
2276 "third_party/libxml"
2277 "third_party/libxslt"
2278 "third_party/libyuv"
2281 "third_party/markupsafe"
2282 "third_party/mesa_headers"
2283 "third_party/metrics_proto"
2284 "third_party/modp_b64"
2286 "third_party/one_euro_filter"
2287 "third_party/openh264/src/codec/api/svc"
2290 "third_party/pdfium"
2291 "third_party/pdfium/third_party/agg23"
2292 "third_party/pdfium/third_party/base"
2293 "third_party/pdfium/third_party/freetype"
2294 "third_party/pdfium/third_party/lcms"
2295 "third_party/pdfium/third_party/libopenjpeg20"
2296 "third_party/pdfium/third_party/skia_shared"
2297 "third_party/perfetto"
2300 "third_party/polymer"
2301 "third_party/protobuf"
2302 "third_party/protobuf/third_party/six"
2303 "third_party/pyjson5"
2305 "third_party/rnnoise"
2307 "third_party/skia/include/third_party/skcms/skcms.h"
2308 "third_party/skia/include/third_party/vulkan"
2309 "third_party/skia/third_party/skcms"
2310 "third_party/skia/third_party/vulkanmemoryallocator"
2311 "third_party/smhasher"
2312 "third_party/snappy"
2313 "third_party/sqlite"
2314 "third_party/usb_ids"
2315 "third_party/usrsctp"
2316 "third_party/web-animations-js"
2317 "third_party/webrtc"
2318 "third_party/webrtc/common_audio/third_party/fft4g"
2319 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2320 "third_party/webrtc/modules/third_party/fft"
2321 "third_party/webrtc/modules/third_party/g711"
2322 "third_party/webrtc/modules/third_party/g722"
2323 "third_party/webrtc/rtc_base/third_party/base64"
2324 "third_party/webrtc/rtc_base/third_party/sigslot"
2325 "third_party/webrtc_overrides"
2326 "third_party/widevine/cdm/widevine_cdm_common.h"
2327 "third_party/widevine/cdm/widevine_cdm_version.h"
2331 "url/third_party/mozilla"
2332 "v8/src/third_party/utf8-decoder"
2333 "v8/src/third_party/valgrind"
2334 "v8/src/third_party/siphash"
2335 "v8/third_party/v8/builtins"
2336 "v8/third_party/inspector_protocol"))
2337 (protected (make-regexp "\\.(gn|gyp)i?$")))
2338 (define preserved-club
2339 (map (lambda (member)
2340 (string-append "./" member))
2341 preserved-third-party-files))
2342 (define (empty? dir)
2343 (equal? (scandir dir) '("." "..")))
2344 (define (third-party? file)
2345 (string-contains file "third_party/"))
2346 (define (useless? file)
2347 (any (cute string-suffix? <> file)
2348 '(".zip" ".so" ".dll" ".exe" ".jar")))
2349 (define (parents child)
2350 ;; Return all parent directories of CHILD up to and including
2351 ;; the closest "third_party".
2352 (let* ((dirs (match (string-split child #\/)
2353 ((dirs ... last) dirs)))
2354 (closest (list-index (lambda (dir)
2355 (string=? "third_party" dir))
2357 (delim (- (length dirs) closest)))
2358 (fold (lambda (dir prev)
2359 (cons (string-append (car prev) "/" dir)
2361 (list (string-join (list-head dirs delim) "/"))
2362 (list-tail dirs delim))))
2363 (define (remove-loudly file)
2364 (format #t "deleting ~a...~%" file)
2367 (define (delete-unwanted-files child stat flag base level)
2369 ((or 'regular 'symlink 'stale-symlink)
2370 (when (third-party? child)
2371 (unless (or (member child preserved-club)
2372 (any (cute member <> preserved-club)
2374 (regexp-exec protected child))
2375 (remove-loudly child)))
2376 (when (and (useless? child) (file-exists? child))
2377 (remove-loudly child))
2379 ('directory-processed
2380 (when (empty? child)
2385 (with-directory-excursion "src/3rdparty"
2386 ;; TODO: Try removing "gn" too for future versions of qtwebengine-5.
2387 (delete-file-recursively "ninja")
2389 (with-directory-excursion "chromium"
2390 ;; Delete bundled software and binaries that were not explicitly
2392 (nftw "." delete-unwanted-files 'depth 'physical)
2394 ;; Assert that each preserved item is present to catch removals.
2395 (for-each (lambda (third-party)
2396 (unless (file-exists? third-party)
2397 (error (format #f "~s does not exist!~%" third-party))))
2400 ;; Use relative header locations instead of hard coded ones.
2402 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2403 (("base/third_party/valgrind") "valgrind"))
2405 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
2406 (("third_party/curl") "curl"))
2408 '("components/viz/common/gpu/vulkan_context_provider.h"
2409 "components/viz/common/resources/resource_format_utils_vulkan.h"
2410 "gpu/config/gpu_util.cc")
2411 (("third_party/vulkan/include/")
2414 ;; Replace Google Analytics bundle with an empty file and hope
2416 (mkdir-p "third_party/analytics")
2417 (call-with-output-file
2418 "third_party/analytics/google-analytics-bundle.js"
2421 ;; Do not enable support for loading the Widevine DRM plugin.
2422 (substitute* "src/buildtools/config/common.pri"
2423 (("enable_widevine=true")
2424 "enable_widevine=false")))))))
2425 (build-system gnu-build-system)
2460 ;; FIXME: libxml2 needs to built with icu support though it links to
2461 ;; libxml2 configure summary still states "Checking for compatible
2462 ;; system libxml2... no"
2487 (substitute-keyword-arguments (package-arguments qtsvg-5)
2488 ((#:modules modules '())
2489 `((guix build gnu-build-system)
2491 (ice-9 textual-ports)))
2493 `(modify-phases ,phases
2494 (add-before 'configure 'substitute-source
2495 (lambda* (#:key inputs outputs #:allow-other-keys)
2496 (let ((out (assoc-ref outputs "out")))
2497 (with-atomic-file-replacement
2498 "src/buildtools/config/linux.pri"
2500 (display (get-string-all in) out)
2501 (display "\ngn_args += use_system_openh264=true\n" out)))
2502 ;; Qtwebengine is not installed into the same prefix as
2503 ;; qtbase. Some qtbase QTLibraryInfo constants will not
2504 ;; work. Replace with the full path to the qtwebengine-5
2505 ;; translations and locales in the store.
2506 (substitute* "src/core/web_engine_library_info.cpp"
2507 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
2508 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
2509 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
2510 (string-append "QLatin1String(\"" out "/share/qt5\")")))
2511 ;; Substitute full dynamic library path for nss.
2512 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2514 (search-input-file inputs "lib/nss/libnssckbi.so")))
2515 ;; Substitute full dynamic library path for udev.
2516 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2518 (search-input-file inputs "lib/libudev.so.1"))))))
2519 (add-before 'configure 'set-env
2521 ;; Avoids potential race conditions.
2522 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2523 (setenv "NINJAFLAGS"
2524 (string-append "-k1" ;less verbose build output
2525 ;; Respect the '--cores' option of 'guix build'.
2526 " -j" (number->string (parallel-job-count))))))
2529 ;; Valid QT_BUILD_PARTS variables are:
2530 ;; libs tools tests examples demos docs translations
2531 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
2532 "--webengine-printing-and-pdf=no"
2533 "--webengine-ffmpeg=system"
2534 ;; FIXME: Building qtwebengine-5 5.12.2 with
2535 ;; icu4c >= 68 fails.
2536 ;;"--webengine-icu=system"
2537 "--webengine-pepper-plugins=no"
2538 "-webengine-proprietary-codecs")))))
2539 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
2540 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
2541 ;; before running tests.
2542 ((#:tests? _ #f) #f)))
2543 (native-search-paths
2544 (list (search-path-specification
2545 (file-type 'regular)
2547 (variable "QTWEBENGINEPROCESS_PATH")
2548 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
2549 (home-page "https://wiki.qt.io/QtWebEngine")
2550 (synopsis "Qt WebEngine module")
2551 (description "The Qt5WebEngine module provides support for web applications
2552 using the Chromium browser project. The Chromium source code has Google services
2553 and binaries removed, and adds modular support for using system libraries.")
2554 (license license:lgpl2.1+)))
2556 (define-public qtwebengine
2558 (name "qtwebengine")
2563 (uri (qt-urls name version))
2566 "0ivfsqd5c0cxsnssj6z37901cf6a47w50zaqgjiysvcm3ar36ymd"))
2567 (modules '((ice-9 ftw)
2571 (guix build utils)))
2574 (let ((preserved-third-party-files
2575 '("base/third_party/double_conversion"
2576 "base/third_party/cityhash"
2577 "base/third_party/cityhash_v103"
2578 "base/third_party/dynamic_annotations"
2579 "base/third_party/icu"
2580 "base/third_party/libevent"
2581 "base/third_party/nspr"
2582 "base/third_party/superfasthash"
2583 "base/third_party/symbolize"
2584 "base/third_party/xdg_mime"
2585 "base/third_party/xdg_user_dirs"
2586 "net/third_party/mozilla_security_manager"
2587 "net/third_party/nss"
2588 "net/third_party/quiche"
2589 "net/third_party/uri_template"
2590 "third_party/abseil-cpp"
2592 "third_party/angle/src/common/third_party/base"
2593 "third_party/angle/src/common/third_party/smhasher"
2594 "third_party/angle/src/common/third_party/xxhash"
2595 "third_party/axe-core"
2597 "third_party/boringssl"
2598 "third_party/boringssl/src/third_party/fiat"
2599 "third_party/breakpad"
2600 "third_party/brotli"
2603 "third_party/closure_compiler"
2604 "third_party/crashpad"
2605 "third_party/crashpad/crashpad/third_party/lss"
2606 "third_party/crashpad/crashpad/third_party/zlib"
2607 "third_party/crc32c"
2610 "third_party/devtools-frontend"
2611 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
2612 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
2613 "third_party/emoji-segmenter"
2614 "third_party/ffmpeg"
2615 "third_party/googletest"
2616 "third_party/harfbuzz-ng/utils"
2617 "third_party/hunspell"
2618 "third_party/iccjpeg"
2620 "third_party/inspector_protocol"
2621 "third_party/jinja2"
2622 "third_party/jsoncpp"
2623 "third_party/jstemplate"
2624 "third_party/khronos"
2625 "third_party/leveldatabase"
2626 "third_party/libaddressinput"
2627 "third_party/libgifcodec"
2628 "third_party/libjingle_xmpp"
2629 "third_party/libjpeg_turbo"
2630 "third_party/libpng"
2631 "third_party/libsrtp"
2632 "third_party/libsync"
2633 "third_party/libudev"
2634 "third_party/libvpx"
2635 "third_party/libwebm"
2636 "third_party/libwebp"
2637 "third_party/libxml"
2638 "third_party/libxslt"
2639 "third_party/libyuv"
2642 "third_party/markupsafe"
2643 "third_party/mesa_headers"
2644 "third_party/metrics_proto"
2645 "third_party/modp_b64"
2647 "third_party/one_euro_filter"
2648 "third_party/openh264/src/codec/api/svc"
2651 "third_party/pdfium"
2652 "third_party/pdfium/third_party/agg23"
2653 "third_party/pdfium/third_party/base"
2654 "third_party/pdfium/third_party/freetype"
2655 "third_party/pdfium/third_party/lcms"
2656 "third_party/pdfium/third_party/libopenjpeg20"
2657 "third_party/pdfium/third_party/skia_shared"
2658 "third_party/perfetto"
2661 "third_party/polymer"
2662 "third_party/protobuf"
2663 "third_party/protobuf/third_party/six"
2664 "third_party/pyjson5"
2666 "third_party/rnnoise"
2668 "third_party/skia/include/third_party/skcms/skcms.h"
2669 "third_party/skia/include/third_party/vulkan"
2670 "third_party/skia/third_party/skcms"
2671 "third_party/skia/third_party/vulkanmemoryallocator"
2672 "third_party/smhasher"
2673 "third_party/snappy"
2674 "third_party/sqlite"
2675 "third_party/usb_ids"
2676 "third_party/usrsctp"
2677 "third_party/web-animations-js"
2678 "third_party/webrtc"
2679 "third_party/webrtc/common_audio/third_party/ooura"
2680 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2681 "third_party/webrtc/modules/third_party/fft"
2682 "third_party/webrtc/modules/third_party/g711"
2683 "third_party/webrtc/modules/third_party/g722"
2684 "third_party/webrtc/rtc_base/third_party/base64"
2685 "third_party/webrtc/rtc_base/third_party/sigslot"
2686 "third_party/webrtc_overrides"
2687 "third_party/widevine/cdm/widevine_cdm_common.h"
2688 "third_party/widevine/cdm/widevine_cdm_version.h"
2691 "url/third_party/mozilla"
2692 "v8/src/third_party/utf8-decoder"
2693 "v8/src/third_party/valgrind"
2694 "v8/src/third_party/siphash"
2695 "v8/third_party/v8/builtins"
2696 "v8/third_party/inspector_protocol"))
2697 (protected (make-regexp "\\.(gn|gyp)i?$")))
2698 (define preserved-club
2699 (map (lambda (member)
2700 (string-append "./" member))
2701 preserved-third-party-files))
2702 (define (empty? dir)
2703 (equal? (scandir dir) '("." "..")))
2704 (define (third-party? file)
2705 (string-contains file "third_party/"))
2706 (define (useless? file)
2707 (any (cute string-suffix? <> file)
2708 '(".zip" ".so" ".dll" ".exe" ".jar")))
2709 (define (parents child)
2710 ;; Return all parent directories of CHILD up to and including
2711 ;; the closest "third_party".
2712 (let* ((dirs (match (string-split child #\/)
2713 ((dirs ... last) dirs)))
2714 (closest (list-index (lambda (dir)
2715 (string=? "third_party" dir))
2717 (delim (- (length dirs) closest)))
2718 (fold (lambda (dir prev)
2719 (cons (string-append (car prev) "/" dir)
2721 (list (string-join (list-head dirs delim) "/"))
2722 (list-tail dirs delim))))
2723 (define (remove-loudly file)
2724 (format #t "deleting ~a...~%" file)
2727 (define (delete-unwanted-files child stat flag base level)
2729 ((or 'regular 'symlink 'stale-symlink)
2730 (when (third-party? child)
2731 (unless (or (member child preserved-club)
2732 (any (cute member <> preserved-club)
2734 (regexp-exec protected child))
2735 (remove-loudly child)))
2736 (when (and (useless? child) (file-exists? child))
2737 (remove-loudly child)))
2738 ('directory-processed
2739 (when (empty? child)
2743 (with-directory-excursion "src/3rdparty"
2744 (delete-file-recursively "ninja")
2746 (with-directory-excursion "chromium"
2747 ;; Delete bundled software and binaries that were not
2748 ;; explicitly preserved above.
2749 (nftw "." delete-unwanted-files 'depth 'physical)
2751 ;; Assert that each preserved item is present to catch
2753 (for-each (lambda (third-party)
2754 (unless (file-exists? third-party)
2755 (error (format #f "~s does not exist!~%"
2759 ;; Use relative header locations instead of hard coded ones.
2761 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2762 (("base/third_party/valgrind") "valgrind"))
2763 (substitute* "third_party/breakpad/breakpad/src/common/\
2764 linux/libcurl_wrapper.h"
2765 (("third_party/curl") "curl"))
2767 '("components/viz/common/gpu/vulkan_context_provider.h"
2768 "gpu/config/gpu_util.cc")
2769 (("third_party/vulkan/include/")
2772 ;; Replace Google Analytics bundle with an empty file and
2773 ;; hope no one notices.
2774 (mkdir-p "third_party/analytics")
2775 (call-with-output-file
2776 "third_party/analytics/google-analytics-bundle.js"
2779 ;; Do not enable support for loading the Widevine DRM plugin.
2780 (substitute* "src/core/CMakeLists.txt"
2781 (("enable_widevine=true")
2782 "enable_widevine=false")))))))
2783 (build-system cmake-build-system)
2786 ;; XXX: The test suite is not built by default; leave it off to save
2787 ;; some build time and resources.
2790 ;; Use the CMake ninja generator, otherwise the build fails (see:
2791 ;; https://bugreports.qt.io/browse/QTBUG-96897).
2793 ;; Manually add the NSS library prefix to the linker
2794 ;; search path, otherwise it fails to be linked (see:
2795 ;; https://bugreports.qt.io/browse/QTBUG-105053).
2796 (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-L"
2797 (search-input-directory %build-inputs "lib/nss"))
2799 ;; The PDF renderer plugin fails to build with errors such as
2800 ;; "src/3rdparty/chromium/components/pdf
2801 ;; /renderer/pdf_accessibility_tree.cc:1373:39:
2802 ;; error: use of undeclared identifier 'IDS_PDF_PAGE_INDEX'";
2804 "-DQT_FEATURE_webengine_printing_and_pdf=OFF"
2805 "-DQT_FEATURE_webengine_pepper_plugins=OFF" ;widevine
2806 "-DQT_FEATURE_system_ffmpeg=ON"
2807 ;; Do not artificially limit codec support; video decoding is
2809 "-DQT_FEATURE_webengine_proprietary_codecs=ON"
2810 "-DQT_FEATURE_webengine_system_alsa=ON"
2811 "-DQT_FEATURE_webengine_system_icu=ON"
2812 "-DQT_FEATURE_webengine_system_libxml=ON"
2813 "-DQT_FEATURE_webengine_system_libpci=ON"
2814 "-DQT_FEATURE_webengine_system_libpng=ON"
2815 "-DQT_FEATURE_webengine_system_pulseaudio=ON"
2816 "-DQT_FEATURE_webengine_system_zlib=ON")
2818 #~(modify-phases %standard-phases
2819 (add-after 'unpack 'patch-paths
2820 (lambda* (#:key inputs #:allow-other-keys)
2821 ;; Qtwebengine is not installed into the same prefix as qtbase.
2822 ;; Some qtbase QTLibraryInfo constants will not work. Replace
2823 ;; with the full path to the qtwebengine translations and
2824 ;; locales in the store.
2825 (substitute* "src/core/web_engine_library_info.cpp"
2826 (("QLibraryInfo::path\\(QLibraryInfo::TranslationsPath)")
2827 (string-append "QLatin1String(\"" #$output
2828 "/share/qt6/translations\")"))
2829 (("QLibraryInfo::path\\(QLibraryInfo::DataPath)")
2830 (string-append "QLatin1String(\"" #$output
2832 ;; Substitute full dynamic library path for nss.
2833 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2835 (search-input-file inputs "lib/nss/libnssckbi.so")))
2836 ;; Substitute full dynamic library path for udev.
2837 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2839 (search-input-file inputs "lib/libudev.so.1")))
2840 ;; Patch the location of the X11 keywoard layouts, otherwise
2841 ;; webengine *crashes* at run time when the default directory,
2842 ;; '/usr/share/X11/xkb' is empty (see:
2843 ;; https://bugreports.qt.io/browse/QTBUG-105124).
2844 (substitute* "src/3rdparty/chromium/ui/events/ozone/layout/xkb\
2845 /xkb_keyboard_layout_engine.cc"
2846 (("/usr/share/X11/xkb")
2847 (search-input-directory inputs "share/X11/xkb")))))
2848 (add-before 'configure 'prepare-build-environment
2850 ;; Avoids potential race conditions.
2851 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2852 (setenv "NINJAFLAGS"
2854 "-k1" ;less verbose build output
2855 ;; Respect the '--cores' option of 'guix build'.
2856 " -j" (number->string (parallel-job-count))))
2857 ;; Use Clang/LDD to help tame the memory requirements and hasten
2859 (setenv "AR" "llvm-ar") (setenv "NM" "llvm-nm")
2860 (setenv "CC" "clang") (setenv "CXX" "clang++")))
2862 (lambda* (#:key parallel-build? #:allow-other-keys)
2863 (apply invoke "cmake" "--build" "."
2865 `("--parallel" ,(number->string (parallel-job-count)))
2869 (invoke "cmake" "--install" "."))))))
2871 (modify-inputs (package-native-inputs qtwebengine-5)
2872 (delete "python2" "python2-six")
2879 (modify-inputs (package-inputs qtwebengine-5)
2880 (replace "qtbase" qtbase)
2881 (replace "qtdeclarative" qtdeclarative)
2882 (replace "qtmultimedia" qtmultimedia)
2883 (replace "qtwebchannel" qtwebchannel)
2884 (append libxkbfile xkeyboard-config)))
2885 (native-search-paths
2886 (list (search-path-specification
2887 (file-type 'regular)
2889 (variable "QTWEBENGINEPROCESS_PATH")
2890 (files '("lib/qt6/libexec/QtWebEngineProcess")))))
2891 (home-page "https://wiki.qt.io/QtWebEngine")
2892 (synopsis "Qt WebEngine module")
2893 (description "The Qt WebEngine module provides support for web
2894 applications using the Chromium browser project. The Chromium source code has
2895 Google services and binaries removed, and adds modular support for using
2897 (license license:lgpl2.1+)))
2899 (define-public single-application-qt5
2900 ;; Change in function signature, nheko requires at least this commit
2901 (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053"))
2903 (name "single-application-qt5")
2904 (version (string-append "3.2.0-" (string-take commit 7)))
2910 (url "https://github.com/itay-grudev/SingleApplication")
2912 (file-name (git-file-name name version))
2915 "163aa2x2qb0h8w26si5ql833ilj427jjbdwlz1p2p8iaq6dh0vq1"))))
2916 (build-system cmake-build-system)
2918 `(#:tests? #f ; no check target
2919 ;; Projects can decide how to build this library. You might need to
2920 ;; override this flag (QApplication, QGuiApplication or
2921 ;; QCoreApplication).
2922 #:configure-flags '("-DQAPPLICATION_CLASS=QApplication")
2924 (modify-phases %standard-phases
2925 ;; No install target, install things manually
2927 (lambda* (#:key inputs outputs source #:allow-other-keys)
2928 (let* ((qt (assoc-ref inputs "qtbase"))
2929 (qt-version ,(version-major (package-version qtbase-5)))
2930 (out (assoc-ref outputs "out")))
2932 "libSingleApplication.a" (string-append out "/lib"))
2936 (string-append source "/" file)
2937 (string-append out "/include")))
2938 '("SingleApplication"
2939 "singleapplication.h" "singleapplication_p.h"))
2943 (home-page "https://github.com/itay-grudev/SingleApplication")
2944 (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6")
2946 "SingleApplication is a replacement of the QtSingleApplication for Qt5 and Qt6.
2948 It keeps the Primary Instance of your Application and kills each subsequent
2949 instances. It can (if enabled) spawn secondary (non-related to the primary)
2950 instances and can send data to the primary instance from secondary
2952 (license license:expat))))
2954 (define-public python-sip
2961 (uri (list (pypi-uri "sip" version)
2962 (string-append "https://www.riverbankcomputing.com/static/"
2963 "Downloads/sip/" version
2964 "/sip-" version ".tar.gz")))
2967 "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"))))
2968 (build-system python-build-system)
2970 (list python-wrapper))
2972 (list python-toml python-packaging))
2973 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
2974 (synopsis "Python binding creator for C and C++ libraries")
2976 "SIP is a tool to create Python bindings for C and C++ libraries. It
2977 was originally developed to create PyQt, the Python bindings for the Qt
2978 toolkit, but can be used to create bindings for any C or C++ library.
2980 SIP comprises a code generator and a Python module. The code generator
2981 processes a set of specification files and generates C or C++ code, which
2982 is then compiled to create the bindings extension module. The SIP Python
2983 module provides support functions to the automatically generated code.")
2984 ;; There is a choice between a python like license, gpl2 and gpl3.
2985 ;; For compatibility with pyqt, we need gpl3.
2986 (license license:gpl3)))
2988 (define-public python-sip-4
2990 (inherit python-sip)
2996 (uri (list (pypi-uri "sip" version)
2997 (string-append "https://www.riverbankcomputing.com/static/"
2998 "Downloads/sip/" version
2999 "/sip-" version ".tar.gz")))
3002 "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"))))
3003 (build-system gnu-build-system)
3005 `(("python" ,python-wrapper)))
3006 (propagated-inputs `())
3008 `(#:tests? #f ; no check target
3009 #:imported-modules ((guix build python-build-system)
3010 ,@%gnu-build-system-modules)
3011 #:modules ((srfi srfi-1)
3012 ((guix build python-build-system) #:select (python-version))
3013 ,@%gnu-build-system-modules)
3015 (modify-phases %standard-phases
3017 (lambda* (#:key inputs outputs #:allow-other-keys)
3018 (let* ((out (assoc-ref outputs "out"))
3019 (bin (string-append out "/bin"))
3020 (include (string-append out "/include"))
3021 (python (assoc-ref inputs "python"))
3022 (lib (string-append out "/lib/python"
3023 (python-version python)
3025 (invoke "python" "configure.py"
3028 "--incdir" include)))))))
3029 (license license:gpl3)))
3031 (define-public python-pyqt
3033 (name "python-pyqt")
3038 ;; PyPI is the canonical distribution point of PyQt. Older
3039 ;; releases are available from the web site.
3040 (uri (list (pypi-uri "PyQt5" version)
3041 (string-append "https://www.riverbankcomputing.com/static/"
3042 "Downloads/PyQt5/" version "/PyQt5-"
3043 version ".tar.gz")))
3044 (file-name (string-append "PyQt5-" version ".tar.gz"))
3047 "1z74295i69cha52llsqffzhb5zz7qnbjc64h8qg21l91jgf0harp"))
3048 (patches (search-patches "pyqt-configure.patch"))))
3049 (build-system gnu-build-system)
3051 (list qtbase-5)) ; for qmake
3053 (list python-sip python-pyqt5-sip))
3055 `(("python" ,python-wrapper)
3056 ("qtbase" ,qtbase-5)
3057 ("qtconnectivity" ,qtconnectivity)
3058 ("qtdeclarative-5" ,qtdeclarative-5)
3059 ("qtlocation" ,qtlocation)
3060 ("qtmultimedia-5" ,qtmultimedia-5)
3061 ("qtsensors" ,qtsensors)
3062 ("qtserialport" ,qtserialport)
3063 ("qtsvg-5" ,qtsvg-5)
3064 ("qttools-5" ,qttools-5)
3065 ("qtwebchannel-5" ,qtwebchannel-5)
3066 ("qtwebkit" ,qtwebkit)
3067 ("qtwebsockets-5" ,qtwebsockets-5)
3068 ("qtx11extras" ,qtx11extras)
3069 ("qtxmlpatterns" ,qtxmlpatterns)))
3071 `(#:modules ((srfi srfi-1)
3072 ((guix build python-build-system) #:select (python-version))
3073 ,@%gnu-build-system-modules)
3074 #:imported-modules ((guix build python-build-system)
3075 ,@%gnu-build-system-modules)
3077 (modify-phases %standard-phases
3078 ;; When building python-pyqtwebengine, <qprinter.h> can not be
3079 ;; included. Here we substitute the full path to the header in the
3081 (add-before 'configure 'substitute-source
3082 (lambda* (#:key inputs #:allow-other-keys)
3083 (let* ((qtbase (assoc-ref inputs "qtbase"))
3084 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
3085 (substitute* "sip/QtPrintSupport/qprinter.sip"
3090 (lambda* (#:key inputs outputs #:allow-other-keys)
3091 (let* ((out (assoc-ref outputs "out"))
3092 (bin (string-append out "/bin"))
3093 (sip (string-append out "/share/sip"))
3094 (plugins (string-append out "/lib/qt5/plugins"))
3095 (designer (string-append plugins "/designer"))
3096 (qml (string-append plugins "/PyQt5"))
3097 (python (assoc-ref inputs "python"))
3098 (lib (string-append out "/lib/python"
3099 (python-version python)
3101 (stubs (string-append lib "/PyQt5")))
3102 (invoke "python" "configure.py"
3106 "--designer-plugindir" designer
3107 "--qml-plugindir" qml
3108 ; Where to install the PEP 484 Type Hints stub
3109 ; files. Without this the stubs are tried to be
3110 ; installed into the python package's
3111 ; site-package directory, which is read-only.
3113 "--sipdir" sip)))))))
3114 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
3115 (synopsis "Python bindings for Qt")
3117 "PyQt is a set of Python v2 and v3 bindings for the Qt application
3118 framework. The bindings are implemented as a set of Python modules and
3119 contain over 620 classes.")
3120 (license license:gpl3)))
3122 (define-public python-pyqt5-sip
3124 (name "python-pyqt5-sip")
3129 (uri (pypi-uri "PyQt5_sip" version))
3132 "1gg032ys4pccwkdzmdryadc9a4lq85nr05pag9swrsdykbdl9s9h"))))
3133 (build-system python-build-system)
3135 `(#:tests? #f)) ;; No test code.
3136 (home-page "https://www.riverbankcomputing.com/software/sip/")
3137 (synopsis "Sip module support for PyQt5")
3138 (description "Sip module support for PyQt5")
3139 (license license:lgpl2.1+)))
3141 (define-public python-pyqtwebengine
3143 (name "python-pyqtwebengine")
3148 ;; The newest releases are only available on PyPI. Older ones
3149 ;; are mirrored at the upstream home page.
3150 (uri (list (pypi-uri "PyQtWebEngine" version)
3151 (string-append "https://www.riverbankcomputing.com/static"
3152 "/Downloads/PyQtWebEngine/" version
3153 "/PyQtWebEngine-" version ".tar.gz")))
3156 "0d56ak71r14w4f9r96vaj34qcn2rbln3s6ildvvyc707fjkzwwjd"))))
3157 (build-system gnu-build-system)
3159 (list python python-sip
3160 ;; qtbase is required for qmake
3163 `(("python" ,python-wrapper)
3164 ("python-sip" ,python-sip)
3165 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3166 ("qtbase" ,qtbase-5)
3167 ("qtsvg-5" ,qtsvg-5)
3168 ("qtdeclarative-5" ,qtdeclarative-5)
3169 ("qtwebchannel-5" ,qtwebchannel-5)
3170 ("qtwebengine-5" ,qtwebengine-5)))
3172 `(#:modules ((srfi srfi-1)
3173 ((guix build python-build-system) #:select (python-version))
3174 ,@%gnu-build-system-modules)
3175 #:imported-modules ((guix build python-build-system)
3176 ,@%gnu-build-system-modules)
3178 (modify-phases %standard-phases
3180 (lambda* (#:key inputs outputs #:allow-other-keys)
3181 (let* ((out (assoc-ref outputs "out"))
3182 (sipdir (string-append out "/share/sip"))
3183 (pyqt-sipdir (string-append
3184 (assoc-ref inputs "python-pyqt") "/share/sip"))
3185 (python (assoc-ref inputs "python"))
3186 (lib (string-append out "/lib/python"
3187 (python-version python)
3188 "/site-packages/PyQt5"))
3189 (stubs (string-append lib "/PyQt5")))
3192 (invoke "python" "configure.py"
3199 "--pyqt-sipdir" pyqt-sipdir))))
3200 ;; Because this has a different prefix than python-pyqt then we need
3201 ;; to make this a namespace of its own.
3202 (add-after 'install 'make-namespace
3203 (lambda* (#:key inputs outputs #:allow-other-keys)
3204 (let* ((__init__.py (string-append
3205 (assoc-ref outputs "out")
3207 (python-version (assoc-ref inputs "python"))
3208 "/site-packages/PyQt5/__init__.py")))
3209 (with-output-to-file __init__.py
3210 (lambda _ (display "
3211 from pkgutil import extend_path
3212 __path__ = extend_path(__path__, __name__)
3215 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
3216 (synopsis "Python bindings for QtWebEngine")
3218 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
3219 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
3220 set of three modules. Prior to v5.12 these bindings were part of PyQt
3222 (license license:gpl3)))
3224 ;; XXX: This is useful for removing qtwebkit from other packages' dependency
3225 ;; graphs, as well as for preventing python-pyqtwebengine from transitively
3226 ;; depending on qtwebkit.
3227 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
3228 ;; packages that could be used together.
3229 (define-public python-pyqt-without-qtwebkit
3230 (package/inherit python-pyqt
3231 (name "python-pyqt-without-qtwebkit")
3233 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
3235 (define-public python-pyqt-builder
3237 (name "python-pyqt-builder")
3242 (uri (pypi-uri "PyQt-builder" version))
3245 "0nh0054c54ji3sm6d268fccf0y5f613spswwgwqd3rnn816hnljl"))))
3246 (build-system python-build-system)
3249 (home-page "https://www.riverbankcomputing.com/static/Docs/PyQt-builder/")
3250 (synopsis "PEP 517 compliant PyQt build system")
3251 (description "PyQt-builder is a tool for generating Python bindings for C++
3252 libraries that use the Qt application framework. The bindings are built on
3253 top of the PyQt bindings for Qt. PyQt-builder is used to build PyQt itself.")
3254 ;; Either version 2 or 3, but no other version. See the file
3255 ;; 'pyqtbuild/builder.py' in the source distribution for more information.
3256 (license (list license:gpl2 license:gpl3))))
3258 (define-public python-qtpy
3260 (name "python-qtpy")
3265 (uri (pypi-uri "QtPy" version))
3268 "051rj10lbv2ny48lz34zhclcbdxxdbk4di2mdk91m9143w91npyq"))))
3269 (build-system python-build-system)
3270 (propagated-inputs (list python-packaging))
3272 `(;; Not all supported bindings are packaged. Especially PyQt4.
3274 (home-page "https://github.com/spyder-ide/qtpy")
3276 "Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets")
3278 "Provides an abstraction layer on top of the various Qt bindings
3279 (PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
3280 (license license:expat)))
3282 (define-public python-qt.py
3284 (name "python-qt.py")
3289 (uri (pypi-uri "Qt.py" version))
3291 (base32 "07rvfwzjl378j75j2va0c6xylwx16icxa6dycsjgjc329pgpng40"))))
3292 (build-system python-build-system)
3293 (native-inputs (list python-pyqt))
3294 (home-page "https://github.com/mottosso/Qt.py")
3295 (synopsis "Abstraction layer for Python Qt bindings")
3297 "This package provides an abstraction layer on top of the various Qt
3298 bindings (PySide, PySide2, PyQt4 and PyQt5).")
3299 (license license:expat)))
3301 (define-public qscintilla
3307 (uri (string-append "https://www.riverbankcomputing.com/static"
3308 "/Downloads/QScintilla/" version
3309 "/QScintilla-" version ".tar.gz"))
3312 "19r0vpqb4m9bqwxmjp9w6x0hgahkrg7zryk78hwgplj7vdbn0d77"))))
3313 (build-system gnu-build-system)
3316 (modify-phases %standard-phases
3318 (lambda* (#:key outputs #:allow-other-keys)
3319 (let ((out (assoc-ref outputs "out")))
3321 (substitute* "qscintilla.pro"
3322 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
3323 (string-append out "/lib"))
3324 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
3325 (string-append out "/include"))
3326 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
3327 (string-append out "/translations"))
3328 (("\\$\\$\\[QT_INSTALL_DATA\\]")
3329 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
3330 (("\\$\\$\\[QT_HOST_DATA\\]")
3331 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
3332 (invoke "qmake")))))))
3333 (native-inputs (list qtbase-5))
3334 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
3335 (synopsis "Qt port of the Scintilla C++ editor control")
3336 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3337 editor control. QScintilla includes features especially useful when editing
3338 and debugging source code. These include support for syntax styling, error
3339 indicators, code completion and call tips.")
3340 (license license:gpl3+)))
3342 (define-public python-qscintilla
3343 (package/inherit qscintilla
3344 (name "python-qscintilla")
3347 (list "--pyqt=PyQt5"
3348 (string-append "--pyqt-sipdir="
3349 (assoc-ref %build-inputs "python-pyqt")
3351 (string-append "--qsci-incdir="
3352 (assoc-ref %build-inputs "qscintilla")
3354 (string-append "--qsci-libdir="
3355 (assoc-ref %build-inputs "qscintilla")
3358 (modify-phases %standard-phases
3360 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
3361 (let ((out (assoc-ref outputs "out"))
3362 (python (assoc-ref inputs "python")))
3364 (apply invoke "python3" "configure.py"
3366 ;; Install to the right directory
3367 (substitute* '("Makefile"
3369 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
3370 (((string-append python "/lib"))
3371 (string-append out "/lib")))
3372 ;; And fix the installed.txt file
3373 (substitute* "installed.txt"
3374 (("/gnu/store/[^/]+") out)))
3377 `(("qscintilla" ,qscintilla)
3379 ("python-pyqt" ,python-pyqt)))
3380 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3381 editor control. QScintilla includes features especially useful when editing
3382 and debugging source code. These include support for syntax styling, error
3383 indicators, code completion and call tips.
3385 This package provides the Python bindings.")))
3387 ;; PyQt only looks for modules in its own directory. It ignores environment
3388 ;; variables such as PYTHONPATH, so we need to build a union package to make
3390 (define-public python-pyqt+qscintilla
3391 (package/inherit python-pyqt
3392 (name "python-pyqt+qscintilla")
3394 (build-system trivial-build-system)
3396 '(#:modules ((guix build union))
3398 (use-modules (ice-9 match)
3400 (match %build-inputs
3401 (((names . directories) ...)
3402 (union-build (assoc-ref %outputs "out")
3406 `(("python-pyqt" ,python-pyqt)
3407 ("python-qscintilla" ,python-qscintilla)))
3408 (synopsis "Union of PyQt and the Qscintilla extension")
3410 "This package contains the union of PyQt and the Qscintilla extension.")))
3412 (define-public qtkeychain
3420 (url "https://github.com/frankosterfeld/qtkeychain/")
3421 (commit (string-append "v" version))))
3422 (file-name (git-file-name name version))
3425 "1zk6r2vc1q48qs7mw2h47bpgrfbb9r7lf9cwq4sb1a4nls87zznk"))))
3426 (build-system cmake-build-system)
3428 (list pkg-config qttools-5))
3430 (list libsecret qtbase-5))
3432 `(#:tests? #f ; No tests included
3434 (modify-phases %standard-phases
3435 (add-before 'configure 'set-qt-trans-dir
3437 (substitute* "CMakeLists.txt"
3438 (("\\$\\{qt_translations_dir\\}")
3439 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations")))))))
3440 (home-page "https://github.com/frankosterfeld/qtkeychain")
3441 (synopsis "Qt API to store passwords")
3443 "QtKeychain is a Qt library to store passwords and other secret data
3444 securely. It will not store any data unencrypted unless explicitly requested.")
3445 (license license:bsd-3)))
3447 (define-public qtsolutions
3448 (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
3451 (name "qtsolutions")
3452 (version (git-version "0" revision commit))
3457 (url "https://github.com/qtproject/qt-solutions")
3459 (file-name (git-file-name name version))
3461 (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
3462 (modules '((guix build utils)
3466 ;; Unvendor QtLockFile from QtSingleApplication.
3468 (with-directory-excursion "qtsingleapplication/src"
3469 (for-each delete-file
3470 (find-files "." "qtlockedfile.*\\.(h|cpp)"))
3471 (substitute* "qtsingleapplication.pri"
3472 ;; Add include path of LockedFile.
3473 (("INCLUDEPATH \\+=")
3474 "INCLUDEPATH += ../../qtlockedfile/src")
3475 ;; Link library of LockedFile.
3477 "LIBS += -lQtSolutions_LockedFile"))
3478 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
3479 (("#include \"qtlockedfile.*\\.cpp\"") "")
3480 ;; Unwrap namespace added in the vendoring process.
3481 (("QtLP_Private::QtLockedFile")
3484 (build-system gnu-build-system)
3486 `(#:tests? #f ; No target
3488 ((guix build copy-build-system)
3489 ,@%gnu-build-system-modules)
3491 (((guix build copy-build-system) #:prefix copy:)
3492 (guix build gnu-build-system)
3495 (modify-phases %standard-phases
3496 (add-after 'unpack 'patch-source
3497 (lambda* (#:key outputs #:allow-other-keys)
3498 (substitute* (find-files "." "common.pri")
3499 ;; Remove unnecessary prefixes/suffixes in library names.
3502 ;; Disable building of examples.
3503 (substitute* (find-files "." "\\.pro$")
3504 (("SUBDIRS\\+=examples") ""))
3505 ;; Fix deprecated functions.
3506 (substitute* "qtsoap/src/qtsoap.cpp"
3507 (("toAscii") "toUtf8"))
3511 (for-each (lambda (solution)
3512 (with-directory-excursion solution
3513 (invoke "./configure" "-library")
3515 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3516 "qtsingleapplication" "qtsoap"))
3520 (for-each (lambda (solution)
3521 (with-directory-excursion solution
3523 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3524 "qtsingleapplication" "qtsoap"))
3528 (for-each (lambda (solution)
3529 (with-directory-excursion solution
3531 (assoc-ref copy:%standard-phases 'install)
3533 '(("src" "include" #:include-regexp ("\\.h$"))
3536 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3537 "qtsingleapplication" "qtsoap")))))))
3540 (synopsis "Collection of Qt extensions")
3541 (description "QtSolutions is a set of components extending Qt.
3543 @item QtLockedFile: A class that extends QFile with advisory locking functions.
3544 @item QtPropertyBrowser: A framework that enables the user to edit a set of
3546 @item QtService: A helper for writing services such as Unix daemons.
3547 @item QtSingleApplication: A component that provides support for applications
3548 that can be only started once per user.
3549 @item QtSoap: A component that provides basic web service support with version
3550 1.1 of the SOAP protocol.
3552 (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
3553 (license (list license:bsd-3
3554 ;; QScriptParser and QScriptGrammar specifically allow
3555 ;; redistribution under GPL3 or LGPL2.1
3556 license:gpl3 license:lgpl2.1)))))
3566 (string-append "mirror://sourceforge/qwt/qwt/"
3567 version "/qwt-" version ".tar.bz2"))
3569 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
3570 (build-system gnu-build-system)
3572 (list qtbase-5 qtsvg-5 qttools-5))
3575 (modify-phases %standard-phases
3577 (lambda* (#:key outputs #:allow-other-keys)
3578 (let* ((out (assoc-ref outputs "out"))
3579 (docdir (string-append out "/share/doc/qwt"))
3580 (incdir (string-append out "/include/qwt"))
3581 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
3582 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
3583 (substitute* '("qwtconfig.pri")
3584 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
3585 (format #f "~a = ~a\n" x out))
3586 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
3587 (format #f "~a = ~a\n" x docdir))
3588 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
3589 (format #f "~a = ~a\n" x incdir))
3590 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
3591 (format #f "~a = ~a\n" x pluginsdir))
3592 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
3593 (format #f "~a = ~a\n" x featuresdir)))
3594 (substitute* '("doc/doc.pro")
3595 ;; We'll install them in the 'install-man-pages' phase.
3596 (("^unix:doc\\.files.*") ""))
3598 (add-after 'install 'install-man-pages
3599 (lambda* (#:key outputs #:allow-other-keys)
3600 (let* ((out (assoc-ref outputs "out"))
3601 (man (string-append out "/share/man")))
3602 ;; Remove some incomplete manual pages.
3603 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
3605 (copy-recursively "doc/man" man)
3607 (home-page "http://qwt.sourceforge.net")
3608 (synopsis "Qt widgets for plots, scales, dials and other technical software
3611 "The Qwt library contains widgets and components which are primarily useful
3612 for technical and scientific purposes. It includes a 2-D plotting widget,
3613 different kinds of sliders, and much more.")
3616 ;; The Qwt license is LGPL2.1 with some exceptions.
3617 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
3618 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
3619 license:lgpl2.1 license:gpl3))))
3621 (define-public qtwebkit
3624 (version "5.212.0-alpha4")
3628 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
3629 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
3632 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
3633 (patches (search-patches "qtwebkit-pbutils-include.patch"
3634 "qtwebkit-fix-building-with-bison-3.7.patch"
3635 "qtwebkit-fix-building-with-glib-2.68.patch"
3636 "qtwebkit-fix-building-with-icu-68.patch"
3637 "qtwebkit-fix-building-with-python-3.9.patch"))))
3638 (build-system cmake-build-system)
3650 ("gst-plugins-base" ,gst-plugins-base)
3651 ("libjpeg" ,libjpeg-turbo)
3653 ("libwebp" ,libwebp)
3655 ("fontconfig" ,fontconfig)
3656 ("libxrender" ,libxrender)
3657 ("qtbase" ,qtbase-5)
3658 ("qtdeclarative-5" ,qtdeclarative-5)
3659 ("qtlocation" ,qtlocation)
3660 ("qtmultimedia-5" ,qtmultimedia-5)
3661 ("qtsensors" ,qtsensors)
3662 ("qtwebchannel-5" ,qtwebchannel-5)
3663 ("libxml2" ,libxml2)
3664 ("libxslt" ,libxslt)
3666 ("libxcomposite" ,libxcomposite)))
3668 `(#:tests? #f ; no apparent tests; it might be necessary to set
3669 ; ENABLE_API_TESTS, see CMakeLists.txt
3671 ;; Parallel builds fail due to a race condition:
3672 ;; <https://bugs.gnu.org/34062>.
3673 #:parallel-build? #f
3675 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
3677 "-DUSE_LIBHYPHEN=OFF"
3678 "-DUSE_SYSTEM_MALLOC=ON"
3679 ;; XXX: relative dir installs to build dir?
3680 (string-append "-DECM_MKSPECS_INSTALL_DIR="
3681 %output "/lib/qt5/mkspecs/modules")
3682 ;; Sacrifice a little speed in order to link
3683 ;; libraries and test executables in a
3684 ;; reasonable amount of memory.
3685 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
3686 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
3687 (home-page "https://www.webkit.org")
3688 (synopsis "Web browser engine and classes to render and interact with web
3690 (description "QtWebKit provides a Web browser engine that makes it easy to
3691 embed content from the World Wide Web into your Qt application. At the same
3692 time Web content can be enhanced with native controls.")
3693 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
3694 ;; room for slower or busy hardware.
3695 (properties '((timeout . 64800))) ;18 hours
3697 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
3698 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
3699 ;; disable it on non-Intel platforms.
3700 (supported-systems '("x86_64-linux" "i686-linux"))
3702 (license license:lgpl2.1+)))
3704 (define-public dotherside
3712 (url "https://github.com/filcuc/DOtherSide")
3713 (commit (string-append "v" version))))
3714 (file-name (git-file-name name version))
3717 "13n2qb8q9jz4ihwlbs7y15lw90w9113gb1bgnb1dggpxkj64r953"))))
3718 (build-system cmake-build-system)
3722 ;; TODO: Support Qt 6 (requires qtdeclarative of Qt6).
3723 (list qtbase-5 qtdeclarative-5))
3724 (home-page "https://filcuc.github.io/DOtherSide/index.html")
3725 (synopsis "C language library for creating bindings for the Qt QML language")
3727 "DOtherSide is a C language library for creating bindings for the
3728 QT QML language. The following features are implementable from
3731 @item Creating custom QObject
3732 @item Creating custom QAbstractListModels
3733 @item Creating custom properties, signals and slots
3734 @item Creating from QML QObject defined in the binded language
3735 @item Creating from Singleton QML QObject defined in the binded language
3737 (license license:lgpl3))) ;version 3 only (+ exception)
3739 ;; There have been no public releases yet.
3740 (define-public qtcolorwidgets
3741 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
3744 (name "qtcolorwidgets")
3745 (version (git-version "0" revision commit))
3749 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3751 (file-name (git-file-name name version))
3754 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
3755 (build-system cmake-build-system)
3756 (arguments `(#:tests? #f)) ; There are no tests
3761 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3762 (synopsis "Color management widgets")
3763 (description "QtColorWidgets provides a Qt color dialog that is more
3764 user-friendly than the default @code{QColorDialog} and several other
3765 color-related widgets.")
3766 ;; Includes a license exception for combining with GPL2 code.
3767 (license license:lgpl3+))))
3769 (define-public qcustomplot
3771 (name "qcustomplot")
3776 (uri (string-append "https://www.qcustomplot.com/release/"
3777 version "fixed" "/QCustomPlot.tar.gz"))
3779 (base32 "1324kqyj1v1f8k8d7b15gc3apwz9qxx52p86hvchg33hjdlqhskx"))))
3781 `(("qcustomplot-sharedlib"
3784 (uri (string-append "https://www.qcustomplot.com/release/"
3785 version "fixed" "/QCustomPlot-sharedlib.tar.gz"))
3787 (base32 "0vp8lpxvd1nlp4liqrlvslpqrgfn0wpiwizzdsjbj22zzb8vxikc"))))))
3790 (build-system gnu-build-system)
3793 (modify-phases %standard-phases
3794 (add-after 'unpack 'unpack-extra-files
3795 (lambda* (#:key inputs #:allow-other-keys)
3796 (invoke "tar" "-xvf" (assoc-ref inputs "qcustomplot-sharedlib"))))
3798 (lambda* (#:key outputs #:allow-other-keys)
3799 (chdir "qcustomplot-sharedlib/sharedlib-compilation")
3800 (substitute* "sharedlib-compilation.pro"
3801 ;; Don't build debug library.
3802 (("debug_and_release")
3805 (string-append "DESTDIR="
3806 (assoc-ref outputs "out")
3808 (add-after 'install 'install-header
3809 (lambda* (#:key outputs #:allow-other-keys)
3810 (install-file "../../qcustomplot.h"
3811 (string-append (assoc-ref outputs "out")
3813 (home-page "https://www.qcustomplot.com/")
3814 (synopsis "Qt widget for plotting and data visualization")
3816 "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts.")
3817 (license license:gpl3+)))
3819 ;; TODO: Split shiboken2 binding generator into a dedicated output.
3820 ;; This executable requires libxml2, libxslt, clang-toolchain at runtime.
3821 ;; The libshiboken library only requires Qt and Python at runtime.
3822 (define-public python-shiboken-2
3824 (name "python-shiboken-2")
3828 (uri (string-append "https://download.qt.io/official_releases"
3829 "/QtForPython/pyside2/PySide2-" version
3830 "-src/pyside-setup-opensource-src-"
3834 "060ljj1nzyp4zfz2vasbv2i7gs5rfkkjwxxbisd0fdw01d5m01mk"))))
3835 (build-system cmake-build-system)
3837 (list clang-toolchain
3846 ;; FIXME: Building tests fails
3847 #:configure-flags #~(list "-DBUILD_TESTS=off")
3849 #~(modify-phases %standard-phases
3850 (add-after 'unpack 'use-shiboken-dir-only
3851 (lambda _ (chdir "sources/shiboken2") #t))
3852 (add-before 'configure 'make-files-writable-and-update-timestamps
3854 ;; The build scripts need to modify some files in
3855 ;; the read-only source directory, and also attempts
3856 ;; to create Zip files which fails because the Zip
3857 ;; format does not support timestamps before 1980.
3858 (let ((circa-1980 (* 10 366 24 60 60)))
3859 (for-each (lambda (file)
3860 (make-file-writable file)
3861 (utime file circa-1980 circa-1980))
3864 (add-before 'configure 'set-build-env
3866 (let ((llvm #$(this-package-input "clang-toolchain")))
3867 (setenv "CLANG_INSTALL_DIR" llvm)
3869 (home-page "https://wiki.qt.io/Qt_for_Python")
3871 "Shiboken generates bindings for C++ libraries using CPython source code")
3873 "Shiboken generates bindings for C++ libraries using CPython source code")
3876 ;; The main code is GPL3 or LGPL3.
3877 ;; Examples are BSD-3.
3882 (define-public python-shiboken-6
3884 (inherit python-shiboken-2)
3885 (name "python-shiboken-6")
3889 (uri (string-append "https://download.qt.io/official_releases"
3890 "/QtForPython/pyside6/PySide6-" version
3891 "-src/pyside-setup-opensource-src-"
3895 "0xwri69nnbhn6fajm7l045r0s0qv8nlq6qj8wcj87srli3b5xa75"))))
3896 (build-system cmake-build-system)
3898 (modify-inputs (package-inputs python-shiboken-2)
3899 (replace "qtbase" qtbase)
3900 (delete "qtxmlpatterns")))
3902 (substitute-keyword-arguments (package-arguments python-shiboken-2)
3904 #~(modify-phases #$p
3905 (replace 'use-shiboken-dir-only
3906 (lambda _ (chdir "sources/shiboken6") #t))))
3907 ((#:configure-flags flags)
3909 ;; The RUNPATH of shibokenmodule contains the entry in build
3910 ;; directory instead of install directory.
3911 "-DCMAKE_SKIP_RPATH=TRUE"
3912 (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath="
3916 (define-public python-pyside-2
3918 (name "python-pyside-2")
3919 (version (package-version python-shiboken-2))
3920 (source (package-source python-shiboken-2))
3921 (build-system cmake-build-system)
3942 (list python-shiboken-2))
3944 (list python-wrapper))
3948 ;; FIXME: Building tests fail.
3950 #~(list "-DBUILD_TESTS=FALSE"
3951 (string-append "-DPYTHON_EXECUTABLE="
3952 (search-input-file %build-inputs
3954 #:modules '((guix build cmake-build-system)
3958 #~(modify-phases %standard-phases
3959 (add-after 'unpack 'go-to-source-dir
3960 (lambda _ (chdir "sources/pyside2") #t))
3961 (add-after 'go-to-source-dir 'fix-qt-module-detection
3963 ;; Activate qt module support even if it not in the same
3964 ;; directory as qtbase.
3965 (substitute* "../cmake_helpers/helpers.cmake"
3966 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
3968 ;; Add include directories for qt modules.
3969 (let ((dirs (map (lambda (path)
3970 (string-append path "/include/qt5"))
3972 #$@(map (lambda (name)
3973 (this-package-input name))
3990 "qtxmlpatterns"))))))
3991 (substitute* "cmake/Macros/PySideModules.cmake"
3992 (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all)
3993 (fold (lambda (dir paths)
3994 (string-append paths "${PATH_SEP}" dir))
3997 (setenv "CXXFLAGS" (fold (lambda (dir paths)
3998 (string-append paths " -I" dir))
4001 (home-page "https://wiki.qt.io/Qt_for_Python")
4003 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
4005 "The Qt for Python product enables the use of Qt5 APIs in Python
4006 applications. It lets Python developers utilize the full potential of Qt,
4007 using the PySide2 module. The PySide2 module provides access to the
4008 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
4009 comes with the Shiboken2 CPython binding code generator, which can be used to
4010 generate Python bindings for your C or C++ code.")
4014 ;; this file may be used under the terms of the GNU General
4015 ;; Public License version 2.0 or (at your option) the GNU
4016 ;; General Public license version 3 or any later version
4017 ;; approved by the KDE Free Qt Foundation.
4018 ;; Thus, it is currently v2 or v3, but no "+".
4022 (define-public python-pyside-6
4024 (inherit python-pyside-2)
4025 (name "python-pyside-6")
4026 (version (package-version python-shiboken-6))
4027 (source (package-source python-shiboken-6))
4028 ;; TODO: Add more Qt components if available.
4041 (list python-shiboken-6))
4043 (list python-wrapper))
4048 #~(list "-DBUILD_TESTS=FALSE"
4049 (string-append "-DPYTHON_EXECUTABLE="
4050 (search-input-file %build-inputs
4053 #~(modify-phases %standard-phases
4054 (add-after 'unpack 'go-to-source-dir
4055 (lambda _ (chdir "sources/pyside6") #t))
4056 (add-after 'go-to-source-dir 'fix-qt-module-detection
4058 (substitute* "cmake/PySideHelpers.cmake"
4059 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
4061 (let ((dirs (map (lambda (path)
4062 (string-append path "/include/qt6"))
4064 #$@(map (lambda (name)
4065 (this-package-input name))
4074 "qtwebsockets"))))))
4075 (substitute* "cmake/Macros/PySideModules.cmake"
4076 (("set\\(shiboken_include_dir_list " all)
4077 (string-append all (string-join dirs ";") " ")))
4081 (string-append "-I" dir))
4085 "The Qt for Python product enables the use of Qt6 APIs in Python applications")
4087 "The Qt for Python product enables the use of Qt6 APIs in Python
4088 applications. It lets Python developers utilize the full potential of Qt,
4089 using the PySide6 module. The PySide6 module provides access to the
4090 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
4091 comes with the Shiboken6 CPython binding code generator, which can be used to
4092 generate Python bindings for your C or C++ code.")))
4094 (define-public python-pyside-2-tools
4096 (name "python-pyside-2-tools")
4097 (version (package-version python-shiboken-2))
4098 (source (package-source python-shiboken-2))
4099 (build-system cmake-build-system)
4101 (list python-pyside-2 python-shiboken-2 qtbase-5))
4103 (list python-wrapper))
4108 #~(list "-DBUILD_TESTS=off"
4109 (string-append "-DPYTHON_EXECUTABLE="
4110 (search-input-file %build-inputs
4113 #~(modify-phases %standard-phases
4114 (add-after 'unpack 'go-to-source-dir
4115 (lambda _ (chdir "sources/pyside2-tools") #t)))))
4116 (home-page "https://wiki.qt.io/Qt_for_Python")
4118 "Command line tools for PySide2")
4120 "Python-pyside-2-tools contains lupdate, rcc and uic tools for PySide2")
4121 (license license:gpl2)))
4123 (define-public libqglviewer
4125 (name "libqglviewer")
4130 (string-append "http://libqglviewer.com/src/libQGLViewer-"
4134 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
4135 (build-system gnu-build-system)
4137 '(#:tests? #f ; no check target
4139 (list (string-append "PREFIX="
4140 (assoc-ref %outputs "out")))
4142 (modify-phases %standard-phases
4144 (lambda* (#:key make-flags #:allow-other-keys)
4145 (apply invoke (cons "qmake" make-flags)))))))
4147 (list qtbase-5 qttools-5))
4150 (home-page "http://libqglviewer.com")
4151 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
4153 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
4154 of OpenGL 3D viewers.
4156 It provides some of the typical 3D viewer functionalities, such as the
4157 possibility to move the camera using the mouse, which lacks in most of the
4158 other APIs. Other features include mouse manipulated frames, interpolated
4159 keyFrames, object selection, stereo display, screenshot saving and much more.
4160 It can be used by OpenGL beginners as well as to create complex applications,
4161 being fully customizable and easy to extend.")
4162 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
4164 (license (list license:gpl2 license:gpl3))))
4166 (define-public qhexedit
4174 (url "https://github.com/Simsys/qhexedit2")
4175 (commit (string-append "v" version))))
4176 (file-name (git-file-name name version))
4178 (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
4179 (build-system gnu-build-system)
4182 (modify-phases %standard-phases
4183 (add-after 'unpack 'fix-path
4184 (lambda* (#:key outputs #:allow-other-keys)
4185 (substitute* "src/qhexedit.pro"
4186 (("^unix:DESTDIR = /usr/lib")
4187 (string-append "unix:DESTDIR = "
4188 (assoc-ref outputs "out") "/lib")))))
4192 (invoke "qmake" "qhexedit.pro")))
4193 (add-after 'install 'install-headers
4194 (lambda* (#:key outputs #:allow-other-keys)
4195 (let* ((out (assoc-ref outputs "out"))
4196 (include-dir (string-append out "/include")))
4197 (mkdir-p include-dir)
4198 (for-each (lambda (file)
4199 (install-file file include-dir))
4200 (find-files "." "\\.h$"))))))))
4201 (inputs (list qtbase-5))
4202 (native-inputs (list qttools-5))
4203 (home-page "https://simsys.github.io")
4204 (synopsis "Binary editor widget for Qt")
4206 "@code{QHexEdit} is a hex editor widget for the Qt framework. It is a
4207 simple editor for binary data, just like @code{QPlainTextEdit} is for text
4209 (license license:lgpl2.1)))
4212 (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
4216 (version (git-version "1.6.0" revision commit-ref))
4221 (url "https://github.com/coin3d/soqt")
4224 (file-name (git-file-name name version))
4226 (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
4227 (build-system cmake-build-system)
4228 (arguments '(#:tests? #f)) ; There are no tests
4230 (list pkg-config cmake))
4232 (list qtbase-5 coin3D-4))
4233 (home-page "https://github.com/coin3d/soqt")
4234 (synopsis "Qt GUI component toolkit library for Coin")
4235 (description "SoQt is a Qt GUI component toolkit library for Coin. It is
4236 also compatible with SGI and TGS Open Inventor, and the API is based on the API
4237 of the InventorXt GUI component toolkit.")
4238 (license license:bsd-3))))
4240 (define-public libdbusmenu-qt
4242 (name "libdbusmenu-qt")
4243 (version "0.9.3+16.04.20160218-0ubuntu1")
4247 ;; Download from github rather than launchpad because launchpad trunk
4248 ;; tarball hash is not deterministic.
4250 (url "https://github.com/unity8-team/libdbusmenu-qt")
4252 (file-name (git-file-name name version))
4254 (base32 "0b7ii1cvmpcyl79gqal9c3va9m55h055s4hx7fpxkhhqs9463ggg"))))
4255 (build-system cmake-build-system)
4257 ;; XXX: Tests require a dbus session and some icons.
4263 (home-page "https://launchpad.net/libdbusmenu-qt")
4264 (synopsis "Qt implementation of the DBusMenu spec")
4265 (description "This library provides a Qt implementation of the DBusMenu
4266 protocol. The DBusMenu protocol makes it possible for applications to export
4267 and import their menus over DBus.")
4268 (license license:lgpl2.1+)))
4270 (define-public kdsoap
4277 (uri (string-append "https://github.com/KDAB/KDSoap/releases/download/"
4278 "kdsoap-" version "/kdsoap-" version ".tar.gz"))
4281 "1vh4rzb09kks1ilay1y60q7gf64gwzdwsca60hmx1xx69w8672fi"))))
4282 (build-system qt-build-system)
4283 (inputs `(("qtbase" ,qtbase-5)))
4285 '(#:configure-flags '("-DKDSoap_TESTS=true")
4287 (modify-phases %standard-phases
4289 (lambda* (#:key tests? #:allow-other-keys)
4291 (invoke "ctest" "-E" ;; These tests try connect to the internet.
4292 "(kdsoap-webcalls|kdsoap-webcalls_wsdl|kdsoap-test_calc)"))
4294 (home-page "https://www.kdab.com/development-resources/qt-tools/kd-soap/")
4295 (synopsis "Qt SOAP component")
4296 (description "KD SOAP is a tool for creating client applications for web
4297 services using the XML based SOAP protocol and without the need for a dedicated
4299 (license (list license:gpl2 license:gpl3))))
4302 ;;; Avoid adding new packages to the end of this file. To reduce the chances
4303 ;;; of a merge conflict, place them above by existing packages with similar
4304 ;;; functionality or similar names.