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 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 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 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>
22 ;;; This file is part of GNU Guix.
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37 (define-module (gnu packages qt)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix packages)
40 #:use-module (guix download)
41 #:use-module (guix git-download)
42 #:use-module (guix build-system cmake)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system trivial)
45 #:use-module (guix build-system python)
46 #:use-module (guix packages)
47 #:use-module (guix deprecation)
48 #:use-module (guix utils)
49 #:use-module (gnu packages)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages bison)
52 #:use-module (gnu packages cmake)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages cups)
55 #:use-module (gnu packages curl)
56 #:use-module (gnu packages databases)
57 #:use-module (gnu packages documentation)
58 #:use-module (gnu packages fontutils)
59 #:use-module (gnu packages flex)
60 #:use-module (gnu packages freedesktop)
61 #:use-module (gnu packages gcc)
62 #:use-module (gnu packages ghostscript)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages glib)
65 #:use-module (gnu packages gnupg)
66 #:use-module (gnu packages gperf)
67 #:use-module (gnu packages gstreamer)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages icu4c)
70 #:use-module (gnu packages image)
71 #:use-module (gnu packages libevent)
72 #:use-module (gnu packages linux)
73 #:use-module (gnu packages llvm)
74 #:use-module (gnu packages maths)
75 #:use-module (gnu packages ninja)
76 #:use-module (gnu packages nss)
77 #:use-module (gnu packages pciutils)
78 #:use-module (gnu packages pcre)
79 #:use-module (gnu packages perl)
80 #:use-module (gnu packages pkg-config)
81 #:use-module (gnu packages pulseaudio)
82 #:use-module (gnu packages protobuf)
83 #:use-module (gnu packages python)
84 #:use-module (gnu packages python-xyz)
85 #:use-module (gnu packages regex)
86 #:use-module (gnu packages ruby)
87 #:use-module (gnu packages sdl)
88 #:use-module (gnu packages serialization)
89 #:use-module (gnu packages sqlite)
90 #:use-module (gnu packages telephony)
91 #:use-module (gnu packages tls)
92 #:use-module (gnu packages valgrind)
93 #:use-module (gnu packages video)
94 #:use-module (gnu packages vulkan)
95 #:use-module (gnu packages xdisorg)
96 #:use-module (gnu packages xiph)
97 #:use-module (gnu packages xorg)
98 #:use-module (gnu packages xml)
99 #:use-module (srfi srfi-1))
101 (define-public grantlee
109 (url "https://github.com/steveire/grantlee.git")
110 (commit (string-append "v" version))))
111 (file-name (git-file-name name version))
113 (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
115 ;; Optional: lcov and cccc, both are for code coverage
116 `(("doxygen" ,doxygen)))
119 ("qtdeclarative" ,qtdeclarative)
120 ("qtscript" ,qtscript)))
121 (build-system cmake-build-system)
124 (modify-phases %standard-phases
125 (add-before 'check 'check-setup
127 ;; make Qt render "offscreen", required for tests
128 (setenv "QT_QPA_PLATFORM" "offscreen")
130 (home-page "https://github.com/steveire/grantlee")
131 (synopsis "Libraries for text templating with Qt")
132 (description "Grantlee Templates can be used for theming and generation of
133 other text such as code. The syntax uses the syntax of the Django template
134 system, and the core design of Django is reused in Grantlee.")
135 (license license:lgpl2.1+)))
143 (uri (string-append "http://download.qt-project.org/archive/qt/"
144 (string-copy version 0 (string-rindex version #\.))
146 "/qt-everywhere-opensource-src-"
150 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
151 (patches (search-patches "qt4-ldflags.patch"))
152 (modules '((guix build utils)))
154 ;; Remove webkit module, which is not built.
155 '(begin (delete-file-recursively "src/3rdparty/webkit")
157 (build-system gnu-build-system)
161 `(("alsa-lib" ,alsa-lib)
165 ("double-conversion" ,double-conversion)
167 ("fontconfig" ,fontconfig)
168 ("freetype" ,freetype)
170 ("gstreamer" ,gstreamer)
171 ("gst-plugins-base" ,gst-plugins-base)
174 ("libinput" ,libinput-minimal)
181 ("libxcomposite" ,libxcomposite)
182 ("libxcursor" ,libxcursor)
184 ("libxfixes" ,libxfixes)
186 ("libxinerama" ,libxinerama)
187 ("libxkbcommon" ,libxkbcommon)
189 ("libxrandr" ,libxrandr)
190 ("libxrender" ,libxrender)
194 ("mariadb" ,mariadb "lib")
195 ("mariadb-dev" ,mariadb "dev")
197 ("postgresql" ,postgresql)
198 ("pulseaudio" ,pulseaudio)
202 ("unixodbc" ,unixodbc)
204 ("xcb-util" ,xcb-util)
205 ("xcb-util-image" ,xcb-util-image)
206 ("xcb-util-keysyms" ,xcb-util-keysyms)
207 ("xcb-util-renderutil" ,xcb-util-renderutil)
208 ("xcb-util-wm" ,xcb-util-wm)
210 ("libjpeg" ,libjpeg-turbo)
212 ("openssl" ,openssl-1.0)))
214 `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
215 ;; We could build it with -std=gnu++98, but then we'll get in trouble with
216 ;; ICU later. Just keep using GCC 5 for now.
222 ("pkg-config" ,pkg-config)
225 ("which" ,(@ (gnu packages base) which))))
226 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
227 ;; but we can't make them a separate output because "out" and "examples"
228 ;; would refer to each other.
229 (outputs '("out" ;112MiB core + 37MiB examples
230 "doc")) ;280MiB of HTML + code
233 (modify-phases %standard-phases
234 (add-after 'set-paths 'hide-default-gcc
235 (lambda* (#:key inputs #:allow-other-keys)
236 (let ((gcc (assoc-ref inputs "gcc")))
237 ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent
238 ;; conflicts with the GCC 5 input.
239 (setenv "CPLUS_INCLUDE_PATH"
241 (delete (string-append gcc "/include/c++")
242 (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
247 (lambda* (#:key outputs #:allow-other-keys)
248 (let ((out (assoc-ref outputs "out"))
249 (doc (assoc-ref outputs "doc")))
250 (substitute* '("configure")
251 (("/bin/pwd") (which "pwd")))
252 (substitute* "src/corelib/global/global.pri"
253 (("/bin/ls") (which "ls")))
259 "-nomake" "examples demos"
260 ;; Note: Don't pass '-docdir' since 'qmake' and
261 ;; libQtCore would record its value, thereby defeating
262 ;; the whole point of having a separate output.
263 "-datadir" (string-append out "/share/qt-" ,version
265 "-importdir" (string-append out "/lib/qt-4"
267 "-plugindir" (string-append out "/lib/qt-4"
269 "-translationdir" (string-append out "/share/qt-" ,version
271 "-demosdir" (string-append out "/share/qt-" ,version
273 "-examplesdir" (string-append out "/share/qt-" ,version
277 ;; explicitly link with dbus instead of dlopening it
279 ;; Skip the webkit module; it fails to build on armhf
280 ;; and, apart from that, may pose security risks.
282 ;; don't use the precompiled headers
284 ;; drop special machine instructions not supported
285 ;; on all instances of the target
286 ,@(if (string-prefix? "x86_64"
287 (or (%current-target-system)
301 (lambda* (#:key outputs #:allow-other-keys)
302 ;; Because of qt4-documentation-path.patch, documentation ends up
303 ;; being installed in OUT. Move it to the right place.
304 (let* ((out (assoc-ref outputs "out"))
305 (doc (assoc-ref outputs "doc"))
306 (olddoc (string-append out "/doc"))
307 (docdir (string-append doc "/share/doc/qt-" ,version)))
308 (mkdir-p (dirname docdir))
310 ;; Note: We can't use 'rename-file' here because OUT and DOC are
311 ;; different "devices" due to bind-mounts.
312 (copy-recursively olddoc docdir)
313 (delete-file-recursively olddoc)
316 (list (search-path-specification
317 (variable "QMAKEPATH")
318 (files '("lib/qt5")))
319 (search-path-specification
320 (variable "QML2_IMPORT_PATH")
321 (files '("lib/qt5/qml")))
322 (search-path-specification
323 (variable "QT_PLUGIN_PATH")
324 (files '("lib/qt5/plugins")))
325 (search-path-specification
326 (variable "XDG_DATA_DIRS")
328 (search-path-specification
329 (variable "XDG_CONFIG_DIRS")
330 (files '("etc/xdg")))))
331 (home-page "https://www.qt.io/")
332 (synopsis "Cross-platform GUI library")
333 (description "Qt is a cross-platform application and UI framework for
334 developers using C++ or QML, a CSS & JavaScript like language.")
335 (license (list license:lgpl2.1 license:lgpl3))
337 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
338 ;; see <http://hydra.gnu.org/build/112828>.
339 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
340 (supported-systems (delete "mips64el-linux" %supported-systems))))
342 (define-public qtbase
348 (uri (string-append "https://download.qt.io/official_releases/qt/"
349 (version-major+minor version) "/" version
350 "/submodules/" name "-everywhere-src-"
354 "12mjsahlma9rw3vz9a6b5h2s6ylg8b34hxc2vnlna5ll429fgfa8"))
355 ;; Use TZDIR to avoid depending on package "tzdata".
356 (patches (search-patches "qtbase-use-TZDIR.patch"
357 "qtbase-moc-ignore-gcc-macro.patch"))
358 (modules '((guix build utils)))
360 ;; corelib uses bundled harfbuzz, md4, md5, sha3
362 (with-directory-excursion "src/3rdparty"
363 (for-each delete-file-recursively
364 (list "double-conversion" "freetype" "harfbuzz-ng"
365 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
368 (build-system gnu-build-system)
371 ;; Use which the package, not the function
372 ("which" ,(@ (gnu packages base) which))))
374 `(("alsa-lib" ,alsa-lib)
377 ("double-conversion" ,double-conversion)
380 ("fontconfig" ,fontconfig)
381 ("freetype" ,freetype)
383 ("harfbuzz" ,harfbuzz)
385 ("libinput" ,libinput-minimal)
386 ("libjpeg" ,libjpeg-turbo)
390 ("libxcomposite" ,libxcomposite)
391 ("libxcursor" ,libxcursor)
392 ("libxfixes" ,libxfixes)
394 ("libxinerama" ,libxinerama)
395 ("libxkbcommon" ,libxkbcommon)
397 ("libxrandr" ,libxrandr)
398 ("libxrender" ,libxrender)
402 ("mariadb" ,mariadb "lib")
403 ("mariadb-dev" ,mariadb "dev")
407 ("postgresql" ,postgresql)
408 ("pulseaudio" ,pulseaudio)
410 ("unixodbc" ,unixodbc)
411 ("xcb-util" ,xcb-util)
412 ("xcb-util-image" ,xcb-util-image)
413 ("xcb-util-keysyms" ,xcb-util-keysyms)
414 ("xcb-util-renderutil" ,xcb-util-renderutil)
415 ("xcb-util-wm" ,xcb-util-wm)
416 ("xdg-utils" ,xdg-utils)
423 ("pkg-config" ,pkg-config)
425 ("vulkan-headers" ,vulkan-headers)
429 (modify-phases %standard-phases
430 (add-after 'configure 'patch-bin-sh
432 (substitute* '("config.status"
434 "mkspecs/features/qt_functions.prf"
435 "qmake/library/qmakebuiltins.cpp")
436 (("/bin/sh") (which "sh")))
438 (add-after 'configure 'patch-xdg-open
440 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
441 (("^.*const char \\*browsers.*$" all)
442 (string-append "*browser = QStringLiteral(\""
444 "\"); return true; \n" all)))
447 (lambda* (#:key outputs #:allow-other-keys)
448 (let ((out (assoc-ref outputs "out")))
449 (substitute* "configure"
450 (("/bin/pwd") (which "pwd")))
451 (substitute* "src/corelib/global/global.pri"
452 (("/bin/ls") (which "ls")))
453 ;; The configuration files for other Qt5 packages are searched
454 ;; through a call to "find_package" in Qt5Config.cmake, which
455 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
456 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
457 ;; components can be installed in different places.
458 (substitute* (find-files "." ".*\\.cmake")
459 (("NO_DEFAULT_PATH") ""))
460 ;; do not pass "--enable-fast-install", which makes the
461 ;; configure process fail
466 "-docdir" (string-append out "/share/doc/qt5")
467 "-headerdir" (string-append out "/include/qt5")
468 "-archdatadir" (string-append out "/lib/qt5")
469 "-datadir" (string-append out "/share/qt5")
470 "-examplesdir" (string-append
471 out "/share/doc/qt5/examples")
475 ;; These features require higher versions of Linux than the
476 ;; minimum version of the glibc. See
477 ;; src/corelib/global/minimum-linux_p.h. By disabling these
478 ;; features Qt5 applications can be used on the oldest
479 ;; kernels that the glibc supports, including the RHEL6
480 ;; (2.6.32) and RHEL7 (3.10) kernels.
481 "-no-feature-getentropy" ; requires Linux 3.17
482 "-no-feature-renameat2" ; requires Linux 3.16
484 ;; Do not build examples; if desired, these could go
485 ;; into a separate output, but for the time being, we
486 ;; prefer to save the space and build time.
487 "-no-compile-examples"
488 ;; Most "-system-..." are automatic, but some use
489 ;; the bundled copy by default.
493 ;; explicitly link with openssl instead of dlopening it
495 ;; explicitly link with dbus instead of dlopening it
497 ;; don't use the precompiled headers
499 ;; drop special machine instructions that do not have
501 ,@(if (string-prefix? "x86_64"
502 (or (%current-target-system)
508 (add-after 'install 'patch-mkspecs
509 (lambda* (#:key outputs #:allow-other-keys)
510 (let* ((out (assoc-ref outputs "out"))
511 (archdata (string-append out "/lib/qt5"))
512 (mkspecs (string-append archdata "/mkspecs"))
513 (qt_config.prf (string-append
514 mkspecs "/features/qt_config.prf")))
515 ;; For each Qt module, let `qmake' uses search paths in the
516 ;; module directory instead of all in QT_INSTALL_PREFIX.
517 (substitute* qt_config.prf
518 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
519 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
520 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
521 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
522 (("\\$\\$\\[QT_HOST_LIBS\\]")
523 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
524 (("\\$\\$\\[QT_INSTALL_BINS\\]")
525 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
527 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
528 (substitute* (string-append mkspecs "/features/qt_functions.prf")
529 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
530 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
532 ;; Resolve qmake spec files within qtbase by absolute paths.
535 (string-append mkspecs "/features/" file))
536 '("device_config.prf" "moc.prf" "qt_build_config.prf"
537 "qt_config.prf" "winrt/package_manifest.prf"))
538 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
539 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
541 (add-after 'patch-mkspecs 'patch-prl-files
542 (lambda* (#:key outputs #:allow-other-keys)
543 (let ((out (assoc-ref outputs "out")))
544 ;; Insert absolute references to the qtbase libraries because
545 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
546 ;; on context. See <https://bugs.gnu.org/38405>
547 (substitute* (find-files (string-append out "/lib") "\\.prl$")
548 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
549 (string-append out "/lib")))
551 (add-after 'unpack 'patch-paths
552 ;; Use the absolute paths for dynamically loaded libs, otherwise
553 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
555 (lambda* (#:key inputs #:allow-other-keys)
557 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
558 "cross-libc" "libc"))))
559 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
560 "src/network/kernel/qhostinfo_unix.cpp")
561 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
562 (string-append a glibc "/lib/lib" b))))
564 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
565 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
566 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
568 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
569 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
570 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
571 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
572 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
575 (list (search-path-specification
576 (variable "QMAKEPATH")
577 (files '("lib/qt5")))
578 (search-path-specification
579 (variable "QML2_IMPORT_PATH")
580 (files '("lib/qt5/qml")))
581 (search-path-specification
582 (variable "QT_PLUGIN_PATH")
583 (files '("lib/qt5/plugins")))
584 (search-path-specification
585 (variable "XDG_DATA_DIRS")
587 (search-path-specification
588 (variable "XDG_CONFIG_DIRS")
589 (files '("etc/xdg")))))
590 (home-page "https://www.qt.io/")
591 (synopsis "Cross-platform GUI library")
592 (description "Qt is a cross-platform application and UI framework for
593 developers using C++ or QML, a CSS & JavaScript like language.")
594 (license (list license:lgpl2.1 license:lgpl3))))
596 ;; qt used to refer to the monolithic Qt 5.x package
597 (define-deprecated qt qtbase)
600 (package (inherit qtbase)
605 (uri (string-append "https://download.qt.io/official_releases/qt/"
606 (version-major+minor version) "/" version
607 "/submodules/" name "-everywhere-src-"
611 "18dmfc8s428fzbk7k5vl3212b25455ayrz7s716nwyiy3ahgmmy7"))))
612 (propagated-inputs `())
613 (native-inputs `(("perl" ,perl)))
620 (modify-phases %standard-phases
621 (add-before 'configure 'configure-qmake
622 (lambda* (#:key inputs outputs #:allow-other-keys)
623 (let* ((out (assoc-ref outputs "out"))
624 (qtbase (assoc-ref inputs "qtbase"))
625 (tmpdir (string-append (getenv "TMPDIR")))
626 (qmake (string-append tmpdir "/qmake"))
627 (qt.conf (string-append tmpdir "/qt.conf")))
628 ;; Use qmake with a customized qt.conf to override install
630 (symlink (which "qmake") qmake)
631 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
632 (with-output-to-file qt.conf
638 Documentation=share/doc/qt5
641 LibraryExecutables=lib/qt5/libexec
644 Plugins=lib/qt5/plugins
645 Imports=lib/qt5/imports
646 Qml2Imports=lib/qt5/qml
647 Translations=share/qt5/translations
649 Examples=share/doc/qt5/examples
655 [EffectiveSourcePaths]
661 (lambda* (#:key inputs outputs #:allow-other-keys)
662 ;; Valid QT_BUILD_PARTS variables are:
663 ;; libs tools tests examples demos docs translations
664 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
665 (add-before 'check 'set-display
667 ;; make Qt render "offscreen", required for tests
668 (setenv "QT_QPA_PLATFORM" "offscreen")
670 (synopsis "Qt module for displaying SVGs")
671 (description "The QtSvg module provides classes for displaying the
672 contents of SVG files.")))
674 (define-public qtimageformats
675 (package (inherit qtsvg)
676 (name "qtimageformats")
680 (uri (string-append "https://download.qt.io/official_releases/qt/"
681 (version-major+minor version) "/" version
682 "/submodules/" name "-everywhere-src-"
686 "132g4rlm61pdcpcrclr1rwpbrxn7va4wjfb021mh8pn1cl0wlgkk"))
687 (modules '((guix build utils)))
690 (delete-file-recursively "src/3rdparty")
701 (synopsis "Additional Image Format plugins for Qt")
702 (description "The QtImageFormats module contains plugins for adding
703 support for MNG, TGA, TIFF and WBMP image formats.")))
705 (define-public qtx11extras
706 (package (inherit qtsvg)
711 (uri (string-append "https://download.qt.io/official_releases/qt/"
712 (version-major+minor version) "/" version
713 "/submodules/" name "-everywhere-src-"
717 "0njlh6d327nll7d8qaqrwr5x15m9yzgyar2j45qigs1f7ah896my"))))
719 (substitute-keyword-arguments (package-arguments qtsvg)
720 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
721 (native-inputs `(("perl" ,perl)))
725 (synopsis "Qt Extras for X11")
726 (description "The QtX11Extras module includes the library to access X11
727 from within Qt 5.")))
729 (define-public qtxmlpatterns
730 (package (inherit qtsvg)
731 (name "qtxmlpatterns")
735 (uri (string-append "https://download.qt.io/official_releases/qt/"
736 (version-major+minor version) "/" version
737 "/submodules/" name "-everywhere-src-"
741 "1dyg1z4349k04yyzn8xbp4f5qjgm60gz6wgzp80khpilcmk8g6i1"))))
743 (substitute-keyword-arguments (package-arguments qtsvg)
744 ((#:tests? _ #f) #f) ; TODO: Enable the tests
746 `(modify-phases ,phases
747 (add-after 'unpack 'disable-network-tests
748 (lambda _ (substitute* "tests/auto/auto.pro"
749 (("qxmlquery") "# qxmlquery")
750 (("xmlpatterns ") "# xmlpatterns"))
752 (native-inputs `(("perl" ,perl)
753 ("qtdeclarative" ,qtdeclarative)))
754 (inputs `(("qtbase" ,qtbase)))
755 (synopsis "Qt XML patterns module")
756 (description "The QtXmlPatterns module is a XQuery and XPath engine for
757 XML and custom data models. It contains programs such as xmlpatterns and
758 xmlpatternsvalidator.")))
760 (define-public qtdeclarative
761 (package (inherit qtsvg)
762 (name "qtdeclarative")
766 (uri (string-append "https://download.qt.io/official_releases/qt/"
767 (version-major+minor version) "/" version
768 "/submodules/" name "-everywhere-src-"
772 "0l0nhc2si6dl9r4s1bs45z90qqigs8jnrsyjjdy38q4pvix63i53"))))
774 (substitute-keyword-arguments (package-arguments qtsvg)
775 ((#:tests? _ #f) #f) ;TODO: Enable the tests
777 `(modify-phases ,phases
778 (add-after 'build 'fix-qt5core-install-prefix
779 (lambda* (#:key outputs #:allow-other-keys)
780 (let ((out (assoc-ref outputs "out")))
781 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
782 ;; is provided by qtdeclarative.
784 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
785 (("\\$\\{_qt5Core_install_prefix\\}") out)))
789 ("pkg-config" ,pkg-config)
791 ("python-wrapper" ,python-wrapper)
793 ("vulkan-headers" ,vulkan-headers)))
797 (synopsis "Qt QML module (Quick 2)")
798 (description "The Qt QML module provides a framework for developing
799 applications and libraries with the QML language. It defines and implements the
800 language and engine infrastructure, and provides an API to enable application
801 developers to extend the QML language with custom types and integrate QML code
802 with JavaScript and C++.")))
804 (define-public qtconnectivity
805 (package (inherit qtsvg)
806 (name "qtconnectivity")
810 (uri (string-append "https://download.qt.io/official_releases/qt/"
811 (version-major+minor version) "/" version
812 "/submodules/" name "-everywhere-src-"
816 "0a5wzin635b926b8prdwfazgy1vhyf8m6an64wp2lpkp78z7prmb"))))
819 ("pkg-config" ,pkg-config)
820 ("qtdeclarative" ,qtdeclarative)))
824 (synopsis "Qt Connectivity module")
825 (description "The Qt Connectivity modules provides modules for interacting
826 with Bluetooth and NFC.")))
828 (define-public qtwebsockets
829 (package (inherit qtsvg)
830 (name "qtwebsockets")
834 (uri (string-append "https://download.qt.io/official_releases/qt/"
835 (version-major+minor version) "/" version
836 "/submodules/" name "-everywhere-src-"
840 "116amx4mnv50k0fpswgpr5x8wjny8nbffrjmld01pzhkhfqn4vph"))))
842 (substitute-keyword-arguments (package-arguments qtsvg)
843 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
846 ("qtdeclarative" ,qtdeclarative)))
847 (inputs `(("qtbase" ,qtbase)))
848 (synopsis "Qt Web Sockets module")
849 (description "WebSocket is a web-based protocol designed to enable two-way
850 communication between a client application and a remote host. The Qt
851 WebSockets module provides C++ and QML interfaces that enable Qt applications
852 to act as a server that can process WebSocket requests, or a client that can
853 consume data received from the server, or both.")))
855 (define-public qtsensors
856 (package (inherit qtsvg)
861 (uri (string-append "https://download.qt.io/official_releases/qt/"
862 (version-major+minor version) "/" version
863 "/submodules/" name "-everywhere-src-"
867 "0qccpgbhyg9k4x5nni7xm0pyvaqia3zrcd42cn7ksf5h21lwmkxw"))))
869 (substitute-keyword-arguments (package-arguments qtsvg)
870 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
872 `(modify-phases ,phases
873 (add-after 'unpack 'fix-tests
875 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
876 (("2000") "5000") ;lengthen test timeout
877 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
881 ("qtdeclarative" ,qtdeclarative)))
882 (inputs `(("qtbase" ,qtbase)))
883 (synopsis "Qt Sensors module")
884 (description "The Qt Sensors API provides access to sensor hardware via QML
885 and C++ interfaces. The Qt Sensors API also provides a motion gesture
886 recognition API for devices.")))
888 (define-public qtmultimedia
889 (package (inherit qtsvg)
890 (name "qtmultimedia")
894 (uri (string-append "https://download.qt.io/official_releases/qt/"
895 (version-major+minor version) "/" version
896 "/submodules/" name "-everywhere-src-"
900 "1sczzcvk3c5gczz53yvp8ma6gp8aixk5pcq7wh344c9md3g8xkbs"))
901 (modules '((guix build utils)))
904 (delete-file-recursively
905 "examples/multimedia/spectrum/3rdparty")
906 ;; We also prevent the spectrum example from being built.
907 (substitute* "examples/multimedia/multimedia.pro"
911 (substitute-keyword-arguments (package-arguments qtsvg)
913 `(modify-phases ,phases
915 (lambda* (#:key outputs #:allow-other-keys)
916 (let ((out (assoc-ref outputs "out")))
917 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
918 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
919 (string-append "PREFIX=" out)))))))
920 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
923 ("pkg-config" ,pkg-config)
925 ("qtdeclarative" ,qtdeclarative)))
927 `(("alsa-lib" ,alsa-lib)
929 ("pulseaudio" ,pulseaudio)
931 ;; Gstreamer is needed for the mediaplayer plugin
932 ("gstreamer" ,gstreamer)
933 ("gst-plugins-base" ,gst-plugins-base)))
934 (synopsis "Qt Multimedia module")
935 (description "The Qt Multimedia module provides set of APIs to play and
936 record media, and manage a collection of media content. It also contains a
937 set of plugins for interacting with pulseaudio and GStreamer.")))
939 (define-public qtwayland
940 (package (inherit qtsvg)
945 (uri (string-append "https://download.qt.io/official_releases/qt/"
946 (version-major+minor version) "/" version
947 "/submodules/" name "-everywhere-src-"
951 "0al3yypy3fin62n8d1859jh0mn0fbpa161l7f37hgd4gf75365nk"))
952 (modules '((guix build utils)))
954 ;; The examples try to build and cause the build to fail
956 (delete-file-recursively "examples")
959 (substitute-keyword-arguments (package-arguments qtsvg)
961 `(modify-phases ,phases
962 (add-after 'unpack 'disable-failing-tests
964 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
965 ;; reason and breaks these two tests.
966 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
967 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
968 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
970 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
973 (add-before 'check 'set-test-environment
975 ;; Do not fail just because /etc/machine-id is missing.
976 (setenv "DBUS_FATAL_WARNINGS" "0")
981 ("pkg-config" ,pkg-config)
982 ("qtdeclarative" ,qtdeclarative)))
984 `(("fontconfig" ,fontconfig)
985 ("freetype" ,freetype)
987 ("libxcomposite" ,libxcomposite)
989 ("libxkbcommon" ,libxkbcommon)
990 ("libxrender" ,libxrender)
994 ("wayland" ,wayland)))
995 (synopsis "Qt Wayland module")
996 (description "The Qt Wayland module provides the QtWayland client and
997 compositor libraries.")))
999 (define-public qtserialport
1000 (package (inherit qtsvg)
1001 (name "qtserialport")
1005 (uri (string-append "https://download.qt.io/official_releases/qt/"
1006 (version-major+minor version) "/" version
1007 "/submodules/" name "-everywhere-src-"
1011 "08ga9a1lwj83872nxablk602z1dq0la6jqsiicvd7m1sfbfpgnd6"))))
1012 (native-inputs `(("perl" ,perl)))
1014 `(("qtbase" ,qtbase)
1017 (substitute-keyword-arguments (package-arguments qtsvg)
1019 `(modify-phases ,phases
1020 (add-after 'unpack 'patch-dlopen-paths
1021 (lambda* (#:key inputs #:allow-other-keys)
1022 (substitute* "src/serialport/qtudev_p.h"
1023 ;; Use the absolute paths for dynamically loaded libs,
1024 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1025 ;; typically is not set in guix.
1026 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1027 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1029 (synopsis "Qt Serial Port module")
1030 (description "The Qt Serial Port module provides the library for
1031 interacting with serial ports from within Qt.")))
1033 (define-public qtserialbus
1034 (package (inherit qtsvg)
1035 (name "qtserialbus")
1039 (uri (string-append "https://download.qt.io/official_releases/qt/"
1040 (version-major+minor version) "/" version
1041 "/submodules/" name "-everywhere-src-"
1045 "14bahg82jciciqkl74q9hvf3a8kp3pk5v731vp2416k4b8bn4xqb"))))
1047 `(("qtbase" ,qtbase)
1048 ("qtserialport" ,qtserialport)))
1049 (synopsis "Qt Serial Bus module")
1050 (description "The Qt Serial Bus API provides classes and functions to
1051 access the various industrial serial buses and protocols, such as CAN, ModBus,
1054 (define-public qtwebchannel
1055 (package (inherit qtsvg)
1056 (name "qtwebchannel")
1060 (uri (string-append "https://download.qt.io/official_releases/qt/"
1061 (version-major+minor version) "/" version
1062 "/submodules/" name "-everywhere-src-"
1066 "0x7q66994pw6cd0f505bmirw1sssqs740zaw8lyqqqr32m2ch7bx"))))
1069 ("qtdeclarative" ,qtdeclarative)
1070 ("qtwebsockets" ,qtwebsockets)))
1071 (inputs `(("qtbase" ,qtbase)))
1072 (synopsis "Web communication library for Qt")
1073 (description "The Qt WebChannel module enables peer-to-peer communication
1074 between the host (QML/C++ application) and the client (HTML/JavaScript
1075 application). The transport mechanism is supported out of the box by the two
1076 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1078 (define-public qtwebglplugin
1079 (package (inherit qtsvg)
1080 (name "qtwebglplugin")
1084 (uri (string-append "https://download.qt.io/official_releases/qt/"
1085 (version-major+minor version) "/" version
1086 "/submodules/" name "-everywhere-src-"
1090 "05rl657848fsprsnabdqb5z363c6drjc32k59223vl351f8ihhgb"))))
1092 (substitute-keyword-arguments (package-arguments qtsvg)
1094 `(modify-phases ,phases
1095 (add-after 'unpack 'disable-network-tests
1096 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1097 (("webgl") "# webgl"))
1103 ("qtdeclarative" ,qtdeclarative)
1104 ("qtwebsockets" ,qtwebsockets)
1106 (synopsis "QPA plugin for running an application via a browser using
1107 streamed WebGL commands")
1108 (description "Qt back end that uses WebGL for rendering. It allows Qt
1109 applications (with some limitations) to run in a web browser that supports
1110 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1111 compatible web browser without the use of plug-ins. The API is similar to
1112 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1114 (define-public qtwebview
1115 (package (inherit qtsvg)
1120 (uri (string-append "https://download.qt.io/official_releases/qt/"
1121 (version-major+minor version) "/" version
1122 "/submodules/" name "-everywhere-src-"
1126 "0jzzcm7z5njkddzfhmyjz4dbbzq8h93980cci4479zc4xq9r47y6"))))
1130 `(("qtbase" ,qtbase)
1131 ("qtdeclarative" ,qtdeclarative)))
1132 (synopsis "Display web content in a QML application")
1133 (description "Qt WebView provides a way to display web content in a QML
1134 application without necessarily including a full web browser stack by using
1135 native APIs where it makes sense.")))
1137 (define-public qtlocation
1138 (package (inherit qtsvg)
1143 (uri (string-append "https://download.qt.io/official_releases/qt/"
1144 (version-major+minor version) "/" version
1145 "/submodules/" name "-everywhere-src-"
1149 "1k3m8zhbv04yrqvj7jlnh8f9xczdsmla59j9gcwsqvbg76y0hxy3"))))
1151 (substitute-keyword-arguments (package-arguments qtsvg)
1152 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1155 ("qtdeclarative" ,qtdeclarative)
1156 ("qtquickcontrols" ,qtquickcontrols)
1157 ("qtserialport" ,qtserialport)))
1160 ("openssl" ,openssl)
1163 (synopsis "Qt Location and Positioning modules")
1164 (description "The Qt Location module provides an interface for location,
1165 positioning and geolocation plugins.")))
1167 (define-public qttools
1168 (package (inherit qtsvg)
1173 (uri (string-append "https://download.qt.io/official_releases/qt/"
1174 (version-major+minor version) "/" version
1175 "/submodules/" name "-everywhere-src-"
1179 "1iakl3hlyg51ri1czmis8mmb257b0y1zk2a2knybd3mq69wczc2v"))))
1181 (substitute-keyword-arguments (package-arguments qtsvg)
1182 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1185 ("qtdeclarative" ,qtdeclarative)
1186 ("vulkan-headers" ,vulkan-headers)))
1189 ("qtbase" ,qtbase)))
1190 (synopsis "Qt Tools and Designer modules")
1191 (description "The Qt Tools module provides a set of applications to browse
1192 the documentation, translate applications, generate help files and other stuff
1193 that helps in Qt development.")))
1195 (define-public qtscript
1196 (package (inherit qtsvg)
1201 (uri (string-append "https://download.qt.io/official_releases/qt/"
1202 (version-major+minor version) "/" version
1203 "/submodules/" name "-everywhere-src-"
1207 "1zlvg3hc6h70d789g3kv6dxbwswzkskkm00bdgl01grwrdy4izg9"))
1208 (patches (search-patches "qtscript-disable-tests.patch"))))
1211 ("qttools" ,qttools)))
1213 `(("qtbase" ,qtbase)))
1214 (synopsis "Qt Script module")
1215 (description "Qt provides support for application scripting with ECMAScript.
1216 The following guides and references cover aspects of programming with
1217 ECMAScript and Qt.")))
1219 (define-public qtquickcontrols
1220 (package (inherit qtsvg)
1221 (name "qtquickcontrols")
1225 (uri (string-append "https://download.qt.io/official_releases/qt/"
1226 (version-major+minor version) "/" version
1227 "/submodules/" name "-everywhere-src-"
1231 "0qa4dlhn3iv9yvaic8hw86v6h8rn9sgq8xjfdaym04pfshfyypfm"))))
1233 (substitute-keyword-arguments (package-arguments qtsvg)
1234 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1236 `(("qtbase" ,qtbase)
1237 ("qtdeclarative" ,qtdeclarative)))
1238 (synopsis "Qt Quick Controls and other Quick modules")
1239 (description "The QtScript module provides classes for making Qt
1240 applications scriptable. This module provides a set of extra components that
1241 can be used to build complete interfaces in Qt Quick.")))
1243 (define-public qtquickcontrols2
1244 (package (inherit qtsvg)
1245 (name "qtquickcontrols2")
1249 (uri (string-append "https://download.qt.io/official_releases/qt/"
1250 (version-major+minor version) "/" version
1251 "/submodules/" name "-everywhere-src-"
1255 "0q0mk2mjlf9ll0gdrdzxy8096s6g9draaqiwrlvdpa7lv14x7xzs"))))
1257 (substitute-keyword-arguments (package-arguments qtsvg)
1258 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1260 `(("qtbase" ,qtbase)
1261 ("qtdeclarative" ,qtdeclarative)))
1262 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1263 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1264 module that provides platform integration: native dialogs, menus and menu bars,
1265 and tray icons. It falls back to Qt Widgets when a native implementation is
1268 (define-public qtgraphicaleffects
1269 (package (inherit qtsvg)
1270 (name "qtgraphicaleffects")
1274 (uri (string-append "https://download.qt.io/official_releases/qt/"
1275 (version-major+minor version) "/" version
1276 "/submodules/" name "-everywhere-src-"
1280 "03xmwhapv0b2qj661iaqqrvhxc7qiid0acrp6rj85824ha2pyyj8"))))
1282 (substitute-keyword-arguments (package-arguments qtsvg)
1283 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1285 `(("qtbase" ,qtbase)
1286 ("qtdeclarative" ,qtdeclarative)))
1287 (synopsis "Qt Graphical Effects module")
1288 (description "The Qt Graphical Effects module provides a set of QML types
1289 for adding visually impressive and configurable effects to user interfaces.
1290 Effects are visual items that can be added to Qt Quick user interface as UI
1291 components. The API consists of over 20 effects provided as separate QML
1292 types. The effects cover functional areas such as blending, masking, blurring,
1293 coloring, and many more.")))
1295 (define-public qtgamepad
1296 (package (inherit qtsvg)
1301 (uri (string-append "https://download.qt.io/official_releases/qt/"
1302 (version-major+minor version) "/" version
1303 "/submodules/" name "-everywhere-src-"
1307 "00wd3h465waxdghg2vdhs5pkj0xikwjn88l12477dksm8zdslzgp"))))
1310 ("pkg-config" ,pkg-config)))
1312 `(("fontconfig" ,fontconfig)
1313 ("freetype" ,freetype)
1314 ("libxrender" ,libxrender)
1317 ("qtdeclarative" ,qtdeclarative)))
1318 (synopsis "Qt Gamepad module")
1319 (description "The Qt Gamepad module is an add-on library that enables Qt
1320 applications to support the use of gamepad hardware and in some cases remote
1321 control equipment. The module provides both QML and C++ interfaces. The
1322 primary target audience are embedded devices with fullscreen user interfaces,
1323 and mobile applications targeting TV-like form factors.")))
1325 (define-public qtscxml
1326 (package (inherit qtsvg)
1331 (uri (string-append "https://download.qt.io/official_releases/qt/"
1332 (version-major+minor version) "/" version
1333 "/submodules/" name "-everywhere-src-"
1337 "141pfschv6zmcvvn3pi7f5vb4nf96zpngy80f9bly1sn58syl303"))
1338 (modules '((guix build utils)))
1341 (delete-file-recursively "tests/3rdparty")
1342 ;; the scion test refers to the bundled 3rd party test code.
1343 (substitute* "tests/auto/auto.pro"
1347 `(("qtbase" ,qtbase)
1348 ("qtdeclarative" ,qtdeclarative)))
1349 (synopsis "Qt SCXML module")
1350 (description "The Qt SCXML module provides functionality to create state
1351 machines from SCXML files. This includes both dynamically creating state
1352 machines (loading the SCXML file and instantiating states and transitions) and
1353 generating a C++ file that has a class implementing the state machine. It
1354 also contains functionality to support data models and executable content.")))
1356 (define-public qtpurchasing
1357 (package (inherit qtsvg)
1358 (name "qtpurchasing")
1362 (uri (string-append "https://download.qt.io/official_releases/qt/"
1363 (version-major+minor version) "/" version
1364 "/submodules/" name "-everywhere-src-"
1368 "0lg8x7g7dkf95xwxq8b4yw4ypdz68igkscya96xwbklg3q08gc39"))))
1370 `(("qtbase" ,qtbase)
1371 ("qtdeclarative" ,qtdeclarative)))
1372 (synopsis "Qt Purchasing module")
1373 (description "The Qt Purchasing module provides and in-app API for
1374 purchasing goods and services.")))
1376 (define-public qtcharts
1377 (package (inherit qtsvg)
1382 (uri (string-append "https://download.qt.io/official_releases/qt/"
1383 (version-major+minor version) "/" version
1384 "/submodules/" name "-everywhere-src-"
1388 "1drvm15i6n10b6a1acgarig120ppvqh3r6fqqdn8i3blx81m5cmd"))))
1390 (substitute-keyword-arguments (package-arguments qtsvg)
1391 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1393 `(("qtbase" ,qtbase)
1394 ("qtdeclarative" ,qtdeclarative)))
1395 (synopsis "Qt Charts module")
1396 (description "The Qt Charts module provides a set of easy to use chart
1397 components. It uses the Qt Graphics View Framework, therefore charts can be
1398 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1399 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1400 selecting one of the charts themes.")
1401 (license license:gpl3)))
1403 (define-public qtdatavis3d
1404 (package (inherit qtsvg)
1405 (name "qtdatavis3d")
1409 (uri (string-append "https://download.qt.io/official_releases/qt/"
1410 (version-major+minor version) "/" version
1411 "/submodules/" name "-everywhere-src-"
1415 "080fkpxg70m3c697wfnkjhca58b7r1xsqd559jzb21985pdh6g3j"))))
1417 (substitute-keyword-arguments (package-arguments qtsvg)
1418 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1420 `(("qtbase" ,qtbase)
1421 ("qtdeclarative" ,qtdeclarative)))
1422 (synopsis "Qt Data Visualization module")
1423 (description "The Qt Data Visualization module provides a way to visualize
1424 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1425 visualizing depth maps and large quantities of rapidly changing data, such as
1426 data received from multiple sensors. The look and feel of graphs can be
1427 customized by using themes or by adding custom items and labels to them.")
1428 (license license:gpl3)))
1430 (define-public qtnetworkauth
1431 (package (inherit qtsvg)
1432 (name "qtnetworkauth")
1436 (uri (string-append "https://download.qt.io/official_releases/qt/"
1437 (version-major+minor version) "/" version
1438 "/submodules/" name "-everywhere-src-"
1442 "0pi6p7bq54kzij2p69cgib7n55k69jsq0yqq09yli645s4ym202g"))))
1444 (substitute-keyword-arguments (package-arguments qtsvg)
1446 `(modify-phases ,phases
1447 (add-after 'unpack 'remove-failing-test
1449 ;; These tests can't find their test data.
1450 (substitute* "tests/auto/auto.pro"
1451 (("oauth1 ") "# oauth1 "))
1454 `(("qtbase" ,qtbase)))
1455 (synopsis "Qt Network Authorization module")
1456 (description "The Qt Network Authorization module provides an
1457 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1459 (define-public qtremoteobjects
1460 (package (inherit qtsvg)
1461 (name "qtremoteobjects")
1465 (uri (string-append "https://download.qt.io/official_releases/qt/"
1466 (version-major+minor version) "/" version
1467 "/submodules/" name "-everywhere-src-"
1471 "1mhlws5w0igf5hw0l90p6dz6k7w16dqfbnk2li0zxdmayk2039m6"))))
1473 (substitute-keyword-arguments (package-arguments qtsvg)
1475 `(modify-phases ,phases
1476 (add-after 'unpack 'remove-failing-test
1478 ;; This test can't find its imports.
1479 (substitute* "tests/auto/qml/qml.pro"
1480 (("integration") "# integration")
1481 (("usertypes") "# usertypes"))
1482 ;; disable failing tests: they need network
1483 (substitute* "tests/auto/auto.pro"
1484 (("integration_multiprocess proxy_multiprocess integration_external restart")
1485 "integration_multiprocess"))
1488 `(("qtbase" ,qtbase)
1489 ("qtdeclarative" ,qtdeclarative)))
1490 (synopsis "Qt Remote Objects module")
1491 (description "The Qt Remote Objects module is an @dfn{inter-process
1492 communication} (IPC) module developed for Qt. The idea is to extend existing
1493 Qt's functionalities to enable an easy exchange of information between
1494 processes or computers.")))
1496 (define-public qtspeech
1497 (package (inherit qtsvg)
1502 (uri (string-append "https://download.qt.io/official_releases/qt/"
1503 (version-major+minor version) "/" version
1504 "/submodules/" name "-everywhere-src-"
1508 "1nn6kspbp8hfkz1jhzc1qx1m9z7r1bgkdqgi9n4vl1q25yk8x7jy"))))
1511 (substitute-keyword-arguments (package-arguments qtsvg)
1512 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1514 `(("qtbase" ,qtbase)))
1517 ("qtdeclarative" ,qtdeclarative)
1518 ("qtmultimedia" ,qtmultimedia)
1519 ("qtxmlpatterns" ,qtxmlpatterns)))
1520 (synopsis "Qt Speech module")
1521 (description "The Qt Speech module enables a Qt application to support
1522 accessibility features such as text-to-speech, which is useful for end-users
1523 who are visually challenged or cannot access the application for whatever
1524 reason. The most common use case where text-to-speech comes in handy is when
1525 the end-user is driving and cannot attend the incoming messages on the phone.
1526 In such a scenario, the messaging application can read out the incoming
1529 (define-public qtwebengine
1532 (name "qtwebengine")
1533 (version (package-version qtbase))
1537 (uri (string-append "https://download.qt.io/official_releases/qt/"
1538 (version-major+minor version) "/" version
1539 "/submodules/" name "-everywhere-src-"
1543 "0iy9lsl6zxlkca6x2p1506hbj3wmhnaipg23z027wfccbnkxcsg1"))
1544 (modules '((ice-9 ftw)
1548 (guix build utils)))
1551 (let ((preserved-third-party-files
1552 '("base/third_party/cityhash"
1553 "base/third_party/dmg_fp"
1554 "base/third_party/dynamic_annotations"
1555 "base/third_party/icu"
1556 "base/third_party/libevent"
1557 "base/third_party/nspr"
1558 "base/third_party/superfasthash"
1559 "base/third_party/symbolize"
1560 "base/third_party/xdg_mime"
1561 "base/third_party/xdg_user_dirs"
1562 "net/third_party/mozilla_security_manager"
1563 "net/third_party/nss"
1564 "net/third_party/quiche"
1565 "net/third_party/uri_template"
1566 "third_party/abseil-cpp"
1568 "third_party/angle/src/common/third_party/base"
1569 "third_party/angle/src/common/third_party/smhasher"
1570 "third_party/angle/src/common/third_party/xxhash"
1571 "third_party/angle/src/third_party/compiler"
1572 "third_party/axe-core"
1574 "third_party/boringssl"
1575 "third_party/boringssl/src/third_party/fiat"
1576 "third_party/boringssl/src/third_party/sike"
1577 "third_party/boringssl/linux-x86_64/crypto/third_party/sike"
1578 "third_party/boringssl/linux-aarch64/crypto/third_party/sike"
1579 "third_party/breakpad"
1580 "third_party/brotli"
1583 "third_party/crc32c"
1586 "third_party/emoji-segmenter"
1587 "third_party/ffmpeg"
1588 "third_party/googletest"
1589 "third_party/hunspell"
1590 "third_party/iccjpeg"
1592 "third_party/inspector_protocol"
1593 "third_party/jinja2"
1594 "third_party/jsoncpp"
1595 "third_party/jstemplate"
1596 "third_party/khronos"
1597 "third_party/leveldatabase"
1598 "third_party/libaddressinput"
1599 "third_party/libjingle_xmpp"
1600 "third_party/libjpeg"
1601 "third_party/libpng"
1602 "third_party/libsrtp"
1603 "third_party/libsync"
1604 "third_party/libudev"
1605 "third_party/libvpx"
1606 "third_party/libwebm"
1607 "third_party/libwebp"
1608 "third_party/libxml"
1609 "third_party/libxslt"
1610 "third_party/libyuv"
1612 "third_party/markupsafe"
1613 "third_party/mesa_headers"
1614 "third_party/metrics_proto"
1615 "third_party/modp_b64"
1617 "third_party/one_euro_filter"
1620 "third_party/perfetto"
1623 "third_party/polymer"
1624 "third_party/protobuf"
1625 "third_party/pyjson5"
1627 "third_party/rnnoise"
1629 "third_party/skia/include/third_party/skcms/skcms.h"
1630 "third_party/skia/include/third_party/vulkan"
1631 "third_party/skia/third_party/gif"
1632 "third_party/skia/third_party/skcms"
1633 "third_party/skia/third_party/vulkanmemoryallocator"
1634 "third_party/smhasher"
1635 "third_party/snappy"
1636 "third_party/sqlite"
1637 "third_party/usb_ids"
1638 "third_party/usrsctp"
1639 "third_party/web-animations-js"
1640 "third_party/webrtc"
1641 "third_party/webrtc/common_audio/third_party/fft4g"
1642 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
1643 "third_party/webrtc/modules/third_party/fft"
1644 "third_party/webrtc/modules/third_party/g711"
1645 "third_party/webrtc/modules/third_party/g722"
1646 "third_party/webrtc/rtc_base/third_party/base64"
1647 "third_party/webrtc/rtc_base/third_party/sigslot"
1648 "third_party/webrtc_overrides"
1649 "third_party/widevine/cdm/widevine_cdm_common.h"
1650 "third_party/widevine/cdm/widevine_cdm_version.h"
1654 "url/third_party/mozilla"
1655 "v8/src/third_party/utf8-decoder"
1656 "v8/src/third_party/valgrind"
1657 "v8/src/third_party/siphash"
1658 "v8/third_party/v8/builtins"
1659 "v8/third_party/inspector_protocol"))
1660 (protected (make-regexp "\\.(gn|gyp)i?$")))
1661 (define preserved-club
1662 (map (lambda (member)
1663 (string-append "./" member))
1664 preserved-third-party-files))
1665 (define (empty? dir)
1666 (equal? (scandir dir) '("." "..")))
1667 (define (third-party? file)
1668 (string-contains file "third_party/"))
1669 (define (useless? file)
1670 (any (cute string-suffix? <> file)
1671 '(".zip" ".so" ".dll" ".exe" ".jar")))
1672 (define (parents child)
1673 ;; Return all parent directories of CHILD up to and including
1674 ;; the closest "third_party".
1675 (let* ((dirs (match (string-split child #\/)
1676 ((dirs ... last) dirs)))
1677 (closest (list-index (lambda (dir)
1678 (string=? "third_party" dir))
1680 (delim (- (length dirs) closest)))
1681 (fold (lambda (dir prev)
1682 (cons (string-append (car prev) "/" dir)
1684 (list (string-join (list-head dirs delim) "/"))
1685 (list-tail dirs delim))))
1686 (define (remove-loudly file)
1687 (format #t "deleting ~a...~%" file)
1690 (define (delete-unwanted-files child stat flag base level)
1692 ((or 'regular 'symlink 'stale-symlink)
1693 (when (third-party? child)
1694 (unless (or (member child preserved-club)
1695 (any (cute member <> preserved-club)
1697 (regexp-exec protected child))
1698 (remove-loudly child)))
1699 (when (and (useless? child) (file-exists? child))
1700 (remove-loudly child))
1702 ('directory-processed
1703 (when (empty? child)
1708 (with-directory-excursion "src/3rdparty"
1709 ;; TODO: Try removing "gn" too for future versions of qtwebengine.
1710 (delete-file-recursively "ninja")
1712 (with-directory-excursion "chromium"
1713 ;; Delete bundled software and binaries that were not explicitly
1715 (nftw "." delete-unwanted-files 'depth 'physical)
1717 ;; Assert that each preserved item is present to catch removals.
1718 (for-each (lambda (third-party)
1719 (unless (file-exists? third-party)
1720 (error (format #f "~s does not exist!~%" third-party))))
1723 ;; Use relative header locations instead of hard coded ones.
1725 "base/third_party/dynamic_annotations/dynamic_annotations.c"
1726 (("base/third_party/valgrind") "valgrind"))
1728 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
1729 (("third_party/curl") "curl"))
1731 '("components/viz/common/gpu/vulkan_context_provider.h"
1732 "components/viz/common/resources/resource_format_utils.h"
1733 "gpu/config/gpu_util.cc")
1734 (("third_party/vulkan/include/")
1737 ;; Replace Google Analytics bundle with an empty file and hope
1739 (mkdir-p "third_party/analytics")
1740 (call-with-output-file
1741 "third_party/analytics/google-analytics-bundle.js"
1744 ;; Do not enable support for loading the Widevine DRM plugin.
1745 (substitute* "src/buildtools/config/common.pri"
1746 (("enable_widevine=true")
1747 "enable_widevine=false"))
1749 (build-system gnu-build-system)
1756 ("pkg-config" ,pkg-config)
1757 ("python-2" ,python-2)
1760 `(("alsa-lib" ,alsa-lib)
1762 ("cups-minimal" ,cups-minimal)
1766 ("fontconfig" ,fontconfig)
1767 ("harbuzz" ,harfbuzz)
1769 ("jsoncpp" ,jsoncpp)
1772 ("libevent" ,libevent)
1773 ("libgcrypt" ,libgcrypt)
1774 ("libjpeg" ,libjpeg-turbo)
1776 ("libwebp" ,libwebp)
1779 ("libxcomposite" ,libxcomposite)
1780 ("libxcursor" ,libxcursor)
1782 ("libxkbcommon" ,libxkbcommon)
1783 ;; FIXME: libxml2 needs to built with icu support though it links to
1784 ;; libxml2 configure summary still states "Checking for compatible
1785 ;; system libxml2... no"
1786 ("libxml2" ,libxml2)
1787 ("libxrandr" ,libxrandr)
1788 ("libxrender" ,libxrender)
1789 ("libxslt" ,libxslt)
1790 ("libxtst" ,libxtst)
1792 ("minizip" ,minizip)
1795 ("pciutils" ,pciutils)
1796 ("protobuf" ,protobuf)
1797 ("pulseaudio" ,pulseaudio)
1799 ("qtdeclarative" ,qtdeclarative)
1800 ("qtmultimedia" ,qtmultimedia)
1801 ("qtwebchannel" ,qtwebchannel)
1805 ("valgrind" ,valgrind)
1806 ("vulkan-headers" ,vulkan-headers)
1807 ("xcb-util" ,xcb-util)))
1809 (substitute-keyword-arguments (package-arguments qtsvg)
1811 `(modify-phases ,phases
1812 (add-after 'unpack 'fix-build-with-newer-re2
1814 ;; Adjust for API change in re2, taken from
1815 ;; https://chromium-review.googlesource.com/c/chromium/src/+/2145261
1816 (substitute* "src/3rdparty/chromium/components/autofill/core\
1817 /browser/address_rewriter.cc"
1818 (("options\\.set_utf8\\(true\\)")
1819 "options.set_encoding(RE2::Options::EncodingUTF8)"))
1821 (add-after 'unpack 'patch-ninja-version-check
1823 ;; The build system assumes the system Ninja is too old because
1824 ;; it only checks for versions 1.7 through 1.9. We have 1.10.
1825 (substitute* "configure.pri"
1826 (("1\\.\\[7-9\\]\\.\\*")
1827 "1.([7-9]|1[0-9]).*"))
1829 (add-before 'configure 'substitute-source
1830 (lambda* (#:key inputs outputs #:allow-other-keys)
1831 (let ((out (assoc-ref outputs "out"))
1832 (nss (assoc-ref inputs "nss"))
1833 (udev (assoc-ref inputs "udev")))
1834 ;; Qtwebengine is not installed into the same prefix as
1835 ;; qtbase. Some qtbase QTLibraryInfo constants will not
1836 ;; work. Replace with the full path to the qtwebengine
1837 ;; translations and locales in the store.
1838 (substitute* "src/core/web_engine_library_info.cpp"
1839 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
1840 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
1841 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
1842 (string-append "QLatin1String(\"" out "/share/qt5\")")))
1843 ;; Substitute full dynamic library path for nss.
1844 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
1846 (string-append nss "/lib/nss/libnssckbi.so")))
1847 ;; Substitute full dynamic library path for udev.
1848 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
1850 (string-append udev "/lib/libudev.so.1")))
1852 (add-before 'configure 'set-env
1854 ;; Avoids potential race conditions.
1855 (setenv "PYTHONDONTWRITEBYTECODE" "1")
1856 (setenv "NINJAFLAGS"
1857 (string-append "-k1" ;less verbose build output
1858 ;; Respect the '--cores' option of 'guix build'.
1859 " -j" (number->string (parallel-job-count))))
1863 ;; Valid QT_BUILD_PARTS variables are:
1864 ;; libs tools tests examples demos docs translations
1865 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
1866 "--webengine-printing-and-pdf=no"
1867 "--webengine-ffmpeg=system"
1868 "--webengine-icu=system"
1869 "--webengine-pepper-plugins=no")))))
1870 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
1871 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
1872 ;; before running tests.
1873 ((#:tests? _ #f) #f)))
1874 (native-search-paths
1875 (list (search-path-specification
1876 (file-type 'regular)
1878 (variable "QTWEBENGINEPROCESS_PATH")
1879 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
1880 (home-page "https://wiki.qt.io/QtWebEngine")
1881 (synopsis "Qt WebEngine module")
1882 (description "The Qt5WebEngine module provides support for web applications
1883 using the Chromium browser project. The Chromium source code has Google services
1884 and binaries removed, and adds modular support for using system libraries.")
1885 (license license:lgpl2.1+)))
1887 (define-public python-sip
1894 (uri (string-append "https://www.riverbankcomputing.com/static/"
1895 "Downloads/sip/" version "/sip-" version ".tar.gz"))
1898 "07kyd56xgbb40ljb022rq82shgxprlbl0z27mpf1b6zd00w8dgf0"))))
1899 (build-system gnu-build-system)
1901 `(("python" ,python-wrapper)))
1903 `(#:tests? #f ; no check target
1904 #:modules ((srfi srfi-1)
1905 ,@%gnu-build-system-modules)
1907 (modify-phases %standard-phases
1909 (lambda* (#:key inputs outputs #:allow-other-keys)
1910 (let* ((out (assoc-ref outputs "out"))
1911 (bin (string-append out "/bin"))
1912 (include (string-append out "/include"))
1913 (python (assoc-ref inputs "python"))
1915 (last (string-split python #\-)))
1918 (take (string-split python-version #\.) 2)
1920 (lib (string-append out "/lib/python"
1923 (invoke "python" "configure.py"
1926 "--incdir" include)))))))
1927 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1928 (synopsis "Python binding creator for C and C++ libraries")
1930 "SIP is a tool to create Python bindings for C and C++ libraries. It
1931 was originally developed to create PyQt, the Python bindings for the Qt
1932 toolkit, but can be used to create bindings for any C or C++ library.
1934 SIP comprises a code generator and a Python module. The code generator
1935 processes a set of specification files and generates C or C++ code, which
1936 is then compiled to create the bindings extension module. The SIP Python
1937 module provides support functions to the automatically generated code.")
1938 ;; There is a choice between a python like license, gpl2 and gpl3.
1939 ;; For compatibility with pyqt, we need gpl3.
1940 (license license:gpl3)))
1942 (define-public python2-sip
1943 (package (inherit python-sip)
1944 (name "python2-sip")
1946 `(("python" ,python-2)))))
1948 (define-public python-pyqt
1950 (name "python-pyqt")
1955 (uri (string-append "https://www.riverbankcomputing.com/static/"
1956 "Downloads/PyQt5/" version "/PyQt5_gpl-"
1960 "041155bdzp57jy747p5d59740c55yy3241cy1x2lgcdsvqvzmc0d"))
1961 (patches (search-patches "pyqt-configure.patch"
1962 "pyqt-unbundled-qt.patch"
1963 "pyqt-public-sip.patch"))))
1964 (build-system gnu-build-system)
1966 `(("qtbase" ,qtbase))) ; for qmake
1968 `(("python-sip" ,python-sip)))
1970 `(("python" ,python-wrapper)
1972 ("qtconnectivity" ,qtconnectivity)
1973 ("qtdeclarative" ,qtdeclarative)
1974 ("qtlocation" ,qtlocation)
1975 ("qtmultimedia" ,qtmultimedia)
1976 ("qtsensors" ,qtsensors)
1977 ("qtserialport" ,qtserialport)
1979 ("qttools" ,qttools)
1980 ("qtwebchannel" ,qtwebchannel)
1981 ("qtwebkit" ,qtwebkit)
1982 ("qtwebsockets" ,qtwebsockets)
1983 ("qtx11extras" ,qtx11extras)
1984 ("qtxmlpatterns" ,qtxmlpatterns)))
1986 `(#:modules ((srfi srfi-1)
1987 ,@%gnu-build-system-modules)
1989 (modify-phases %standard-phases
1990 ;; When building python-pyqtwebengine, <qprinter.h> can not be
1991 ;; included. Here we substitute the full path to the header in the
1993 (add-before 'configure 'substitute-source
1994 (lambda* (#:key inputs #:allow-other-keys)
1995 (let* ((qtbase (assoc-ref inputs "qtbase"))
1996 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
1997 (substitute* "sip/QtPrintSupport/qprinter.sip"
2002 (lambda* (#:key inputs outputs #:allow-other-keys)
2003 (let* ((out (assoc-ref outputs "out"))
2004 (bin (string-append out "/bin"))
2005 (sip (string-append out "/share/sip"))
2006 (plugins (string-append out "/lib/qt5/plugins"))
2007 (designer (string-append plugins "/designer"))
2008 (qml (string-append plugins "/PyQt5"))
2009 (python (assoc-ref inputs "python"))
2011 (last (string-split python #\-)))
2014 (take (string-split python-version #\.) 2)
2016 (lib (string-append out "/lib/python"
2019 (stubs (string-append lib "/PyQt5")))
2020 (invoke "python" "configure.py"
2024 "--designer-plugindir" designer
2025 "--qml-plugindir" qml
2026 ; Where to install the PEP 484 Type Hints stub
2027 ; files. Without this the stubs are tried to be
2028 ; installed into the python package's
2029 ; site-package directory, which is read-only.
2031 "--sipdir" sip)))))))
2032 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
2033 (synopsis "Python bindings for Qt")
2035 "PyQt is a set of Python v2 and v3 bindings for the Qt application
2036 framework. The bindings are implemented as a set of Python modules and
2037 contain over 620 classes.")
2038 (license license:gpl3)))
2040 (define-public python-pyqtwebengine
2042 (name "python-pyqtwebengine")
2048 "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/"
2049 version "/PyQtWebEngine_gpl-" version ".tar.gz"))
2052 "0wylkd7fh2g27y3710rpxmj9wx0wpi3z7qbv6khiddm15rkh81w6"))))
2053 (build-system gnu-build-system)
2055 `(("python" ,python)
2056 ("python-sip" ,python-sip)
2057 ;; qtbase is required for qmake
2058 ("qtbase" ,qtbase)))
2060 `(("python" ,python-wrapper)
2061 ("python-sip" ,python-sip)
2062 ("python-pyqt" ,python-pyqt)
2065 ("qtdeclarative" ,qtdeclarative)
2066 ("qtwebchannel" ,qtwebchannel)
2067 ("python-pyqt" ,python-pyqt)
2068 ("qtwebengine" ,qtwebengine)))
2070 `(#:modules ((srfi srfi-1)
2071 ((guix build python-build-system) #:select (python-version))
2072 ,@%gnu-build-system-modules)
2073 #:imported-modules ((guix build python-build-system)
2074 ,@%gnu-build-system-modules)
2076 (modify-phases %standard-phases
2078 (lambda* (#:key inputs outputs #:allow-other-keys)
2079 (let* ((out (assoc-ref outputs "out"))
2080 (sipdir (string-append out "/share/sip"))
2081 (pyqt-sipdir (string-append
2082 (assoc-ref inputs "python-pyqt") "/share/sip"))
2083 (python (assoc-ref inputs "python"))
2084 (lib (string-append out "/lib/python"
2085 (python-version python)
2086 "/site-packages/PyQt5"))
2087 (stubs (string-append lib "/PyQt5")))
2090 (invoke "python" "configure.py"
2097 "--pyqt-sipdir" pyqt-sipdir))))
2098 ;; Because this has a different prefix than python-pyqt then we need
2099 ;; to make this a namespace of it's own
2100 (add-after 'install 'make-namespace
2101 (lambda* (#:key inputs outputs #:allow-other-keys)
2102 (let* ((__init__.py (string-append
2103 (assoc-ref outputs "out")
2105 (python-version (assoc-ref inputs "python"))
2106 "/site-packages/PyQt5/__init__.py")))
2107 (with-output-to-file __init__.py
2108 (lambda _ (display "
2109 from pkgutil import extend_path
2110 __path__ = extend_path(__path__, __name__)
2113 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
2114 (synopsis "Python bindings for QtWebEngine")
2116 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
2117 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
2118 set of three modules. Prior to v5.12 these bindings were part of PyQt
2120 (license license:gpl3)))
2122 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
2123 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
2124 ;; packages that could be used together.
2125 (define-public python-pyqt-without-qtwebkit
2126 (package (inherit python-pyqt)
2127 (name "python-pyqt-without-qtwebkit")
2129 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
2131 (define-public python2-pyqt
2132 (package (inherit python-pyqt)
2133 (name "python2-pyqt")
2135 `(("python-sip" ,python2-sip)
2136 ("qtbase" ,qtbase)))
2138 `(("python" ,python-2)
2139 ("python2-enum34" ,python2-enum34)
2140 ,@(alist-delete "python" (package-inputs python-pyqt))))))
2142 (define-public python2-pyqt-4
2143 (package (inherit python-pyqt)
2144 (name "python2-pyqt")
2150 (string-append "mirror://sourceforge/pyqt/PyQt4/"
2151 "PyQt-" version "/PyQt4_gpl_x11-"
2155 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
2157 `(("python-sip" ,python2-sip)
2159 (inputs `(("python" ,python-2)))
2161 `(#:tests? #f ; no check target
2162 #:modules ((srfi srfi-1)
2163 ,@%gnu-build-system-modules)
2165 (modify-phases %standard-phases
2167 (lambda* (#:key inputs outputs #:allow-other-keys)
2168 (let* ((out (assoc-ref outputs "out"))
2169 (bin (string-append out "/bin"))
2170 (sip (string-append out "/share/sip"))
2171 (python (assoc-ref inputs "python"))
2173 (last (string-split python #\-)))
2176 (take (string-split python-version #\.) 2)
2178 (lib (string-append out "/lib/python"
2181 (invoke "python" "configure.py"
2185 "--sipdir" sip)))))))
2186 (license (list license:gpl2 license:gpl3)))) ; choice of either license
2188 (define-public qscintilla
2194 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
2195 "QScintilla-" version "/QScintilla_gpl-"
2199 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
2200 (build-system gnu-build-system)
2203 (modify-phases %standard-phases
2205 (lambda* (#:key outputs #:allow-other-keys)
2206 (let ((out (assoc-ref outputs "out")))
2208 (substitute* "qscintilla.pro"
2209 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
2210 (string-append out "/lib"))
2211 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
2212 (string-append out "/include"))
2213 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
2214 (string-append out "/translations"))
2215 (("\\$\\$\\[QT_INSTALL_DATA\\]")
2216 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
2217 (("\\$\\$\\[QT_HOST_DATA\\]")
2218 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
2219 (invoke "qmake")))))))
2220 (native-inputs `(("qtbase" ,qtbase)))
2221 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
2222 (synopsis "Qt port of the Scintilla C++ editor control")
2223 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2224 editor control. QScintilla includes features especially useful when editing
2225 and debugging source code. These include support for syntax styling, error
2226 indicators, code completion and call tips.")
2227 (license license:gpl3+)))
2229 (define-public python-qscintilla
2230 (package (inherit qscintilla)
2231 (name "python-qscintilla")
2234 (list "--pyqt=PyQt5"
2235 (string-append "--pyqt-sipdir="
2236 (assoc-ref %build-inputs "python-pyqt")
2238 (string-append "--qsci-incdir="
2239 (assoc-ref %build-inputs "qscintilla")
2241 (string-append "--qsci-libdir="
2242 (assoc-ref %build-inputs "qscintilla")
2245 (modify-phases %standard-phases
2247 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
2248 (let ((out (assoc-ref outputs "out"))
2249 (python (assoc-ref inputs "python")))
2251 (apply invoke "python3" "configure.py"
2253 ;; Install to the right directory
2254 (substitute* '("Makefile"
2256 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2257 (((string-append python "/lib"))
2258 (string-append out "/lib")))
2259 ;; And fix the installed.txt file
2260 (substitute* "installed.txt"
2261 (("/gnu/store/[^/]+") out)))
2264 `(("qscintilla" ,qscintilla)
2266 ("python-pyqt" ,python-pyqt)))
2267 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2268 editor control. QScintilla includes features especially useful when editing
2269 and debugging source code. These include support for syntax styling, error
2270 indicators, code completion and call tips.
2272 This package provides the Python bindings.")))
2274 ;; PyQt only looks for modules in its own directory. It ignores environment
2275 ;; variables such as PYTHONPATH, so we need to build a union package to make
2277 (define-public python-pyqt+qscintilla
2278 (package (inherit python-pyqt)
2279 (name "python-pyqt+qscintilla")
2281 (build-system trivial-build-system)
2283 '(#:modules ((guix build union))
2285 (use-modules (ice-9 match)
2287 (match %build-inputs
2288 (((names . directories) ...)
2289 (union-build (assoc-ref %outputs "out")
2293 `(("python-pyqt" ,python-pyqt)
2294 ("python-qscintilla" ,python-qscintilla)))
2295 (synopsis "Union of PyQt and the Qscintilla extension")
2297 "This package contains the union of PyQt and the Qscintilla extension.")))
2299 (define-public qtkeychain
2307 (url "https://github.com/frankosterfeld/qtkeychain/")
2308 (commit (string-append "v" version))))
2309 (file-name (git-file-name name version))
2312 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
2313 (build-system cmake-build-system)
2315 `(("pkg-config" ,pkg-config)
2316 ("qttools" ,qttools)))
2318 `(("qtbase" ,qtbase)))
2320 `(#:tests? #f ; No tests included
2322 (modify-phases %standard-phases
2323 (add-before 'configure 'set-qt-trans-dir
2325 (substitute* "CMakeLists.txt"
2326 (("\\$\\{qt_translations_dir\\}")
2327 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
2329 (home-page "https://github.com/frankosterfeld/qtkeychain")
2330 (synopsis "Qt API to store passwords")
2332 "QtKeychain is a Qt library to store passwords and other secret data
2333 securely. It will not store any data unencrypted unless explicitly requested.")
2334 (license license:bsd-3)))
2344 (string-append "mirror://sourceforge/qwt/qwt/"
2345 version "/qwt-" version ".tar.bz2"))
2347 (base32 "1navkcnmn0qz8kzsyqmk32d929zl72l0b580w1ica7z5559j2a8m"))))
2348 (build-system gnu-build-system)
2350 `(("qtbase" ,qtbase)
2352 ("qttools" ,qttools)))
2355 (modify-phases %standard-phases
2357 (lambda* (#:key outputs #:allow-other-keys)
2358 (let* ((out (assoc-ref outputs "out"))
2359 (docdir (string-append out "/share/doc/qwt"))
2360 (incdir (string-append out "/include/qwt"))
2361 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2362 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2363 (substitute* '("qwtconfig.pri")
2364 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2365 (format #f "~a = ~a\n" x out))
2366 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2367 (format #f "~a = ~a\n" x docdir))
2368 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2369 (format #f "~a = ~a\n" x incdir))
2370 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2371 (format #f "~a = ~a\n" x pluginsdir))
2372 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2373 (format #f "~a = ~a\n" x featuresdir)))
2374 (substitute* '("doc/doc.pro")
2375 ;; We'll install them in the 'install-man-pages' phase.
2376 (("^unix:doc\\.files.*") ""))
2378 (add-after 'install 'install-man-pages
2379 (lambda* (#:key outputs #:allow-other-keys)
2380 (let* ((out (assoc-ref outputs "out"))
2381 (man (string-append out "/share/man")))
2382 ;; Remove some incomplete manual pages.
2383 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2385 (copy-recursively "doc/man" man)
2387 (home-page "http://qwt.sourceforge.net")
2388 (synopsis "Qt widgets for plots, scales, dials and other technical software
2391 "The Qwt library contains widgets and components which are primarily useful
2392 for technical and scientific purposes. It includes a 2-D plotting widget,
2393 different kinds of sliders, and much more.")
2396 ;; The Qwt license is LGPL2.1 with some exceptions.
2397 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2398 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2399 license:lgpl2.1 license:gpl3))))
2401 (define-public qtwebkit
2404 (version "5.212.0-alpha4")
2408 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2409 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
2412 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
2413 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2414 (build-system cmake-build-system)
2422 ("pkg-config" ,pkg-config)))
2426 ("gst-plugins-base" ,gst-plugins-base)
2427 ("libjpeg" ,libjpeg-turbo)
2429 ("libwebp" ,libwebp)
2431 ("fontconfig" ,fontconfig)
2432 ("libxrender" ,libxrender)
2434 ("qtdeclarative" ,qtdeclarative)
2435 ("qtlocation" ,qtlocation)
2436 ("qtmultimedia" ,qtmultimedia)
2437 ("qtsensors" ,qtsensors)
2438 ("qtwebchannel" ,qtwebchannel)
2439 ("libxml2" ,libxml2)
2440 ("libxslt" ,libxslt)
2442 ("libxcomposite" ,libxcomposite)))
2444 `(#:tests? #f ; no apparent tests; it might be necessary to set
2445 ; ENABLE_API_TESTS, see CMakeLists.txt
2447 ;; Parallel builds fail due to a race condition:
2448 ;; <https://bugs.gnu.org/34062>.
2449 #:parallel-build? #f
2451 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2453 "-DUSE_LIBHYPHEN=OFF"
2454 "-DUSE_SYSTEM_MALLOC=ON"
2455 ;; XXX: relative dir installs to build dir?
2456 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2457 %output "/lib/qt5/mkspecs/modules")
2458 ;; Sacrifice a little speed in order to link
2459 ;; libraries and test executables in a
2460 ;; reasonable amount of memory.
2461 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2462 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2463 (home-page "https://www.webkit.org")
2464 (synopsis "Web browser engine and classes to render and interact with web
2466 (description "QtWebKit provides a Web browser engine that makes it easy to
2467 embed content from the World Wide Web into your Qt application. At the same
2468 time Web content can be enhanced with native controls.")
2469 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2470 ;; room for slower or busy hardware.
2471 (properties '((timeout . 64800))) ;18 hours
2473 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2474 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2475 ;; disable it on non-Intel platforms.
2476 (supported-systems '("x86_64-linux" "i686-linux"))
2478 (license license:lgpl2.1+)))
2480 (define-public dotherside
2488 (url "https://github.com/filcuc/DOtherSide")
2489 (commit (string-append "v" version))))
2490 (file-name (git-file-name name version))
2493 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
2494 (build-system cmake-build-system)
2496 `(("qttools" ,qttools)))
2498 `(("qtbase" ,qtbase)
2499 ("qtdeclarative" ,qtdeclarative)))
2500 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2501 (synopsis "C language library for creating bindings for the Qt QML language")
2503 "DOtherSide is a C language library for creating bindings for the
2504 QT QML language. The following features are implementable from
2507 @item Creating custom QObject
2508 @item Creating custom QAbstractListModels
2509 @item Creating custom properties, signals and slots
2510 @item Creating from QML QObject defined in the binded language
2511 @item Creating from Singleton QML QObject defined in the binded language
2513 (license license:lgpl3))) ;version 3 only (+ exception)
2515 ;; There have been no public releases yet.
2516 (define-public qtcolorwidgets
2517 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2520 (name "qtcolorwidgets")
2521 (version (git-version "0" revision commit))
2525 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2527 (file-name (git-file-name name version))
2530 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2531 (build-system cmake-build-system)
2532 (arguments `(#:tests? #f)) ; There are no tests
2534 `(("qttools" ,qttools)))
2536 `(("qtbase" ,qtbase)))
2537 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2538 (synopsis "Color management widgets")
2539 (description "QtColorWidgets provides a Qt color dialog that is more
2540 user-friendly than the default @code{QColorDialog} and several other
2541 color-related widgets.")
2542 ;; Includes a license exception for combining with GPL2 code.
2543 (license license:lgpl3+))))
2545 (define-public python-shiboken-2
2547 (name "python-shiboken-2")
2551 (uri (string-append "https://download.qt.io/official_releases"
2552 "/QtForPython/pyside2/PySide2-" version
2553 "-src/pyside-setup-everywhere-src-"
2557 "1n45l6xxyxs6cfp2l4rp8qs1c2fyfwyrdxa4qcpwfsqsi51rydsk"))))
2558 (build-system cmake-build-system)
2560 `(("clang-toolchain" ,clang-toolchain-6)
2561 ("libxml2" ,libxml2)
2562 ("libxslt" ,libxslt)
2563 ("python-wrapper" ,python-wrapper)
2565 ("qtxmlpatterns" ,qtxmlpatterns)))
2568 ;; FIXME: Building tests fails
2569 #:configure-flags '("-DBUILD_TESTS=off")
2571 (modify-phases %standard-phases
2572 (add-after 'unpack 'use-shiboken-dir-only
2573 (lambda _ (chdir "sources/shiboken2") #t))
2574 (add-before 'configure 'make-files-writable-and-update-timestamps
2576 ;; The build scripts need to modify some files in
2577 ;; the read-only source directory, and also attempts
2578 ;; to create Zip files which fails because the Zip
2579 ;; format does not support timestamps before 1980.
2580 (let ((circa-1980 (* 10 366 24 60 60)))
2581 (for-each (lambda (file)
2582 (make-file-writable file)
2583 (utime file circa-1980 circa-1980))
2586 (add-before 'configure 'set-build-env
2587 (lambda* (#:key inputs #:allow-other-keys)
2588 (let ((llvm (assoc-ref inputs "clang-toolchain")))
2589 (setenv "CLANG_INSTALL_DIR" llvm)
2591 (home-page "https://wiki.qt.io/Qt_for_Python")
2593 "Shiboken generates bindings for C++ libraries using CPython source code")
2595 "Shiboken generates bindings for C++ libraries using CPython source code")
2598 ;; The main code is GPL3 or LGPL3.
2599 ;; Examples are BSD-3.
2604 (define-public python-pyside-2
2606 (name "python-pyside-2")
2607 (version (package-version python-shiboken-2))
2608 (source (package-source python-shiboken-2))
2609 (build-system cmake-build-system)
2611 `(("libxml2" ,libxml2)
2612 ("libxslt" ,libxslt)
2613 ("clang-toolchain" ,clang-toolchain-6)
2615 ("qtdatavis3d" ,qtdatavis3d)
2616 ("qtlocation" ,qtlocation)
2617 ("qtmultimedia" ,qtmultimedia)
2618 ("qtquickcontrols" ,qtquickcontrols)
2619 ("qtscript" ,qtscript)
2620 ("qtscxml" ,qtscxml)
2621 ("qtsensors" ,qtsensors)
2622 ("qtspeech" ,qtspeech)
2624 ("qtwebchannel" ,qtwebchannel)
2625 ("qtwebsockets" ,qtwebsockets)
2626 ("qtx11extras" ,qtx11extras)
2627 ("qtxmlpatterns" ,qtxmlpatterns)))
2629 `(("cmake" ,cmake-minimal)
2630 ("python-shiboken-2" ,python-shiboken-2)
2631 ("python" ,python-wrapper)
2632 ("qttools" ,qttools)
2636 ;; FIXME: Building tests fail.
2638 (list "-DBUILD_TESTS=FALSE"
2639 (string-append "-DPYTHON_EXECUTABLE="
2640 (assoc-ref %build-inputs "python")
2643 (modify-phases %standard-phases
2644 (add-after 'unpack 'go-to-source-dir
2645 (lambda _ (chdir "sources/pyside2") #t))
2646 (add-before 'configure 'set-clang-dir
2647 (lambda* (#:key inputs #:allow-other-keys)
2648 (let ((clang (assoc-ref inputs "clang-toolchain")))
2649 (setenv "CLANG_INSTALL_DIR" clang)
2651 (home-page "https://wiki.qt.io/Qt_for_Python")
2653 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2655 "The Qt for Python product enables the use of Qt5 APIs in Python
2656 applications. It lets Python developers utilize the full potential of Qt,
2657 using the PySide2 module. The PySide2 module provides access to the
2658 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2659 comes with the Shiboken2 CPython binding code generator, which can be used to
2660 generate Python bindings for your C or C++ code.")
2664 ;; this file may be used under the terms of the GNU General
2665 ;; Public License version 2.0 or (at your option) the GNU
2666 ;; General Public license version 3 or any later version
2667 ;; approved by the KDE Free Qt Foundation.
2668 ;; Thus, it is currently v2 or v3, but no "+".
2672 (define-public python-pyside-2-tools
2674 (name "python-pyside-2-tools")
2675 (version (package-version python-shiboken-2))
2676 (source (package-source python-shiboken-2))
2677 (build-system cmake-build-system)
2679 `(("python-pyside-2" ,python-pyside-2)
2680 ("python-shiboken-2" ,python-shiboken-2)
2681 ("qtbase" ,qtbase)))
2683 `(("python" ,python-wrapper)))
2687 (list "-DBUILD_TESTS=off"
2688 (string-append "-DPYTHON_EXECUTABLE="
2689 (assoc-ref %build-inputs "python")
2691 #:phases (modify-phases %standard-phases
2692 (add-after 'unpack 'go-to-source-dir
2693 (lambda _ (chdir "sources/pyside2-tools") #t)))))
2694 (home-page "https://wiki.qt.io/Qt_for_Python")
2696 "Contains command line tools for PySide2")
2698 "Contains lupdate, rcc and uic tools for PySide2")
2699 (license license:gpl2)))
2701 (define-public libqglviewer
2703 (name "libqglviewer")
2708 (string-append "http://libqglviewer.com/src/libQGLViewer-"
2712 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
2713 (build-system gnu-build-system)
2715 '(#:tests? #f ; no check target
2717 (list (string-append "PREFIX="
2718 (assoc-ref %outputs "out")))
2720 (modify-phases %standard-phases
2722 (lambda* (#:key make-flags #:allow-other-keys)
2723 (apply invoke (cons "qmake" make-flags)))))))
2725 `(("qtbase" ,qtbase)
2726 ("qttools" ,qttools)))
2729 (home-page "http://libqglviewer.com")
2730 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
2732 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
2733 of OpenGL 3D viewers.
2735 It provides some of the typical 3D viewer functionalities, such as the
2736 possibility to move the camera using the mouse, which lacks in most of the
2737 other APIs. Other features include mouse manipulated frames, interpolated
2738 keyFrames, object selection, stereo display, screenshot saving and much more.
2739 It can be used by OpenGL beginners as well as to create complex applications,
2740 being fully customizable and easy to extend.")
2741 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
2743 (license (list license:gpl2 license:gpl3))))