1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
10 ;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018, 2020, 2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
12 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
13 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
15 ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
16 ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
17 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
18 ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
19 ;;; Copyright © 2020 TomZ <tomz@freedommail.ch>
20 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
21 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
22 ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
23 ;;; Copyright © 2021, 2022 Brendan Tildesley <mail@brendan.scot>
24 ;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
25 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
26 ;;; Copyright © 2022 Foo Chuan Wei <chuanwei.foo@hotmail.com>
27 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
29 ;;; This file is part of GNU Guix.
31 ;;; GNU Guix is free software; you can redistribute it and/or modify it
32 ;;; under the terms of the GNU General Public License as published by
33 ;;; the Free Software Foundation; either version 3 of the License, or (at
34 ;;; your option) any later version.
36 ;;; GNU Guix is distributed in the hope that it will be useful, but
37 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 ;;; GNU General Public License for more details.
41 ;;; You should have received a copy of the GNU General Public License
42 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44 (define-module (gnu packages qt)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix packages)
47 #:use-module (guix download)
48 #:use-module (guix git-download)
49 #:use-module (guix build-system cmake)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system trivial)
52 #:use-module (guix build-system python)
53 #:use-module (guix build-system qt)
54 #:use-module (guix gexp)
55 #:use-module (guix packages)
56 #:use-module (guix deprecation)
57 #:use-module (guix utils)
58 #:use-module (gnu packages)
59 #:use-module (gnu packages bash)
60 #:use-module (gnu packages base)
61 #:use-module (gnu packages bison)
62 #:use-module (gnu packages cmake)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages cups)
65 #:use-module (gnu packages curl)
66 #:use-module (gnu packages databases)
67 #:use-module (gnu packages documentation)
68 #:use-module (gnu packages enchant)
69 #:use-module (gnu packages fontutils)
70 #:use-module (gnu packages flex)
71 #:use-module (gnu packages freedesktop)
72 #:use-module (gnu packages gcc)
73 #:use-module (gnu packages ghostscript)
74 #:use-module (gnu packages gl)
75 #:use-module (gnu packages glib)
76 #:use-module (gnu packages gnome)
77 #:use-module (gnu packages gnupg)
78 #:use-module (gnu packages gperf)
79 #:use-module (gnu packages graphics)
80 #:use-module (gnu packages gstreamer)
81 #:use-module (gnu packages gtk)
82 #:use-module (gnu packages icu4c)
83 #:use-module (gnu packages image)
84 #:use-module (gnu packages kde-frameworks)
85 #:use-module (gnu packages libevent)
86 #:use-module (gnu packages linux)
87 #:use-module (gnu packages llvm)
88 #:use-module (gnu packages maths)
89 #:use-module (gnu packages markup)
90 #:use-module (gnu packages networking)
91 #:use-module (gnu packages ninja)
92 #:use-module (gnu packages node)
93 #:use-module (gnu packages nss)
94 #:use-module (gnu packages pciutils)
95 #:use-module (gnu packages pcre)
96 #:use-module (gnu packages perl)
97 #:use-module (gnu packages pkg-config)
98 #:use-module (gnu packages pulseaudio)
99 #:use-module (gnu packages protobuf)
100 #:use-module (gnu packages python)
101 #:use-module (gnu packages python-build)
102 #:use-module (gnu packages python-xyz)
103 #:use-module (gnu packages python-web)
104 #:use-module (gnu packages regex)
105 #:use-module (gnu packages ruby)
106 #:use-module (gnu packages sdl)
107 #:use-module (gnu packages serialization)
108 #:use-module (gnu packages sqlite)
109 #:use-module (gnu packages telephony)
110 #:use-module (gnu packages tls)
111 #:use-module (gnu packages valgrind)
112 #:use-module (gnu packages video)
113 #:use-module (gnu packages vulkan)
114 #:use-module (gnu packages xdisorg)
115 #:use-module (gnu packages xiph)
116 #:use-module (gnu packages xorg)
117 #:use-module (gnu packages xml)
118 #:use-module (srfi srfi-1))
121 (let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
125 (version (git-version "0" revision commit))
131 (url "https://github.com/Ri0n/qite")
133 (file-name (git-file-name name version))
135 (base32 "0jmmgy9pvk9hwwph1nwy7hxhczy8drhl4ymhnjjn6yx7bckssvsq"))))
136 (build-system qt-build-system)
138 `(#:tests? #f ; no target
140 (modify-phases %standard-phases
141 (add-after 'unpack 'chdir
146 (list qtbase-5 qtmultimedia-5))
147 (home-page "https://github.com/Ri0n/qite/")
148 (synopsis "Qt Interactive Text Elements")
149 (description "Qite manages interactive elements on QTextEdit.")
150 (license license:asl2.0))))
160 (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
162 (base32 "14742vs32m98nbfb5mad0i8ciff5f45gfcb5v03p4hh2dvhhqgfn"))))
163 (build-system qt-build-system)
166 #:tests? #f ; No target
168 #~(modify-phases %standard-phases
169 (add-after 'unpack 'patch
171 (substitute* '("src/qt5ct-qtplugin/CMakeLists.txt"
172 "src/qt5ct-style/CMakeLists.txt")
173 (("\\$\\{PLUGINDIR\\}")
174 (string-append #$output "/lib/qt5/plugins"))))))))
179 (synopsis "Qt5 Configuration Tool")
180 (description "Qt5CT is a program that allows users to configure Qt5
181 settings (such as icons, themes, and fonts) in desktop environments or
182 window managers, that don't provide Qt integration by themselves.")
183 (home-page "https://qt5ct.sourceforge.io/")
184 (license license:bsd-2)))
186 (define-public materialdecoration
187 (let ((commit "6a5de23f2e5162fbee39d16f938473ff970a2ec0")
190 (name "materialdecoration")
192 (git-version "1.1.0" revision commit))
198 (url "https://github.com/lirios/materialdecoration.git")
201 (git-file-name name version))
203 (base32 "1zdrcb39fhhmn76w8anv1dnspz26pdl6izmj1mlm02aza4y8ffp4"))
204 (modules '((guix build utils)
209 (delete-file-recursively "cmake/3rdparty")))))
210 (build-system qt-build-system)
212 `(#:tests? #f ; No target
215 (string-append "-DCMAKE_CXX_FLAGS=-I"
216 #$(this-package-input "qtbase")
217 "/include/qt5/QtXkbCommonSupport/"
218 #$(package-version qtbase-5)))))
220 (list cmake-shared extra-cmake-modules pkg-config))
222 `(("qtbase" ,qtbase-5)
223 ("qtwayland" ,qtwayland)
225 ("xkbcommon" ,libxkbcommon)))
226 (synopsis "Material Decoration for Qt")
227 (description "MaterialDecoration is a client-side decoration for Qt
228 applications on Wayland.")
229 (home-page "https://github.com/lirios/materialdecoration")
230 (license license:lgpl3+))))
232 (define-public grantlee
240 (url "https://github.com/steveire/grantlee")
241 (commit (string-append "v" version))))
242 (file-name (git-file-name name version))
244 (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
246 ;; Optional: lcov and cccc, both are for code coverage
249 (list qtbase-5 qtdeclarative-5 qtscript))
250 (build-system cmake-build-system)
253 (modify-phases %standard-phases
254 (add-before 'check 'check-setup
256 ;; make Qt render "offscreen", required for tests
257 (setenv "QT_QPA_PLATFORM" "offscreen")
259 (home-page "https://github.com/steveire/grantlee")
260 (synopsis "Libraries for text templating with Qt")
261 (description "Grantlee Templates can be used for theming and generation of
262 other text such as code. The syntax uses the syntax of the Django template
263 system, and the core design of Django is reused in Grantlee.")
264 (license license:lgpl2.1+)))
266 (define (qt-urls component version)
267 "Return a list of URLs for VERSION of the Qt5 COMPONENT."
268 ;; We can't use a mirror:// scheme because these URLs are not exact copies:
269 ;; the layout differs between them.
270 (list (string-append "https://download.qt.io/official_releases/qt/"
271 (version-major+minor version) "/" version
272 "/submodules/" component "-everywhere-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
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 qtserialport
1500 (package (inherit qtsvg-5)
1501 (name "qtserialport")
1505 (uri (qt-urls name version))
1508 "0xg2djwhrj5jqamawlp75g70nmwbp2ph2hh1pm45s36jkxm0k7al"))))
1509 (native-inputs (list perl))
1511 (list qtbase-5 eudev))
1513 (substitute-keyword-arguments (package-arguments qtsvg-5)
1515 `(modify-phases ,phases
1516 (add-after 'unpack 'patch-dlopen-paths
1517 (lambda* (#:key inputs #:allow-other-keys)
1518 (substitute* "src/serialport/qtudev_p.h"
1519 ;; Use the absolute paths for dynamically loaded libs,
1520 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1521 ;; typically is not set in guix.
1522 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1523 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))))))))
1524 (synopsis "Qt Serial Port module")
1525 (description "The Qt Serial Port module provides the library for
1526 interacting with serial ports from within Qt.")))
1528 (define-public qtserialbus
1529 (package (inherit qtsvg-5)
1530 (name "qtserialbus")
1534 (uri (qt-urls name version))
1537 "180gm1jvqfn0h3251zafdd1wd3af00phwaa5qljsbrj6s6ywj79j"))))
1539 (substitute-keyword-arguments (package-arguments qtsvg-5)
1540 ((#:phases phases '%standard-phases)
1541 `(modify-phases ,phases
1542 (add-after 'unpack 'patch-libsocketcan-reference
1543 (lambda* (#:key inputs #:allow-other-keys)
1544 (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
1545 (libcansocket.so (string-append libcansocket
1546 "/lib/libsocketcan.so")))
1547 (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
1548 (("QStringLiteral\\(\"socketcan\"\\)")
1549 (format #f "QStringLiteral(~s)" libcansocket.so))))))))))
1551 (list libsocketcan qtbase-5 qtserialport))
1552 (synopsis "Qt Serial Bus module")
1553 (description "The Qt Serial Bus API provides classes and functions to
1554 access the various industrial serial buses and protocols, such as CAN, ModBus,
1557 (define-public qtwebchannel-5
1558 (package (inherit qtsvg-5)
1559 (name "qtwebchannel")
1563 (uri (qt-urls name version))
1566 "1w8mcpdqlphgg3a6yfq18liwlj2nkwrafv0n80h242x5l2mk3ljf"))))
1568 (list perl qtdeclarative-5 qtwebsockets-5))
1569 (inputs (list qtbase-5))
1570 (synopsis "Web communication library for Qt")
1571 (description "The Qt WebChannel module enables peer-to-peer communication
1572 between the host (QML/C++ application) and the client (HTML/JavaScript
1573 application). The transport mechanism is supported out of the box by the two
1574 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1576 (define-public qtwebchannel
1578 (name "qtwebchannel")
1582 (uri (qt-urls name version))
1585 "0s16zx3qn3byldvhmsnwijm8rmizk8vpqj7fnwhjg6c67z10m8ma"))))
1586 (build-system cmake-build-system)
1589 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1590 #:phases #~(modify-phases %standard-phases
1591 (delete 'check) ;move after install
1592 (add-after 'install 'prepare-for-tests
1594 (setenv "QT_QPA_PLATFORM" "offscreen")
1595 (setenv "QML2_IMPORT_PATH"
1596 (string-append #$output "/lib/qt6/qml:"
1597 (getenv "QML2_IMPORT_PATH")))))
1598 (add-after 'prepare-for-tests 'check
1599 (assoc-ref %standard-phases 'check))
1600 (add-after 'check 'delete-installed-tests
1602 (delete-file-recursively
1603 (string-append #$output "/tests")))))))
1604 (native-inputs (list perl))
1605 (inputs (list qtbase qtdeclarative qtwebsockets))
1606 (home-page (package-home-page qtbase))
1607 (synopsis "Web communication library for Qt")
1608 (description "The Qt WebChannel module enables peer-to-peer communication
1609 between the host (QML/C++ application) and the client (HTML/JavaScript
1611 (license (package-license qtbase))))
1613 (define-public qtwebglplugin
1614 (package (inherit qtsvg-5)
1615 (name "qtwebglplugin")
1619 (uri (qt-urls name version))
1622 "1m0p4ssykw07lbip2qyv6w34f8ng13bxb63j0w446f5w0492nn9f"))))
1624 (substitute-keyword-arguments (package-arguments qtsvg-5)
1626 `(modify-phases ,phases
1627 (add-after 'unpack 'disable-network-tests
1628 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1629 (("webgl") "# webgl"))))))))
1632 (list mesa qtbase-5 qtdeclarative-5 qtwebsockets-5 zlib))
1633 (synopsis "QPA plugin for running an application via a browser using
1634 streamed WebGL commands")
1635 (description "Qt back end that uses WebGL for rendering. It allows Qt
1636 applications (with some limitations) to run in a web browser that supports
1637 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1638 compatible web browser without the use of plug-ins. The API is similar to
1639 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1641 (define-public qtwebview
1642 (package (inherit qtsvg-5)
1647 (uri (qt-urls name version))
1650 "0arwaky3jy5ql3z4d8f7k7diidzb1kncdans7pn50hsa1bzacfal"))))
1654 (list qtbase-5 qtdeclarative-5))
1655 (synopsis "Display web content in a QML application")
1656 (description "Qt WebView provides a way to display web content in a QML
1657 application without necessarily including a full web browser stack by using
1658 native APIs where it makes sense.")))
1660 (define-public qtlocation
1661 (package (inherit qtsvg-5)
1666 (uri (qt-urls name version))
1669 "0mlhhhcxx3gpr9kh04c6fljxcj50c2j21r0wb9f7d7nk4flip7b2"))))
1671 (substitute-keyword-arguments (package-arguments qtsvg-5)
1672 ((#:tests? _ #f) #f) ; TODO: Enable the tests
1674 `(modify-phases ,phases
1675 (add-before 'check 'pre-check
1677 (setenv "HOME" "/tmp")))))))
1679 (list perl qtdeclarative-5 qtquickcontrols-5 qtserialport))
1681 (list icu4c openssl qtbase-5 zlib))
1682 (synopsis "Qt Location and Positioning modules")
1683 (description "The Qt Location module provides an interface for location,
1684 positioning and geolocation plugins.")))
1686 (define-public qtlottie
1692 (uri (qt-urls name version))
1695 "1x8wmc6gwmxk92zjcsrbhrbqbfvnk7302ggghld5wk8jk5lsf2vl"))))
1696 (build-system cmake-build-system)
1699 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1701 #~(modify-phases %standard-phases
1702 (delete 'check) ;move after install
1703 (add-after 'install 'prepare-for-tests
1705 (setenv "QT_QPA_PLATFORM" "offscreen")
1706 (setenv "QML2_IMPORT_PATH"
1707 (string-append #$output "/lib/qt6/qml:"
1708 (getenv "QML2_IMPORT_PATH"))))))))
1709 (native-inputs (list perl))
1710 (inputs (list libxkbcommon qtbase qtdeclarative))
1711 (home-page (package-home-page qtbase))
1712 (synopsis "QML API for rendering Bodymovin graphics and animations")
1713 (description "Qt Lottie Animation provides a QML API for rendering
1714 graphics and animations that are exported in JSON format by the Bodymovin
1715 plugin for Adobe After Effects.")
1716 (license (package-license qtbase))))
1718 (define-public qttools-5
1719 (package (inherit qtsvg-5)
1724 (uri (qt-urls name version))
1727 "0v7wkzq9i8w3qrw0z8al7lb6clr57lfisyb1fm9cnhi73fvph1vd"))))
1729 (substitute-keyword-arguments (package-arguments qtsvg-5)
1730 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1732 (list perl qtdeclarative-5 vulkan-headers))
1734 (list mesa qtbase-5))
1735 (synopsis "Qt Tools and Designer modules")
1736 (description "The Qt Tools module provides a set of applications to browse
1737 the documentation, translate applications, generate help files and other stuff
1738 that helps in Qt development.")))
1740 (define-public qttools
1746 (uri (qt-urls name version))
1749 "1h96w4bzkbd80vr7lh6hnypdlmbzc1y52c2zrqzvkgm3587pa4n4"))))
1750 (build-system cmake-build-system)
1753 ;; The build system attempts to fetch online resources and fails when
1754 ;; building the test suite.
1755 #:configure-flags #~(list "-DQT_BUILD_TESTS=OFF")))
1756 (native-inputs (list perl qtdeclarative vulkan-headers))
1757 (inputs (list libxkbcommon mesa qtbase))
1758 (home-page (package-home-page qtbase))
1759 (synopsis "Qt Tools and Designer modules")
1760 (description "The Qt Tools module provides a set of applications to browse
1761 the documentation, translate applications, generate help files and other stuff
1762 that helps in Qt development.")
1763 ;; GPL 3 only with Qt GPL exception 1.0 (see:
1764 ;; LICENSES/Qt-GPL-exception-1.0.txt).
1765 (license (list license:gpl3))))
1767 (define-public qtscript
1768 (package (inherit qtsvg-5)
1773 (uri (qt-urls name version))
1776 "17yk0p8ci47xlfpllc17arlycng47wrnnskimskzz85bspabc8pm"))
1777 (patches (search-patches "qtscript-disable-tests.patch"))))
1779 (list perl qttools-5))
1782 (synopsis "Qt Script module")
1783 (description "Qt provides support for application scripting with ECMAScript.
1784 The following guides and references cover aspects of programming with
1785 ECMAScript and Qt.")))
1787 (define-public qtquickcontrols-5
1788 (package (inherit qtsvg-5)
1789 (name "qtquickcontrols")
1793 (uri (qt-urls name version))
1796 "0mjw25wcgd2bvjz9rr4qjydb423c63615rcx1vws4jmydqdihssr"))))
1798 (substitute-keyword-arguments (package-arguments qtsvg-5)
1799 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1801 (list qtbase-5 qtdeclarative-5))
1802 (synopsis "Qt Quick Controls and other Quick modules")
1803 (description "The QtScript module provides classes for making Qt
1804 applications scriptable. This module provides a set of extra components that
1805 can be used to build complete interfaces in Qt Quick.")))
1807 (define-public qtquickcontrols2-5
1808 (package (inherit qtsvg-5)
1809 (name "qtquickcontrols2")
1813 (uri (qt-urls name version))
1816 "1cxg4ml07k1zcyi5m4lx06sz8f5l67isb5vhk7nakxm0wnn7p8y4"))))
1818 (substitute-keyword-arguments (package-arguments qtsvg-5)
1819 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1821 (list qtbase-5 qtdeclarative-5))
1822 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1823 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1824 module that provides platform integration: native dialogs, menus and menu bars,
1825 and tray icons. It falls back to Qt Widgets when a native implementation is
1828 (define-public qtquickcontrols2
1829 ;; qtquickcontrols2 still exist, but was merged into qtdeclarative.
1830 ;; Unfortunately that hasn't been well communicated at all (see:
1831 ;; https://bugreports.qt.io/browse/QTBUG-79454).
1832 (deprecated-package "qtquickcontrols2" qtdeclarative))
1834 (define-public qtgraphicaleffects
1835 (package (inherit qtsvg-5)
1836 (name "qtgraphicaleffects")
1840 (uri (qt-urls name version))
1843 "0xznn5zqp6xrqfgl54l8cig9asqf9m2hz0p3ga514rh8spmdazr3"))))
1845 (substitute-keyword-arguments (package-arguments qtsvg-5)
1846 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1848 (list qtbase-5 qtdeclarative-5))
1849 (synopsis "Qt Graphical Effects module")
1850 (description "The Qt Graphical Effects module provides a set of QML types
1851 for adding visually impressive and configurable effects to user interfaces.
1852 Effects are visual items that can be added to Qt Quick user interface as UI
1853 components. The API consists of over 20 effects provided as separate QML
1854 types. The effects cover functional areas such as blending, masking, blurring,
1855 coloring, and many more.")))
1857 (define-public qtgamepad
1858 (package (inherit qtsvg-5)
1863 (uri (qt-urls name version))
1866 "0wa4d8f025hlp4bmdzdy5wcahm9wjg6bkwig8dpw9nrsj3idz5b0"))))
1868 (list perl pkg-config))
1870 `(("fontconfig" ,fontconfig)
1871 ("freetype" ,freetype)
1872 ("libxrender" ,libxrender)
1874 ("qtbase" ,qtbase-5)
1875 ("qtdeclarative-5" ,qtdeclarative-5)))
1876 (synopsis "Qt Gamepad module")
1877 (description "The Qt Gamepad module is an add-on library that enables Qt
1878 applications to support the use of gamepad hardware and in some cases remote
1879 control equipment. The module provides both QML and C++ interfaces. The
1880 primary target audience are embedded devices with fullscreen user interfaces,
1881 and mobile applications targeting TV-like form factors.")))
1883 (define-public qtscxml
1884 (package (inherit qtsvg-5)
1889 (uri (qt-urls name version))
1892 "0xf5mqsrw16h8xjglymgfc8qg2qa5bi4fgdl4j3dkhvvpr7vrphp"))
1893 (modules '((guix build utils)))
1896 (delete-file-recursively "tests/3rdparty")
1897 ;; the scion test refers to the bundled 3rd party test code.
1898 (substitute* "tests/auto/auto.pro"
1899 (("scion") "#"))))))
1901 (substitute-keyword-arguments (package-arguments qtsvg-5)
1902 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1904 (list qtbase-5 qtdeclarative-5))
1905 (synopsis "Qt SCXML module")
1906 (description "The Qt SCXML module provides functionality to create state
1907 machines from SCXML files. This includes both dynamically creating state
1908 machines (loading the SCXML file and instantiating states and transitions) and
1909 generating a C++ file that has a class implementing the state machine. It
1910 also contains functionality to support data models and executable content.")))
1912 (define-public qtpositioning
1914 (name "qtpositioning")
1918 (uri (qt-urls name version))
1921 "0v78wamvdw02kf9rq7m5v24q2g6jmgq4ch0fnfa014p1r978wy06"))))
1922 (build-system cmake-build-system)
1925 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1926 #:phases #~(modify-phases %standard-phases
1927 (add-after 'install 'delete-installed-tests
1929 (delete-file-recursively
1930 (string-append #$output "/tests")))))))
1931 (inputs (list perl qtbase))
1932 (home-page (package-home-page qtbase))
1933 (synopsis "QML and C++ positioning information API")
1934 (description "The Qt Positioning API provides positioning information via
1935 QML and C++ interfaces. The Qt Positioning API lets you to determine a
1936 position by using a variety of possible sources, including satellite, wifi, or
1937 text files. That information can then be used to, for example, determine a
1938 position on a map. In addition, you can use to the API to retrieve satellite
1939 information and perform area based monitoring.")
1940 (license (package-license qtbase))))
1942 (define-public qtpurchasing
1943 (package (inherit qtsvg-5)
1944 (name "qtpurchasing")
1948 (uri (qt-urls name version))
1951 "04z6mwzn73gg56hgs7gividinfgndx4kmcnp7w6h3wamrdlkfdx7"))))
1953 (list qtbase-5 qtdeclarative-5))
1954 (synopsis "Qt Purchasing module")
1955 (description "The Qt Purchasing module provides and in-app API for
1956 purchasing goods and services.")))
1958 (define-public qtcharts
1959 (package (inherit qtsvg-5)
1964 (uri (qt-urls name version))
1967 "0y051i1837bfybkf8cm7cx8k5wjmbi47pxawaaz6wm0hd2z5b4qi"))))
1969 (substitute-keyword-arguments (package-arguments qtsvg-5)
1971 `(modify-phases ,phases
1972 (add-after 'unpack 'remove-failing-test
1974 (substitute* "tests/auto/auto.pro"
1976 (("qml-qtquicktest") "# qml-qtquicktest"))))))))
1978 (list qtbase-5 qtdeclarative-5))
1979 (synopsis "Qt Charts module")
1980 (description "The Qt Charts module provides a set of easy to use chart
1981 components. It uses the Qt Graphics View Framework, therefore charts can be
1982 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1983 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1984 selecting one of the charts themes.")
1985 (license license:gpl3)))
1987 (define-public qtdatavis3d
1988 (package (inherit qtsvg-5)
1989 (name "qtdatavis3d")
1993 (uri (qt-urls name version))
1996 "0sczwqlc36jdywf7bqxz0hm6mr7fn8p1fsnc33jliiqzn9yrg77x"))))
1998 (substitute-keyword-arguments (package-arguments qtsvg-5)
1999 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2001 (list qtbase-5 qtdeclarative-5))
2002 (synopsis "Qt Data Visualization module")
2003 (description "The Qt Data Visualization module provides a way to visualize
2004 data in 3D as bar, scatter, and surface graphs. It is especially useful for
2005 visualizing depth maps and large quantities of rapidly changing data, such as
2006 data received from multiple sensors. The look and feel of graphs can be
2007 customized by using themes or by adding custom items and labels to them.")
2008 (license license:gpl3)))
2010 (define-public qtnetworkauth-5
2011 (package (inherit qtsvg-5)
2012 (name "qtnetworkauth")
2016 (uri (qt-urls name version))
2019 "0c7mz715rlpg0cqgs6s0aszmslyamkhnpamc1iij6i571sj5j2f1"))))
2022 (synopsis "Qt Network Authorization module")
2023 (description "The Qt Network Authorization module provides an
2024 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
2026 (define-public qtnetworkauth
2028 (name "qtnetworkauth")
2032 (uri (qt-urls name version))
2035 "0apvsb2ip1m3kw8vi9spvf6f6q72ys8vr40rpyysi7shsjwm83yn"))))
2036 (build-system cmake-build-system)
2037 (arguments (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")))
2038 (native-inputs (list perl))
2039 (inputs (list qtbase))
2040 (home-page (package-home-page qtbase))
2041 (synopsis "Qt Network Authorization module")
2042 (description "The Qt Network Authorization module provides an
2043 implementation of OAuth and OAuth2 authenticathon methods for Qt.")
2044 (license (package-license qtbase))))
2046 (define-public qtremoteobjects
2047 (package (inherit qtsvg-5)
2048 (name "qtremoteobjects")
2052 (uri (qt-urls name version))
2055 "1m0xcqlbxsfn0cd4ajin1h3i4l51dajmkw91v0r4a61xi14i0kks"))))
2057 (substitute-keyword-arguments (package-arguments qtsvg-5)
2059 `(modify-phases ,phases
2060 (add-after 'unpack 'remove-failing-test
2062 ;; This test can't find its imports.
2063 (substitute* "tests/auto/qml/qml.pro"
2064 (("integration") "# integration")
2065 (("usertypes") "# usertypes"))
2066 ;; disable failing tests: they need network
2067 (substitute* "tests/auto/auto.pro"
2068 (("integration_multiprocess proxy_multiprocess integration_external restart")
2069 "integration_multiprocess"))))))))
2071 (list qtbase-5 qtdeclarative-5))
2072 (synopsis "Qt Remote Objects module")
2073 (description "The Qt Remote Objects module is an @dfn{inter-process
2074 communication} (IPC) module developed for Qt. The idea is to extend existing
2075 Qt's functionalities to enable an easy exchange of information between
2076 processes or computers.")))
2078 (define-public qtspeech
2079 (package (inherit qtsvg-5)
2084 (uri (qt-urls name version))
2087 "0xskp9dzjy5nqszygk8gwvjyiylgynx5sq3nk2vi3zwgfdh5jpm4"))))
2089 (substitute-keyword-arguments (package-arguments qtsvg-5)
2090 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2094 (list perl qtdeclarative-5 qtmultimedia-5 qtxmlpatterns))
2095 (synopsis "Qt Speech module")
2096 (description "The Qt Speech module enables a Qt application to support
2097 accessibility features such as text-to-speech, which is useful for end-users
2098 who are visually challenged or cannot access the application for whatever
2099 reason. The most common use case where text-to-speech comes in handy is when
2100 the end-user is driving and cannot attend the incoming messages on the phone.
2101 In such a scenario, the messaging application can read out the incoming
2104 (define-public qtspell
2112 (url "https://github.com/manisandro/qtspell")
2114 (file-name (git-file-name name version))
2116 (base32 "19ff6jzm699wrxrk57w3d4kl9qxgdipdikpwls9n4aqv4mw7g969"))))
2117 (build-system cmake-build-system)
2119 `(#:tests? #f)) ;no test
2121 (list pkg-config qttools-5))
2123 (list enchant qtbase-5))
2124 (home-page "https://github.com/manisandro/qtspell")
2125 (synopsis "Spell checking for Qt text widgets")
2127 "QtSpell adds spell-checking functionality to Qt's text widgets,
2128 using the Enchant spell-checking library.")
2129 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
2130 (license license:gpl2+)))
2132 (define-public qtwebengine-5
2135 (name "qtwebengine")
2140 (uri (qt-urls name version))
2143 "0zahr9w6rqdxwh2whsgk3fhcszs7wa9j95lq4sqi8xzin2wcgl17"))
2144 (modules '((ice-9 ftw)
2148 (guix build utils)))
2151 (let ((preserved-third-party-files
2152 '("base/third_party/double_conversion"
2153 "base/third_party/cityhash"
2154 "base/third_party/cityhash_v103"
2155 "base/third_party/dynamic_annotations"
2156 "base/third_party/icu"
2157 "base/third_party/libevent"
2158 "base/third_party/nspr"
2159 "base/third_party/superfasthash"
2160 "base/third_party/symbolize"
2161 "base/third_party/xdg_mime"
2162 "base/third_party/xdg_user_dirs"
2163 "net/third_party/mozilla_security_manager"
2164 "net/third_party/nss"
2165 "net/third_party/quiche"
2166 "net/third_party/uri_template"
2167 "third_party/abseil-cpp"
2169 "third_party/angle/src/common/third_party/base"
2170 "third_party/angle/src/common/third_party/smhasher"
2171 "third_party/angle/src/common/third_party/xxhash"
2172 "third_party/angle/src/third_party/compiler"
2173 "third_party/axe-core"
2175 "third_party/boringssl"
2176 "third_party/boringssl/src/third_party/fiat"
2177 "third_party/breakpad"
2178 "third_party/brotli"
2179 "third_party/catapult/common/py_vulcanize/py_vulcanize"
2180 "third_party/catapult/common/py_vulcanize/third_party"
2181 "third_party/catapult/third_party/beautifulsoup4"
2182 "third_party/catapult/third_party/html5lib-python"
2183 "third_party/catapult/third_party/polymer/components"
2184 "third_party/catapult/tracing"
2185 "third_party/catapult/tracing/third_party"
2188 "third_party/closure_compiler"
2189 "third_party/crashpad"
2190 "third_party/crashpad/crashpad/third_party/lss"
2191 "third_party/crashpad/crashpad/third_party/zlib"
2192 "third_party/crc32c"
2195 "third_party/devtools-frontend"
2196 "third_party/devtools-frontend/src/front_end/third_party"
2197 "third_party/devtools-frontend/src/third_party/typescript"
2198 "third_party/emoji-segmenter"
2199 "third_party/ffmpeg"
2200 "third_party/googletest"
2201 "third_party/harfbuzz-ng/utils"
2202 "third_party/hunspell"
2203 "third_party/iccjpeg"
2205 "third_party/inspector_protocol"
2206 "third_party/jinja2"
2207 "third_party/jsoncpp"
2208 "third_party/jstemplate"
2209 "third_party/khronos"
2210 "third_party/leveldatabase"
2211 "third_party/libaddressinput"
2212 "third_party/libavif"
2213 "third_party/libgifcodec"
2214 "third_party/libjingle_xmpp"
2215 "third_party/libjpeg_turbo"
2216 "third_party/libpng"
2217 "third_party/libsrtp"
2218 "third_party/libsync"
2219 "third_party/libudev"
2220 "third_party/libvpx"
2221 "third_party/libwebm"
2222 "third_party/libwebp"
2223 "third_party/libxml"
2224 "third_party/libxslt"
2225 "third_party/libyuv"
2226 "third_party/lottie"
2229 "third_party/markupsafe"
2230 "third_party/mesa_headers"
2231 "third_party/metrics_proto"
2232 "third_party/modp_b64"
2235 "third_party/one_euro_filter"
2236 "third_party/openh264/src/codec/api/svc"
2239 "third_party/pdfium"
2240 "third_party/pdfium/third_party/agg23"
2241 "third_party/pdfium/third_party/base"
2242 "third_party/pdfium/third_party/freetype"
2243 "third_party/pdfium/third_party/lcms"
2244 "third_party/pdfium/third_party/libopenjpeg20"
2245 "third_party/pdfium/third_party/skia_shared"
2246 "third_party/perfetto"
2249 "third_party/polymer"
2250 "third_party/protobuf"
2251 "third_party/protobuf/third_party/six"
2252 "third_party/pyjson5"
2254 "third_party/rnnoise"
2256 "third_party/skia/include/third_party/skcms/skcms.h"
2257 "third_party/skia/include/third_party/vulkan"
2258 "third_party/skia/third_party/skcms"
2259 "third_party/smhasher"
2260 "third_party/snappy"
2261 "third_party/sqlite"
2262 "third_party/usb_ids"
2263 "third_party/usrsctp"
2264 "third_party/vulkan_memory_allocator"
2265 "third_party/web-animations-js"
2266 "third_party/webrtc"
2267 "third_party/webrtc/common_audio/third_party/ooura/fft_size_128"
2268 "third_party/webrtc/common_audio/third_party/ooura/fft_size_256"
2269 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2270 "third_party/webrtc/modules/third_party/fft"
2271 "third_party/webrtc/modules/third_party/g711"
2272 "third_party/webrtc/modules/third_party/g722"
2273 "third_party/webrtc/rtc_base/third_party/base64"
2274 "third_party/webrtc/rtc_base/third_party/sigslot"
2275 "third_party/webrtc_overrides"
2276 "third_party/widevine/cdm/widevine_cdm_common.h"
2277 "third_party/widevine/cdm/widevine_cdm_version.h"
2279 "third_party/xcbproto"
2281 "url/third_party/mozilla"
2282 "v8/src/third_party/utf8-decoder"
2283 "v8/src/third_party/valgrind"
2284 "v8/src/third_party/siphash"
2285 "v8/third_party/v8/builtins"
2286 "v8/third_party/inspector_protocol"))
2287 (protected (make-regexp "\\.(gn|gyp)i?$")))
2288 (define preserved-club
2289 (map (lambda (member)
2290 (string-append "./" member))
2291 preserved-third-party-files))
2292 (define (empty? dir)
2293 (equal? (scandir dir) '("." "..")))
2294 (define (third-party? file)
2295 (string-contains file "third_party/"))
2296 (define (useless? file)
2297 (any (cute string-suffix? <> file)
2298 '(".zip" ".so" ".dll" ".exe" ".jar")))
2299 (define (parents child)
2300 ;; Return all parent directories of CHILD up to and including
2301 ;; the closest "third_party".
2302 (let* ((dirs (match (string-split child #\/)
2303 ((dirs ... last) dirs)))
2304 (closest (list-index (lambda (dir)
2305 (string=? "third_party" dir))
2307 (delim (- (length dirs) closest)))
2308 (fold (lambda (dir prev)
2309 (cons (string-append (car prev) "/" dir)
2311 (list (string-join (list-head dirs delim) "/"))
2312 (list-tail dirs delim))))
2313 (define (remove-loudly file)
2314 (format #t "deleting ~a...~%" file)
2317 (define (delete-unwanted-files child stat flag base level)
2319 ((or 'regular 'symlink 'stale-symlink)
2320 (when (third-party? child)
2321 (unless (or (member child preserved-club)
2322 (any (cute member <> preserved-club)
2324 (regexp-exec protected child))
2325 (remove-loudly child)))
2326 (when (and (useless? child) (file-exists? child))
2327 (remove-loudly child))
2329 ('directory-processed
2330 (when (empty? child)
2335 (with-directory-excursion "src/3rdparty"
2336 ;; TODO: Try removing "gn" too for future versions of qtwebengine-5.
2337 (delete-file-recursively "ninja")
2339 (with-directory-excursion "chromium"
2340 ;; Delete bundled software and binaries that were not explicitly
2342 (nftw "." delete-unwanted-files 'depth 'physical)
2344 ;; Assert that each preserved item is present to catch removals.
2345 (for-each (lambda (third-party)
2346 (unless (file-exists? third-party)
2347 (error (format #f "~s does not exist!~%" third-party))))
2350 ;; Use relative header locations instead of hard coded ones.
2352 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2353 (("base/third_party/valgrind") "valgrind"))
2355 '("third_party/breakpad/breakpad/src/common/linux/http_upload.cc"
2356 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h")
2357 (("third_party/curl") "curl"))
2359 '("components/viz/common/gpu/vulkan_context_provider.h"
2360 "components/viz/common/resources/resource_format_utils.h"
2361 "gpu/config/gpu_info_collector_win.cc"
2362 "gpu/config/gpu_util.cc"
2363 "gpu/config/vulkan_info.h")
2364 (("third_party/vulkan_headers/include/")
2367 ;; Replace Google Analytics bundle with an empty file and hope
2369 (mkdir-p "third_party/analytics")
2370 (call-with-output-file
2371 "third_party/analytics/google-analytics-bundle.js"
2374 ;; Do not enable support for loading the Widevine DRM plugin.
2375 (substitute* "src/buildtools/config/common.pri"
2376 (("enable_widevine=true")
2377 "enable_widevine=false")))))))
2378 (build-system gnu-build-system)
2415 ;; FIXME: libxml2 needs to built with icu support though it links to
2416 ;; libxml2 configure summary still states "Checking for compatible
2417 ;; system libxml2... no"
2442 (substitute-keyword-arguments (package-arguments qtsvg-5)
2443 ((#:modules modules '())
2444 `((guix build gnu-build-system)
2446 (ice-9 textual-ports)))
2448 `(modify-phases ,phases
2449 (add-before 'configure 'substitute-source
2450 (lambda* (#:key inputs outputs #:allow-other-keys)
2451 (let ((out (assoc-ref outputs "out")))
2452 (with-atomic-file-replacement
2453 "src/buildtools/config/linux.pri"
2455 (display (get-string-all in) out)
2456 (display "\ngn_args += use_system_openh264=true\n" out)))
2457 ;; Qtwebengine is not installed into the same prefix as
2458 ;; qtbase. Some qtbase QTLibraryInfo constants will not
2459 ;; work. Replace with the full path to the qtwebengine-5
2460 ;; translations and locales in the store.
2461 (substitute* "src/core/web_engine_library_info.cpp"
2462 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
2463 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
2464 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
2465 (string-append "QLatin1String(\"" out "/share/qt5\")")))
2466 ;; Substitute full dynamic library path for nss.
2467 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2469 (search-input-file inputs "lib/nss/libnssckbi.so")))
2470 ;; Substitute full dynamic library path for udev.
2471 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2473 (search-input-file inputs "lib/libudev.so.1"))))))
2474 (add-before 'configure 'set-env
2476 ;; Avoids potential race conditions.
2477 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2478 (setenv "NINJAFLAGS"
2479 (string-append "-k1" ;less verbose build output
2480 ;; Respect the '--cores' option of 'guix build'.
2481 " -j" (number->string (parallel-job-count))))))
2484 ;; Valid QT_BUILD_PARTS variables are:
2485 ;; libs tools tests examples demos docs translations
2486 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
2487 "--webengine-printing-and-pdf=no"
2488 "--webengine-ffmpeg=system"
2489 ;; FIXME: Building qtwebengine-5 5.12.2 with
2490 ;; icu4c >= 68 fails.
2491 ;;"--webengine-icu=system"
2492 "--webengine-pepper-plugins=no"
2493 "-webengine-proprietary-codecs")))))
2494 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
2495 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
2496 ;; before running tests.
2497 ((#:tests? _ #f) #f)))
2498 (native-search-paths
2499 (list (search-path-specification
2500 (file-type 'regular)
2502 (variable "QTWEBENGINEPROCESS_PATH")
2503 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
2504 (home-page "https://wiki.qt.io/QtWebEngine")
2505 (synopsis "Qt WebEngine module")
2506 (description "The Qt5WebEngine module provides support for web applications
2507 using the Chromium browser project. The Chromium source code has Google services
2508 and binaries removed, and adds modular support for using system libraries.")
2509 (license license:lgpl2.1+)))
2511 (define-public qtwebengine
2513 (name "qtwebengine")
2518 (uri (qt-urls name version))
2521 "0ivfsqd5c0cxsnssj6z37901cf6a47w50zaqgjiysvcm3ar36ymd"))
2522 (modules '((ice-9 ftw)
2526 (guix build utils)))
2529 (let ((preserved-third-party-files
2530 '("base/third_party/double_conversion"
2531 "base/third_party/cityhash"
2532 "base/third_party/cityhash_v103"
2533 "base/third_party/dynamic_annotations"
2534 "base/third_party/icu"
2535 "base/third_party/libevent"
2536 "base/third_party/nspr"
2537 "base/third_party/superfasthash"
2538 "base/third_party/symbolize"
2539 "base/third_party/xdg_mime"
2540 "base/third_party/xdg_user_dirs"
2541 "net/third_party/mozilla_security_manager"
2542 "net/third_party/nss"
2543 "net/third_party/quiche"
2544 "net/third_party/uri_template"
2545 "third_party/abseil-cpp"
2547 "third_party/angle/src/common/third_party/base"
2548 "third_party/angle/src/common/third_party/smhasher"
2549 "third_party/angle/src/common/third_party/xxhash"
2550 "third_party/axe-core"
2552 "third_party/boringssl"
2553 "third_party/boringssl/src/third_party/fiat"
2554 "third_party/breakpad"
2555 "third_party/brotli"
2558 "third_party/closure_compiler"
2559 "third_party/crashpad"
2560 "third_party/crashpad/crashpad/third_party/lss"
2561 "third_party/crashpad/crashpad/third_party/zlib"
2562 "third_party/crc32c"
2565 "third_party/devtools-frontend"
2566 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
2567 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
2568 "third_party/emoji-segmenter"
2569 "third_party/ffmpeg"
2570 "third_party/googletest"
2571 "third_party/harfbuzz-ng/utils"
2572 "third_party/hunspell"
2573 "third_party/iccjpeg"
2575 "third_party/inspector_protocol"
2576 "third_party/jinja2"
2577 "third_party/jsoncpp"
2578 "third_party/jstemplate"
2579 "third_party/khronos"
2580 "third_party/leveldatabase"
2581 "third_party/libaddressinput"
2582 "third_party/libgifcodec"
2583 "third_party/libjingle_xmpp"
2584 "third_party/libjpeg_turbo"
2585 "third_party/libpng"
2586 "third_party/libsrtp"
2587 "third_party/libsync"
2588 "third_party/libudev"
2589 "third_party/libvpx"
2590 "third_party/libwebm"
2591 "third_party/libwebp"
2592 "third_party/libxml"
2593 "third_party/libxslt"
2594 "third_party/libyuv"
2597 "third_party/markupsafe"
2598 "third_party/mesa_headers"
2599 "third_party/metrics_proto"
2600 "third_party/modp_b64"
2602 "third_party/one_euro_filter"
2603 "third_party/openh264/src/codec/api/svc"
2606 "third_party/pdfium"
2607 "third_party/pdfium/third_party/agg23"
2608 "third_party/pdfium/third_party/base"
2609 "third_party/pdfium/third_party/freetype"
2610 "third_party/pdfium/third_party/lcms"
2611 "third_party/pdfium/third_party/libopenjpeg20"
2612 "third_party/pdfium/third_party/skia_shared"
2613 "third_party/perfetto"
2616 "third_party/polymer"
2617 "third_party/protobuf"
2618 "third_party/protobuf/third_party/six"
2619 "third_party/pyjson5"
2621 "third_party/rnnoise"
2623 "third_party/skia/include/third_party/skcms/skcms.h"
2624 "third_party/skia/include/third_party/vulkan"
2625 "third_party/skia/third_party/skcms"
2626 "third_party/skia/third_party/vulkanmemoryallocator"
2627 "third_party/smhasher"
2628 "third_party/snappy"
2629 "third_party/sqlite"
2630 "third_party/usb_ids"
2631 "third_party/usrsctp"
2632 "third_party/web-animations-js"
2633 "third_party/webrtc"
2634 "third_party/webrtc/common_audio/third_party/ooura"
2635 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2636 "third_party/webrtc/modules/third_party/fft"
2637 "third_party/webrtc/modules/third_party/g711"
2638 "third_party/webrtc/modules/third_party/g722"
2639 "third_party/webrtc/rtc_base/third_party/base64"
2640 "third_party/webrtc/rtc_base/third_party/sigslot"
2641 "third_party/webrtc_overrides"
2642 "third_party/widevine/cdm/widevine_cdm_common.h"
2643 "third_party/widevine/cdm/widevine_cdm_version.h"
2646 "url/third_party/mozilla"
2647 "v8/src/third_party/utf8-decoder"
2648 "v8/src/third_party/valgrind"
2649 "v8/src/third_party/siphash"
2650 "v8/third_party/v8/builtins"
2651 "v8/third_party/inspector_protocol"))
2652 (protected (make-regexp "\\.(gn|gyp)i?$")))
2653 (define preserved-club
2654 (map (lambda (member)
2655 (string-append "./" member))
2656 preserved-third-party-files))
2657 (define (empty? dir)
2658 (equal? (scandir dir) '("." "..")))
2659 (define (third-party? file)
2660 (string-contains file "third_party/"))
2661 (define (useless? file)
2662 (any (cute string-suffix? <> file)
2663 '(".zip" ".so" ".dll" ".exe" ".jar")))
2664 (define (parents child)
2665 ;; Return all parent directories of CHILD up to and including
2666 ;; the closest "third_party".
2667 (let* ((dirs (match (string-split child #\/)
2668 ((dirs ... last) dirs)))
2669 (closest (list-index (lambda (dir)
2670 (string=? "third_party" dir))
2672 (delim (- (length dirs) closest)))
2673 (fold (lambda (dir prev)
2674 (cons (string-append (car prev) "/" dir)
2676 (list (string-join (list-head dirs delim) "/"))
2677 (list-tail dirs delim))))
2678 (define (remove-loudly file)
2679 (format #t "deleting ~a...~%" file)
2682 (define (delete-unwanted-files child stat flag base level)
2684 ((or 'regular 'symlink 'stale-symlink)
2685 (when (third-party? child)
2686 (unless (or (member child preserved-club)
2687 (any (cute member <> preserved-club)
2689 (regexp-exec protected child))
2690 (remove-loudly child)))
2691 (when (and (useless? child) (file-exists? child))
2692 (remove-loudly child)))
2693 ('directory-processed
2694 (when (empty? child)
2698 (with-directory-excursion "src/3rdparty"
2699 (delete-file-recursively "ninja")
2701 (with-directory-excursion "chromium"
2702 ;; Delete bundled software and binaries that were not
2703 ;; explicitly preserved above.
2704 (nftw "." delete-unwanted-files 'depth 'physical)
2706 ;; Assert that each preserved item is present to catch
2708 (for-each (lambda (third-party)
2709 (unless (file-exists? third-party)
2710 (error (format #f "~s does not exist!~%"
2714 ;; Use relative header locations instead of hard coded ones.
2716 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2717 (("base/third_party/valgrind") "valgrind"))
2718 (substitute* "third_party/breakpad/breakpad/src/common/\
2719 linux/libcurl_wrapper.h"
2720 (("third_party/curl") "curl"))
2722 '("components/viz/common/gpu/vulkan_context_provider.h"
2723 "gpu/config/gpu_util.cc")
2724 (("third_party/vulkan/include/")
2727 ;; Replace Google Analytics bundle with an empty file and
2728 ;; hope no one notices.
2729 (mkdir-p "third_party/analytics")
2730 (call-with-output-file
2731 "third_party/analytics/google-analytics-bundle.js"
2734 ;; Do not enable support for loading the Widevine DRM plugin.
2735 (substitute* "src/core/CMakeLists.txt"
2736 (("enable_widevine=true")
2737 "enable_widevine=false")))))))
2738 (build-system cmake-build-system)
2741 ;; XXX: The test suite is not built by default; leave it off to save
2742 ;; some build time and resources.
2745 ;; Use the CMake ninja generator, otherwise the build fails (see:
2746 ;; https://bugreports.qt.io/browse/QTBUG-96897).
2748 ;; Manually add the NSS library prefix to the linker
2749 ;; search path, otherwise it fails to be linked (see:
2750 ;; https://bugreports.qt.io/browse/QTBUG-105053).
2751 (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-L"
2752 (search-input-directory %build-inputs "lib/nss"))
2754 ;; The PDF renderer plugin fails to build with errors such as
2755 ;; "src/3rdparty/chromium/components/pdf
2756 ;; /renderer/pdf_accessibility_tree.cc:1373:39:
2757 ;; error: use of undeclared identifier 'IDS_PDF_PAGE_INDEX'";
2759 "-DQT_FEATURE_webengine_printing_and_pdf=OFF"
2760 "-DQT_FEATURE_webengine_pepper_plugins=OFF" ;widevine
2761 "-DQT_FEATURE_system_ffmpeg=ON"
2762 ;; Do not artificially limit codec support; video decoding is
2764 "-DQT_FEATURE_webengine_proprietary_codecs=ON"
2765 "-DQT_FEATURE_webengine_system_alsa=ON"
2766 "-DQT_FEATURE_webengine_system_icu=ON"
2767 "-DQT_FEATURE_webengine_system_libxml=ON"
2768 "-DQT_FEATURE_webengine_system_libpci=ON"
2769 "-DQT_FEATURE_webengine_system_libpng=ON"
2770 "-DQT_FEATURE_webengine_system_pulseaudio=ON"
2771 "-DQT_FEATURE_webengine_system_zlib=ON")
2773 #~(modify-phases %standard-phases
2774 (add-after 'unpack 'patch-paths
2775 (lambda* (#:key inputs #:allow-other-keys)
2776 ;; Qtwebengine is not installed into the same prefix as qtbase.
2777 ;; Some qtbase QTLibraryInfo constants will not work. Replace
2778 ;; with the full path to the qtwebengine translations and
2779 ;; locales in the store.
2780 (substitute* "src/core/web_engine_library_info.cpp"
2781 (("QLibraryInfo::path\\(QLibraryInfo::TranslationsPath)")
2782 (string-append "QLatin1String(\"" #$output
2783 "/share/qt6/translations\")"))
2784 (("QLibraryInfo::path\\(QLibraryInfo::DataPath)")
2785 (string-append "QLatin1String(\"" #$output
2787 ;; Substitute full dynamic library path for nss.
2788 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2790 (search-input-file inputs "lib/nss/libnssckbi.so")))
2791 ;; Substitute full dynamic library path for udev.
2792 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2794 (search-input-file inputs "lib/libudev.so.1")))
2795 ;; Patch the location of the X11 keywoard layouts, otherwise
2796 ;; webengine *crashes* at run time when the default directory,
2797 ;; '/usr/share/X11/xkb' is empty (see:
2798 ;; https://bugreports.qt.io/browse/QTBUG-105124).
2799 (substitute* "src/3rdparty/chromium/ui/events/ozone/layout/xkb\
2800 /xkb_keyboard_layout_engine.cc"
2801 (("/usr/share/X11/xkb")
2802 (search-input-directory inputs "share/X11/xkb")))))
2803 (add-before 'configure 'prepare-build-environment
2805 ;; Avoids potential race conditions.
2806 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2807 (setenv "NINJAFLAGS"
2809 "-k1" ;less verbose build output
2810 ;; Respect the '--cores' option of 'guix build'.
2811 " -j" (number->string (parallel-job-count))))
2812 ;; Use Clang/LDD to help tame the memory requirements and hasten
2814 (setenv "AR" "llvm-ar") (setenv "NM" "llvm-nm")
2815 (setenv "CC" "clang") (setenv "CXX" "clang++")))
2817 (lambda* (#:key parallel-build? #:allow-other-keys)
2818 (apply invoke "cmake" "--build" "."
2820 `("--parallel" ,(number->string (parallel-job-count)))
2824 (invoke "cmake" "--install" "."))))))
2826 (modify-inputs (package-native-inputs qtwebengine-5)
2827 (delete "python2" "python2-six")
2834 (modify-inputs (package-inputs qtwebengine-5)
2835 (replace "qtbase" qtbase)
2836 (replace "qtdeclarative" qtdeclarative)
2837 (replace "qtmultimedia" qtmultimedia)
2838 (replace "qtwebchannel" qtwebchannel)
2839 (append libxkbfile xkeyboard-config)))
2840 (native-search-paths
2841 (list (search-path-specification
2842 (file-type 'regular)
2844 (variable "QTWEBENGINEPROCESS_PATH")
2845 (files '("lib/qt6/libexec/QtWebEngineProcess")))))
2846 (home-page "https://wiki.qt.io/QtWebEngine")
2847 (synopsis "Qt WebEngine module")
2848 (description "The Qt WebEngine module provides support for web
2849 applications using the Chromium browser project. The Chromium source code has
2850 Google services and binaries removed, and adds modular support for using
2852 (license license:lgpl2.1+)))
2854 (define-public single-application-qt5
2855 ;; Change in function signature, nheko requires at least this commit
2856 (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053"))
2858 (name "single-application-qt5")
2859 (version (string-append "3.2.0-" (string-take commit 7)))
2865 (url "https://github.com/itay-grudev/SingleApplication")
2867 (file-name (git-file-name name version))
2870 "163aa2x2qb0h8w26si5ql833ilj427jjbdwlz1p2p8iaq6dh0vq1"))))
2871 (build-system cmake-build-system)
2873 `(#:tests? #f ; no check target
2874 ;; Projects can decide how to build this library. You might need to
2875 ;; override this flag (QApplication, QGuiApplication or
2876 ;; QCoreApplication).
2877 #:configure-flags '("-DQAPPLICATION_CLASS=QApplication")
2879 (modify-phases %standard-phases
2880 ;; No install target, install things manually
2882 (lambda* (#:key inputs outputs source #:allow-other-keys)
2883 (let* ((qt (assoc-ref inputs "qtbase"))
2884 (qt-version ,(version-major (package-version qtbase-5)))
2885 (out (assoc-ref outputs "out")))
2887 "libSingleApplication.a" (string-append out "/lib"))
2891 (string-append source "/" file)
2892 (string-append out "/include")))
2893 '("SingleApplication"
2894 "singleapplication.h" "singleapplication_p.h"))
2898 (home-page "https://github.com/itay-grudev/SingleApplication")
2899 (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6")
2901 "SingleApplication is a replacement of the QtSingleApplication for Qt5 and Qt6.
2903 It keeps the Primary Instance of your Application and kills each subsequent
2904 instances. It can (if enabled) spawn secondary (non-related to the primary)
2905 instances and can send data to the primary instance from secondary
2907 (license license:expat))))
2909 (define-public python-sip
2916 (uri (list (pypi-uri "sip" version)
2917 (string-append "https://www.riverbankcomputing.com/static/"
2918 "Downloads/sip/" version
2919 "/sip-" version ".tar.gz")))
2922 "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"))))
2923 (build-system python-build-system)
2925 (list python-wrapper))
2927 (list python-toml python-packaging))
2928 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
2929 (synopsis "Python binding creator for C and C++ libraries")
2931 "SIP is a tool to create Python bindings for C and C++ libraries. It
2932 was originally developed to create PyQt, the Python bindings for the Qt
2933 toolkit, but can be used to create bindings for any C or C++ library.
2935 SIP comprises a code generator and a Python module. The code generator
2936 processes a set of specification files and generates C or C++ code, which
2937 is then compiled to create the bindings extension module. The SIP Python
2938 module provides support functions to the automatically generated code.")
2939 ;; There is a choice between a python like license, gpl2 and gpl3.
2940 ;; For compatibility with pyqt, we need gpl3.
2941 (license license:gpl3)))
2943 (define-public python-sip-4
2945 (inherit python-sip)
2951 (uri (list (pypi-uri "sip" version)
2952 (string-append "https://www.riverbankcomputing.com/static/"
2953 "Downloads/sip/" version
2954 "/sip-" version ".tar.gz")))
2957 "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"))))
2958 (build-system gnu-build-system)
2960 `(("python" ,python-wrapper)))
2961 (propagated-inputs `())
2963 `(#:tests? #f ; no check target
2964 #:imported-modules ((guix build python-build-system)
2965 ,@%gnu-build-system-modules)
2966 #:modules ((srfi srfi-1)
2967 ((guix build python-build-system) #:select (python-version))
2968 ,@%gnu-build-system-modules)
2970 (modify-phases %standard-phases
2972 (lambda* (#:key inputs outputs #:allow-other-keys)
2973 (let* ((out (assoc-ref outputs "out"))
2974 (bin (string-append out "/bin"))
2975 (include (string-append out "/include"))
2976 (python (assoc-ref inputs "python"))
2977 (lib (string-append out "/lib/python"
2978 (python-version python)
2980 (invoke "python" "configure.py"
2983 "--incdir" include)))))))
2984 (license license:gpl3)))
2986 (define-public python-pyqt
2988 (name "python-pyqt")
2993 ;; PyPI is the canonical distribution point of PyQt. Older
2994 ;; releases are available from the web site.
2995 (uri (list (pypi-uri "PyQt5" version)
2996 (string-append "https://www.riverbankcomputing.com/static/"
2997 "Downloads/PyQt5/" version "/PyQt5-"
2998 version ".tar.gz")))
2999 (file-name (string-append "PyQt5-" version ".tar.gz"))
3002 "0aya963kkmbwfwmpd0p6k85y4g7wl5zarjqxxfgir403zalbf4dl"))
3003 (patches (search-patches "pyqt-configure.patch"))))
3004 (build-system gnu-build-system)
3006 (list qtbase-5)) ; for qmake
3008 (list python-sip python-pyqt5-sip))
3010 `(("python" ,python-wrapper)
3011 ("qtbase" ,qtbase-5)
3012 ("qtconnectivity" ,qtconnectivity)
3013 ("qtdeclarative-5" ,qtdeclarative-5)
3014 ("qtlocation" ,qtlocation)
3015 ("qtmultimedia-5" ,qtmultimedia-5)
3016 ("qtsensors" ,qtsensors)
3017 ("qtserialport" ,qtserialport)
3018 ("qtsvg-5" ,qtsvg-5)
3019 ("qttools-5" ,qttools-5)
3020 ("qtwebchannel-5" ,qtwebchannel-5)
3021 ("qtwebkit" ,qtwebkit)
3022 ("qtwebsockets-5" ,qtwebsockets-5)
3023 ("qtx11extras" ,qtx11extras)
3024 ("qtxmlpatterns" ,qtxmlpatterns)))
3026 `(#:modules ((srfi srfi-1)
3027 ((guix build python-build-system) #:select (python-version))
3028 ,@%gnu-build-system-modules)
3029 #:imported-modules ((guix build python-build-system)
3030 ,@%gnu-build-system-modules)
3032 (modify-phases %standard-phases
3033 ;; When building python-pyqtwebengine, <qprinter.h> can not be
3034 ;; included. Here we substitute the full path to the header in the
3036 (add-before 'configure 'substitute-source
3037 (lambda* (#:key inputs #:allow-other-keys)
3038 (let* ((qtbase (assoc-ref inputs "qtbase"))
3039 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
3040 (substitute* "sip/QtPrintSupport/qprinter.sip"
3045 (lambda* (#:key inputs outputs #:allow-other-keys)
3046 (let* ((out (assoc-ref outputs "out"))
3047 (bin (string-append out "/bin"))
3048 (sip (string-append out "/share/sip"))
3049 (plugins (string-append out "/lib/qt5/plugins"))
3050 (designer (string-append plugins "/designer"))
3051 (qml (string-append plugins "/PyQt5"))
3052 (python (assoc-ref inputs "python"))
3053 (lib (string-append out "/lib/python"
3054 (python-version python)
3056 (stubs (string-append lib "/PyQt5")))
3057 (invoke "python" "configure.py"
3061 "--designer-plugindir" designer
3062 "--qml-plugindir" qml
3063 ; Where to install the PEP 484 Type Hints stub
3064 ; files. Without this the stubs are tried to be
3065 ; installed into the python package's
3066 ; site-package directory, which is read-only.
3068 "--sipdir" sip)))))))
3069 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
3070 (synopsis "Python bindings for Qt")
3072 "PyQt is a set of Python v2 and v3 bindings for the Qt application
3073 framework. The bindings are implemented as a set of Python modules and
3074 contain over 620 classes.")
3075 (license license:gpl3)))
3077 (define-public python-pyqt5-sip
3079 (name "python-pyqt5-sip")
3084 (uri (pypi-uri "PyQt5_sip" version))
3087 "09771b6fdn0rx34l5a0wzcd899yd57zxp5sw3bsqhd25biwhiq4p"))))
3088 (build-system python-build-system)
3090 `(#:tests? #f)) ;; No test code.
3091 (home-page "https://www.riverbankcomputing.com/software/sip/")
3092 (synopsis "Sip module support for PyQt5")
3093 (description "Sip module support for PyQt5")
3094 (license license:lgpl2.1+)))
3096 (define-public python-pyqtwebengine
3098 (name "python-pyqtwebengine")
3103 ;; The newest releases are only available on PyPI. Older ones
3104 ;; are mirrored at the upstream home page.
3105 (uri (list (pypi-uri "PyQtWebEngine" version)
3106 (string-append "https://www.riverbankcomputing.com/static"
3107 "/Downloads/PyQtWebEngine/" version
3108 "/PyQtWebEngine-" version ".tar.gz")))
3111 "0hdr0g0rzlhsnylhfk826pq1lw8p9dqcr8yma2wy9dgjrj6n0ixb"))))
3112 (build-system gnu-build-system)
3114 (list python python-sip
3115 ;; qtbase is required for qmake
3118 `(("python" ,python-wrapper)
3119 ("python-sip" ,python-sip)
3120 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3121 ("qtbase" ,qtbase-5)
3122 ("qtsvg-5" ,qtsvg-5)
3123 ("qtdeclarative-5" ,qtdeclarative-5)
3124 ("qtwebchannel-5" ,qtwebchannel-5)
3125 ("qtwebengine-5" ,qtwebengine-5)))
3127 `(#:modules ((srfi srfi-1)
3128 ((guix build python-build-system) #:select (python-version))
3129 ,@%gnu-build-system-modules)
3130 #:imported-modules ((guix build python-build-system)
3131 ,@%gnu-build-system-modules)
3133 (modify-phases %standard-phases
3135 (lambda* (#:key inputs outputs #:allow-other-keys)
3136 (let* ((out (assoc-ref outputs "out"))
3137 (sipdir (string-append out "/share/sip"))
3138 (pyqt-sipdir (string-append
3139 (assoc-ref inputs "python-pyqt") "/share/sip"))
3140 (python (assoc-ref inputs "python"))
3141 (lib (string-append out "/lib/python"
3142 (python-version python)
3143 "/site-packages/PyQt5"))
3144 (stubs (string-append lib "/PyQt5")))
3147 (invoke "python" "configure.py"
3154 "--pyqt-sipdir" pyqt-sipdir))))
3155 ;; Because this has a different prefix than python-pyqt then we need
3156 ;; to make this a namespace of its own.
3157 (add-after 'install 'make-namespace
3158 (lambda* (#:key inputs outputs #:allow-other-keys)
3159 (let* ((__init__.py (string-append
3160 (assoc-ref outputs "out")
3162 (python-version (assoc-ref inputs "python"))
3163 "/site-packages/PyQt5/__init__.py")))
3164 (with-output-to-file __init__.py
3165 (lambda _ (display "
3166 from pkgutil import extend_path
3167 __path__ = extend_path(__path__, __name__)
3170 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
3171 (synopsis "Python bindings for QtWebEngine")
3173 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
3174 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
3175 set of three modules. Prior to v5.12 these bindings were part of PyQt
3177 (license license:gpl3)))
3179 ;; XXX: This is useful for removing qtwebkit from other packages' dependency
3180 ;; graphs, as well as for preventing python-pyqtwebengine from transitively
3181 ;; depending on qtwebkit.
3182 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
3183 ;; packages that could be used together.
3184 (define-public python-pyqt-without-qtwebkit
3185 (package/inherit python-pyqt
3186 (name "python-pyqt-without-qtwebkit")
3188 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
3190 (define-public python-pyqt-builder
3192 (name "python-pyqt-builder")
3197 (uri (pypi-uri "PyQt-builder" version))
3200 "0nh0054c54ji3sm6d268fccf0y5f613spswwgwqd3rnn816hnljl"))))
3201 (build-system python-build-system)
3204 (home-page "https://www.riverbankcomputing.com/static/Docs/PyQt-builder/")
3205 (synopsis "PEP 517 compliant PyQt build system")
3206 (description "PyQt-builder is a tool for generating Python bindings for C++
3207 libraries that use the Qt application framework. The bindings are built on
3208 top of the PyQt bindings for Qt. PyQt-builder is used to build PyQt itself.")
3209 ;; Either version 2 or 3, but no other version. See the file
3210 ;; 'pyqtbuild/builder.py' in the source distribution for more information.
3211 (license (list license:gpl2 license:gpl3))))
3213 (define-public python-qtpy
3215 (name "python-qtpy")
3220 (uri (pypi-uri "QtPy" version))
3223 "051rj10lbv2ny48lz34zhclcbdxxdbk4di2mdk91m9143w91npyq"))))
3224 (build-system python-build-system)
3225 (propagated-inputs (list python-packaging))
3227 `(;; Not all supported bindings are packaged. Especially PyQt4.
3229 (home-page "https://github.com/spyder-ide/qtpy")
3231 "Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets")
3233 "Provides an abstraction layer on top of the various Qt bindings
3234 (PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
3235 (license license:expat)))
3237 (define-public qscintilla
3243 (uri (string-append "https://www.riverbankcomputing.com/static"
3244 "/Downloads/QScintilla/" version
3245 "/QScintilla-" version ".tar.gz"))
3248 "19r0vpqb4m9bqwxmjp9w6x0hgahkrg7zryk78hwgplj7vdbn0d77"))))
3249 (build-system gnu-build-system)
3252 (modify-phases %standard-phases
3254 (lambda* (#:key outputs #:allow-other-keys)
3255 (let ((out (assoc-ref outputs "out")))
3257 (substitute* "qscintilla.pro"
3258 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
3259 (string-append out "/lib"))
3260 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
3261 (string-append out "/include"))
3262 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
3263 (string-append out "/translations"))
3264 (("\\$\\$\\[QT_INSTALL_DATA\\]")
3265 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
3266 (("\\$\\$\\[QT_HOST_DATA\\]")
3267 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
3268 (invoke "qmake")))))))
3269 (native-inputs (list qtbase-5))
3270 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
3271 (synopsis "Qt port of the Scintilla C++ editor control")
3272 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3273 editor control. QScintilla includes features especially useful when editing
3274 and debugging source code. These include support for syntax styling, error
3275 indicators, code completion and call tips.")
3276 (license license:gpl3+)))
3278 (define-public python-qscintilla
3279 (package/inherit qscintilla
3280 (name "python-qscintilla")
3283 (list "--pyqt=PyQt5"
3284 (string-append "--pyqt-sipdir="
3285 (assoc-ref %build-inputs "python-pyqt")
3287 (string-append "--qsci-incdir="
3288 (assoc-ref %build-inputs "qscintilla")
3290 (string-append "--qsci-libdir="
3291 (assoc-ref %build-inputs "qscintilla")
3294 (modify-phases %standard-phases
3296 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
3297 (let ((out (assoc-ref outputs "out"))
3298 (python (assoc-ref inputs "python")))
3300 (apply invoke "python3" "configure.py"
3302 ;; Install to the right directory
3303 (substitute* '("Makefile"
3305 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
3306 (((string-append python "/lib"))
3307 (string-append out "/lib")))
3308 ;; And fix the installed.txt file
3309 (substitute* "installed.txt"
3310 (("/gnu/store/[^/]+") out)))
3313 `(("qscintilla" ,qscintilla)
3315 ("python-pyqt" ,python-pyqt)))
3316 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3317 editor control. QScintilla includes features especially useful when editing
3318 and debugging source code. These include support for syntax styling, error
3319 indicators, code completion and call tips.
3321 This package provides the Python bindings.")))
3323 ;; PyQt only looks for modules in its own directory. It ignores environment
3324 ;; variables such as PYTHONPATH, so we need to build a union package to make
3326 (define-public python-pyqt+qscintilla
3327 (package/inherit python-pyqt
3328 (name "python-pyqt+qscintilla")
3330 (build-system trivial-build-system)
3332 '(#:modules ((guix build union))
3334 (use-modules (ice-9 match)
3336 (match %build-inputs
3337 (((names . directories) ...)
3338 (union-build (assoc-ref %outputs "out")
3342 `(("python-pyqt" ,python-pyqt)
3343 ("python-qscintilla" ,python-qscintilla)))
3344 (synopsis "Union of PyQt and the Qscintilla extension")
3346 "This package contains the union of PyQt and the Qscintilla extension.")))
3348 (define-public qtkeychain
3356 (url "https://github.com/frankosterfeld/qtkeychain/")
3357 (commit (string-append "v" version))))
3358 (file-name (git-file-name name version))
3361 "1zk6r2vc1q48qs7mw2h47bpgrfbb9r7lf9cwq4sb1a4nls87zznk"))))
3362 (build-system cmake-build-system)
3364 (list pkg-config qttools-5))
3366 (list libsecret qtbase-5))
3368 `(#:tests? #f ; No tests included
3370 (modify-phases %standard-phases
3371 (add-before 'configure 'set-qt-trans-dir
3373 (substitute* "CMakeLists.txt"
3374 (("\\$\\{qt_translations_dir\\}")
3375 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations")))))))
3376 (home-page "https://github.com/frankosterfeld/qtkeychain")
3377 (synopsis "Qt API to store passwords")
3379 "QtKeychain is a Qt library to store passwords and other secret data
3380 securely. It will not store any data unencrypted unless explicitly requested.")
3381 (license license:bsd-3)))
3383 (define-public qtsolutions
3384 (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
3387 (name "qtsolutions")
3388 (version (git-version "0" revision commit))
3393 (url "https://github.com/qtproject/qt-solutions")
3395 (file-name (git-file-name name version))
3397 (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
3398 (modules '((guix build utils)
3402 ;; Unvendor QtLockFile from QtSingleApplication.
3404 (with-directory-excursion "qtsingleapplication/src"
3405 (for-each delete-file
3406 (find-files "." "qtlockedfile.*\\.(h|cpp)"))
3407 (substitute* "qtsingleapplication.pri"
3408 ;; Add include path of LockedFile.
3409 (("INCLUDEPATH \\+=")
3410 "INCLUDEPATH += ../../qtlockedfile/src")
3411 ;; Link library of LockedFile.
3413 "LIBS += -lQtSolutions_LockedFile"))
3414 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
3415 (("#include \"qtlockedfile.*\\.cpp\"") "")
3416 ;; Unwrap namespace added in the vendoring process.
3417 (("QtLP_Private::QtLockedFile")
3420 (build-system gnu-build-system)
3422 `(#:tests? #f ; No target
3424 ((guix build copy-build-system)
3425 ,@%gnu-build-system-modules)
3427 (((guix build copy-build-system) #:prefix copy:)
3428 (guix build gnu-build-system)
3431 (modify-phases %standard-phases
3432 (add-after 'unpack 'patch-source
3433 (lambda* (#:key outputs #:allow-other-keys)
3434 (substitute* (find-files "." "common.pri")
3435 ;; Remove unnecessary prefixes/suffixes in library names.
3438 ;; Disable building of examples.
3439 (substitute* (find-files "." "\\.pro$")
3440 (("SUBDIRS\\+=examples") ""))
3441 ;; Fix deprecated functions.
3442 (substitute* "qtsoap/src/qtsoap.cpp"
3443 (("toAscii") "toUtf8"))
3447 (for-each (lambda (solution)
3448 (with-directory-excursion solution
3449 (invoke "./configure" "-library")
3451 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3452 "qtsingleapplication" "qtsoap"))
3456 (for-each (lambda (solution)
3457 (with-directory-excursion solution
3459 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3460 "qtsingleapplication" "qtsoap"))
3464 (for-each (lambda (solution)
3465 (with-directory-excursion solution
3467 (assoc-ref copy:%standard-phases 'install)
3469 '(("src" "include" #:include-regexp ("\\.h$"))
3472 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3473 "qtsingleapplication" "qtsoap")))))))
3476 (synopsis "Collection of Qt extensions")
3477 (description "QtSolutions is a set of components extending Qt.
3479 @item QtLockedFile: A class that extends QFile with advisory locking functions.
3480 @item QtPropertyBrowser: A framework that enables the user to edit a set of
3482 @item QtService: A helper for writing services such as Unix daemons.
3483 @item QtSingleApplication: A component that provides support for applications
3484 that can be only started once per user.
3485 @item QtSoap: A component that provides basic web service support with version
3486 1.1 of the SOAP protocol.
3488 (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
3489 (license (list license:bsd-3
3490 ;; QScriptParser and QScriptGrammar specifically allow
3491 ;; redistribution under GPL3 or LGPL2.1
3492 license:gpl3 license:lgpl2.1)))))
3502 (string-append "mirror://sourceforge/qwt/qwt/"
3503 version "/qwt-" version ".tar.bz2"))
3505 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
3506 (build-system gnu-build-system)
3508 (list qtbase-5 qtsvg-5 qttools-5))
3511 (modify-phases %standard-phases
3513 (lambda* (#:key outputs #:allow-other-keys)
3514 (let* ((out (assoc-ref outputs "out"))
3515 (docdir (string-append out "/share/doc/qwt"))
3516 (incdir (string-append out "/include/qwt"))
3517 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
3518 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
3519 (substitute* '("qwtconfig.pri")
3520 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
3521 (format #f "~a = ~a\n" x out))
3522 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
3523 (format #f "~a = ~a\n" x docdir))
3524 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
3525 (format #f "~a = ~a\n" x incdir))
3526 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
3527 (format #f "~a = ~a\n" x pluginsdir))
3528 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
3529 (format #f "~a = ~a\n" x featuresdir)))
3530 (substitute* '("doc/doc.pro")
3531 ;; We'll install them in the 'install-man-pages' phase.
3532 (("^unix:doc\\.files.*") ""))
3534 (add-after 'install 'install-man-pages
3535 (lambda* (#:key outputs #:allow-other-keys)
3536 (let* ((out (assoc-ref outputs "out"))
3537 (man (string-append out "/share/man")))
3538 ;; Remove some incomplete manual pages.
3539 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
3541 (copy-recursively "doc/man" man)
3543 (home-page "http://qwt.sourceforge.net")
3544 (synopsis "Qt widgets for plots, scales, dials and other technical software
3547 "The Qwt library contains widgets and components which are primarily useful
3548 for technical and scientific purposes. It includes a 2-D plotting widget,
3549 different kinds of sliders, and much more.")
3552 ;; The Qwt license is LGPL2.1 with some exceptions.
3553 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
3554 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
3555 license:lgpl2.1 license:gpl3))))
3557 (define-public qtwebkit
3560 (version "5.212.0-alpha4")
3564 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
3565 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
3568 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
3569 (patches (search-patches "qtwebkit-pbutils-include.patch"
3570 "qtwebkit-fix-building-with-bison-3.7.patch"
3571 "qtwebkit-fix-building-with-glib-2.68.patch"
3572 "qtwebkit-fix-building-with-icu-68.patch"
3573 "qtwebkit-fix-building-with-python-3.9.patch"))))
3574 (build-system cmake-build-system)
3586 ("gst-plugins-base" ,gst-plugins-base)
3587 ("libjpeg" ,libjpeg-turbo)
3589 ("libwebp" ,libwebp)
3591 ("fontconfig" ,fontconfig)
3592 ("libxrender" ,libxrender)
3593 ("qtbase" ,qtbase-5)
3594 ("qtdeclarative-5" ,qtdeclarative-5)
3595 ("qtlocation" ,qtlocation)
3596 ("qtmultimedia-5" ,qtmultimedia-5)
3597 ("qtsensors" ,qtsensors)
3598 ("qtwebchannel-5" ,qtwebchannel-5)
3599 ("libxml2" ,libxml2)
3600 ("libxslt" ,libxslt)
3602 ("libxcomposite" ,libxcomposite)))
3604 `(#:tests? #f ; no apparent tests; it might be necessary to set
3605 ; ENABLE_API_TESTS, see CMakeLists.txt
3607 ;; Parallel builds fail due to a race condition:
3608 ;; <https://bugs.gnu.org/34062>.
3609 #:parallel-build? #f
3611 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
3613 "-DUSE_LIBHYPHEN=OFF"
3614 "-DUSE_SYSTEM_MALLOC=ON"
3615 ;; XXX: relative dir installs to build dir?
3616 (string-append "-DECM_MKSPECS_INSTALL_DIR="
3617 %output "/lib/qt5/mkspecs/modules")
3618 ;; Sacrifice a little speed in order to link
3619 ;; libraries and test executables in a
3620 ;; reasonable amount of memory.
3621 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
3622 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
3623 (home-page "https://www.webkit.org")
3624 (synopsis "Web browser engine and classes to render and interact with web
3626 (description "QtWebKit provides a Web browser engine that makes it easy to
3627 embed content from the World Wide Web into your Qt application. At the same
3628 time Web content can be enhanced with native controls.")
3629 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
3630 ;; room for slower or busy hardware.
3631 (properties '((timeout . 64800))) ;18 hours
3633 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
3634 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
3635 ;; disable it on non-Intel platforms.
3636 (supported-systems '("x86_64-linux" "i686-linux"))
3638 (license license:lgpl2.1+)))
3640 (define-public dotherside
3648 (url "https://github.com/filcuc/DOtherSide")
3649 (commit (string-append "v" version))))
3650 (file-name (git-file-name name version))
3653 "13n2qb8q9jz4ihwlbs7y15lw90w9113gb1bgnb1dggpxkj64r953"))))
3654 (build-system cmake-build-system)
3658 ;; TODO: Support Qt 6 (requires qtdeclarative of Qt6).
3659 (list qtbase-5 qtdeclarative-5))
3660 (home-page "https://filcuc.github.io/DOtherSide/index.html")
3661 (synopsis "C language library for creating bindings for the Qt QML language")
3663 "DOtherSide is a C language library for creating bindings for the
3664 QT QML language. The following features are implementable from
3667 @item Creating custom QObject
3668 @item Creating custom QAbstractListModels
3669 @item Creating custom properties, signals and slots
3670 @item Creating from QML QObject defined in the binded language
3671 @item Creating from Singleton QML QObject defined in the binded language
3673 (license license:lgpl3))) ;version 3 only (+ exception)
3675 ;; There have been no public releases yet.
3676 (define-public qtcolorwidgets
3677 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
3680 (name "qtcolorwidgets")
3681 (version (git-version "0" revision commit))
3685 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3687 (file-name (git-file-name name version))
3690 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
3691 (build-system cmake-build-system)
3692 (arguments `(#:tests? #f)) ; There are no tests
3697 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3698 (synopsis "Color management widgets")
3699 (description "QtColorWidgets provides a Qt color dialog that is more
3700 user-friendly than the default @code{QColorDialog} and several other
3701 color-related widgets.")
3702 ;; Includes a license exception for combining with GPL2 code.
3703 (license license:lgpl3+))))
3705 (define-public qcustomplot
3707 (name "qcustomplot")
3712 (uri (string-append "https://www.qcustomplot.com/release/"
3713 version "fixed" "/QCustomPlot.tar.gz"))
3715 (base32 "1324kqyj1v1f8k8d7b15gc3apwz9qxx52p86hvchg33hjdlqhskx"))))
3717 `(("qcustomplot-sharedlib"
3720 (uri (string-append "https://www.qcustomplot.com/release/"
3721 version "fixed" "/QCustomPlot-sharedlib.tar.gz"))
3723 (base32 "0vp8lpxvd1nlp4liqrlvslpqrgfn0wpiwizzdsjbj22zzb8vxikc"))))))
3726 (build-system gnu-build-system)
3729 (modify-phases %standard-phases
3730 (add-after 'unpack 'unpack-extra-files
3731 (lambda* (#:key inputs #:allow-other-keys)
3732 (invoke "tar" "-xvf" (assoc-ref inputs "qcustomplot-sharedlib"))))
3734 (lambda* (#:key outputs #:allow-other-keys)
3735 (chdir "qcustomplot-sharedlib/sharedlib-compilation")
3736 (substitute* "sharedlib-compilation.pro"
3737 ;; Don't build debug library.
3738 (("debug_and_release")
3741 (string-append "DESTDIR="
3742 (assoc-ref outputs "out")
3744 (add-after 'install 'install-header
3745 (lambda* (#:key outputs #:allow-other-keys)
3746 (install-file "../../qcustomplot.h"
3747 (string-append (assoc-ref outputs "out")
3749 (home-page "https://www.qcustomplot.com/")
3750 (synopsis "Qt widget for plotting and data visualization")
3752 "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts.")
3753 (license license:gpl3+)))
3755 ;; TODO: Split shiboken2 binding generator into a dedicated output.
3756 ;; This executable requires libxml2, libxslt, clang-toolchain at runtime.
3757 ;; The libshiboken library only requires Qt and Python at runtime.
3758 (define-public python-shiboken-2
3760 (name "python-shiboken-2")
3764 (uri (string-append "https://download.qt.io/official_releases"
3765 "/QtForPython/pyside2/PySide2-" version
3766 "-src/pyside-setup-opensource-src-"
3770 "0cwvw6695215498rsbm2xzkwaxdr3w7zfvy4kc62c01k6pxs881r"))))
3771 (build-system cmake-build-system)
3773 (list clang-toolchain
3782 ;; FIXME: Building tests fails
3783 #:configure-flags #~(list "-DBUILD_TESTS=off")
3785 #~(modify-phases %standard-phases
3786 (add-after 'unpack 'use-shiboken-dir-only
3787 (lambda _ (chdir "sources/shiboken2") #t))
3788 (add-before 'configure 'make-files-writable-and-update-timestamps
3790 ;; The build scripts need to modify some files in
3791 ;; the read-only source directory, and also attempts
3792 ;; to create Zip files which fails because the Zip
3793 ;; format does not support timestamps before 1980.
3794 (let ((circa-1980 (* 10 366 24 60 60)))
3795 (for-each (lambda (file)
3796 (make-file-writable file)
3797 (utime file circa-1980 circa-1980))
3800 (add-before 'configure 'set-build-env
3802 (let ((llvm #$(this-package-input "clang-toolchain")))
3803 (setenv "CLANG_INSTALL_DIR" llvm)
3805 (home-page "https://wiki.qt.io/Qt_for_Python")
3807 "Shiboken generates bindings for C++ libraries using CPython source code")
3809 "Shiboken generates bindings for C++ libraries using CPython source code")
3812 ;; The main code is GPL3 or LGPL3.
3813 ;; Examples are BSD-3.
3818 (define-public python-shiboken-6
3820 (inherit python-shiboken-2)
3821 (name "python-shiboken-6")
3825 (uri (string-append "https://download.qt.io/official_releases"
3826 "/QtForPython/pyside6/PySide6-" version
3827 "-src/pyside-setup-opensource-src-"
3831 "0xwri69nnbhn6fajm7l045r0s0qv8nlq6qj8wcj87srli3b5xa75"))))
3832 (build-system cmake-build-system)
3834 (modify-inputs (package-inputs python-shiboken-2)
3835 (replace "qtbase" qtbase)
3836 (delete "qtxmlpatterns")))
3838 (substitute-keyword-arguments (package-arguments python-shiboken-2)
3840 #~(modify-phases #$p
3841 (replace 'use-shiboken-dir-only
3842 (lambda _ (chdir "sources/shiboken6") #t))))
3843 ((#:configure-flags flags)
3845 ;; The RUNPATH of shibokenmodule contains the entry in build
3846 ;; directory instead of install directory.
3847 "-DCMAKE_SKIP_RPATH=TRUE"
3848 (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath="
3852 (define-public python-pyside-2
3854 (name "python-pyside-2")
3855 (version (package-version python-shiboken-2))
3856 (source (package-source python-shiboken-2))
3857 (build-system cmake-build-system)
3878 (list python-shiboken-2))
3880 (list python-wrapper))
3884 ;; FIXME: Building tests fail.
3886 #~(list "-DBUILD_TESTS=FALSE"
3887 (string-append "-DPYTHON_EXECUTABLE="
3888 (search-input-file %build-inputs
3890 #:modules '((guix build cmake-build-system)
3894 #~(modify-phases %standard-phases
3895 (add-after 'unpack 'go-to-source-dir
3896 (lambda _ (chdir "sources/pyside2") #t))
3897 (add-after 'go-to-source-dir 'fix-qt-module-detection
3899 ;; Activate qt module support even if it not in the same
3900 ;; directory as qtbase.
3901 (substitute* "../cmake_helpers/helpers.cmake"
3902 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
3904 ;; Add include directories for qt modules.
3905 (let ((dirs (map (lambda (path)
3906 (string-append path "/include/qt5"))
3908 #$@(map (lambda (name)
3909 (this-package-input name))
3926 "qtxmlpatterns"))))))
3927 (substitute* "cmake/Macros/PySideModules.cmake"
3928 (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all)
3929 (fold (lambda (dir paths)
3930 (string-append paths "${PATH_SEP}" dir))
3933 (setenv "CXXFLAGS" (fold (lambda (dir paths)
3934 (string-append paths " -I" dir))
3937 (home-page "https://wiki.qt.io/Qt_for_Python")
3939 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
3941 "The Qt for Python product enables the use of Qt5 APIs in Python
3942 applications. It lets Python developers utilize the full potential of Qt,
3943 using the PySide2 module. The PySide2 module provides access to the
3944 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
3945 comes with the Shiboken2 CPython binding code generator, which can be used to
3946 generate Python bindings for your C or C++ code.")
3950 ;; this file may be used under the terms of the GNU General
3951 ;; Public License version 2.0 or (at your option) the GNU
3952 ;; General Public license version 3 or any later version
3953 ;; approved by the KDE Free Qt Foundation.
3954 ;; Thus, it is currently v2 or v3, but no "+".
3958 (define-public python-pyside-6
3960 (inherit python-pyside-2)
3961 (name "python-pyside-6")
3962 (version (package-version python-shiboken-6))
3963 (source (package-source python-shiboken-6))
3964 ;; TODO: Add more Qt components if available.
3977 (list python-shiboken-6))
3979 (list python-wrapper))
3984 #~(list "-DBUILD_TESTS=FALSE"
3985 (string-append "-DPYTHON_EXECUTABLE="
3986 (search-input-file %build-inputs
3989 #~(modify-phases %standard-phases
3990 (add-after 'unpack 'go-to-source-dir
3991 (lambda _ (chdir "sources/pyside6") #t))
3992 (add-after 'go-to-source-dir 'fix-qt-module-detection
3994 (substitute* "cmake/PySideHelpers.cmake"
3995 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
3997 (let ((dirs (map (lambda (path)
3998 (string-append path "/include/qt6"))
4000 #$@(map (lambda (name)
4001 (this-package-input name))
4010 "qtwebsockets"))))))
4011 (substitute* "cmake/Macros/PySideModules.cmake"
4012 (("set\\(shiboken_include_dir_list " all)
4013 (string-append all (string-join dirs ";") " ")))
4017 (string-append "-I" dir))
4021 "The Qt for Python product enables the use of Qt6 APIs in Python applications")
4023 "The Qt for Python product enables the use of Qt6 APIs in Python
4024 applications. It lets Python developers utilize the full potential of Qt,
4025 using the PySide6 module. The PySide6 module provides access to the
4026 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
4027 comes with the Shiboken6 CPython binding code generator, which can be used to
4028 generate Python bindings for your C or C++ code.")))
4030 (define-public python-pyside-2-tools
4032 (name "python-pyside-2-tools")
4033 (version (package-version python-shiboken-2))
4034 (source (package-source python-shiboken-2))
4035 (build-system cmake-build-system)
4037 (list python-pyside-2 python-shiboken-2 qtbase-5))
4039 (list python-wrapper))
4044 #~(list "-DBUILD_TESTS=off"
4045 (string-append "-DPYTHON_EXECUTABLE="
4046 (search-input-file %build-inputs
4049 #~(modify-phases %standard-phases
4050 (add-after 'unpack 'go-to-source-dir
4051 (lambda _ (chdir "sources/pyside2-tools") #t)))))
4052 (home-page "https://wiki.qt.io/Qt_for_Python")
4054 "Command line tools for PySide2")
4056 "Python-pyside-2-tools contains lupdate, rcc and uic tools for PySide2")
4057 (license license:gpl2)))
4059 (define-public libqglviewer
4061 (name "libqglviewer")
4066 (string-append "http://libqglviewer.com/src/libQGLViewer-"
4070 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
4071 (build-system gnu-build-system)
4073 '(#:tests? #f ; no check target
4075 (list (string-append "PREFIX="
4076 (assoc-ref %outputs "out")))
4078 (modify-phases %standard-phases
4080 (lambda* (#:key make-flags #:allow-other-keys)
4081 (apply invoke (cons "qmake" make-flags)))))))
4083 (list qtbase-5 qttools-5))
4086 (home-page "http://libqglviewer.com")
4087 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
4089 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
4090 of OpenGL 3D viewers.
4092 It provides some of the typical 3D viewer functionalities, such as the
4093 possibility to move the camera using the mouse, which lacks in most of the
4094 other APIs. Other features include mouse manipulated frames, interpolated
4095 keyFrames, object selection, stereo display, screenshot saving and much more.
4096 It can be used by OpenGL beginners as well as to create complex applications,
4097 being fully customizable and easy to extend.")
4098 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
4100 (license (list license:gpl2 license:gpl3))))
4102 (define-public qhexedit
4110 (url "https://github.com/Simsys/qhexedit2")
4111 (commit (string-append "v" version))))
4112 (file-name (git-file-name name version))
4114 (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
4115 (build-system gnu-build-system)
4118 (modify-phases %standard-phases
4119 (add-after 'unpack 'fix-path
4120 (lambda* (#:key outputs #:allow-other-keys)
4121 (substitute* "src/qhexedit.pro"
4122 (("^unix:DESTDIR = /usr/lib")
4123 (string-append "unix:DESTDIR = "
4124 (assoc-ref outputs "out") "/lib")))))
4128 (invoke "qmake" "qhexedit.pro")))
4129 (add-after 'install 'install-headers
4130 (lambda* (#:key outputs #:allow-other-keys)
4131 (let* ((out (assoc-ref outputs "out"))
4132 (include-dir (string-append out "/include")))
4133 (mkdir-p include-dir)
4134 (for-each (lambda (file)
4135 (install-file file include-dir))
4136 (find-files "." "\\.h$"))))))))
4137 (inputs (list qtbase-5))
4138 (native-inputs (list qttools-5))
4139 (home-page "https://simsys.github.io")
4140 (synopsis "Binary editor widget for Qt")
4142 "@code{QHexEdit} is a hex editor widget for the Qt framework. It is a
4143 simple editor for binary data, just like @code{QPlainTextEdit} is for text
4145 (license license:lgpl2.1)))
4148 (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
4152 (version (git-version "1.6.0" revision commit-ref))
4157 (url "https://github.com/coin3d/soqt")
4160 (file-name (git-file-name name version))
4162 (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
4163 (build-system cmake-build-system)
4164 (arguments '(#:tests? #f)) ; There are no tests
4166 (list pkg-config cmake))
4168 (list qtbase-5 coin3D-4))
4169 (home-page "https://github.com/coin3d/soqt")
4170 (synopsis "Qt GUI component toolkit library for Coin")
4171 (description "SoQt is a Qt GUI component toolkit library for Coin. It is
4172 also compatible with SGI and TGS Open Inventor, and the API is based on the API
4173 of the InventorXt GUI component toolkit.")
4174 (license license:bsd-3))))
4176 (define-public libdbusmenu-qt
4178 (name "libdbusmenu-qt")
4179 (version "0.9.3+16.04.20160218-0ubuntu1")
4183 ;; Download from github rather than launchpad because launchpad trunk
4184 ;; tarball hash is not deterministic.
4186 (url "https://github.com/unity8-team/libdbusmenu-qt")
4188 (file-name (git-file-name name version))
4190 (base32 "0b7ii1cvmpcyl79gqal9c3va9m55h055s4hx7fpxkhhqs9463ggg"))))
4191 (build-system cmake-build-system)
4193 ;; XXX: Tests require a dbus session and some icons.
4199 (home-page "https://launchpad.net/libdbusmenu-qt")
4200 (synopsis "Qt implementation of the DBusMenu spec")
4201 (description "This library provides a Qt implementation of the DBusMenu
4202 protocol. The DBusMenu protocol makes it possible for applications to export
4203 and import their menus over DBus.")
4204 (license license:lgpl2.1+)))
4206 (define-public kdsoap
4213 (uri (string-append "https://github.com/KDAB/KDSoap/releases/download/"
4214 "kdsoap-" version "/kdsoap-" version ".tar.gz"))
4217 "1vh4rzb09kks1ilay1y60q7gf64gwzdwsca60hmx1xx69w8672fi"))))
4218 (build-system qt-build-system)
4219 (inputs `(("qtbase" ,qtbase-5)))
4221 '(#:configure-flags '("-DKDSoap_TESTS=true")
4223 (modify-phases %standard-phases
4225 (lambda* (#:key tests? #:allow-other-keys)
4227 (invoke "ctest" "-E" ;; These tests try connect to the internet.
4228 "(kdsoap-webcalls|kdsoap-webcalls_wsdl|kdsoap-test_calc)"))
4230 (home-page "https://www.kdab.com/development-resources/qt-tools/kd-soap/")
4231 (synopsis "Qt SOAP component")
4232 (description "KD SOAP is a tool for creating client applications for web
4233 services using the XML based SOAP protocol and without the need for a dedicated
4235 (license (list license:gpl2 license:gpl3))))
4238 ;;; Avoid adding new packages to the end of this file. To reduce the chances
4239 ;;; of a merge conflict, place them above by existing packages with similar
4240 ;;; functionality or similar names.