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-opensource-src-"
274 (string-append "https://download.qt.io/official_releases/qt/"
275 (version-major+minor version) "/" version
276 "/submodules/" component "-everywhere-src-"
278 (string-append "https://download.qt.io/archive/qt/"
279 (version-major+minor version) "/" version
280 "/submodules/" component "-everywhere-opensource-src-"
282 (let ((directory (string-append "qt5" (string-drop component 2))))
283 (string-append "http://sources.buildroot.net/" directory "/"
284 component "-everywhere-opensource-src-" version ".tar.xz"))
285 (string-append "https://distfiles.macports.org/qt5/"
286 component "-everywhere-opensource-src-" version ".tar.xz")))
288 (define-public qtbase-5
294 (uri (qt-urls name version))
297 "1p2fa94m1y8qzhdfi2d7dck93qh1lgsinibwl1wy92bwmacwfhhc"))
298 ;; Use TZDIR to avoid depending on package "tzdata".
299 (patches (search-patches "qtbase-use-TZDIR.patch"
300 "qtbase-moc-ignore-gcc-macro.patch"
301 "qtbase-absolute-runpath.patch"))
302 (modules '((guix build utils)))
304 ;; corelib uses bundled harfbuzz, md4, md5, sha3
306 (with-directory-excursion "src/3rdparty"
307 (for-each delete-file-recursively
308 (list "double-conversion" "freetype" "harfbuzz-ng"
309 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
311 (build-system gnu-build-system)
312 (outputs '("out" "debug"))
315 ;; Use which the package, not the function
316 (@ (gnu packages base) which)))
318 `(("alsa-lib" ,alsa-lib)
321 ("double-conversion" ,double-conversion)
324 ("fontconfig" ,fontconfig)
325 ("freetype" ,freetype)
327 ("gtk+" ,gtk+) ;for GTK theme support
328 ("harfbuzz" ,harfbuzz)
330 ("libinput" ,libinput-minimal)
331 ("libjpeg" ,libjpeg-turbo)
335 ("libxcomposite" ,libxcomposite)
336 ("libxcursor" ,libxcursor)
337 ("libxfixes" ,libxfixes)
339 ("libxinerama" ,libxinerama)
340 ("libxkbcommon" ,libxkbcommon)
342 ("libxrandr" ,libxrandr)
343 ("libxrender" ,libxrender)
347 ("mariadb-dev" ,mariadb "dev")
351 ("postgresql" ,postgresql)
352 ("pulseaudio" ,pulseaudio)
354 ("unixodbc" ,unixodbc)
355 ("xcb-util" ,xcb-util)
356 ("xcb-util-image" ,xcb-util-image)
357 ("xcb-util-keysyms" ,xcb-util-keysyms)
358 ("xcb-util-renderutil" ,xcb-util-renderutil)
359 ("xcb-util-wm" ,xcb-util-wm)
360 ("xdg-utils" ,xdg-utils)
373 (let ((out (assoc-ref %outputs "out")))
376 "-docdir" (string-append out "/share/doc/qt5")
377 "-headerdir" (string-append out "/include/qt5")
378 "-archdatadir" (string-append out "/lib/qt5")
379 "-datadir" (string-append out "/share/qt5")
380 "-examplesdir" (string-append
381 out "/share/doc/qt5/examples")
385 ;; Later stripped into the :debug output.
388 ;; These features require higher versions of Linux than the
389 ;; minimum version of the glibc. See
390 ;; src/corelib/global/minimum-linux_p.h. By disabling these
391 ;; features Qt5 applications can be used on the oldest
392 ;; kernels that the glibc supports, including the RHEL6
393 ;; (2.6.32) and RHEL7 (3.10) kernels.
394 "-no-feature-getentropy" ; requires Linux 3.17
395 "-no-feature-renameat2" ; requires Linux 3.16
397 ;; Do not build examples; if desired, these could go
398 ;; into a separate output, but for the time being, we
399 ;; prefer to save the space and build time.
400 "-no-compile-examples"
401 ;; Most "-system-..." are automatic, but some use
402 ;; the bundled copy by default.
406 ;; explicitly link with openssl instead of dlopening it
408 ;; explicitly link with dbus instead of dlopening it
410 ;; don't use the precompiled headers
412 ;; drop special machine instructions that do not have
414 ,@(if (string-prefix? "x86_64"
415 (or (%current-target-system)
422 (modify-phases %standard-phases
423 (add-after 'configure 'patch-bin-sh
425 (substitute* '("config.status"
427 "mkspecs/features/qt_functions.prf"
428 "qmake/library/qmakebuiltins.cpp")
429 (("/bin/sh") (which "sh")))))
430 (add-after 'configure 'patch-xdg-open
432 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
433 (("^.*const char \\*browsers.*$" all)
434 (string-append "*browser = QStringLiteral(\""
436 "\"); return true; \n" all)))))
438 ;; Overridden to not pass "--enable-fast-install", which makes the
439 ;; configure process fail.
440 (lambda* (#:key outputs configure-flags #:allow-other-keys)
441 (let ((out (assoc-ref outputs "out")))
442 (substitute* "configure"
443 (("/bin/pwd") (which "pwd")))
444 (substitute* "src/corelib/global/global.pri"
445 (("/bin/ls") (which "ls")))
446 ;; The configuration files for other Qt5 packages are searched
447 ;; through a call to "find_package" in Qt5Config.cmake, which
448 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
449 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
450 ;; components can be installed in different places.
451 (substitute* (find-files "." ".*\\.cmake")
452 (("NO_DEFAULT_PATH") ""))
453 (format #t "build directory: ~s~%" (getcwd))
454 (format #t "configure flags: ~s~%" configure-flags)
455 (apply invoke "./configure" configure-flags))))
456 (add-after 'install 'patch-mkspecs
457 (lambda* (#:key outputs #:allow-other-keys)
458 (let* ((out (assoc-ref outputs "out"))
459 (archdata (string-append out "/lib/qt5"))
460 (mkspecs (string-append archdata "/mkspecs"))
461 (qt_config.prf (string-append
462 mkspecs "/features/qt_config.prf")))
463 ;; For each Qt module, let `qmake' uses search paths in the
464 ;; module directory instead of all in QT_INSTALL_PREFIX.
465 (substitute* qt_config.prf
466 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
467 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
468 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
469 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
470 (("\\$\\$\\[QT_HOST_LIBS\\]")
471 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
472 (("\\$\\$\\[QT_INSTALL_BINS\\]")
473 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
475 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
476 (substitute* (string-append mkspecs "/features/qt_functions.prf")
477 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
478 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
480 ;; Resolve qmake spec files within qtbase by absolute paths.
483 (string-append mkspecs "/features/" file))
484 '("device_config.prf" "moc.prf" "qt_build_config.prf"
485 "qt_config.prf" "winrt/package_manifest.prf"))
486 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
487 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))
488 (add-after 'patch-mkspecs 'patch-prl-files
489 (lambda* (#:key outputs #:allow-other-keys)
490 (let ((out (assoc-ref outputs "out")))
491 ;; Insert absolute references to the qtbase libraries because
492 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
493 ;; on context. See <https://bugs.gnu.org/38405>
494 (substitute* (find-files (string-append out "/lib") "\\.prl$")
495 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
496 (string-append out "/lib"))))))
497 (add-after 'unpack 'patch-paths
498 ;; Use the absolute paths for dynamically loaded libs, otherwise
499 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
501 (lambda* (#:key inputs #:allow-other-keys)
503 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
504 "cross-libc" "libc"))))
505 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
506 "src/network/kernel/qhostinfo_unix.cpp")
507 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
508 (string-append a glibc "/lib/lib" b))))
510 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
511 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
512 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
514 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
515 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
516 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
517 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
518 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))))))))
520 (list (search-path-specification
521 (variable "QMAKEPATH")
522 (files '("lib/qt5")))
523 (search-path-specification
524 (variable "QML2_IMPORT_PATH")
525 (files '("lib/qt5/qml")))
526 (search-path-specification
527 (variable "QT_PLUGIN_PATH")
528 (files '("lib/qt5/plugins")))
529 (search-path-specification
530 (variable "XDG_DATA_DIRS")
532 (search-path-specification
533 (variable "XDG_CONFIG_DIRS")
534 (files '("etc/xdg")))))
535 (home-page "https://www.qt.io/")
536 (synopsis "Cross-platform GUI library")
537 (description "Qt is a cross-platform application and UI framework for
538 developers using C++ or QML, a CSS & JavaScript like language.")
539 (license (list license:lgpl2.1 license:lgpl3))))
541 (define-public qtbase
542 (package/inherit qtbase-5
546 (inherit (package-source qtbase-5))
547 (uri (qt-urls name version))
550 "00sfya41ihqb0zwg6wf1kiy02iymj6mk584hhk2c4s94khfl4r0a"))
551 (modules '((guix build utils)))
553 ;; corelib uses bundled harfbuzz, md4, md5, sha3
554 '(with-directory-excursion "src/3rdparty"
555 (for-each delete-file-recursively
556 ;; The bundled pcre2 copy is kept, as its headers
557 ;; are required by some internal bootstrap target
558 ;; used for the tools.
559 (list "double-conversion" "freetype" "harfbuzz-ng"
560 "libpng" "libjpeg" "sqlite" "xcb" "zlib"))))))
561 (build-system cmake-build-system)
563 (substitute-keyword-arguments (package-arguments qtbase-5)
564 ((#:configure-flags _ ''())
565 `(let ((out (assoc-ref %outputs "out")))
566 (list "-GNinja" ;the build fails otherwise
567 "-DQT_BUILD_TESTS=ON"
568 (string-append "-DINSTALL_ARCHDATADIR=" out "/lib/qt6")
569 (string-append "-DINSTALL_DATADIR=" out "/share/qt6")
570 (string-append "-DINSTALL_DOCDIR=" out "/share/doc/qt6")
571 (string-append "-DINSTALL_MKSPECSDIR=" out "/lib/qt6/mkspecs")
572 (string-append "-DINSTALL_EXAMPLESDIR=" out
573 "/share/doc/qt6/examples")
574 (string-append "-DINSTALL_INCLUDEDIR=" out "/include/qt6")
575 ;; Link with DBus and OpenSSL so they don't get dlopen'ed.
576 "-DINPUT_dbus=linked"
577 "-DINPUT_openssl=linked"
578 ;; These features require higher versions of Linux than the
579 ;; minimum version of the glibc. See
580 ;; src/corelib/global/minimum-linux_p.h. By disabling these
581 ;; features Qt applications can be used on the oldest kernels
582 ;; that the glibc supports, including the RHEL6 (2.6.32) and
583 ;; RHEL7 (3.10) kernels.
584 "-DFEATURE_getentropy=OFF" ; requires Linux 3.17
585 "-DFEATURE_renameat2=OFF" ; requires Linux 3.16
586 ;; Most system libraries are used by default, except in some
587 ;; cases such as for those below.
588 "-DFEATURE_system_pcre2=ON"
589 "-DFEATURE_system_sqlite=ON"
590 "-DFEATURE_system_xcb_xinput=ON"
591 ;; Don't use the precompiled headers.
592 "-DBUILD_WITH_PCH=OFF"
593 ;; Drop special machine instructions that do not have runtime
595 ,@(if (string-prefix? "x86_64"
596 (or (%current-target-system)
598 '() ;implicitly enabled
599 '("-DFEATURE_sse2=OFF"
601 "-DFEATURE_ssse3=OFF"
602 "-DFEATURE_sse4_1=OFF"
603 "-DFEATURE_sse4_2=OFF"))
604 "-DFEATURE_mips_dsp=OFF"
605 "-DFEATURE_mips_dspr2=OFF")))
607 #~(modify-phases #$phases
608 (add-after 'unpack 'honor-CMAKE_PREFIX_PATH
610 ;; The configuration files for other Qt packages are searched
611 ;; through a call to "find_package" in Qt5Config.cmake, which
612 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
613 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
614 ;; components can be installed in different places.
615 (substitute* (find-files "." "\\.cmake(\\.in)?$")
616 (("\\bNO_DEFAULT_PATH\\b") ""))
617 ;; Because Qt goes against the grain of CMake and set
618 ;; NO_DEFAULT_PATH, it needs to invent yet another variable
619 ;; to do what CMAKE_PREFIX_PATH could have done:
620 ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH. Since we patch out
621 ;; the NO_DEFAULT_PATH, we can set the default value of
622 ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH to that of
623 ;; CMAKE_PREFIX_PATH to ensure tools such as
624 ;; 'qmlimportscanner' from qtdeclarative work out of the
626 (substitute* "cmake/QtConfig.cmake.in"
627 (("(set\\(QT_ADDITIONAL_PACKAGES_PREFIX_PATH )\"\"" _ head)
628 (string-append head "\"$ENV{CMAKE_PREFIX_PATH}\"")))))
629 (delete 'patch-bin-sh)
630 (delete 'patch-xdg-open)
631 (add-after 'patch-paths 'patch-more-paths
632 (lambda* (#:key inputs #:allow-other-keys)
633 (substitute* (find-files "bin" "\\.in$")
635 (search-input-file inputs "bin/pwd")))
636 (substitute* "src/gui/platform/unix/qgenericunixservices.cpp"
638 (format #f "~s" (search-input-file inputs "bin/xdg-open"))))
639 (substitute* '("mkspecs/features/qt_functions.prf"
640 "qmake/library/qmakebuiltins.cpp")
642 (search-input-file inputs "bin/bash")))
643 (substitute* "src/corelib/CMakeLists.txt"
645 (search-input-file inputs "bin/ls")))))
647 (assoc-ref %standard-phases 'configure))
649 (lambda* (#:key parallel-build? #:allow-other-keys)
650 (apply invoke "cmake" "--build" "."
652 `("--parallel" ,(number->string (parallel-job-count)))
654 (delete 'check) ;move after patch-prl-files
655 (add-after 'patch-prl-files 'check
656 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
658 ;; The tests expect to find the modules provided by this
659 ;; package; extend the environment variables needed to do so.
660 (setenv "CMAKE_PREFIX_PATH"
661 (string-append #$output
662 ":" (getenv "CMAKE_PREFIX_PATH")))
663 (setenv "QMAKEPATH" (string-append #$output "/lib/qt6"))
664 (setenv "QML2_IMPORT_PATH"
665 (string-append #$output "/lib/qt6/qml"))
666 (setenv "QT_PLUGIN_PATH"
667 (string-append #$output "/lib/qt6/plugins"))
668 (setenv "QT_QPA_PLATFORM" "offscreen")
669 ;; Skip tests known to fail on GNU/Linux, in a CI context or
670 ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
671 ;; /tree/src/testlib/qtestblacklist.cpp).
672 (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
673 (setenv "HOME" "/tmp") ;some tests require a writable HOME
675 "xvfb-run" "ctest" "--output-on-failure"
676 "-j" (if parallel-tests?
677 (number->string (parallel-job-count))
679 "-E" ;disable problematic tests
684 ;; The 'tst_moc' test fails with "'fi.exists()' returned FALSE".
686 ;; The 'test_rcc' test fails on a comparison:
688 ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xe8,
690 ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
693 ;; The 'tst_qtemporarydir' and 'tst_qtemporaryfile'
694 ;; tests depend on '/home' not being writable.
697 ;; The 'tst_qdir' compares two directories which are
698 ;; unexpectedly different when inside the build
701 ;; This checks the last modified time of '/', and fails
702 ;; because Epoch 0 is considered to be invalid.
703 "tst_qresourceengine"
704 ;; The 'tst_qfilesystemwatcher' installs a watcher on
705 ;; '/home', which doesn't exist in the build container.
706 "tst_qfilesystemwatcher"
707 ;; The 'mockplugins' test fail following error: "Unknown
708 ;; platform linux-g++", and the other plugin tests
711 "test_plugin_flavor.*"
712 ;; The 'test_import_plugins' fails with "Could NOT find
714 "test_import_plugins"
715 ;; The 'tst_QTimeZone::systemZone' validates the
716 ;; currently set timezone and fails.
718 ;; The 'tst_qdatetime' fails with:
719 ;; FAIL! : tst_QDateTime::offsetFromUtc() Compared values are not the same
720 ;; Actual (dt5.offsetFromUtc()): 0
721 ;; Expected (46800) : 46800
723 ;; The 'tst_QSettings::fromFile' assumes the data
724 ;; location to be relative to the root directory and
727 ;; The 'tst_qaddpreroutine',
728 ;; 'test_generating_cpp_exports' and
729 ;; 'test_static_resources' tests fail with: "Unknown
730 ;; platform linux-g++.
732 "test_generating_cpp_exports"
733 "test_static_resources"
734 ;; The 'tst_qfile' fails since there is no /home in the
737 ;; The 'tst_QGlyphRun::mixedScripts' test fails with:
738 ;; Actual (glyphRuns.size()): 1
741 ;; The 'tst_qx11info' test fails with "Internal error:
742 ;; QPA plugin doesn't implement generatePeekerId",
743 ;; likely requires a real display.
745 ;; The 'tst_qgraphicswidget' test fails because "This
746 ;; plugin does not support propagateSizeHints".
747 "tst_qgraphicswidget"
748 ;; The 'tst_qdnslookup' test requires networking.
750 ;; The 'tst_qcompleter' and 'tst_QFiledialog::completer'
751 ;; attempt to complete paths they assume exist, such as
752 ;; "/home", "/etc" or "/root" and fail.
754 "tst_qfiledialog") "|")
758 (invoke "cmake" "--install" ".")))
759 (replace 'patch-mkspecs
760 (lambda* (#:key outputs #:allow-other-keys)
761 (let* ((archdata (search-input-directory outputs "lib/qt6"))
762 (mkspecs (search-input-directory outputs
766 outputs "lib/qt6/mkspecs/features/qt_config.prf"))
769 outputs "lib/qt6/mkspecs/features/qt_functions.prf")))
770 ;; For each Qt module, let `qmake' uses search paths in the
771 ;; module directory instead of all in QT_INSTALL_PREFIX.
772 (substitute* qt_config.prf
773 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
774 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt6))")
775 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
776 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
777 (("\\$\\$\\[QT_HOST_LIBS\\]")
778 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
779 (("\\$\\$\\[QT_INSTALL_BINS\\]")
780 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
782 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
783 (substitute* qt_functions.prf
784 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
785 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
787 ;; Resolve qmake spec files within qtbase by absolute paths.
792 (string-append "lib/qt6/mkspecs/features/" file)))
793 '("device_config.prf" "moc.prf" "qt_build_config.prf"
795 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
796 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))))))
798 (modify-inputs (package-native-inputs qtbase-5)
803 (modify-inputs (package-inputs qtbase-5)
804 (prepend bash-minimal coreutils-minimal libxcb md4c)
805 (replace "postgresql" postgresql))) ;use latest postgresql
807 (list (search-path-specification
808 (variable "QMAKEPATH")
809 (files '("lib/qt6")))
810 (search-path-specification
811 (variable "QML2_IMPORT_PATH")
812 (files '("lib/qt6/qml")))
813 (search-path-specification
814 (variable "QT_PLUGIN_PATH")
815 (files '("lib/qt6/plugins")))
816 (search-path-specification
817 (variable "XDG_DATA_DIRS")
819 (search-path-specification
820 (variable "XDG_CONFIG_DIRS")
821 (files '("etc/xdg")))))))
823 (define-public qt5compat
829 (uri (qt-urls name version))
832 "1zbcaswpl79ixcxzj85qzjq73962s4c7316pibwfrskqswmwcgm4"))))
833 (build-system cmake-build-system)
836 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
837 #:phases #~(modify-phases %standard-phases
838 (add-after 'install 'delete-installed-tests
840 (delete-file-recursively
841 (string-append #$output "/tests")))))))
842 (native-inputs (list perl))
843 (inputs (list icu4c libxkbcommon qtbase qtdeclarative qtshadertools))
844 (home-page (package-home-page qtbase))
845 (synopsis "Legacy Qt 5 APIs ported to Qt 6")
846 (description "The @code{qt5compat} package includes application
847 programming interfaces (APIs) from Qt 5 that were ported to Qt 6, to ease
848 migration. It provides for example the @code{GraphicalEffects} module that
849 came with the @{qtgraphicaleffects} Qt 5 package.")
850 (license (list license:gpl2+ license:lgpl3+)))) ;dual licensed
852 (define-public qtsvg-5
859 (uri (qt-urls name version))
862 "0cdhmhxngv4y7kl5vbcii4l4anbz0hj7dvhlddy1agyl19j9xky4"))))
863 (propagated-inputs `())
864 (native-inputs (list perl))
866 (list mesa qtbase-5 zlib))
869 (modify-phases %standard-phases
870 (add-before 'configure 'configure-qmake
871 (lambda* (#:key inputs outputs #:allow-other-keys)
872 (let* ((out (assoc-ref outputs "out"))
873 (qtbase (assoc-ref inputs "qtbase"))
874 (tmpdir (string-append (getenv "TMPDIR")))
875 (qmake (string-append tmpdir "/qmake"))
876 (qt.conf (string-append tmpdir "/qt.conf")))
877 ;; Use qmake with a customized qt.conf to override install
879 (symlink (which "qmake") qmake)
880 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
881 (with-output-to-file qt.conf
887 Documentation=share/doc/qt5
890 LibraryExecutables=lib/qt5/libexec
893 Plugins=lib/qt5/plugins
894 Imports=lib/qt5/imports
895 Qml2Imports=lib/qt5/qml
896 Translations=share/qt5/translations
898 Examples=share/doc/qt5/examples
904 [EffectiveSourcePaths]
907 " out out qtbase))))))
909 (lambda* (#:key inputs outputs #:allow-other-keys)
910 ;; Valid QT_BUILD_PARTS variables are:
911 ;; libs tools tests examples demos docs translations
912 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
913 (add-before 'check 'set-display
915 ;; make Qt render "offscreen", required for tests
916 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
917 (synopsis "Qt module for displaying SVGs")
918 (description "The QtSvg module provides classes for displaying the
919 contents of SVG files.")))
927 (uri (qt-urls name version))
930 "1xvxz2jfpr1al85rhwss7ji5vkxa812d0b888hry5f7pwqcg86bv"))))
931 (build-system cmake-build-system)
934 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
936 #~(modify-phases %standard-phases
937 (add-before 'check 'set-display
939 ;; Make Qt render "offscreen", required for tests.
940 (setenv "QT_QPA_PLATFORM" "offscreen")))
941 (add-after 'install 'delete-installed-tests
943 (delete-file-recursively (string-append #$output "/tests")))))))
944 (native-inputs (list perl))
945 (inputs (list libxkbcommon mesa qtbase zlib))
946 (synopsis "Qt module for displaying SVGs")
947 (description "The QtSvg module provides classes for displaying the
948 contents of SVG files.")
949 (home-page (package-home-page qtbase))
950 (license (package-license qtbase))))
952 (define-public qtimageformats
953 (package (inherit qtsvg-5)
954 (name "qtimageformats")
958 (uri (qt-urls name version))
961 "1xjb2z2h1ajw7z9cwq8djpdvjwalpnmirwcwrlbjqv5r4ghmi82a"))
962 (modules '((guix build utils)))
965 (delete-file-recursively "src/3rdparty")))))
975 (synopsis "Additional Image Format plugins for Qt")
976 (description "The QtImageFormats module contains plugins for adding
977 support for MNG, TGA, TIFF and WBMP image formats.")))
979 (define-public qtx11extras
980 (package (inherit qtsvg-5)
985 (uri (qt-urls name version))
988 "0wxsrnnkkn68myy211rfz98brs7j3qmx3hmy097vh5avgsmw11bn"))))
990 (substitute-keyword-arguments (package-arguments qtsvg-5)
991 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
992 (native-inputs (list perl))
994 (list mesa qtbase-5))
995 (synopsis "Qt Extras for X11")
996 (description "The QtX11Extras module includes the library to access X11
997 from within Qt 5.")))
999 (define-public qtxmlpatterns
1000 (package (inherit qtsvg-5)
1001 (name "qtxmlpatterns")
1005 (uri (qt-urls name version))
1008 "065vj1gk5i4cg0f9spksyb9ps4px0vssx262y77aakvw408vfmq5"))))
1010 (substitute-keyword-arguments (package-arguments qtsvg-5)
1012 `(modify-phases ,phases
1013 (add-after 'unpack 'disable-network-tests
1014 (lambda _ (substitute* "tests/auto/auto.pro"
1015 (("qxmlquery") "# qxmlquery")
1016 (("xmlpatterns ") "# xmlpatterns"))))
1017 (add-after 'unpack 'skip-qquickxmllistmodel-test
1018 (lambda _ (substitute* "tests/auto/auto.pro"
1019 ((".*qquickxmllistmodel.*") ""))))))))
1020 (native-inputs (list perl qtdeclarative-5))
1021 (inputs (list qtbase-5))
1022 (synopsis "Qt XML patterns module")
1023 (description "The QtXmlPatterns module is a XQuery and XPath engine for
1024 XML and custom data models. It contains programs such as xmlpatterns and
1025 xmlpatternsvalidator.")))
1027 (define-public qtdeclarative-5
1028 (package (inherit qtsvg-5)
1029 (name "qtdeclarative")
1033 (uri (qt-urls name version))
1036 "0ji5131g7h2mrgxw1wxc5mcvmsn3fbw64j28gzpa25gv3vcnkhaw"))))
1038 (substitute-keyword-arguments (package-arguments qtsvg-5)
1039 ((#:tests? _ #f) #f) ;TODO: Enable the tests
1041 `(modify-phases ,phases
1042 (add-after 'build 'fix-qt5core-install-prefix
1043 (lambda* (#:key outputs #:allow-other-keys)
1044 (let ((out (assoc-ref outputs "out")))
1045 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
1046 ;; is provided by qtdeclarative-5.
1048 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
1049 (("\\$\\{_qt5Core_install_prefix\\}") out)))))
1050 ;; TODO: Add phase unconditionally.
1051 ,@(if (target-riscv64?)
1052 '((add-after 'unpack 'fix-linking-riscv64
1054 (substitute* "src/qml/qml.pro"
1055 (("DEFINES \\+= QT_NO_FOREACH")
1057 "isEqual(QT_ARCH, \"riscv64\"): QMAKE_LIBS += -latomic\n\n"
1058 "DEFINES += QT_NO_FOREACH"))))))
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 "0b2dnxw1rjbp1srhgns148cwl99f50mx29588dal3avv0f73s597"))))
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 "0f120rfqnmlffjhrm5jbpipk1qsbzp1a2v3q8gz94hz6n9dqpav6"))))
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 "0zlhm4js02niibb23rw87wf4ik0gy4ai08fwprnwy7zf4rm1ss3d"))))
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
1305 (list perl qtdeclarative-5))
1306 (inputs (list qtbase-5))
1307 (synopsis "Qt Sensors module")
1308 (description "The Qt Sensors API provides access to sensor hardware via QML
1309 and C++ interfaces. The Qt Sensors API also provides a motion gesture
1310 recognition API for devices.")))
1312 (define-public qtmultimedia-5
1315 (name "qtmultimedia")
1319 (uri (qt-urls name version))
1322 "0q76iy1frcgm85mid17lh4p6gnn04n19n6zklgpv4w3md1ng97xw"))
1323 (modules '((guix build utils)))
1326 (delete-file-recursively
1327 "examples/multimedia/spectrum/3rdparty")
1328 ;; We also prevent the spectrum example from being built.
1329 (substitute* "examples/multimedia/multimedia.pro"
1330 (("spectrum") "#"))))))
1332 (substitute-keyword-arguments (package-arguments qtsvg-5)
1334 `(modify-phases ,phases
1336 (lambda* (#:key outputs #:allow-other-keys)
1337 (let ((out (assoc-ref outputs "out")))
1338 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
1339 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
1340 (string-append "PREFIX=" out)))))))
1341 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1343 (list perl pkg-config python qtdeclarative-5))
1349 ;; Gstreamer is needed for the mediaplayer plugin
1352 (synopsis "Qt Multimedia module")
1353 (description "The Qt Multimedia module provides set of APIs to play and
1354 record media, and manage a collection of media content. It also contains a
1355 set of plugins for interacting with pulseaudio and GStreamer.")))
1357 (define-public qtshadertools
1359 (name "qtshadertools")
1363 (uri (qt-urls name version))
1364 ;; Note: the source bundles *patched* glslang and SPIRV-Cross
1368 "0nj35s2z5n438q7nqf6bnj3slwz2am3169ck1ixwqa0mjrv73dsr"))))
1369 (build-system cmake-build-system)
1372 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1373 #:phases #~(modify-phases %standard-phases
1374 (add-before 'check 'prepare-for-tests
1376 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
1377 (native-inputs (list perl))
1378 (inputs (list glslang libxkbcommon qtbase))
1379 (home-page (package-home-page qtbase))
1380 (synopsis "Shader pipeline API and and tools for Qt")
1381 (description "The @code{qtshadertools} module provides APIs and tools
1382 supporting shader pipeline functionality as offered in Qt Quick to operate on
1383 Vulkan, OpenGL and other main graphic APIs.")
1384 (license (package-license qtbase))))
1386 (define-public qtmultimedia
1388 (name "qtmultimedia")
1392 (uri (qt-urls name version))
1395 "0dkk3lmzi2fs13cnj8q1lpcs6gghj219826gkwnzyd6nmlm280vy"))
1396 (modules '((guix build utils)))
1399 (delete-file-recursively
1400 "examples/multimedia/spectrum/3rdparty")
1401 ;; We also prevent the spectrum example from being built.
1402 (substitute* "examples/multimedia/multimedia.pro"
1403 (("spectrum") "#"))))))
1404 (build-system cmake-build-system)
1407 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON"
1408 "-DQT_FEATURE_pulseaudio=ON")
1410 #~(modify-phases %standard-phases
1411 (add-after 'unpack 'disable-integration-tests
1413 ;; XXX: The tst_qaudiodecoderbackend, tst_qaudiodevice,
1414 ;; tst_qaudiosource, tst_qmediaplayerbackend and
1415 ;; tst_qcamerabackend tests fail, presumably because they
1416 ;; require a functional pulseaudio daemon (which requires a dbus
1417 ;; session bus, which requires an X11 server, and then is still
1419 (substitute* "tests/auto/CMakeLists.txt"
1420 (("add_subdirectory\\(integration)") ""))))
1421 (add-before 'check 'prepare-for-tests
1423 (setenv "QT_QPA_PLATFORM" "offscreen")))
1424 (add-after 'install 'delete-installed-tests
1426 (delete-file-recursively (string-append #$output "/tests")))))))
1436 gst-plugins-base ;gstreamer-gl
1437 gst-plugins-good ;camera support, additional plugins
1438 gst-libav ;ffmpeg plugin
1444 (home-page (package-home-page qtbase))
1445 (synopsis "Qt Multimedia module")
1446 (description "The Qt Multimedia module provides set of APIs to play and
1447 record media, and manage a collection of media content. It also contains a
1448 set of plugins for interacting with pulseaudio and GStreamer.")
1449 (license (package-license qtbase))))
1451 (define-public qtwayland-5
1452 (package (inherit qtsvg-5)
1457 (uri (qt-urls name version))
1458 (patches (search-patches "qtwayland-gcc-11.patch"))
1461 "0yy8qf9kn15iqsxi2r7jbcsc0vsdyfz7bbxmfn4i9qmz1yvg0jgr"))))
1463 (substitute-keyword-arguments (package-arguments qtsvg-5)
1465 `(modify-phases ,phases
1466 (add-after 'unpack 'disable-failing-tests
1468 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
1469 ;; reason and breaks these two tests.
1470 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
1471 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
1472 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
1474 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
1476 (add-before 'check 'set-test-environment
1478 ;; Do not fail just because /etc/machine-id is missing.
1479 (setenv "DBUS_FATAL_WARNINGS" "0")))))))
1481 (list glib perl pkg-config qtdeclarative-5))
1495 (synopsis "Qt Wayland module")
1496 (description "The Qt Wayland module provides the QtWayland client and
1497 compositor libraries.")))
1499 (define-public qtwayland
1506 (uri (qt-urls name version))
1508 (base32 "1w60p1did7awdlzq5k8vnq2ncpskb07cpvz31cbv99bjs6igw53g"))))
1509 (build-system cmake-build-system)
1511 (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1513 #~(modify-phases %standard-phases
1514 (add-after 'unpack 'disable-failing-tests
1516 ;; FIXME: tst_seatv4::animatedCursor() fails here.
1517 ;; See also: <https://bugreports.qt.io/browse/QTBUG-78317>
1518 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
1520 "QVERIFY\\(!cursorSurface\\(\\)->"
1521 "m_waitingFrameCallbacks\\.empty\\(\\)\\);")) "")
1522 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);") ""))))
1523 (add-before 'check 'set-test-environment
1525 ;; Do not fail just because /etc/machine-id is missing.
1526 (setenv "DBUS_FATAL_WARNINGS" "0")
1527 ;; Make Qt render "offscreen", required for tests.
1528 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
1529 (native-inputs (list glib perl pkg-config qtdeclarative))
1543 (synopsis "Qt Wayland module")
1544 (description "The Qt Wayland module provides the QtWayland client and
1545 compositor libraries.")
1546 (home-page (package-home-page qtbase))
1547 (license (package-license qtbase))))
1549 (define-public qtserialport
1550 (package (inherit qtsvg-5)
1551 (name "qtserialport")
1555 (uri (qt-urls name version))
1558 "0xg2djwhrj5jqamawlp75g70nmwbp2ph2hh1pm45s36jkxm0k7al"))))
1559 (native-inputs (list perl))
1561 (list qtbase-5 eudev))
1563 (substitute-keyword-arguments (package-arguments qtsvg-5)
1565 `(modify-phases ,phases
1566 (add-after 'unpack 'patch-dlopen-paths
1567 (lambda* (#:key inputs #:allow-other-keys)
1568 (substitute* "src/serialport/qtudev_p.h"
1569 ;; Use the absolute paths for dynamically loaded libs,
1570 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1571 ;; typically is not set in guix.
1572 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1573 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))))))))
1574 (synopsis "Qt Serial Port module")
1575 (description "The Qt Serial Port module provides the library for
1576 interacting with serial ports from within Qt.")))
1578 (define-public qtserialbus
1579 (package (inherit qtsvg-5)
1580 (name "qtserialbus")
1584 (uri (qt-urls name version))
1587 "180gm1jvqfn0h3251zafdd1wd3af00phwaa5qljsbrj6s6ywj79j"))))
1589 (substitute-keyword-arguments (package-arguments qtsvg-5)
1590 ((#:phases phases '%standard-phases)
1591 `(modify-phases ,phases
1592 (add-after 'unpack 'patch-libsocketcan-reference
1593 (lambda* (#:key inputs #:allow-other-keys)
1594 (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
1595 (libcansocket.so (string-append libcansocket
1596 "/lib/libsocketcan.so")))
1597 (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
1598 (("QStringLiteral\\(\"socketcan\"\\)")
1599 (format #f "QStringLiteral(~s)" libcansocket.so))))))))))
1601 (list libsocketcan qtbase-5 qtserialport))
1602 (synopsis "Qt Serial Bus module")
1603 (description "The Qt Serial Bus API provides classes and functions to
1604 access the various industrial serial buses and protocols, such as CAN, ModBus,
1607 (define-public qtwebchannel-5
1608 (package (inherit qtsvg-5)
1609 (name "qtwebchannel")
1613 (uri (qt-urls name version))
1616 "1w8mcpdqlphgg3a6yfq18liwlj2nkwrafv0n80h242x5l2mk3ljf"))))
1618 (list perl qtdeclarative-5 qtwebsockets-5))
1619 (inputs (list qtbase-5))
1620 (synopsis "Web communication library for Qt")
1621 (description "The Qt WebChannel module enables peer-to-peer communication
1622 between the host (QML/C++ application) and the client (HTML/JavaScript
1623 application). The transport mechanism is supported out of the box by the two
1624 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1626 (define-public qtwebchannel
1628 (name "qtwebchannel")
1632 (uri (qt-urls name version))
1635 "0s16zx3qn3byldvhmsnwijm8rmizk8vpqj7fnwhjg6c67z10m8ma"))))
1636 (build-system cmake-build-system)
1639 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1640 #:phases #~(modify-phases %standard-phases
1641 (delete 'check) ;move after install
1642 (add-after 'install 'prepare-for-tests
1644 (setenv "QT_QPA_PLATFORM" "offscreen")
1645 (setenv "QML2_IMPORT_PATH"
1646 (string-append #$output "/lib/qt6/qml:"
1647 (getenv "QML2_IMPORT_PATH")))))
1648 (add-after 'prepare-for-tests 'check
1649 (assoc-ref %standard-phases 'check))
1650 (add-after 'check 'delete-installed-tests
1652 (delete-file-recursively
1653 (string-append #$output "/tests")))))))
1654 (native-inputs (list perl))
1655 (inputs (list qtbase qtdeclarative qtwebsockets))
1656 (home-page (package-home-page qtbase))
1657 (synopsis "Web communication library for Qt")
1658 (description "The Qt WebChannel module enables peer-to-peer communication
1659 between the host (QML/C++ application) and the client (HTML/JavaScript
1661 (license (package-license qtbase))))
1663 (define-public qtwebglplugin
1664 (package (inherit qtsvg-5)
1665 (name "qtwebglplugin")
1669 (uri (qt-urls name version))
1672 "1m0p4ssykw07lbip2qyv6w34f8ng13bxb63j0w446f5w0492nn9f"))))
1674 (substitute-keyword-arguments (package-arguments qtsvg-5)
1676 `(modify-phases ,phases
1677 (add-after 'unpack 'disable-network-tests
1678 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1679 (("webgl") "# webgl"))))))))
1682 (list mesa qtbase-5 qtdeclarative-5 qtwebsockets-5 zlib))
1683 (synopsis "QPA plugin for running an application via a browser using
1684 streamed WebGL commands")
1685 (description "Qt back end that uses WebGL for rendering. It allows Qt
1686 applications (with some limitations) to run in a web browser that supports
1687 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1688 compatible web browser without the use of plug-ins. The API is similar to
1689 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1691 (define-public qtwebview
1692 (package (inherit qtsvg-5)
1697 (uri (qt-urls name version))
1700 "0arwaky3jy5ql3z4d8f7k7diidzb1kncdans7pn50hsa1bzacfal"))))
1704 (list qtbase-5 qtdeclarative-5))
1705 (synopsis "Display web content in a QML application")
1706 (description "Qt WebView provides a way to display web content in a QML
1707 application without necessarily including a full web browser stack by using
1708 native APIs where it makes sense.")))
1710 (define-public qtlocation
1711 (package (inherit qtsvg-5)
1716 (uri (qt-urls name version))
1719 "0mlhhhcxx3gpr9kh04c6fljxcj50c2j21r0wb9f7d7nk4flip7b2"))))
1721 (substitute-keyword-arguments (package-arguments qtsvg-5)
1722 ((#:tests? _ #f) #f) ; TODO: Enable the tests
1724 `(modify-phases ,phases
1725 (add-before 'check 'pre-check
1727 (setenv "HOME" "/tmp")))))))
1729 (list perl qtdeclarative-5 qtquickcontrols-5 qtserialport))
1731 (list icu4c openssl qtbase-5 zlib))
1732 (synopsis "Qt Location and Positioning modules")
1733 (description "The Qt Location module provides an interface for location,
1734 positioning and geolocation plugins.")))
1736 (define-public qtlottie
1742 (uri (qt-urls name version))
1745 "1x8wmc6gwmxk92zjcsrbhrbqbfvnk7302ggghld5wk8jk5lsf2vl"))))
1746 (build-system cmake-build-system)
1749 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1751 #~(modify-phases %standard-phases
1752 (delete 'check) ;move after install
1753 (add-after 'install 'prepare-for-tests
1755 (setenv "QT_QPA_PLATFORM" "offscreen")
1756 (setenv "QML2_IMPORT_PATH"
1757 (string-append #$output "/lib/qt6/qml:"
1758 (getenv "QML2_IMPORT_PATH"))))))))
1759 (native-inputs (list perl))
1760 (inputs (list libxkbcommon qtbase qtdeclarative))
1761 (home-page (package-home-page qtbase))
1762 (synopsis "QML API for rendering Bodymovin graphics and animations")
1763 (description "Qt Lottie Animation provides a QML API for rendering
1764 graphics and animations that are exported in JSON format by the Bodymovin
1765 plugin for Adobe After Effects.")
1766 (license (package-license qtbase))))
1768 (define-public qttools-5
1769 (package (inherit qtsvg-5)
1774 (uri (qt-urls name version))
1777 "0v7wkzq9i8w3qrw0z8al7lb6clr57lfisyb1fm9cnhi73fvph1vd"))))
1779 (substitute-keyword-arguments (package-arguments qtsvg-5)
1780 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1782 (list perl qtdeclarative-5 vulkan-headers))
1784 (list mesa qtbase-5))
1785 (synopsis "Qt Tools and Designer modules")
1786 (description "The Qt Tools module provides a set of applications to browse
1787 the documentation, translate applications, generate help files and other stuff
1788 that helps in Qt development.")))
1790 (define-public qttools
1796 (uri (qt-urls name version))
1799 "1h96w4bzkbd80vr7lh6hnypdlmbzc1y52c2zrqzvkgm3587pa4n4"))))
1800 (build-system cmake-build-system)
1803 ;; The build system attempts to fetch online resources and fails when
1804 ;; building the test suite.
1805 #:configure-flags #~(list "-DQT_BUILD_TESTS=OFF")))
1806 (native-inputs (list perl qtdeclarative vulkan-headers))
1807 (inputs (list libxkbcommon mesa qtbase))
1808 (home-page (package-home-page qtbase))
1809 (synopsis "Qt Tools and Designer modules")
1810 (description "The Qt Tools module provides a set of applications to browse
1811 the documentation, translate applications, generate help files and other stuff
1812 that helps in Qt development.")
1813 ;; GPL 3 only with Qt GPL exception 1.0 (see:
1814 ;; LICENSES/Qt-GPL-exception-1.0.txt).
1815 (license (list license:gpl3))))
1817 (define-public qtscript
1818 (package (inherit qtsvg-5)
1823 (uri (qt-urls name version))
1826 "17yk0p8ci47xlfpllc17arlycng47wrnnskimskzz85bspabc8pm"))
1827 (patches (search-patches "qtscript-disable-tests.patch"))))
1829 (list perl qttools-5))
1832 (synopsis "Qt Script module")
1833 (description "Qt provides support for application scripting with ECMAScript.
1834 The following guides and references cover aspects of programming with
1835 ECMAScript and Qt.")))
1837 (define-public qtquickcontrols-5
1838 (package (inherit qtsvg-5)
1839 (name "qtquickcontrols")
1843 (uri (qt-urls name version))
1846 "0mjw25wcgd2bvjz9rr4qjydb423c63615rcx1vws4jmydqdihssr"))))
1848 (substitute-keyword-arguments (package-arguments qtsvg-5)
1849 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1851 (list qtbase-5 qtdeclarative-5))
1852 (synopsis "Qt Quick Controls and other Quick modules")
1853 (description "The QtScript module provides classes for making Qt
1854 applications scriptable. This module provides a set of extra components that
1855 can be used to build complete interfaces in Qt Quick.")))
1857 (define-public qtquickcontrols2-5
1858 (package (inherit qtsvg-5)
1859 (name "qtquickcontrols2")
1863 (uri (qt-urls name version))
1866 "1cxg4ml07k1zcyi5m4lx06sz8f5l67isb5vhk7nakxm0wnn7p8y4"))))
1868 (substitute-keyword-arguments (package-arguments qtsvg-5)
1869 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1871 (list qtbase-5 qtdeclarative-5))
1872 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1873 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1874 module that provides platform integration: native dialogs, menus and menu bars,
1875 and tray icons. It falls back to Qt Widgets when a native implementation is
1878 (define-public qtquickcontrols2
1879 ;; qtquickcontrols2 still exist, but was merged into qtdeclarative.
1880 ;; Unfortunately that hasn't been well communicated at all (see:
1881 ;; https://bugreports.qt.io/browse/QTBUG-79454).
1882 (deprecated-package "qtquickcontrols2" qtdeclarative))
1884 (define-public qtgraphicaleffects
1885 (package (inherit qtsvg-5)
1886 (name "qtgraphicaleffects")
1890 (uri (qt-urls name version))
1893 "0xznn5zqp6xrqfgl54l8cig9asqf9m2hz0p3ga514rh8spmdazr3"))))
1895 (substitute-keyword-arguments (package-arguments qtsvg-5)
1896 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1898 (list qtbase-5 qtdeclarative-5))
1899 (synopsis "Qt Graphical Effects module")
1900 (description "The Qt Graphical Effects module provides a set of QML types
1901 for adding visually impressive and configurable effects to user interfaces.
1902 Effects are visual items that can be added to Qt Quick user interface as UI
1903 components. The API consists of over 20 effects provided as separate QML
1904 types. The effects cover functional areas such as blending, masking, blurring,
1905 coloring, and many more.")))
1907 (define-public qtgamepad
1908 (package (inherit qtsvg-5)
1913 (uri (qt-urls name version))
1916 "0wa4d8f025hlp4bmdzdy5wcahm9wjg6bkwig8dpw9nrsj3idz5b0"))))
1918 (list perl pkg-config))
1920 `(("fontconfig" ,fontconfig)
1921 ("freetype" ,freetype)
1922 ("libxrender" ,libxrender)
1924 ("qtbase" ,qtbase-5)
1925 ("qtdeclarative-5" ,qtdeclarative-5)))
1926 (synopsis "Qt Gamepad module")
1927 (description "The Qt Gamepad module is an add-on library that enables Qt
1928 applications to support the use of gamepad hardware and in some cases remote
1929 control equipment. The module provides both QML and C++ interfaces. The
1930 primary target audience are embedded devices with fullscreen user interfaces,
1931 and mobile applications targeting TV-like form factors.")))
1933 (define-public qtscxml
1934 (package (inherit qtsvg-5)
1939 (uri (qt-urls name version))
1942 "0xf5mqsrw16h8xjglymgfc8qg2qa5bi4fgdl4j3dkhvvpr7vrphp"))
1943 (modules '((guix build utils)))
1946 (delete-file-recursively "tests/3rdparty")
1947 ;; the scion test refers to the bundled 3rd party test code.
1948 (substitute* "tests/auto/auto.pro"
1949 (("scion") "#"))))))
1951 (substitute-keyword-arguments (package-arguments qtsvg-5)
1952 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1954 (list qtbase-5 qtdeclarative-5))
1955 (synopsis "Qt SCXML module")
1956 (description "The Qt SCXML module provides functionality to create state
1957 machines from SCXML files. This includes both dynamically creating state
1958 machines (loading the SCXML file and instantiating states and transitions) and
1959 generating a C++ file that has a class implementing the state machine. It
1960 also contains functionality to support data models and executable content.")))
1962 (define-public qtpositioning
1964 (name "qtpositioning")
1968 (uri (qt-urls name version))
1971 "0v78wamvdw02kf9rq7m5v24q2g6jmgq4ch0fnfa014p1r978wy06"))))
1972 (build-system cmake-build-system)
1975 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1976 #:phases #~(modify-phases %standard-phases
1977 (add-after 'install 'delete-installed-tests
1979 (delete-file-recursively
1980 (string-append #$output "/tests")))))))
1981 (inputs (list perl qtbase))
1982 (home-page (package-home-page qtbase))
1983 (synopsis "QML and C++ positioning information API")
1984 (description "The Qt Positioning API provides positioning information via
1985 QML and C++ interfaces. The Qt Positioning API lets you to determine a
1986 position by using a variety of possible sources, including satellite, wifi, or
1987 text files. That information can then be used to, for example, determine a
1988 position on a map. In addition, you can use to the API to retrieve satellite
1989 information and perform area based monitoring.")
1990 (license (package-license qtbase))))
1992 (define-public qtpurchasing
1993 (package (inherit qtsvg-5)
1994 (name "qtpurchasing")
1998 (uri (qt-urls name version))
2001 "04z6mwzn73gg56hgs7gividinfgndx4kmcnp7w6h3wamrdlkfdx7"))))
2003 (list qtbase-5 qtdeclarative-5))
2004 (synopsis "Qt Purchasing module")
2005 (description "The Qt Purchasing module provides and in-app API for
2006 purchasing goods and services.")))
2008 (define-public qtcharts
2009 (package (inherit qtsvg-5)
2014 (uri (qt-urls name version))
2017 "0y051i1837bfybkf8cm7cx8k5wjmbi47pxawaaz6wm0hd2z5b4qi"))))
2019 (substitute-keyword-arguments (package-arguments qtsvg-5)
2021 `(modify-phases ,phases
2022 (add-after 'unpack 'remove-failing-test
2024 (substitute* "tests/auto/auto.pro"
2026 (("qml-qtquicktest") "# qml-qtquicktest"))))))))
2028 (list qtbase-5 qtdeclarative-5))
2029 (synopsis "Qt Charts module")
2030 (description "The Qt Charts module provides a set of easy to use chart
2031 components. It uses the Qt Graphics View Framework, therefore charts can be
2032 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
2033 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
2034 selecting one of the charts themes.")
2035 (license license:gpl3)))
2037 (define-public qtdatavis3d
2038 (package (inherit qtsvg-5)
2039 (name "qtdatavis3d")
2043 (uri (qt-urls name version))
2046 "0sczwqlc36jdywf7bqxz0hm6mr7fn8p1fsnc33jliiqzn9yrg77x"))))
2048 (substitute-keyword-arguments (package-arguments qtsvg-5)
2049 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2051 (list qtbase-5 qtdeclarative-5))
2052 (synopsis "Qt Data Visualization module")
2053 (description "The Qt Data Visualization module provides a way to visualize
2054 data in 3D as bar, scatter, and surface graphs. It is especially useful for
2055 visualizing depth maps and large quantities of rapidly changing data, such as
2056 data received from multiple sensors. The look and feel of graphs can be
2057 customized by using themes or by adding custom items and labels to them.")
2058 (license license:gpl3)))
2060 (define-public qtnetworkauth-5
2061 (package (inherit qtsvg-5)
2062 (name "qtnetworkauth")
2066 (uri (qt-urls name version))
2069 "0c7mz715rlpg0cqgs6s0aszmslyamkhnpamc1iij6i571sj5j2f1"))))
2072 (synopsis "Qt Network Authorization module")
2073 (description "The Qt Network Authorization module provides an
2074 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
2076 (define-public qtnetworkauth
2078 (name "qtnetworkauth")
2082 (uri (qt-urls name version))
2085 "0apvsb2ip1m3kw8vi9spvf6f6q72ys8vr40rpyysi7shsjwm83yn"))))
2086 (build-system cmake-build-system)
2087 (arguments (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")))
2088 (native-inputs (list perl))
2089 (inputs (list qtbase))
2090 (home-page (package-home-page qtbase))
2091 (synopsis "Qt Network Authorization module")
2092 (description "The Qt Network Authorization module provides an
2093 implementation of OAuth and OAuth2 authenticathon methods for Qt.")
2094 (license (package-license qtbase))))
2096 (define-public qtremoteobjects
2097 (package (inherit qtsvg-5)
2098 (name "qtremoteobjects")
2102 (uri (qt-urls name version))
2105 "1m0xcqlbxsfn0cd4ajin1h3i4l51dajmkw91v0r4a61xi14i0kks"))))
2107 (substitute-keyword-arguments (package-arguments qtsvg-5)
2109 `(modify-phases ,phases
2110 (add-after 'unpack 'remove-failing-test
2112 ;; This test can't find its imports.
2113 (substitute* "tests/auto/qml/qml.pro"
2114 (("integration") "# integration")
2115 (("usertypes") "# usertypes"))
2116 ;; disable failing tests: they need network
2117 (substitute* "tests/auto/auto.pro"
2118 (("integration_multiprocess proxy_multiprocess integration_external restart")
2119 "integration_multiprocess"))))))))
2121 (list qtbase-5 qtdeclarative-5))
2122 (synopsis "Qt Remote Objects module")
2123 (description "The Qt Remote Objects module is an @dfn{inter-process
2124 communication} (IPC) module developed for Qt. The idea is to extend existing
2125 Qt's functionalities to enable an easy exchange of information between
2126 processes or computers.")))
2128 (define-public qtspeech
2129 (package (inherit qtsvg-5)
2134 (uri (qt-urls name version))
2137 "0xskp9dzjy5nqszygk8gwvjyiylgynx5sq3nk2vi3zwgfdh5jpm4"))))
2139 (substitute-keyword-arguments (package-arguments qtsvg-5)
2140 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2144 (list perl qtdeclarative-5 qtmultimedia-5 qtxmlpatterns))
2145 (synopsis "Qt Speech module")
2146 (description "The Qt Speech module enables a Qt application to support
2147 accessibility features such as text-to-speech, which is useful for end-users
2148 who are visually challenged or cannot access the application for whatever
2149 reason. The most common use case where text-to-speech comes in handy is when
2150 the end-user is driving and cannot attend the incoming messages on the phone.
2151 In such a scenario, the messaging application can read out the incoming
2154 (define-public qtspell
2162 (url "https://github.com/manisandro/qtspell")
2164 (file-name (git-file-name name version))
2166 (base32 "19ff6jzm699wrxrk57w3d4kl9qxgdipdikpwls9n4aqv4mw7g969"))))
2167 (build-system cmake-build-system)
2169 `(#:tests? #f)) ;no test
2171 (list pkg-config qttools-5))
2173 (list enchant qtbase-5))
2174 (home-page "https://github.com/manisandro/qtspell")
2175 (synopsis "Spell checking for Qt text widgets")
2177 "QtSpell adds spell-checking functionality to Qt's text widgets,
2178 using the Enchant spell-checking library.")
2179 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
2180 (license license:gpl2+)))
2182 (define-public qtwebengine-5
2185 (name "qtwebengine")
2190 (uri (qt-urls name version))
2193 "0zahr9w6rqdxwh2whsgk3fhcszs7wa9j95lq4sqi8xzin2wcgl17"))
2194 (modules '((ice-9 ftw)
2198 (guix build utils)))
2201 (let ((preserved-third-party-files
2202 '("base/third_party/double_conversion"
2203 "base/third_party/cityhash"
2204 "base/third_party/cityhash_v103"
2205 "base/third_party/dynamic_annotations"
2206 "base/third_party/icu"
2207 "base/third_party/libevent"
2208 "base/third_party/nspr"
2209 "base/third_party/superfasthash"
2210 "base/third_party/symbolize"
2211 "base/third_party/xdg_mime"
2212 "base/third_party/xdg_user_dirs"
2213 "net/third_party/mozilla_security_manager"
2214 "net/third_party/nss"
2215 "net/third_party/quiche"
2216 "net/third_party/uri_template"
2217 "third_party/abseil-cpp"
2219 "third_party/angle/src/common/third_party/base"
2220 "third_party/angle/src/common/third_party/smhasher"
2221 "third_party/angle/src/common/third_party/xxhash"
2222 "third_party/angle/src/third_party/compiler"
2223 "third_party/axe-core"
2225 "third_party/boringssl"
2226 "third_party/boringssl/src/third_party/fiat"
2227 "third_party/breakpad"
2228 "third_party/brotli"
2229 "third_party/catapult/common/py_vulcanize/py_vulcanize"
2230 "third_party/catapult/common/py_vulcanize/third_party"
2231 "third_party/catapult/third_party/beautifulsoup4"
2232 "third_party/catapult/third_party/html5lib-python"
2233 "third_party/catapult/third_party/polymer/components"
2234 "third_party/catapult/tracing"
2235 "third_party/catapult/tracing/third_party"
2238 "third_party/closure_compiler"
2239 "third_party/crashpad"
2240 "third_party/crashpad/crashpad/third_party/lss"
2241 "third_party/crashpad/crashpad/third_party/zlib"
2242 "third_party/crc32c"
2245 "third_party/devtools-frontend"
2246 "third_party/devtools-frontend/src/front_end/third_party"
2247 "third_party/devtools-frontend/src/third_party/typescript"
2248 "third_party/emoji-segmenter"
2249 "third_party/ffmpeg"
2250 "third_party/googletest"
2251 "third_party/harfbuzz-ng/utils"
2252 "third_party/hunspell"
2253 "third_party/iccjpeg"
2255 "third_party/inspector_protocol"
2256 "third_party/jinja2"
2257 "third_party/jsoncpp"
2258 "third_party/jstemplate"
2259 "third_party/khronos"
2260 "third_party/leveldatabase"
2261 "third_party/libaddressinput"
2262 "third_party/libavif"
2263 "third_party/libgifcodec"
2264 "third_party/libjingle_xmpp"
2265 "third_party/libjpeg_turbo"
2266 "third_party/libpng"
2267 "third_party/libsrtp"
2268 "third_party/libsync"
2269 "third_party/libudev"
2270 "third_party/libvpx"
2271 "third_party/libwebm"
2272 "third_party/libwebp"
2273 "third_party/libxml"
2274 "third_party/libxslt"
2275 "third_party/libyuv"
2276 "third_party/lottie"
2279 "third_party/markupsafe"
2280 "third_party/mesa_headers"
2281 "third_party/metrics_proto"
2282 "third_party/modp_b64"
2285 "third_party/one_euro_filter"
2286 "third_party/openh264/src/codec/api/svc"
2289 "third_party/pdfium"
2290 "third_party/pdfium/third_party/agg23"
2291 "third_party/pdfium/third_party/base"
2292 "third_party/pdfium/third_party/freetype"
2293 "third_party/pdfium/third_party/lcms"
2294 "third_party/pdfium/third_party/libopenjpeg20"
2295 "third_party/pdfium/third_party/skia_shared"
2296 "third_party/perfetto"
2299 "third_party/polymer"
2300 "third_party/protobuf"
2301 "third_party/protobuf/third_party/six"
2302 "third_party/pyjson5"
2304 "third_party/rnnoise"
2306 "third_party/skia/include/third_party/skcms/skcms.h"
2307 "third_party/skia/include/third_party/vulkan"
2308 "third_party/skia/third_party/skcms"
2309 "third_party/smhasher"
2310 "third_party/snappy"
2311 "third_party/sqlite"
2312 "third_party/usb_ids"
2313 "third_party/usrsctp"
2314 "third_party/vulkan_memory_allocator"
2315 "third_party/web-animations-js"
2316 "third_party/webrtc"
2317 "third_party/webrtc/common_audio/third_party/ooura/fft_size_128"
2318 "third_party/webrtc/common_audio/third_party/ooura/fft_size_256"
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"
2329 "third_party/xcbproto"
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/http_upload.cc"
2406 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h")
2407 (("third_party/curl") "curl"))
2409 '("components/viz/common/gpu/vulkan_context_provider.h"
2410 "components/viz/common/resources/resource_format_utils.h"
2411 "gpu/config/gpu_info_collector_win.cc"
2412 "gpu/config/gpu_util.cc"
2413 "gpu/config/vulkan_info.h")
2414 (("third_party/vulkan_headers/include/")
2417 ;; Replace Google Analytics bundle with an empty file and hope
2419 (mkdir-p "third_party/analytics")
2420 (call-with-output-file
2421 "third_party/analytics/google-analytics-bundle.js"
2424 ;; Do not enable support for loading the Widevine DRM plugin.
2425 (substitute* "src/buildtools/config/common.pri"
2426 (("enable_widevine=true")
2427 "enable_widevine=false")))))))
2428 (build-system gnu-build-system)
2465 ;; FIXME: libxml2 needs to built with icu support though it links to
2466 ;; libxml2 configure summary still states "Checking for compatible
2467 ;; system libxml2... no"
2492 (substitute-keyword-arguments (package-arguments qtsvg-5)
2493 ((#:modules modules '())
2494 `((guix build gnu-build-system)
2496 (ice-9 textual-ports)))
2498 `(modify-phases ,phases
2499 (add-before 'configure 'substitute-source
2500 (lambda* (#:key inputs outputs #:allow-other-keys)
2501 (let ((out (assoc-ref outputs "out")))
2502 (with-atomic-file-replacement
2503 "src/buildtools/config/linux.pri"
2505 (display (get-string-all in) out)
2506 (display "\ngn_args += use_system_openh264=true\n" out)))
2507 ;; Qtwebengine is not installed into the same prefix as
2508 ;; qtbase. Some qtbase QTLibraryInfo constants will not
2509 ;; work. Replace with the full path to the qtwebengine-5
2510 ;; translations and locales in the store.
2511 (substitute* "src/core/web_engine_library_info.cpp"
2512 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
2513 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
2514 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
2515 (string-append "QLatin1String(\"" out "/share/qt5\")")))
2516 ;; Substitute full dynamic library path for nss.
2517 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2519 (search-input-file inputs "lib/nss/libnssckbi.so")))
2520 ;; Substitute full dynamic library path for udev.
2521 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2523 (search-input-file inputs "lib/libudev.so.1"))))))
2524 (add-before 'configure 'set-env
2526 ;; Avoids potential race conditions.
2527 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2528 (setenv "NINJAFLAGS"
2529 (string-append "-k1" ;less verbose build output
2530 ;; Respect the '--cores' option of 'guix build'.
2531 " -j" (number->string (parallel-job-count))))))
2534 ;; Valid QT_BUILD_PARTS variables are:
2535 ;; libs tools tests examples demos docs translations
2536 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
2537 "--webengine-printing-and-pdf=no"
2538 "--webengine-ffmpeg=system"
2539 ;; FIXME: Building qtwebengine-5 5.12.2 with
2540 ;; icu4c >= 68 fails.
2541 ;;"--webengine-icu=system"
2542 "--webengine-pepper-plugins=no"
2543 "-webengine-proprietary-codecs")))))
2544 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
2545 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
2546 ;; before running tests.
2547 ((#:tests? _ #f) #f)))
2548 (native-search-paths
2549 (list (search-path-specification
2550 (file-type 'regular)
2552 (variable "QTWEBENGINEPROCESS_PATH")
2553 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
2554 (home-page "https://wiki.qt.io/QtWebEngine")
2555 (synopsis "Qt WebEngine module")
2556 (description "The Qt5WebEngine module provides support for web applications
2557 using the Chromium browser project. The Chromium source code has Google services
2558 and binaries removed, and adds modular support for using system libraries.")
2559 (license license:lgpl2.1+)))
2561 (define-public qtwebengine
2563 (name "qtwebengine")
2568 (uri (qt-urls name version))
2571 "0ivfsqd5c0cxsnssj6z37901cf6a47w50zaqgjiysvcm3ar36ymd"))
2572 (modules '((ice-9 ftw)
2576 (guix build utils)))
2579 (let ((preserved-third-party-files
2580 '("base/third_party/double_conversion"
2581 "base/third_party/cityhash"
2582 "base/third_party/cityhash_v103"
2583 "base/third_party/dynamic_annotations"
2584 "base/third_party/icu"
2585 "base/third_party/libevent"
2586 "base/third_party/nspr"
2587 "base/third_party/superfasthash"
2588 "base/third_party/symbolize"
2589 "base/third_party/xdg_mime"
2590 "base/third_party/xdg_user_dirs"
2591 "net/third_party/mozilla_security_manager"
2592 "net/third_party/nss"
2593 "net/third_party/quiche"
2594 "net/third_party/uri_template"
2595 "third_party/abseil-cpp"
2597 "third_party/angle/src/common/third_party/base"
2598 "third_party/angle/src/common/third_party/smhasher"
2599 "third_party/angle/src/common/third_party/xxhash"
2600 "third_party/axe-core"
2602 "third_party/boringssl"
2603 "third_party/boringssl/src/third_party/fiat"
2604 "third_party/breakpad"
2605 "third_party/brotli"
2608 "third_party/closure_compiler"
2609 "third_party/crashpad"
2610 "third_party/crashpad/crashpad/third_party/lss"
2611 "third_party/crashpad/crashpad/third_party/zlib"
2612 "third_party/crc32c"
2615 "third_party/devtools-frontend"
2616 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
2617 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
2618 "third_party/emoji-segmenter"
2619 "third_party/ffmpeg"
2620 "third_party/googletest"
2621 "third_party/harfbuzz-ng/utils"
2622 "third_party/hunspell"
2623 "third_party/iccjpeg"
2625 "third_party/inspector_protocol"
2626 "third_party/jinja2"
2627 "third_party/jsoncpp"
2628 "third_party/jstemplate"
2629 "third_party/khronos"
2630 "third_party/leveldatabase"
2631 "third_party/libaddressinput"
2632 "third_party/libgifcodec"
2633 "third_party/libjingle_xmpp"
2634 "third_party/libjpeg_turbo"
2635 "third_party/libpng"
2636 "third_party/libsrtp"
2637 "third_party/libsync"
2638 "third_party/libudev"
2639 "third_party/libvpx"
2640 "third_party/libwebm"
2641 "third_party/libwebp"
2642 "third_party/libxml"
2643 "third_party/libxslt"
2644 "third_party/libyuv"
2647 "third_party/markupsafe"
2648 "third_party/mesa_headers"
2649 "third_party/metrics_proto"
2650 "third_party/modp_b64"
2652 "third_party/one_euro_filter"
2653 "third_party/openh264/src/codec/api/svc"
2656 "third_party/pdfium"
2657 "third_party/pdfium/third_party/agg23"
2658 "third_party/pdfium/third_party/base"
2659 "third_party/pdfium/third_party/freetype"
2660 "third_party/pdfium/third_party/lcms"
2661 "third_party/pdfium/third_party/libopenjpeg20"
2662 "third_party/pdfium/third_party/skia_shared"
2663 "third_party/perfetto"
2666 "third_party/polymer"
2667 "third_party/protobuf"
2668 "third_party/protobuf/third_party/six"
2669 "third_party/pyjson5"
2671 "third_party/rnnoise"
2673 "third_party/skia/include/third_party/skcms/skcms.h"
2674 "third_party/skia/include/third_party/vulkan"
2675 "third_party/skia/third_party/skcms"
2676 "third_party/skia/third_party/vulkanmemoryallocator"
2677 "third_party/smhasher"
2678 "third_party/snappy"
2679 "third_party/sqlite"
2680 "third_party/usb_ids"
2681 "third_party/usrsctp"
2682 "third_party/web-animations-js"
2683 "third_party/webrtc"
2684 "third_party/webrtc/common_audio/third_party/ooura"
2685 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2686 "third_party/webrtc/modules/third_party/fft"
2687 "third_party/webrtc/modules/third_party/g711"
2688 "third_party/webrtc/modules/third_party/g722"
2689 "third_party/webrtc/rtc_base/third_party/base64"
2690 "third_party/webrtc/rtc_base/third_party/sigslot"
2691 "third_party/webrtc_overrides"
2692 "third_party/widevine/cdm/widevine_cdm_common.h"
2693 "third_party/widevine/cdm/widevine_cdm_version.h"
2696 "url/third_party/mozilla"
2697 "v8/src/third_party/utf8-decoder"
2698 "v8/src/third_party/valgrind"
2699 "v8/src/third_party/siphash"
2700 "v8/third_party/v8/builtins"
2701 "v8/third_party/inspector_protocol"))
2702 (protected (make-regexp "\\.(gn|gyp)i?$")))
2703 (define preserved-club
2704 (map (lambda (member)
2705 (string-append "./" member))
2706 preserved-third-party-files))
2707 (define (empty? dir)
2708 (equal? (scandir dir) '("." "..")))
2709 (define (third-party? file)
2710 (string-contains file "third_party/"))
2711 (define (useless? file)
2712 (any (cute string-suffix? <> file)
2713 '(".zip" ".so" ".dll" ".exe" ".jar")))
2714 (define (parents child)
2715 ;; Return all parent directories of CHILD up to and including
2716 ;; the closest "third_party".
2717 (let* ((dirs (match (string-split child #\/)
2718 ((dirs ... last) dirs)))
2719 (closest (list-index (lambda (dir)
2720 (string=? "third_party" dir))
2722 (delim (- (length dirs) closest)))
2723 (fold (lambda (dir prev)
2724 (cons (string-append (car prev) "/" dir)
2726 (list (string-join (list-head dirs delim) "/"))
2727 (list-tail dirs delim))))
2728 (define (remove-loudly file)
2729 (format #t "deleting ~a...~%" file)
2732 (define (delete-unwanted-files child stat flag base level)
2734 ((or 'regular 'symlink 'stale-symlink)
2735 (when (third-party? child)
2736 (unless (or (member child preserved-club)
2737 (any (cute member <> preserved-club)
2739 (regexp-exec protected child))
2740 (remove-loudly child)))
2741 (when (and (useless? child) (file-exists? child))
2742 (remove-loudly child)))
2743 ('directory-processed
2744 (when (empty? child)
2748 (with-directory-excursion "src/3rdparty"
2749 (delete-file-recursively "ninja")
2751 (with-directory-excursion "chromium"
2752 ;; Delete bundled software and binaries that were not
2753 ;; explicitly preserved above.
2754 (nftw "." delete-unwanted-files 'depth 'physical)
2756 ;; Assert that each preserved item is present to catch
2758 (for-each (lambda (third-party)
2759 (unless (file-exists? third-party)
2760 (error (format #f "~s does not exist!~%"
2764 ;; Use relative header locations instead of hard coded ones.
2766 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2767 (("base/third_party/valgrind") "valgrind"))
2768 (substitute* "third_party/breakpad/breakpad/src/common/\
2769 linux/libcurl_wrapper.h"
2770 (("third_party/curl") "curl"))
2772 '("components/viz/common/gpu/vulkan_context_provider.h"
2773 "gpu/config/gpu_util.cc")
2774 (("third_party/vulkan/include/")
2777 ;; Replace Google Analytics bundle with an empty file and
2778 ;; hope no one notices.
2779 (mkdir-p "third_party/analytics")
2780 (call-with-output-file
2781 "third_party/analytics/google-analytics-bundle.js"
2784 ;; Do not enable support for loading the Widevine DRM plugin.
2785 (substitute* "src/core/CMakeLists.txt"
2786 (("enable_widevine=true")
2787 "enable_widevine=false")))))))
2788 (build-system cmake-build-system)
2791 ;; XXX: The test suite is not built by default; leave it off to save
2792 ;; some build time and resources.
2795 ;; Use the CMake ninja generator, otherwise the build fails (see:
2796 ;; https://bugreports.qt.io/browse/QTBUG-96897).
2798 ;; Manually add the NSS library prefix to the linker
2799 ;; search path, otherwise it fails to be linked (see:
2800 ;; https://bugreports.qt.io/browse/QTBUG-105053).
2801 (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-L"
2802 (search-input-directory %build-inputs "lib/nss"))
2804 ;; The PDF renderer plugin fails to build with errors such as
2805 ;; "src/3rdparty/chromium/components/pdf
2806 ;; /renderer/pdf_accessibility_tree.cc:1373:39:
2807 ;; error: use of undeclared identifier 'IDS_PDF_PAGE_INDEX'";
2809 "-DQT_FEATURE_webengine_printing_and_pdf=OFF"
2810 "-DQT_FEATURE_webengine_pepper_plugins=OFF" ;widevine
2811 "-DQT_FEATURE_system_ffmpeg=ON"
2812 ;; Do not artificially limit codec support; video decoding is
2814 "-DQT_FEATURE_webengine_proprietary_codecs=ON"
2815 "-DQT_FEATURE_webengine_system_alsa=ON"
2816 "-DQT_FEATURE_webengine_system_icu=ON"
2817 "-DQT_FEATURE_webengine_system_libxml=ON"
2818 "-DQT_FEATURE_webengine_system_libpci=ON"
2819 "-DQT_FEATURE_webengine_system_libpng=ON"
2820 "-DQT_FEATURE_webengine_system_pulseaudio=ON"
2821 "-DQT_FEATURE_webengine_system_zlib=ON")
2823 #~(modify-phases %standard-phases
2824 (add-after 'unpack 'patch-paths
2825 (lambda* (#:key inputs #:allow-other-keys)
2826 ;; Qtwebengine is not installed into the same prefix as qtbase.
2827 ;; Some qtbase QTLibraryInfo constants will not work. Replace
2828 ;; with the full path to the qtwebengine translations and
2829 ;; locales in the store.
2830 (substitute* "src/core/web_engine_library_info.cpp"
2831 (("QLibraryInfo::path\\(QLibraryInfo::TranslationsPath)")
2832 (string-append "QLatin1String(\"" #$output
2833 "/share/qt6/translations\")"))
2834 (("QLibraryInfo::path\\(QLibraryInfo::DataPath)")
2835 (string-append "QLatin1String(\"" #$output
2837 ;; Substitute full dynamic library path for nss.
2838 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2840 (search-input-file inputs "lib/nss/libnssckbi.so")))
2841 ;; Substitute full dynamic library path for udev.
2842 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2844 (search-input-file inputs "lib/libudev.so.1")))
2845 ;; Patch the location of the X11 keywoard layouts, otherwise
2846 ;; webengine *crashes* at run time when the default directory,
2847 ;; '/usr/share/X11/xkb' is empty (see:
2848 ;; https://bugreports.qt.io/browse/QTBUG-105124).
2849 (substitute* "src/3rdparty/chromium/ui/events/ozone/layout/xkb\
2850 /xkb_keyboard_layout_engine.cc"
2851 (("/usr/share/X11/xkb")
2852 (search-input-directory inputs "share/X11/xkb")))))
2853 (add-before 'configure 'prepare-build-environment
2855 ;; Avoids potential race conditions.
2856 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2857 (setenv "NINJAFLAGS"
2859 "-k1" ;less verbose build output
2860 ;; Respect the '--cores' option of 'guix build'.
2861 " -j" (number->string (parallel-job-count))))
2862 ;; Use Clang/LDD to help tame the memory requirements and hasten
2864 (setenv "AR" "llvm-ar") (setenv "NM" "llvm-nm")
2865 (setenv "CC" "clang") (setenv "CXX" "clang++")))
2867 (lambda* (#:key parallel-build? #:allow-other-keys)
2868 (apply invoke "cmake" "--build" "."
2870 `("--parallel" ,(number->string (parallel-job-count)))
2874 (invoke "cmake" "--install" "."))))))
2876 (modify-inputs (package-native-inputs qtwebengine-5)
2877 (delete "python2" "python2-six")
2884 (modify-inputs (package-inputs qtwebengine-5)
2885 (replace "qtbase" qtbase)
2886 (replace "qtdeclarative" qtdeclarative)
2887 (replace "qtmultimedia" qtmultimedia)
2888 (replace "qtwebchannel" qtwebchannel)
2889 (append libxkbfile xkeyboard-config)))
2890 (native-search-paths
2891 (list (search-path-specification
2892 (file-type 'regular)
2894 (variable "QTWEBENGINEPROCESS_PATH")
2895 (files '("lib/qt6/libexec/QtWebEngineProcess")))))
2896 (home-page "https://wiki.qt.io/QtWebEngine")
2897 (synopsis "Qt WebEngine module")
2898 (description "The Qt WebEngine module provides support for web
2899 applications using the Chromium browser project. The Chromium source code has
2900 Google services and binaries removed, and adds modular support for using
2902 (license license:lgpl2.1+)))
2904 (define-public single-application-qt5
2905 ;; Change in function signature, nheko requires at least this commit
2906 (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053"))
2908 (name "single-application-qt5")
2909 (version (string-append "3.2.0-" (string-take commit 7)))
2915 (url "https://github.com/itay-grudev/SingleApplication")
2917 (file-name (git-file-name name version))
2920 "163aa2x2qb0h8w26si5ql833ilj427jjbdwlz1p2p8iaq6dh0vq1"))))
2921 (build-system cmake-build-system)
2923 `(#:tests? #f ; no check target
2924 ;; Projects can decide how to build this library. You might need to
2925 ;; override this flag (QApplication, QGuiApplication or
2926 ;; QCoreApplication).
2927 #:configure-flags '("-DQAPPLICATION_CLASS=QApplication")
2929 (modify-phases %standard-phases
2930 ;; No install target, install things manually
2932 (lambda* (#:key inputs outputs source #:allow-other-keys)
2933 (let* ((qt (assoc-ref inputs "qtbase"))
2934 (qt-version ,(version-major (package-version qtbase-5)))
2935 (out (assoc-ref outputs "out")))
2937 "libSingleApplication.a" (string-append out "/lib"))
2941 (string-append source "/" file)
2942 (string-append out "/include")))
2943 '("SingleApplication"
2944 "singleapplication.h" "singleapplication_p.h"))
2948 (home-page "https://github.com/itay-grudev/SingleApplication")
2949 (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6")
2951 "SingleApplication is a replacement of the QtSingleApplication for Qt5 and Qt6.
2953 It keeps the Primary Instance of your Application and kills each subsequent
2954 instances. It can (if enabled) spawn secondary (non-related to the primary)
2955 instances and can send data to the primary instance from secondary
2957 (license license:expat))))
2959 (define-public python-sip
2966 (uri (list (pypi-uri "sip" version)
2967 (string-append "https://www.riverbankcomputing.com/static/"
2968 "Downloads/sip/" version
2969 "/sip-" version ".tar.gz")))
2972 "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"))))
2973 (build-system python-build-system)
2975 (list python-wrapper))
2977 (list python-toml python-packaging))
2978 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
2979 (synopsis "Python binding creator for C and C++ libraries")
2981 "SIP is a tool to create Python bindings for C and C++ libraries. It
2982 was originally developed to create PyQt, the Python bindings for the Qt
2983 toolkit, but can be used to create bindings for any C or C++ library.
2985 SIP comprises a code generator and a Python module. The code generator
2986 processes a set of specification files and generates C or C++ code, which
2987 is then compiled to create the bindings extension module. The SIP Python
2988 module provides support functions to the automatically generated code.")
2989 ;; There is a choice between a python like license, gpl2 and gpl3.
2990 ;; For compatibility with pyqt, we need gpl3.
2991 (license license:gpl3)))
2993 (define-public python-sip-4
2995 (inherit python-sip)
3001 (uri (list (pypi-uri "sip" version)
3002 (string-append "https://www.riverbankcomputing.com/static/"
3003 "Downloads/sip/" version
3004 "/sip-" version ".tar.gz")))
3007 "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"))))
3008 (build-system gnu-build-system)
3010 `(("python" ,python-wrapper)))
3011 (propagated-inputs `())
3013 `(#:tests? #f ; no check target
3014 #:imported-modules ((guix build python-build-system)
3015 ,@%gnu-build-system-modules)
3016 #:modules ((srfi srfi-1)
3017 ((guix build python-build-system) #:select (python-version))
3018 ,@%gnu-build-system-modules)
3020 (modify-phases %standard-phases
3022 (lambda* (#:key inputs outputs #:allow-other-keys)
3023 (let* ((out (assoc-ref outputs "out"))
3024 (bin (string-append out "/bin"))
3025 (include (string-append out "/include"))
3026 (python (assoc-ref inputs "python"))
3027 (lib (string-append out "/lib/python"
3028 (python-version python)
3030 (invoke "python" "configure.py"
3033 "--incdir" include)))))))
3034 (license license:gpl3)))
3036 (define-public python-pyqt
3038 (name "python-pyqt")
3043 ;; PyPI is the canonical distribution point of PyQt. Older
3044 ;; releases are available from the web site.
3045 (uri (list (pypi-uri "PyQt5" version)
3046 (string-append "https://www.riverbankcomputing.com/static/"
3047 "Downloads/PyQt5/" version "/PyQt5-"
3048 version ".tar.gz")))
3049 (file-name (string-append "PyQt5-" version ".tar.gz"))
3052 "0aya963kkmbwfwmpd0p6k85y4g7wl5zarjqxxfgir403zalbf4dl"))
3053 (patches (search-patches "pyqt-configure.patch"))))
3054 (build-system gnu-build-system)
3056 (list qtbase-5)) ; for qmake
3058 (list python-sip python-pyqt5-sip))
3060 `(("python" ,python-wrapper)
3061 ("qtbase" ,qtbase-5)
3062 ("qtconnectivity" ,qtconnectivity)
3063 ("qtdeclarative-5" ,qtdeclarative-5)
3064 ("qtlocation" ,qtlocation)
3065 ("qtmultimedia-5" ,qtmultimedia-5)
3066 ("qtsensors" ,qtsensors)
3067 ("qtserialport" ,qtserialport)
3068 ("qtsvg-5" ,qtsvg-5)
3069 ("qttools-5" ,qttools-5)
3070 ("qtwebchannel-5" ,qtwebchannel-5)
3071 ("qtwebkit" ,qtwebkit)
3072 ("qtwebsockets-5" ,qtwebsockets-5)
3073 ("qtx11extras" ,qtx11extras)
3074 ("qtxmlpatterns" ,qtxmlpatterns)))
3076 `(#:modules ((srfi srfi-1)
3077 ((guix build python-build-system) #:select (python-version))
3078 ,@%gnu-build-system-modules)
3079 #:imported-modules ((guix build python-build-system)
3080 ,@%gnu-build-system-modules)
3082 (modify-phases %standard-phases
3083 ;; When building python-pyqtwebengine, <qprinter.h> can not be
3084 ;; included. Here we substitute the full path to the header in the
3086 (add-before 'configure 'substitute-source
3087 (lambda* (#:key inputs #:allow-other-keys)
3088 (let* ((qtbase (assoc-ref inputs "qtbase"))
3089 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
3090 (substitute* "sip/QtPrintSupport/qprinter.sip"
3095 (lambda* (#:key inputs outputs #:allow-other-keys)
3096 (let* ((out (assoc-ref outputs "out"))
3097 (bin (string-append out "/bin"))
3098 (sip (string-append out "/share/sip"))
3099 (plugins (string-append out "/lib/qt5/plugins"))
3100 (designer (string-append plugins "/designer"))
3101 (qml (string-append plugins "/PyQt5"))
3102 (python (assoc-ref inputs "python"))
3103 (lib (string-append out "/lib/python"
3104 (python-version python)
3106 (stubs (string-append lib "/PyQt5")))
3107 (invoke "python" "configure.py"
3111 "--designer-plugindir" designer
3112 "--qml-plugindir" qml
3113 ; Where to install the PEP 484 Type Hints stub
3114 ; files. Without this the stubs are tried to be
3115 ; installed into the python package's
3116 ; site-package directory, which is read-only.
3118 "--sipdir" sip)))))))
3119 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
3120 (synopsis "Python bindings for Qt")
3122 "PyQt is a set of Python v2 and v3 bindings for the Qt application
3123 framework. The bindings are implemented as a set of Python modules and
3124 contain over 620 classes.")
3125 (license license:gpl3)))
3127 (define-public python-pyqt5-sip
3129 (name "python-pyqt5-sip")
3134 (uri (pypi-uri "PyQt5_sip" version))
3137 "09771b6fdn0rx34l5a0wzcd899yd57zxp5sw3bsqhd25biwhiq4p"))))
3138 (build-system python-build-system)
3140 `(#:tests? #f)) ;; No test code.
3141 (home-page "https://www.riverbankcomputing.com/software/sip/")
3142 (synopsis "Sip module support for PyQt5")
3143 (description "Sip module support for PyQt5")
3144 (license license:lgpl2.1+)))
3146 (define-public python-pyqtwebengine
3148 (name "python-pyqtwebengine")
3153 ;; The newest releases are only available on PyPI. Older ones
3154 ;; are mirrored at the upstream home page.
3155 (uri (list (pypi-uri "PyQtWebEngine" version)
3156 (string-append "https://www.riverbankcomputing.com/static"
3157 "/Downloads/PyQtWebEngine/" version
3158 "/PyQtWebEngine-" version ".tar.gz")))
3161 "0hdr0g0rzlhsnylhfk826pq1lw8p9dqcr8yma2wy9dgjrj6n0ixb"))))
3162 (build-system gnu-build-system)
3164 (list python python-sip
3165 ;; qtbase is required for qmake
3168 `(("python" ,python-wrapper)
3169 ("python-sip" ,python-sip)
3170 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3171 ("qtbase" ,qtbase-5)
3172 ("qtsvg-5" ,qtsvg-5)
3173 ("qtdeclarative-5" ,qtdeclarative-5)
3174 ("qtwebchannel-5" ,qtwebchannel-5)
3175 ("qtwebengine-5" ,qtwebengine-5)))
3177 `(#:modules ((srfi srfi-1)
3178 ((guix build python-build-system) #:select (python-version))
3179 ,@%gnu-build-system-modules)
3180 #:imported-modules ((guix build python-build-system)
3181 ,@%gnu-build-system-modules)
3183 (modify-phases %standard-phases
3185 (lambda* (#:key inputs outputs #:allow-other-keys)
3186 (let* ((out (assoc-ref outputs "out"))
3187 (sipdir (string-append out "/share/sip"))
3188 (pyqt-sipdir (string-append
3189 (assoc-ref inputs "python-pyqt") "/share/sip"))
3190 (python (assoc-ref inputs "python"))
3191 (lib (string-append out "/lib/python"
3192 (python-version python)
3193 "/site-packages/PyQt5"))
3194 (stubs (string-append lib "/PyQt5")))
3197 (invoke "python" "configure.py"
3204 "--pyqt-sipdir" pyqt-sipdir))))
3205 ;; Because this has a different prefix than python-pyqt then we need
3206 ;; to make this a namespace of its own.
3207 (add-after 'install 'make-namespace
3208 (lambda* (#:key inputs outputs #:allow-other-keys)
3209 (let* ((__init__.py (string-append
3210 (assoc-ref outputs "out")
3212 (python-version (assoc-ref inputs "python"))
3213 "/site-packages/PyQt5/__init__.py")))
3214 (with-output-to-file __init__.py
3215 (lambda _ (display "
3216 from pkgutil import extend_path
3217 __path__ = extend_path(__path__, __name__)
3220 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
3221 (synopsis "Python bindings for QtWebEngine")
3223 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
3224 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
3225 set of three modules. Prior to v5.12 these bindings were part of PyQt
3227 (license license:gpl3)))
3229 ;; XXX: This is useful for removing qtwebkit from other packages' dependency
3230 ;; graphs, as well as for preventing python-pyqtwebengine from transitively
3231 ;; depending on qtwebkit.
3232 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
3233 ;; packages that could be used together.
3234 (define-public python-pyqt-without-qtwebkit
3235 (package/inherit python-pyqt
3236 (name "python-pyqt-without-qtwebkit")
3238 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
3240 (define-public python-pyqt-builder
3242 (name "python-pyqt-builder")
3247 (uri (pypi-uri "PyQt-builder" version))
3250 "0nh0054c54ji3sm6d268fccf0y5f613spswwgwqd3rnn816hnljl"))))
3251 (build-system python-build-system)
3254 (home-page "https://www.riverbankcomputing.com/static/Docs/PyQt-builder/")
3255 (synopsis "PEP 517 compliant PyQt build system")
3256 (description "PyQt-builder is a tool for generating Python bindings for C++
3257 libraries that use the Qt application framework. The bindings are built on
3258 top of the PyQt bindings for Qt. PyQt-builder is used to build PyQt itself.")
3259 ;; Either version 2 or 3, but no other version. See the file
3260 ;; 'pyqtbuild/builder.py' in the source distribution for more information.
3261 (license (list license:gpl2 license:gpl3))))
3263 (define-public python-qtpy
3265 (name "python-qtpy")
3270 (uri (pypi-uri "QtPy" version))
3273 "051rj10lbv2ny48lz34zhclcbdxxdbk4di2mdk91m9143w91npyq"))))
3274 (build-system python-build-system)
3275 (propagated-inputs (list python-packaging))
3277 `(;; Not all supported bindings are packaged. Especially PyQt4.
3279 (home-page "https://github.com/spyder-ide/qtpy")
3281 "Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets")
3283 "Provides an abstraction layer on top of the various Qt bindings
3284 (PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
3285 (license license:expat)))
3287 (define-public python-qt.py
3289 (name "python-qt.py")
3294 (uri (pypi-uri "Qt.py" version))
3296 (base32 "07rvfwzjl378j75j2va0c6xylwx16icxa6dycsjgjc329pgpng40"))))
3297 (build-system python-build-system)
3298 (native-inputs (list python-pyqt))
3299 (home-page "https://github.com/mottosso/Qt.py")
3300 (synopsis "Abstraction layer for Python Qt bindings")
3302 "This package provides an abstraction layer on top of the various Qt
3303 bindings (PySide, PySide2, PyQt4 and PyQt5).")
3304 (license license:expat)))
3306 (define-public qscintilla
3312 (uri (string-append "https://www.riverbankcomputing.com/static"
3313 "/Downloads/QScintilla/" version
3314 "/QScintilla-" version ".tar.gz"))
3317 "19r0vpqb4m9bqwxmjp9w6x0hgahkrg7zryk78hwgplj7vdbn0d77"))))
3318 (build-system gnu-build-system)
3321 (modify-phases %standard-phases
3323 (lambda* (#:key outputs #:allow-other-keys)
3324 (let ((out (assoc-ref outputs "out")))
3326 (substitute* "qscintilla.pro"
3327 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
3328 (string-append out "/lib"))
3329 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
3330 (string-append out "/include"))
3331 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
3332 (string-append out "/translations"))
3333 (("\\$\\$\\[QT_INSTALL_DATA\\]")
3334 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
3335 (("\\$\\$\\[QT_HOST_DATA\\]")
3336 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
3337 (invoke "qmake")))))))
3338 (native-inputs (list qtbase-5))
3339 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
3340 (synopsis "Qt port of the Scintilla C++ editor control")
3341 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3342 editor control. QScintilla includes features especially useful when editing
3343 and debugging source code. These include support for syntax styling, error
3344 indicators, code completion and call tips.")
3345 (license license:gpl3+)))
3347 (define-public python-qscintilla
3348 (package/inherit qscintilla
3349 (name "python-qscintilla")
3352 (list "--pyqt=PyQt5"
3353 (string-append "--pyqt-sipdir="
3354 (assoc-ref %build-inputs "python-pyqt")
3356 (string-append "--qsci-incdir="
3357 (assoc-ref %build-inputs "qscintilla")
3359 (string-append "--qsci-libdir="
3360 (assoc-ref %build-inputs "qscintilla")
3363 (modify-phases %standard-phases
3365 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
3366 (let ((out (assoc-ref outputs "out"))
3367 (python (assoc-ref inputs "python")))
3369 (apply invoke "python3" "configure.py"
3371 ;; Install to the right directory
3372 (substitute* '("Makefile"
3374 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
3375 (((string-append python "/lib"))
3376 (string-append out "/lib")))
3377 ;; And fix the installed.txt file
3378 (substitute* "installed.txt"
3379 (("/gnu/store/[^/]+") out)))
3382 `(("qscintilla" ,qscintilla)
3384 ("python-pyqt" ,python-pyqt)))
3385 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3386 editor control. QScintilla includes features especially useful when editing
3387 and debugging source code. These include support for syntax styling, error
3388 indicators, code completion and call tips.
3390 This package provides the Python bindings.")))
3392 ;; PyQt only looks for modules in its own directory. It ignores environment
3393 ;; variables such as PYTHONPATH, so we need to build a union package to make
3395 (define-public python-pyqt+qscintilla
3396 (package/inherit python-pyqt
3397 (name "python-pyqt+qscintilla")
3399 (build-system trivial-build-system)
3401 '(#:modules ((guix build union))
3403 (use-modules (ice-9 match)
3405 (match %build-inputs
3406 (((names . directories) ...)
3407 (union-build (assoc-ref %outputs "out")
3411 `(("python-pyqt" ,python-pyqt)
3412 ("python-qscintilla" ,python-qscintilla)))
3413 (synopsis "Union of PyQt and the Qscintilla extension")
3415 "This package contains the union of PyQt and the Qscintilla extension.")))
3417 (define-public qtkeychain
3425 (url "https://github.com/frankosterfeld/qtkeychain/")
3426 (commit (string-append "v" version))))
3427 (file-name (git-file-name name version))
3430 "1zk6r2vc1q48qs7mw2h47bpgrfbb9r7lf9cwq4sb1a4nls87zznk"))))
3431 (build-system cmake-build-system)
3433 (list pkg-config qttools-5))
3435 (list libsecret qtbase-5))
3437 `(#:tests? #f ; No tests included
3439 (modify-phases %standard-phases
3440 (add-before 'configure 'set-qt-trans-dir
3442 (substitute* "CMakeLists.txt"
3443 (("\\$\\{qt_translations_dir\\}")
3444 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations")))))))
3445 (home-page "https://github.com/frankosterfeld/qtkeychain")
3446 (synopsis "Qt API to store passwords")
3448 "QtKeychain is a Qt library to store passwords and other secret data
3449 securely. It will not store any data unencrypted unless explicitly requested.")
3450 (license license:bsd-3)))
3452 (define-public qtsolutions
3453 (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
3456 (name "qtsolutions")
3457 (version (git-version "0" revision commit))
3462 (url "https://github.com/qtproject/qt-solutions")
3464 (file-name (git-file-name name version))
3466 (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
3467 (modules '((guix build utils)
3471 ;; Unvendor QtLockFile from QtSingleApplication.
3473 (with-directory-excursion "qtsingleapplication/src"
3474 (for-each delete-file
3475 (find-files "." "qtlockedfile.*\\.(h|cpp)"))
3476 (substitute* "qtsingleapplication.pri"
3477 ;; Add include path of LockedFile.
3478 (("INCLUDEPATH \\+=")
3479 "INCLUDEPATH += ../../qtlockedfile/src")
3480 ;; Link library of LockedFile.
3482 "LIBS += -lQtSolutions_LockedFile"))
3483 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
3484 (("#include \"qtlockedfile.*\\.cpp\"") "")
3485 ;; Unwrap namespace added in the vendoring process.
3486 (("QtLP_Private::QtLockedFile")
3489 (build-system gnu-build-system)
3491 `(#:tests? #f ; No target
3493 ((guix build copy-build-system)
3494 ,@%gnu-build-system-modules)
3496 (((guix build copy-build-system) #:prefix copy:)
3497 (guix build gnu-build-system)
3500 (modify-phases %standard-phases
3501 (add-after 'unpack 'patch-source
3502 (lambda* (#:key outputs #:allow-other-keys)
3503 (substitute* (find-files "." "common.pri")
3504 ;; Remove unnecessary prefixes/suffixes in library names.
3507 ;; Disable building of examples.
3508 (substitute* (find-files "." "\\.pro$")
3509 (("SUBDIRS\\+=examples") ""))
3510 ;; Fix deprecated functions.
3511 (substitute* "qtsoap/src/qtsoap.cpp"
3512 (("toAscii") "toUtf8"))
3516 (for-each (lambda (solution)
3517 (with-directory-excursion solution
3518 (invoke "./configure" "-library")
3520 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3521 "qtsingleapplication" "qtsoap"))
3525 (for-each (lambda (solution)
3526 (with-directory-excursion solution
3528 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3529 "qtsingleapplication" "qtsoap"))
3533 (for-each (lambda (solution)
3534 (with-directory-excursion solution
3536 (assoc-ref copy:%standard-phases 'install)
3538 '(("src" "include" #:include-regexp ("\\.h$"))
3541 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3542 "qtsingleapplication" "qtsoap")))))))
3545 (synopsis "Collection of Qt extensions")
3546 (description "QtSolutions is a set of components extending Qt.
3548 @item QtLockedFile: A class that extends QFile with advisory locking functions.
3549 @item QtPropertyBrowser: A framework that enables the user to edit a set of
3551 @item QtService: A helper for writing services such as Unix daemons.
3552 @item QtSingleApplication: A component that provides support for applications
3553 that can be only started once per user.
3554 @item QtSoap: A component that provides basic web service support with version
3555 1.1 of the SOAP protocol.
3557 (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
3558 (license (list license:bsd-3
3559 ;; QScriptParser and QScriptGrammar specifically allow
3560 ;; redistribution under GPL3 or LGPL2.1
3561 license:gpl3 license:lgpl2.1)))))
3571 (string-append "mirror://sourceforge/qwt/qwt/"
3572 version "/qwt-" version ".tar.bz2"))
3574 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
3575 (build-system gnu-build-system)
3577 (list qtbase-5 qtsvg-5 qttools-5))
3580 (modify-phases %standard-phases
3582 (lambda* (#:key outputs #:allow-other-keys)
3583 (let* ((out (assoc-ref outputs "out"))
3584 (docdir (string-append out "/share/doc/qwt"))
3585 (incdir (string-append out "/include/qwt"))
3586 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
3587 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
3588 (substitute* '("qwtconfig.pri")
3589 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
3590 (format #f "~a = ~a\n" x out))
3591 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
3592 (format #f "~a = ~a\n" x docdir))
3593 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
3594 (format #f "~a = ~a\n" x incdir))
3595 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
3596 (format #f "~a = ~a\n" x pluginsdir))
3597 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
3598 (format #f "~a = ~a\n" x featuresdir)))
3599 (substitute* '("doc/doc.pro")
3600 ;; We'll install them in the 'install-man-pages' phase.
3601 (("^unix:doc\\.files.*") ""))
3603 (add-after 'install 'install-man-pages
3604 (lambda* (#:key outputs #:allow-other-keys)
3605 (let* ((out (assoc-ref outputs "out"))
3606 (man (string-append out "/share/man")))
3607 ;; Remove some incomplete manual pages.
3608 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
3610 (copy-recursively "doc/man" man)
3612 (home-page "http://qwt.sourceforge.net")
3613 (synopsis "Qt widgets for plots, scales, dials and other technical software
3616 "The Qwt library contains widgets and components which are primarily useful
3617 for technical and scientific purposes. It includes a 2-D plotting widget,
3618 different kinds of sliders, and much more.")
3621 ;; The Qwt license is LGPL2.1 with some exceptions.
3622 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
3623 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
3624 license:lgpl2.1 license:gpl3))))
3626 (define-public qtwebkit
3629 (version "5.212.0-alpha4")
3633 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
3634 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
3637 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
3638 (patches (search-patches "qtwebkit-pbutils-include.patch"
3639 "qtwebkit-fix-building-with-bison-3.7.patch"
3640 "qtwebkit-fix-building-with-glib-2.68.patch"
3641 "qtwebkit-fix-building-with-icu-68.patch"
3642 "qtwebkit-fix-building-with-python-3.9.patch"))))
3643 (build-system cmake-build-system)
3655 ("gst-plugins-base" ,gst-plugins-base)
3656 ("libjpeg" ,libjpeg-turbo)
3658 ("libwebp" ,libwebp)
3660 ("fontconfig" ,fontconfig)
3661 ("libxrender" ,libxrender)
3662 ("qtbase" ,qtbase-5)
3663 ("qtdeclarative-5" ,qtdeclarative-5)
3664 ("qtlocation" ,qtlocation)
3665 ("qtmultimedia-5" ,qtmultimedia-5)
3666 ("qtsensors" ,qtsensors)
3667 ("qtwebchannel-5" ,qtwebchannel-5)
3668 ("libxml2" ,libxml2)
3669 ("libxslt" ,libxslt)
3671 ("libxcomposite" ,libxcomposite)))
3673 `(#:tests? #f ; no apparent tests; it might be necessary to set
3674 ; ENABLE_API_TESTS, see CMakeLists.txt
3676 ;; Parallel builds fail due to a race condition:
3677 ;; <https://bugs.gnu.org/34062>.
3678 #:parallel-build? #f
3680 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
3682 "-DUSE_LIBHYPHEN=OFF"
3683 "-DUSE_SYSTEM_MALLOC=ON"
3684 ;; XXX: relative dir installs to build dir?
3685 (string-append "-DECM_MKSPECS_INSTALL_DIR="
3686 %output "/lib/qt5/mkspecs/modules")
3687 ;; Sacrifice a little speed in order to link
3688 ;; libraries and test executables in a
3689 ;; reasonable amount of memory.
3690 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
3691 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
3692 (home-page "https://www.webkit.org")
3693 (synopsis "Web browser engine and classes to render and interact with web
3695 (description "QtWebKit provides a Web browser engine that makes it easy to
3696 embed content from the World Wide Web into your Qt application. At the same
3697 time Web content can be enhanced with native controls.")
3698 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
3699 ;; room for slower or busy hardware.
3700 (properties '((timeout . 64800))) ;18 hours
3702 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
3703 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
3704 ;; disable it on non-Intel platforms.
3705 (supported-systems '("x86_64-linux" "i686-linux"))
3707 (license license:lgpl2.1+)))
3709 (define-public dotherside
3717 (url "https://github.com/filcuc/DOtherSide")
3718 (commit (string-append "v" version))))
3719 (file-name (git-file-name name version))
3722 "13n2qb8q9jz4ihwlbs7y15lw90w9113gb1bgnb1dggpxkj64r953"))))
3723 (build-system cmake-build-system)
3727 ;; TODO: Support Qt 6 (requires qtdeclarative of Qt6).
3728 (list qtbase-5 qtdeclarative-5))
3729 (home-page "https://filcuc.github.io/DOtherSide/index.html")
3730 (synopsis "C language library for creating bindings for the Qt QML language")
3732 "DOtherSide is a C language library for creating bindings for the
3733 QT QML language. The following features are implementable from
3736 @item Creating custom QObject
3737 @item Creating custom QAbstractListModels
3738 @item Creating custom properties, signals and slots
3739 @item Creating from QML QObject defined in the binded language
3740 @item Creating from Singleton QML QObject defined in the binded language
3742 (license license:lgpl3))) ;version 3 only (+ exception)
3744 ;; There have been no public releases yet.
3745 (define-public qtcolorwidgets
3746 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
3749 (name "qtcolorwidgets")
3750 (version (git-version "0" revision commit))
3754 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3756 (file-name (git-file-name name version))
3759 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
3760 (build-system cmake-build-system)
3761 (arguments `(#:tests? #f)) ; There are no tests
3766 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3767 (synopsis "Color management widgets")
3768 (description "QtColorWidgets provides a Qt color dialog that is more
3769 user-friendly than the default @code{QColorDialog} and several other
3770 color-related widgets.")
3771 ;; Includes a license exception for combining with GPL2 code.
3772 (license license:lgpl3+))))
3774 (define-public qcustomplot
3776 (name "qcustomplot")
3781 (uri (string-append "https://www.qcustomplot.com/release/"
3782 version "fixed" "/QCustomPlot.tar.gz"))
3784 (base32 "1324kqyj1v1f8k8d7b15gc3apwz9qxx52p86hvchg33hjdlqhskx"))))
3786 `(("qcustomplot-sharedlib"
3789 (uri (string-append "https://www.qcustomplot.com/release/"
3790 version "fixed" "/QCustomPlot-sharedlib.tar.gz"))
3792 (base32 "0vp8lpxvd1nlp4liqrlvslpqrgfn0wpiwizzdsjbj22zzb8vxikc"))))))
3795 (build-system gnu-build-system)
3798 (modify-phases %standard-phases
3799 (add-after 'unpack 'unpack-extra-files
3800 (lambda* (#:key inputs #:allow-other-keys)
3801 (invoke "tar" "-xvf" (assoc-ref inputs "qcustomplot-sharedlib"))))
3803 (lambda* (#:key outputs #:allow-other-keys)
3804 (chdir "qcustomplot-sharedlib/sharedlib-compilation")
3805 (substitute* "sharedlib-compilation.pro"
3806 ;; Don't build debug library.
3807 (("debug_and_release")
3810 (string-append "DESTDIR="
3811 (assoc-ref outputs "out")
3813 (add-after 'install 'install-header
3814 (lambda* (#:key outputs #:allow-other-keys)
3815 (install-file "../../qcustomplot.h"
3816 (string-append (assoc-ref outputs "out")
3818 (home-page "https://www.qcustomplot.com/")
3819 (synopsis "Qt widget for plotting and data visualization")
3821 "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts.")
3822 (license license:gpl3+)))
3824 ;; TODO: Split shiboken2 binding generator into a dedicated output.
3825 ;; This executable requires libxml2, libxslt, clang-toolchain at runtime.
3826 ;; The libshiboken library only requires Qt and Python at runtime.
3827 (define-public python-shiboken-2
3829 (name "python-shiboken-2")
3833 (uri (string-append "https://download.qt.io/official_releases"
3834 "/QtForPython/pyside2/PySide2-" version
3835 "-src/pyside-setup-opensource-src-"
3839 "0cwvw6695215498rsbm2xzkwaxdr3w7zfvy4kc62c01k6pxs881r"))))
3840 (build-system cmake-build-system)
3842 (list clang-toolchain
3851 ;; FIXME: Building tests fails
3852 #:configure-flags #~(list "-DBUILD_TESTS=off")
3854 #~(modify-phases %standard-phases
3855 (add-after 'unpack 'use-shiboken-dir-only
3856 (lambda _ (chdir "sources/shiboken2") #t))
3857 (add-before 'configure 'make-files-writable-and-update-timestamps
3859 ;; The build scripts need to modify some files in
3860 ;; the read-only source directory, and also attempts
3861 ;; to create Zip files which fails because the Zip
3862 ;; format does not support timestamps before 1980.
3863 (let ((circa-1980 (* 10 366 24 60 60)))
3864 (for-each (lambda (file)
3865 (make-file-writable file)
3866 (utime file circa-1980 circa-1980))
3869 (add-before 'configure 'set-build-env
3871 (let ((llvm #$(this-package-input "clang-toolchain")))
3872 (setenv "CLANG_INSTALL_DIR" llvm)
3874 (home-page "https://wiki.qt.io/Qt_for_Python")
3876 "Shiboken generates bindings for C++ libraries using CPython source code")
3878 "Shiboken generates bindings for C++ libraries using CPython source code")
3881 ;; The main code is GPL3 or LGPL3.
3882 ;; Examples are BSD-3.
3887 (define-public python-shiboken-6
3889 (inherit python-shiboken-2)
3890 (name "python-shiboken-6")
3894 (uri (string-append "https://download.qt.io/official_releases"
3895 "/QtForPython/pyside6/PySide6-" version
3896 "-src/pyside-setup-opensource-src-"
3900 "0xwri69nnbhn6fajm7l045r0s0qv8nlq6qj8wcj87srli3b5xa75"))))
3901 (build-system cmake-build-system)
3903 (modify-inputs (package-inputs python-shiboken-2)
3904 (replace "qtbase" qtbase)
3905 (delete "qtxmlpatterns")))
3907 (substitute-keyword-arguments (package-arguments python-shiboken-2)
3909 #~(modify-phases #$p
3910 (replace 'use-shiboken-dir-only
3911 (lambda _ (chdir "sources/shiboken6") #t))))
3912 ((#:configure-flags flags)
3914 ;; The RUNPATH of shibokenmodule contains the entry in build
3915 ;; directory instead of install directory.
3916 "-DCMAKE_SKIP_RPATH=TRUE"
3917 (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath="
3921 (define-public python-pyside-2
3923 (name "python-pyside-2")
3924 (version (package-version python-shiboken-2))
3925 (source (package-source python-shiboken-2))
3926 (build-system cmake-build-system)
3947 (list python-shiboken-2))
3949 (list python-wrapper))
3953 ;; FIXME: Building tests fail.
3955 #~(list "-DBUILD_TESTS=FALSE"
3956 (string-append "-DPYTHON_EXECUTABLE="
3957 (search-input-file %build-inputs
3959 #:modules '((guix build cmake-build-system)
3963 #~(modify-phases %standard-phases
3964 (add-after 'unpack 'go-to-source-dir
3965 (lambda _ (chdir "sources/pyside2") #t))
3966 (add-after 'go-to-source-dir 'fix-qt-module-detection
3968 ;; Activate qt module support even if it not in the same
3969 ;; directory as qtbase.
3970 (substitute* "../cmake_helpers/helpers.cmake"
3971 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
3973 ;; Add include directories for qt modules.
3974 (let ((dirs (map (lambda (path)
3975 (string-append path "/include/qt5"))
3977 #$@(map (lambda (name)
3978 (this-package-input name))
3995 "qtxmlpatterns"))))))
3996 (substitute* "cmake/Macros/PySideModules.cmake"
3997 (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all)
3998 (fold (lambda (dir paths)
3999 (string-append paths "${PATH_SEP}" dir))
4002 (setenv "CXXFLAGS" (fold (lambda (dir paths)
4003 (string-append paths " -I" dir))
4006 (home-page "https://wiki.qt.io/Qt_for_Python")
4008 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
4010 "The Qt for Python product enables the use of Qt5 APIs in Python
4011 applications. It lets Python developers utilize the full potential of Qt,
4012 using the PySide2 module. The PySide2 module provides access to the
4013 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
4014 comes with the Shiboken2 CPython binding code generator, which can be used to
4015 generate Python bindings for your C or C++ code.")
4019 ;; this file may be used under the terms of the GNU General
4020 ;; Public License version 2.0 or (at your option) the GNU
4021 ;; General Public license version 3 or any later version
4022 ;; approved by the KDE Free Qt Foundation.
4023 ;; Thus, it is currently v2 or v3, but no "+".
4027 (define-public python-pyside-6
4029 (inherit python-pyside-2)
4030 (name "python-pyside-6")
4031 (version (package-version python-shiboken-6))
4032 (source (package-source python-shiboken-6))
4033 ;; TODO: Add more Qt components if available.
4046 (list python-shiboken-6))
4048 (list python-wrapper))
4053 #~(list "-DBUILD_TESTS=FALSE"
4054 (string-append "-DPYTHON_EXECUTABLE="
4055 (search-input-file %build-inputs
4058 #~(modify-phases %standard-phases
4059 (add-after 'unpack 'go-to-source-dir
4060 (lambda _ (chdir "sources/pyside6") #t))
4061 (add-after 'go-to-source-dir 'fix-qt-module-detection
4063 (substitute* "cmake/PySideHelpers.cmake"
4064 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
4066 (let ((dirs (map (lambda (path)
4067 (string-append path "/include/qt6"))
4069 #$@(map (lambda (name)
4070 (this-package-input name))
4079 "qtwebsockets"))))))
4080 (substitute* "cmake/Macros/PySideModules.cmake"
4081 (("set\\(shiboken_include_dir_list " all)
4082 (string-append all (string-join dirs ";") " ")))
4086 (string-append "-I" dir))
4090 "The Qt for Python product enables the use of Qt6 APIs in Python applications")
4092 "The Qt for Python product enables the use of Qt6 APIs in Python
4093 applications. It lets Python developers utilize the full potential of Qt,
4094 using the PySide6 module. The PySide6 module provides access to the
4095 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
4096 comes with the Shiboken6 CPython binding code generator, which can be used to
4097 generate Python bindings for your C or C++ code.")))
4099 (define-public python-pyside-2-tools
4101 (name "python-pyside-2-tools")
4102 (version (package-version python-shiboken-2))
4103 (source (package-source python-shiboken-2))
4104 (build-system cmake-build-system)
4106 (list python-pyside-2 python-shiboken-2 qtbase-5))
4108 (list python-wrapper))
4113 #~(list "-DBUILD_TESTS=off"
4114 (string-append "-DPYTHON_EXECUTABLE="
4115 (search-input-file %build-inputs
4118 #~(modify-phases %standard-phases
4119 (add-after 'unpack 'go-to-source-dir
4120 (lambda _ (chdir "sources/pyside2-tools") #t)))))
4121 (home-page "https://wiki.qt.io/Qt_for_Python")
4123 "Command line tools for PySide2")
4125 "Python-pyside-2-tools contains lupdate, rcc and uic tools for PySide2")
4126 (license license:gpl2)))
4128 (define-public libqglviewer
4130 (name "libqglviewer")
4135 (string-append "http://libqglviewer.com/src/libQGLViewer-"
4139 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
4140 (build-system gnu-build-system)
4142 '(#:tests? #f ; no check target
4144 (list (string-append "PREFIX="
4145 (assoc-ref %outputs "out")))
4147 (modify-phases %standard-phases
4149 (lambda* (#:key make-flags #:allow-other-keys)
4150 (apply invoke (cons "qmake" make-flags)))))))
4152 (list qtbase-5 qttools-5))
4155 (home-page "http://libqglviewer.com")
4156 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
4158 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
4159 of OpenGL 3D viewers.
4161 It provides some of the typical 3D viewer functionalities, such as the
4162 possibility to move the camera using the mouse, which lacks in most of the
4163 other APIs. Other features include mouse manipulated frames, interpolated
4164 keyFrames, object selection, stereo display, screenshot saving and much more.
4165 It can be used by OpenGL beginners as well as to create complex applications,
4166 being fully customizable and easy to extend.")
4167 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
4169 (license (list license:gpl2 license:gpl3))))
4171 (define-public qhexedit
4179 (url "https://github.com/Simsys/qhexedit2")
4180 (commit (string-append "v" version))))
4181 (file-name (git-file-name name version))
4183 (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
4184 (build-system gnu-build-system)
4187 (modify-phases %standard-phases
4188 (add-after 'unpack 'fix-path
4189 (lambda* (#:key outputs #:allow-other-keys)
4190 (substitute* "src/qhexedit.pro"
4191 (("^unix:DESTDIR = /usr/lib")
4192 (string-append "unix:DESTDIR = "
4193 (assoc-ref outputs "out") "/lib")))))
4197 (invoke "qmake" "qhexedit.pro")))
4198 (add-after 'install 'install-headers
4199 (lambda* (#:key outputs #:allow-other-keys)
4200 (let* ((out (assoc-ref outputs "out"))
4201 (include-dir (string-append out "/include")))
4202 (mkdir-p include-dir)
4203 (for-each (lambda (file)
4204 (install-file file include-dir))
4205 (find-files "." "\\.h$"))))))))
4206 (inputs (list qtbase-5))
4207 (native-inputs (list qttools-5))
4208 (home-page "https://simsys.github.io")
4209 (synopsis "Binary editor widget for Qt")
4211 "@code{QHexEdit} is a hex editor widget for the Qt framework. It is a
4212 simple editor for binary data, just like @code{QPlainTextEdit} is for text
4214 (license license:lgpl2.1)))
4217 (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
4221 (version (git-version "1.6.0" revision commit-ref))
4226 (url "https://github.com/coin3d/soqt")
4229 (file-name (git-file-name name version))
4231 (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
4232 (build-system cmake-build-system)
4233 (arguments '(#:tests? #f)) ; There are no tests
4235 (list pkg-config cmake))
4237 (list qtbase-5 coin3D-4))
4238 (home-page "https://github.com/coin3d/soqt")
4239 (synopsis "Qt GUI component toolkit library for Coin")
4240 (description "SoQt is a Qt GUI component toolkit library for Coin. It is
4241 also compatible with SGI and TGS Open Inventor, and the API is based on the API
4242 of the InventorXt GUI component toolkit.")
4243 (license license:bsd-3))))
4245 (define-public libdbusmenu-qt
4247 (name "libdbusmenu-qt")
4248 (version "0.9.3+16.04.20160218-0ubuntu1")
4252 ;; Download from github rather than launchpad because launchpad trunk
4253 ;; tarball hash is not deterministic.
4255 (url "https://github.com/unity8-team/libdbusmenu-qt")
4257 (file-name (git-file-name name version))
4259 (base32 "0b7ii1cvmpcyl79gqal9c3va9m55h055s4hx7fpxkhhqs9463ggg"))))
4260 (build-system cmake-build-system)
4262 ;; XXX: Tests require a dbus session and some icons.
4268 (home-page "https://launchpad.net/libdbusmenu-qt")
4269 (synopsis "Qt implementation of the DBusMenu spec")
4270 (description "This library provides a Qt implementation of the DBusMenu
4271 protocol. The DBusMenu protocol makes it possible for applications to export
4272 and import their menus over DBus.")
4273 (license license:lgpl2.1+)))
4275 (define-public kdsoap
4282 (uri (string-append "https://github.com/KDAB/KDSoap/releases/download/"
4283 "kdsoap-" version "/kdsoap-" version ".tar.gz"))
4286 "1vh4rzb09kks1ilay1y60q7gf64gwzdwsca60hmx1xx69w8672fi"))))
4287 (build-system qt-build-system)
4288 (inputs `(("qtbase" ,qtbase-5)))
4290 '(#:configure-flags '("-DKDSoap_TESTS=true")
4292 (modify-phases %standard-phases
4294 (lambda* (#:key tests? #:allow-other-keys)
4296 (invoke "ctest" "-E" ;; These tests try connect to the internet.
4297 "(kdsoap-webcalls|kdsoap-webcalls_wsdl|kdsoap-test_calc)"))
4299 (home-page "https://www.kdab.com/development-resources/qt-tools/kd-soap/")
4300 (synopsis "Qt SOAP component")
4301 (description "KD SOAP is a tool for creating client applications for web
4302 services using the XML based SOAP protocol and without the need for a dedicated
4304 (license (list license:gpl2 license:gpl3))))
4307 ;;; Avoid adding new packages to the end of this file. To reduce the chances
4308 ;;; of a merge conflict, place them above by existing packages with similar
4309 ;;; functionality or similar names.