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, 2020 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")
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 "qtbase-absolute-runpath.patch"
359 "qtbase-fix-krita-deadlock.patch"))
360 (modules '((guix build utils)))
362 ;; corelib uses bundled harfbuzz, md4, md5, sha3
364 (with-directory-excursion "src/3rdparty"
365 (for-each delete-file-recursively
366 (list "double-conversion" "freetype" "harfbuzz-ng"
367 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
370 (build-system gnu-build-system)
371 (outputs '("out" "debug"))
374 ;; Use which the package, not the function
375 ("which" ,(@ (gnu packages base) which))))
377 `(("alsa-lib" ,alsa-lib)
380 ("double-conversion" ,double-conversion)
383 ("fontconfig" ,fontconfig)
384 ("freetype" ,freetype)
386 ("harfbuzz" ,harfbuzz)
388 ("libinput" ,libinput-minimal)
389 ("libjpeg" ,libjpeg-turbo)
393 ("libxcomposite" ,libxcomposite)
394 ("libxcursor" ,libxcursor)
395 ("libxfixes" ,libxfixes)
397 ("libxinerama" ,libxinerama)
398 ("libxkbcommon" ,libxkbcommon)
400 ("libxrandr" ,libxrandr)
401 ("libxrender" ,libxrender)
405 ("mariadb" ,mariadb "lib")
406 ("mariadb-dev" ,mariadb "dev")
410 ("postgresql" ,postgresql)
411 ("pulseaudio" ,pulseaudio)
413 ("unixodbc" ,unixodbc)
414 ("xcb-util" ,xcb-util)
415 ("xcb-util-image" ,xcb-util-image)
416 ("xcb-util-keysyms" ,xcb-util-keysyms)
417 ("xcb-util-renderutil" ,xcb-util-renderutil)
418 ("xcb-util-wm" ,xcb-util-wm)
419 ("xdg-utils" ,xdg-utils)
426 ("pkg-config" ,pkg-config)
428 ("vulkan-headers" ,vulkan-headers)
432 (modify-phases %standard-phases
433 (add-after 'configure 'patch-bin-sh
435 (substitute* '("config.status"
437 "mkspecs/features/qt_functions.prf"
438 "qmake/library/qmakebuiltins.cpp")
439 (("/bin/sh") (which "sh")))
441 (add-after 'configure 'patch-xdg-open
443 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
444 (("^.*const char \\*browsers.*$" all)
445 (string-append "*browser = QStringLiteral(\""
447 "\"); return true; \n" all)))
450 (lambda* (#:key outputs #:allow-other-keys)
451 (let ((out (assoc-ref outputs "out")))
452 (substitute* "configure"
453 (("/bin/pwd") (which "pwd")))
454 (substitute* "src/corelib/global/global.pri"
455 (("/bin/ls") (which "ls")))
456 ;; The configuration files for other Qt5 packages are searched
457 ;; through a call to "find_package" in Qt5Config.cmake, which
458 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
459 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
460 ;; components can be installed in different places.
461 (substitute* (find-files "." ".*\\.cmake")
462 (("NO_DEFAULT_PATH") ""))
463 ;; do not pass "--enable-fast-install", which makes the
464 ;; configure process fail
469 "-docdir" (string-append out "/share/doc/qt5")
470 "-headerdir" (string-append out "/include/qt5")
471 "-archdatadir" (string-append out "/lib/qt5")
472 "-datadir" (string-append out "/share/qt5")
473 "-examplesdir" (string-append
474 out "/share/doc/qt5/examples")
478 ;; Later stripped into the :debug output.
481 ;; These features require higher versions of Linux than the
482 ;; minimum version of the glibc. See
483 ;; src/corelib/global/minimum-linux_p.h. By disabling these
484 ;; features Qt5 applications can be used on the oldest
485 ;; kernels that the glibc supports, including the RHEL6
486 ;; (2.6.32) and RHEL7 (3.10) kernels.
487 "-no-feature-getentropy" ; requires Linux 3.17
488 "-no-feature-renameat2" ; requires Linux 3.16
490 ;; Do not build examples; if desired, these could go
491 ;; into a separate output, but for the time being, we
492 ;; prefer to save the space and build time.
493 "-no-compile-examples"
494 ;; Most "-system-..." are automatic, but some use
495 ;; the bundled copy by default.
499 ;; explicitly link with openssl instead of dlopening it
501 ;; explicitly link with dbus instead of dlopening it
503 ;; don't use the precompiled headers
505 ;; drop special machine instructions that do not have
507 ,@(if (string-prefix? "x86_64"
508 (or (%current-target-system)
514 (add-after 'install 'patch-mkspecs
515 (lambda* (#:key outputs #:allow-other-keys)
516 (let* ((out (assoc-ref outputs "out"))
517 (archdata (string-append out "/lib/qt5"))
518 (mkspecs (string-append archdata "/mkspecs"))
519 (qt_config.prf (string-append
520 mkspecs "/features/qt_config.prf")))
521 ;; For each Qt module, let `qmake' uses search paths in the
522 ;; module directory instead of all in QT_INSTALL_PREFIX.
523 (substitute* qt_config.prf
524 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
525 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
526 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
527 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
528 (("\\$\\$\\[QT_HOST_LIBS\\]")
529 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
530 (("\\$\\$\\[QT_INSTALL_BINS\\]")
531 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
533 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
534 (substitute* (string-append mkspecs "/features/qt_functions.prf")
535 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
536 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
538 ;; Resolve qmake spec files within qtbase by absolute paths.
541 (string-append mkspecs "/features/" file))
542 '("device_config.prf" "moc.prf" "qt_build_config.prf"
543 "qt_config.prf" "winrt/package_manifest.prf"))
544 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
545 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
547 (add-after 'patch-mkspecs 'patch-prl-files
548 (lambda* (#:key outputs #:allow-other-keys)
549 (let ((out (assoc-ref outputs "out")))
550 ;; Insert absolute references to the qtbase libraries because
551 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
552 ;; on context. See <https://bugs.gnu.org/38405>
553 (substitute* (find-files (string-append out "/lib") "\\.prl$")
554 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
555 (string-append out "/lib")))
557 (add-after 'unpack 'patch-paths
558 ;; Use the absolute paths for dynamically loaded libs, otherwise
559 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
561 (lambda* (#:key inputs #:allow-other-keys)
563 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
564 "cross-libc" "libc"))))
565 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
566 "src/network/kernel/qhostinfo_unix.cpp")
567 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
568 (string-append a glibc "/lib/lib" b))))
570 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
571 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
572 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
574 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
575 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
576 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
577 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
578 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
581 (list (search-path-specification
582 (variable "QMAKEPATH")
583 (files '("lib/qt5")))
584 (search-path-specification
585 (variable "QML2_IMPORT_PATH")
586 (files '("lib/qt5/qml")))
587 (search-path-specification
588 (variable "QT_PLUGIN_PATH")
589 (files '("lib/qt5/plugins")))
590 (search-path-specification
591 (variable "XDG_DATA_DIRS")
593 (search-path-specification
594 (variable "XDG_CONFIG_DIRS")
595 (files '("etc/xdg")))))
596 (home-page "https://www.qt.io/")
597 (synopsis "Cross-platform GUI library")
598 (description "Qt is a cross-platform application and UI framework for
599 developers using C++ or QML, a CSS & JavaScript like language.")
600 (license (list license:lgpl2.1 license:lgpl3))))
602 ;; qt used to refer to the monolithic Qt 5.x package
603 (define-deprecated qt qtbase)
606 (package (inherit qtbase)
611 (uri (string-append "https://download.qt.io/official_releases/qt/"
612 (version-major+minor version) "/" version
613 "/submodules/" name "-everywhere-src-"
617 "18dmfc8s428fzbk7k5vl3212b25455ayrz7s716nwyiy3ahgmmy7"))))
618 (propagated-inputs `())
619 (native-inputs `(("perl" ,perl)))
626 (modify-phases %standard-phases
627 (add-before 'configure 'configure-qmake
628 (lambda* (#:key inputs outputs #:allow-other-keys)
629 (let* ((out (assoc-ref outputs "out"))
630 (qtbase (assoc-ref inputs "qtbase"))
631 (tmpdir (string-append (getenv "TMPDIR")))
632 (qmake (string-append tmpdir "/qmake"))
633 (qt.conf (string-append tmpdir "/qt.conf")))
634 ;; Use qmake with a customized qt.conf to override install
636 (symlink (which "qmake") qmake)
637 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
638 (with-output-to-file qt.conf
644 Documentation=share/doc/qt5
647 LibraryExecutables=lib/qt5/libexec
650 Plugins=lib/qt5/plugins
651 Imports=lib/qt5/imports
652 Qml2Imports=lib/qt5/qml
653 Translations=share/qt5/translations
655 Examples=share/doc/qt5/examples
661 [EffectiveSourcePaths]
667 (lambda* (#:key inputs outputs #:allow-other-keys)
668 ;; Valid QT_BUILD_PARTS variables are:
669 ;; libs tools tests examples demos docs translations
670 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
671 (add-before 'check 'set-display
673 ;; make Qt render "offscreen", required for tests
674 (setenv "QT_QPA_PLATFORM" "offscreen")
676 (synopsis "Qt module for displaying SVGs")
677 (description "The QtSvg module provides classes for displaying the
678 contents of SVG files.")))
680 (define-public qtimageformats
681 (package (inherit qtsvg)
682 (name "qtimageformats")
686 (uri (string-append "https://download.qt.io/official_releases/qt/"
687 (version-major+minor version) "/" version
688 "/submodules/" name "-everywhere-src-"
692 "132g4rlm61pdcpcrclr1rwpbrxn7va4wjfb021mh8pn1cl0wlgkk"))
693 (modules '((guix build utils)))
696 (delete-file-recursively "src/3rdparty")
707 (synopsis "Additional Image Format plugins for Qt")
708 (description "The QtImageFormats module contains plugins for adding
709 support for MNG, TGA, TIFF and WBMP image formats.")))
711 (define-public qtx11extras
712 (package (inherit qtsvg)
717 (uri (string-append "https://download.qt.io/official_releases/qt/"
718 (version-major+minor version) "/" version
719 "/submodules/" name "-everywhere-src-"
723 "0njlh6d327nll7d8qaqrwr5x15m9yzgyar2j45qigs1f7ah896my"))))
725 (substitute-keyword-arguments (package-arguments qtsvg)
726 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
727 (native-inputs `(("perl" ,perl)))
731 (synopsis "Qt Extras for X11")
732 (description "The QtX11Extras module includes the library to access X11
733 from within Qt 5.")))
735 (define-public qtxmlpatterns
736 (package (inherit qtsvg)
737 (name "qtxmlpatterns")
741 (uri (string-append "https://download.qt.io/official_releases/qt/"
742 (version-major+minor version) "/" version
743 "/submodules/" name "-everywhere-src-"
747 "1dyg1z4349k04yyzn8xbp4f5qjgm60gz6wgzp80khpilcmk8g6i1"))))
749 (substitute-keyword-arguments (package-arguments qtsvg)
750 ((#:tests? _ #f) #f) ; TODO: Enable the tests
752 `(modify-phases ,phases
753 (add-after 'unpack 'disable-network-tests
754 (lambda _ (substitute* "tests/auto/auto.pro"
755 (("qxmlquery") "# qxmlquery")
756 (("xmlpatterns ") "# xmlpatterns"))
758 (native-inputs `(("perl" ,perl)
759 ("qtdeclarative" ,qtdeclarative)))
760 (inputs `(("qtbase" ,qtbase)))
761 (synopsis "Qt XML patterns module")
762 (description "The QtXmlPatterns module is a XQuery and XPath engine for
763 XML and custom data models. It contains programs such as xmlpatterns and
764 xmlpatternsvalidator.")))
766 (define-public qtdeclarative
767 (package (inherit qtsvg)
768 (name "qtdeclarative")
772 (uri (string-append "https://download.qt.io/official_releases/qt/"
773 (version-major+minor version) "/" version
774 "/submodules/" name "-everywhere-src-"
778 "0l0nhc2si6dl9r4s1bs45z90qqigs8jnrsyjjdy38q4pvix63i53"))))
780 (substitute-keyword-arguments (package-arguments qtsvg)
781 ((#:tests? _ #f) #f) ;TODO: Enable the tests
783 `(modify-phases ,phases
784 (add-after 'build 'fix-qt5core-install-prefix
785 (lambda* (#:key outputs #:allow-other-keys)
786 (let ((out (assoc-ref outputs "out")))
787 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
788 ;; is provided by qtdeclarative.
790 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
791 (("\\$\\{_qt5Core_install_prefix\\}") out)))
795 ("pkg-config" ,pkg-config)
797 ("python-wrapper" ,python-wrapper)
799 ("vulkan-headers" ,vulkan-headers)))
803 (synopsis "Qt QML module (Quick 2)")
804 (description "The Qt QML module provides a framework for developing
805 applications and libraries with the QML language. It defines and implements the
806 language and engine infrastructure, and provides an API to enable application
807 developers to extend the QML language with custom types and integrate QML code
808 with JavaScript and C++.")))
810 (define-public qtconnectivity
811 (package (inherit qtsvg)
812 (name "qtconnectivity")
816 (uri (string-append "https://download.qt.io/official_releases/qt/"
817 (version-major+minor version) "/" version
818 "/submodules/" name "-everywhere-src-"
822 "0a5wzin635b926b8prdwfazgy1vhyf8m6an64wp2lpkp78z7prmb"))))
825 ("pkg-config" ,pkg-config)
826 ("qtdeclarative" ,qtdeclarative)))
830 (synopsis "Qt Connectivity module")
831 (description "The Qt Connectivity modules provides modules for interacting
832 with Bluetooth and NFC.")))
834 (define-public qtwebsockets
835 (package (inherit qtsvg)
836 (name "qtwebsockets")
840 (uri (string-append "https://download.qt.io/official_releases/qt/"
841 (version-major+minor version) "/" version
842 "/submodules/" name "-everywhere-src-"
846 "116amx4mnv50k0fpswgpr5x8wjny8nbffrjmld01pzhkhfqn4vph"))))
848 (substitute-keyword-arguments (package-arguments qtsvg)
849 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
852 ("qtdeclarative" ,qtdeclarative)))
853 (inputs `(("qtbase" ,qtbase)))
854 (synopsis "Qt Web Sockets module")
855 (description "WebSocket is a web-based protocol designed to enable two-way
856 communication between a client application and a remote host. The Qt
857 WebSockets module provides C++ and QML interfaces that enable Qt applications
858 to act as a server that can process WebSocket requests, or a client that can
859 consume data received from the server, or both.")))
861 (define-public qtsensors
862 (package (inherit qtsvg)
867 (uri (string-append "https://download.qt.io/official_releases/qt/"
868 (version-major+minor version) "/" version
869 "/submodules/" name "-everywhere-src-"
873 "0qccpgbhyg9k4x5nni7xm0pyvaqia3zrcd42cn7ksf5h21lwmkxw"))))
875 (substitute-keyword-arguments (package-arguments qtsvg)
876 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
878 `(modify-phases ,phases
879 (add-after 'unpack 'fix-tests
881 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
882 (("2000") "5000") ;lengthen test timeout
883 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
887 ("qtdeclarative" ,qtdeclarative)))
888 (inputs `(("qtbase" ,qtbase)))
889 (synopsis "Qt Sensors module")
890 (description "The Qt Sensors API provides access to sensor hardware via QML
891 and C++ interfaces. The Qt Sensors API also provides a motion gesture
892 recognition API for devices.")))
894 (define-public qtmultimedia
895 (package (inherit qtsvg)
896 (name "qtmultimedia")
900 (uri (string-append "https://download.qt.io/official_releases/qt/"
901 (version-major+minor version) "/" version
902 "/submodules/" name "-everywhere-src-"
906 "1sczzcvk3c5gczz53yvp8ma6gp8aixk5pcq7wh344c9md3g8xkbs"))
907 (modules '((guix build utils)))
910 (delete-file-recursively
911 "examples/multimedia/spectrum/3rdparty")
912 ;; We also prevent the spectrum example from being built.
913 (substitute* "examples/multimedia/multimedia.pro"
917 (substitute-keyword-arguments (package-arguments qtsvg)
919 `(modify-phases ,phases
921 (lambda* (#:key outputs #:allow-other-keys)
922 (let ((out (assoc-ref outputs "out")))
923 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
924 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
925 (string-append "PREFIX=" out)))))))
926 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
929 ("pkg-config" ,pkg-config)
931 ("qtdeclarative" ,qtdeclarative)))
933 `(("alsa-lib" ,alsa-lib)
935 ("pulseaudio" ,pulseaudio)
937 ;; Gstreamer is needed for the mediaplayer plugin
938 ("gstreamer" ,gstreamer)
939 ("gst-plugins-base" ,gst-plugins-base)))
940 (synopsis "Qt Multimedia module")
941 (description "The Qt Multimedia module provides set of APIs to play and
942 record media, and manage a collection of media content. It also contains a
943 set of plugins for interacting with pulseaudio and GStreamer.")))
945 (define-public qtwayland
946 (package (inherit qtsvg)
951 (uri (string-append "https://download.qt.io/official_releases/qt/"
952 (version-major+minor version) "/" version
953 "/submodules/" name "-everywhere-src-"
957 "0al3yypy3fin62n8d1859jh0mn0fbpa161l7f37hgd4gf75365nk"))
958 (modules '((guix build utils)))
960 ;; The examples try to build and cause the build to fail
962 (delete-file-recursively "examples")
965 (substitute-keyword-arguments (package-arguments qtsvg)
967 `(modify-phases ,phases
968 (add-after 'unpack 'disable-failing-tests
970 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
971 ;; reason and breaks these two tests.
972 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
973 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
974 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
976 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
979 (add-before 'check 'set-test-environment
981 ;; Do not fail just because /etc/machine-id is missing.
982 (setenv "DBUS_FATAL_WARNINGS" "0")
987 ("pkg-config" ,pkg-config)
988 ("qtdeclarative" ,qtdeclarative)))
990 `(("fontconfig" ,fontconfig)
991 ("freetype" ,freetype)
993 ("libxcomposite" ,libxcomposite)
995 ("libxkbcommon" ,libxkbcommon)
996 ("libxrender" ,libxrender)
1000 ("wayland" ,wayland)))
1001 (synopsis "Qt Wayland module")
1002 (description "The Qt Wayland module provides the QtWayland client and
1003 compositor libraries.")))
1005 (define-public qtserialport
1006 (package (inherit qtsvg)
1007 (name "qtserialport")
1011 (uri (string-append "https://download.qt.io/official_releases/qt/"
1012 (version-major+minor version) "/" version
1013 "/submodules/" name "-everywhere-src-"
1017 "08ga9a1lwj83872nxablk602z1dq0la6jqsiicvd7m1sfbfpgnd6"))))
1018 (native-inputs `(("perl" ,perl)))
1020 `(("qtbase" ,qtbase)
1023 (substitute-keyword-arguments (package-arguments qtsvg)
1025 `(modify-phases ,phases
1026 (add-after 'unpack 'patch-dlopen-paths
1027 (lambda* (#:key inputs #:allow-other-keys)
1028 (substitute* "src/serialport/qtudev_p.h"
1029 ;; Use the absolute paths for dynamically loaded libs,
1030 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1031 ;; typically is not set in guix.
1032 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1033 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1035 (synopsis "Qt Serial Port module")
1036 (description "The Qt Serial Port module provides the library for
1037 interacting with serial ports from within Qt.")))
1039 (define-public qtserialbus
1040 (package (inherit qtsvg)
1041 (name "qtserialbus")
1045 (uri (string-append "https://download.qt.io/official_releases/qt/"
1046 (version-major+minor version) "/" version
1047 "/submodules/" name "-everywhere-src-"
1051 "14bahg82jciciqkl74q9hvf3a8kp3pk5v731vp2416k4b8bn4xqb"))))
1053 `(("qtbase" ,qtbase)
1054 ("qtserialport" ,qtserialport)))
1055 (synopsis "Qt Serial Bus module")
1056 (description "The Qt Serial Bus API provides classes and functions to
1057 access the various industrial serial buses and protocols, such as CAN, ModBus,
1060 (define-public qtwebchannel
1061 (package (inherit qtsvg)
1062 (name "qtwebchannel")
1066 (uri (string-append "https://download.qt.io/official_releases/qt/"
1067 (version-major+minor version) "/" version
1068 "/submodules/" name "-everywhere-src-"
1072 "0x7q66994pw6cd0f505bmirw1sssqs740zaw8lyqqqr32m2ch7bx"))))
1075 ("qtdeclarative" ,qtdeclarative)
1076 ("qtwebsockets" ,qtwebsockets)))
1077 (inputs `(("qtbase" ,qtbase)))
1078 (synopsis "Web communication library for Qt")
1079 (description "The Qt WebChannel module enables peer-to-peer communication
1080 between the host (QML/C++ application) and the client (HTML/JavaScript
1081 application). The transport mechanism is supported out of the box by the two
1082 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1084 (define-public qtwebglplugin
1085 (package (inherit qtsvg)
1086 (name "qtwebglplugin")
1090 (uri (string-append "https://download.qt.io/official_releases/qt/"
1091 (version-major+minor version) "/" version
1092 "/submodules/" name "-everywhere-src-"
1096 "05rl657848fsprsnabdqb5z363c6drjc32k59223vl351f8ihhgb"))))
1098 (substitute-keyword-arguments (package-arguments qtsvg)
1100 `(modify-phases ,phases
1101 (add-after 'unpack 'disable-network-tests
1102 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1103 (("webgl") "# webgl"))
1109 ("qtdeclarative" ,qtdeclarative)
1110 ("qtwebsockets" ,qtwebsockets)
1112 (synopsis "QPA plugin for running an application via a browser using
1113 streamed WebGL commands")
1114 (description "Qt back end that uses WebGL for rendering. It allows Qt
1115 applications (with some limitations) to run in a web browser that supports
1116 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1117 compatible web browser without the use of plug-ins. The API is similar to
1118 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1120 (define-public qtwebview
1121 (package (inherit qtsvg)
1126 (uri (string-append "https://download.qt.io/official_releases/qt/"
1127 (version-major+minor version) "/" version
1128 "/submodules/" name "-everywhere-src-"
1132 "0jzzcm7z5njkddzfhmyjz4dbbzq8h93980cci4479zc4xq9r47y6"))))
1136 `(("qtbase" ,qtbase)
1137 ("qtdeclarative" ,qtdeclarative)))
1138 (synopsis "Display web content in a QML application")
1139 (description "Qt WebView provides a way to display web content in a QML
1140 application without necessarily including a full web browser stack by using
1141 native APIs where it makes sense.")))
1143 (define-public qtlocation
1144 (package (inherit qtsvg)
1149 (uri (string-append "https://download.qt.io/official_releases/qt/"
1150 (version-major+minor version) "/" version
1151 "/submodules/" name "-everywhere-src-"
1155 "1k3m8zhbv04yrqvj7jlnh8f9xczdsmla59j9gcwsqvbg76y0hxy3"))))
1157 (substitute-keyword-arguments (package-arguments qtsvg)
1158 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1161 ("qtdeclarative" ,qtdeclarative)
1162 ("qtquickcontrols" ,qtquickcontrols)
1163 ("qtserialport" ,qtserialport)))
1166 ("openssl" ,openssl)
1169 (synopsis "Qt Location and Positioning modules")
1170 (description "The Qt Location module provides an interface for location,
1171 positioning and geolocation plugins.")))
1173 (define-public qttools
1174 (package (inherit qtsvg)
1179 (uri (string-append "https://download.qt.io/official_releases/qt/"
1180 (version-major+minor version) "/" version
1181 "/submodules/" name "-everywhere-src-"
1185 "1iakl3hlyg51ri1czmis8mmb257b0y1zk2a2knybd3mq69wczc2v"))))
1187 (substitute-keyword-arguments (package-arguments qtsvg)
1188 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1191 ("qtdeclarative" ,qtdeclarative)
1192 ("vulkan-headers" ,vulkan-headers)))
1195 ("qtbase" ,qtbase)))
1196 (synopsis "Qt Tools and Designer modules")
1197 (description "The Qt Tools module provides a set of applications to browse
1198 the documentation, translate applications, generate help files and other stuff
1199 that helps in Qt development.")))
1201 (define-public qtscript
1202 (package (inherit qtsvg)
1207 (uri (string-append "https://download.qt.io/official_releases/qt/"
1208 (version-major+minor version) "/" version
1209 "/submodules/" name "-everywhere-src-"
1213 "1zlvg3hc6h70d789g3kv6dxbwswzkskkm00bdgl01grwrdy4izg9"))
1214 (patches (search-patches "qtscript-disable-tests.patch"))))
1217 ("qttools" ,qttools)))
1219 `(("qtbase" ,qtbase)))
1220 (synopsis "Qt Script module")
1221 (description "Qt provides support for application scripting with ECMAScript.
1222 The following guides and references cover aspects of programming with
1223 ECMAScript and Qt.")))
1225 (define-public qtquickcontrols
1226 (package (inherit qtsvg)
1227 (name "qtquickcontrols")
1231 (uri (string-append "https://download.qt.io/official_releases/qt/"
1232 (version-major+minor version) "/" version
1233 "/submodules/" name "-everywhere-src-"
1237 "0qa4dlhn3iv9yvaic8hw86v6h8rn9sgq8xjfdaym04pfshfyypfm"))))
1239 (substitute-keyword-arguments (package-arguments qtsvg)
1240 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1242 `(("qtbase" ,qtbase)
1243 ("qtdeclarative" ,qtdeclarative)))
1244 (synopsis "Qt Quick Controls and other Quick modules")
1245 (description "The QtScript module provides classes for making Qt
1246 applications scriptable. This module provides a set of extra components that
1247 can be used to build complete interfaces in Qt Quick.")))
1249 (define-public qtquickcontrols2
1250 (package (inherit qtsvg)
1251 (name "qtquickcontrols2")
1255 (uri (string-append "https://download.qt.io/official_releases/qt/"
1256 (version-major+minor version) "/" version
1257 "/submodules/" name "-everywhere-src-"
1261 "0q0mk2mjlf9ll0gdrdzxy8096s6g9draaqiwrlvdpa7lv14x7xzs"))))
1263 (substitute-keyword-arguments (package-arguments qtsvg)
1264 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1266 `(("qtbase" ,qtbase)
1267 ("qtdeclarative" ,qtdeclarative)))
1268 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1269 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1270 module that provides platform integration: native dialogs, menus and menu bars,
1271 and tray icons. It falls back to Qt Widgets when a native implementation is
1274 (define-public qtgraphicaleffects
1275 (package (inherit qtsvg)
1276 (name "qtgraphicaleffects")
1280 (uri (string-append "https://download.qt.io/official_releases/qt/"
1281 (version-major+minor version) "/" version
1282 "/submodules/" name "-everywhere-src-"
1286 "03xmwhapv0b2qj661iaqqrvhxc7qiid0acrp6rj85824ha2pyyj8"))))
1288 (substitute-keyword-arguments (package-arguments qtsvg)
1289 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1291 `(("qtbase" ,qtbase)
1292 ("qtdeclarative" ,qtdeclarative)))
1293 (synopsis "Qt Graphical Effects module")
1294 (description "The Qt Graphical Effects module provides a set of QML types
1295 for adding visually impressive and configurable effects to user interfaces.
1296 Effects are visual items that can be added to Qt Quick user interface as UI
1297 components. The API consists of over 20 effects provided as separate QML
1298 types. The effects cover functional areas such as blending, masking, blurring,
1299 coloring, and many more.")))
1301 (define-public qtgamepad
1302 (package (inherit qtsvg)
1307 (uri (string-append "https://download.qt.io/official_releases/qt/"
1308 (version-major+minor version) "/" version
1309 "/submodules/" name "-everywhere-src-"
1313 "00wd3h465waxdghg2vdhs5pkj0xikwjn88l12477dksm8zdslzgp"))))
1316 ("pkg-config" ,pkg-config)))
1318 `(("fontconfig" ,fontconfig)
1319 ("freetype" ,freetype)
1320 ("libxrender" ,libxrender)
1323 ("qtdeclarative" ,qtdeclarative)))
1324 (synopsis "Qt Gamepad module")
1325 (description "The Qt Gamepad module is an add-on library that enables Qt
1326 applications to support the use of gamepad hardware and in some cases remote
1327 control equipment. The module provides both QML and C++ interfaces. The
1328 primary target audience are embedded devices with fullscreen user interfaces,
1329 and mobile applications targeting TV-like form factors.")))
1331 (define-public qtscxml
1332 (package (inherit qtsvg)
1337 (uri (string-append "https://download.qt.io/official_releases/qt/"
1338 (version-major+minor version) "/" version
1339 "/submodules/" name "-everywhere-src-"
1343 "141pfschv6zmcvvn3pi7f5vb4nf96zpngy80f9bly1sn58syl303"))
1344 (modules '((guix build utils)))
1347 (delete-file-recursively "tests/3rdparty")
1348 ;; the scion test refers to the bundled 3rd party test code.
1349 (substitute* "tests/auto/auto.pro"
1353 `(("qtbase" ,qtbase)
1354 ("qtdeclarative" ,qtdeclarative)))
1355 (synopsis "Qt SCXML module")
1356 (description "The Qt SCXML module provides functionality to create state
1357 machines from SCXML files. This includes both dynamically creating state
1358 machines (loading the SCXML file and instantiating states and transitions) and
1359 generating a C++ file that has a class implementing the state machine. It
1360 also contains functionality to support data models and executable content.")))
1362 (define-public qtpurchasing
1363 (package (inherit qtsvg)
1364 (name "qtpurchasing")
1368 (uri (string-append "https://download.qt.io/official_releases/qt/"
1369 (version-major+minor version) "/" version
1370 "/submodules/" name "-everywhere-src-"
1374 "0lg8x7g7dkf95xwxq8b4yw4ypdz68igkscya96xwbklg3q08gc39"))))
1376 `(("qtbase" ,qtbase)
1377 ("qtdeclarative" ,qtdeclarative)))
1378 (synopsis "Qt Purchasing module")
1379 (description "The Qt Purchasing module provides and in-app API for
1380 purchasing goods and services.")))
1382 (define-public qtcharts
1383 (package (inherit qtsvg)
1388 (uri (string-append "https://download.qt.io/official_releases/qt/"
1389 (version-major+minor version) "/" version
1390 "/submodules/" name "-everywhere-src-"
1394 "1drvm15i6n10b6a1acgarig120ppvqh3r6fqqdn8i3blx81m5cmd"))))
1396 (substitute-keyword-arguments (package-arguments qtsvg)
1397 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1399 `(("qtbase" ,qtbase)
1400 ("qtdeclarative" ,qtdeclarative)))
1401 (synopsis "Qt Charts module")
1402 (description "The Qt Charts module provides a set of easy to use chart
1403 components. It uses the Qt Graphics View Framework, therefore charts can be
1404 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1405 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1406 selecting one of the charts themes.")
1407 (license license:gpl3)))
1409 (define-public qtdatavis3d
1410 (package (inherit qtsvg)
1411 (name "qtdatavis3d")
1415 (uri (string-append "https://download.qt.io/official_releases/qt/"
1416 (version-major+minor version) "/" version
1417 "/submodules/" name "-everywhere-src-"
1421 "080fkpxg70m3c697wfnkjhca58b7r1xsqd559jzb21985pdh6g3j"))))
1423 (substitute-keyword-arguments (package-arguments qtsvg)
1424 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1426 `(("qtbase" ,qtbase)
1427 ("qtdeclarative" ,qtdeclarative)))
1428 (synopsis "Qt Data Visualization module")
1429 (description "The Qt Data Visualization module provides a way to visualize
1430 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1431 visualizing depth maps and large quantities of rapidly changing data, such as
1432 data received from multiple sensors. The look and feel of graphs can be
1433 customized by using themes or by adding custom items and labels to them.")
1434 (license license:gpl3)))
1436 (define-public qtnetworkauth
1437 (package (inherit qtsvg)
1438 (name "qtnetworkauth")
1442 (uri (string-append "https://download.qt.io/official_releases/qt/"
1443 (version-major+minor version) "/" version
1444 "/submodules/" name "-everywhere-src-"
1448 "0pi6p7bq54kzij2p69cgib7n55k69jsq0yqq09yli645s4ym202g"))))
1450 (substitute-keyword-arguments (package-arguments qtsvg)
1452 `(modify-phases ,phases
1453 (add-after 'unpack 'remove-failing-test
1455 ;; These tests can't find their test data.
1456 (substitute* "tests/auto/auto.pro"
1457 (("oauth1 ") "# oauth1 "))
1460 `(("qtbase" ,qtbase)))
1461 (synopsis "Qt Network Authorization module")
1462 (description "The Qt Network Authorization module provides an
1463 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1465 (define-public qtremoteobjects
1466 (package (inherit qtsvg)
1467 (name "qtremoteobjects")
1471 (uri (string-append "https://download.qt.io/official_releases/qt/"
1472 (version-major+minor version) "/" version
1473 "/submodules/" name "-everywhere-src-"
1477 "1mhlws5w0igf5hw0l90p6dz6k7w16dqfbnk2li0zxdmayk2039m6"))))
1479 (substitute-keyword-arguments (package-arguments qtsvg)
1481 `(modify-phases ,phases
1482 (add-after 'unpack 'remove-failing-test
1484 ;; This test can't find its imports.
1485 (substitute* "tests/auto/qml/qml.pro"
1486 (("integration") "# integration")
1487 (("usertypes") "# usertypes"))
1488 ;; disable failing tests: they need network
1489 (substitute* "tests/auto/auto.pro"
1490 (("integration_multiprocess proxy_multiprocess integration_external restart")
1491 "integration_multiprocess"))
1494 `(("qtbase" ,qtbase)
1495 ("qtdeclarative" ,qtdeclarative)))
1496 (synopsis "Qt Remote Objects module")
1497 (description "The Qt Remote Objects module is an @dfn{inter-process
1498 communication} (IPC) module developed for Qt. The idea is to extend existing
1499 Qt's functionalities to enable an easy exchange of information between
1500 processes or computers.")))
1502 (define-public qtspeech
1503 (package (inherit qtsvg)
1508 (uri (string-append "https://download.qt.io/official_releases/qt/"
1509 (version-major+minor version) "/" version
1510 "/submodules/" name "-everywhere-src-"
1514 "1nn6kspbp8hfkz1jhzc1qx1m9z7r1bgkdqgi9n4vl1q25yk8x7jy"))))
1517 (substitute-keyword-arguments (package-arguments qtsvg)
1518 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1520 `(("qtbase" ,qtbase)))
1523 ("qtdeclarative" ,qtdeclarative)
1524 ("qtmultimedia" ,qtmultimedia)
1525 ("qtxmlpatterns" ,qtxmlpatterns)))
1526 (synopsis "Qt Speech module")
1527 (description "The Qt Speech module enables a Qt application to support
1528 accessibility features such as text-to-speech, which is useful for end-users
1529 who are visually challenged or cannot access the application for whatever
1530 reason. The most common use case where text-to-speech comes in handy is when
1531 the end-user is driving and cannot attend the incoming messages on the phone.
1532 In such a scenario, the messaging application can read out the incoming
1535 (define-public qtwebengine
1538 (name "qtwebengine")
1539 (version (package-version qtbase))
1543 (uri (string-append "https://download.qt.io/official_releases/qt/"
1544 (version-major+minor version) "/" version
1545 "/submodules/" name "-everywhere-src-"
1549 "0iy9lsl6zxlkca6x2p1506hbj3wmhnaipg23z027wfccbnkxcsg1"))
1550 (modules '((ice-9 ftw)
1554 (guix build utils)))
1557 (let ((preserved-third-party-files
1558 '("base/third_party/cityhash"
1559 "base/third_party/dmg_fp"
1560 "base/third_party/dynamic_annotations"
1561 "base/third_party/icu"
1562 "base/third_party/libevent"
1563 "base/third_party/nspr"
1564 "base/third_party/superfasthash"
1565 "base/third_party/symbolize"
1566 "base/third_party/xdg_mime"
1567 "base/third_party/xdg_user_dirs"
1568 "net/third_party/mozilla_security_manager"
1569 "net/third_party/nss"
1570 "net/third_party/quiche"
1571 "net/third_party/uri_template"
1572 "third_party/abseil-cpp"
1574 "third_party/angle/src/common/third_party/base"
1575 "third_party/angle/src/common/third_party/smhasher"
1576 "third_party/angle/src/common/third_party/xxhash"
1577 "third_party/angle/src/third_party/compiler"
1578 "third_party/axe-core"
1580 "third_party/boringssl"
1581 "third_party/boringssl/src/third_party/fiat"
1582 "third_party/boringssl/src/third_party/sike"
1583 "third_party/boringssl/linux-x86_64/crypto/third_party/sike"
1584 "third_party/boringssl/linux-aarch64/crypto/third_party/sike"
1585 "third_party/breakpad"
1586 "third_party/brotli"
1589 "third_party/crc32c"
1592 "third_party/emoji-segmenter"
1593 "third_party/ffmpeg"
1594 "third_party/googletest"
1595 "third_party/hunspell"
1596 "third_party/iccjpeg"
1598 "third_party/inspector_protocol"
1599 "third_party/jinja2"
1600 "third_party/jsoncpp"
1601 "third_party/jstemplate"
1602 "third_party/khronos"
1603 "third_party/leveldatabase"
1604 "third_party/libaddressinput"
1605 "third_party/libjingle_xmpp"
1606 "third_party/libjpeg"
1607 "third_party/libpng"
1608 "third_party/libsrtp"
1609 "third_party/libsync"
1610 "third_party/libudev"
1611 "third_party/libvpx"
1612 "third_party/libwebm"
1613 "third_party/libwebp"
1614 "third_party/libxml"
1615 "third_party/libxslt"
1616 "third_party/libyuv"
1618 "third_party/markupsafe"
1619 "third_party/mesa_headers"
1620 "third_party/metrics_proto"
1621 "third_party/modp_b64"
1623 "third_party/one_euro_filter"
1626 "third_party/perfetto"
1629 "third_party/polymer"
1630 "third_party/protobuf"
1631 "third_party/pyjson5"
1633 "third_party/rnnoise"
1635 "third_party/skia/include/third_party/skcms/skcms.h"
1636 "third_party/skia/include/third_party/vulkan"
1637 "third_party/skia/third_party/gif"
1638 "third_party/skia/third_party/skcms"
1639 "third_party/skia/third_party/vulkanmemoryallocator"
1640 "third_party/smhasher"
1641 "third_party/snappy"
1642 "third_party/sqlite"
1643 "third_party/usb_ids"
1644 "third_party/usrsctp"
1645 "third_party/web-animations-js"
1646 "third_party/webrtc"
1647 "third_party/webrtc/common_audio/third_party/fft4g"
1648 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
1649 "third_party/webrtc/modules/third_party/fft"
1650 "third_party/webrtc/modules/third_party/g711"
1651 "third_party/webrtc/modules/third_party/g722"
1652 "third_party/webrtc/rtc_base/third_party/base64"
1653 "third_party/webrtc/rtc_base/third_party/sigslot"
1654 "third_party/webrtc_overrides"
1655 "third_party/widevine/cdm/widevine_cdm_common.h"
1656 "third_party/widevine/cdm/widevine_cdm_version.h"
1660 "url/third_party/mozilla"
1661 "v8/src/third_party/utf8-decoder"
1662 "v8/src/third_party/valgrind"
1663 "v8/src/third_party/siphash"
1664 "v8/third_party/v8/builtins"
1665 "v8/third_party/inspector_protocol"))
1666 (protected (make-regexp "\\.(gn|gyp)i?$")))
1667 (define preserved-club
1668 (map (lambda (member)
1669 (string-append "./" member))
1670 preserved-third-party-files))
1671 (define (empty? dir)
1672 (equal? (scandir dir) '("." "..")))
1673 (define (third-party? file)
1674 (string-contains file "third_party/"))
1675 (define (useless? file)
1676 (any (cute string-suffix? <> file)
1677 '(".zip" ".so" ".dll" ".exe" ".jar")))
1678 (define (parents child)
1679 ;; Return all parent directories of CHILD up to and including
1680 ;; the closest "third_party".
1681 (let* ((dirs (match (string-split child #\/)
1682 ((dirs ... last) dirs)))
1683 (closest (list-index (lambda (dir)
1684 (string=? "third_party" dir))
1686 (delim (- (length dirs) closest)))
1687 (fold (lambda (dir prev)
1688 (cons (string-append (car prev) "/" dir)
1690 (list (string-join (list-head dirs delim) "/"))
1691 (list-tail dirs delim))))
1692 (define (remove-loudly file)
1693 (format #t "deleting ~a...~%" file)
1696 (define (delete-unwanted-files child stat flag base level)
1698 ((or 'regular 'symlink 'stale-symlink)
1699 (when (third-party? child)
1700 (unless (or (member child preserved-club)
1701 (any (cute member <> preserved-club)
1703 (regexp-exec protected child))
1704 (remove-loudly child)))
1705 (when (and (useless? child) (file-exists? child))
1706 (remove-loudly child))
1708 ('directory-processed
1709 (when (empty? child)
1714 (with-directory-excursion "src/3rdparty"
1715 ;; TODO: Try removing "gn" too for future versions of qtwebengine.
1716 (delete-file-recursively "ninja")
1718 (with-directory-excursion "chromium"
1719 ;; Delete bundled software and binaries that were not explicitly
1721 (nftw "." delete-unwanted-files 'depth 'physical)
1723 ;; Assert that each preserved item is present to catch removals.
1724 (for-each (lambda (third-party)
1725 (unless (file-exists? third-party)
1726 (error (format #f "~s does not exist!~%" third-party))))
1729 ;; Use relative header locations instead of hard coded ones.
1731 "base/third_party/dynamic_annotations/dynamic_annotations.c"
1732 (("base/third_party/valgrind") "valgrind"))
1734 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
1735 (("third_party/curl") "curl"))
1737 '("components/viz/common/gpu/vulkan_context_provider.h"
1738 "components/viz/common/resources/resource_format_utils.h"
1739 "gpu/config/gpu_util.cc")
1740 (("third_party/vulkan/include/")
1743 ;; Replace Google Analytics bundle with an empty file and hope
1745 (mkdir-p "third_party/analytics")
1746 (call-with-output-file
1747 "third_party/analytics/google-analytics-bundle.js"
1750 ;; Do not enable support for loading the Widevine DRM plugin.
1751 (substitute* "src/buildtools/config/common.pri"
1752 (("enable_widevine=true")
1753 "enable_widevine=false"))
1755 (build-system gnu-build-system)
1762 ("pkg-config" ,pkg-config)
1763 ("python-2" ,python-2)
1766 `(("alsa-lib" ,alsa-lib)
1768 ("cups-minimal" ,cups-minimal)
1772 ("fontconfig" ,fontconfig)
1773 ("harbuzz" ,harfbuzz)
1775 ("jsoncpp" ,jsoncpp)
1778 ("libevent" ,libevent)
1779 ("libgcrypt" ,libgcrypt)
1780 ("libjpeg" ,libjpeg-turbo)
1782 ("libwebp" ,libwebp)
1785 ("libxcomposite" ,libxcomposite)
1786 ("libxcursor" ,libxcursor)
1788 ("libxkbcommon" ,libxkbcommon)
1789 ;; FIXME: libxml2 needs to built with icu support though it links to
1790 ;; libxml2 configure summary still states "Checking for compatible
1791 ;; system libxml2... no"
1792 ("libxml2" ,libxml2)
1793 ("libxrandr" ,libxrandr)
1794 ("libxrender" ,libxrender)
1795 ("libxslt" ,libxslt)
1796 ("libxtst" ,libxtst)
1798 ("minizip" ,minizip)
1801 ("pciutils" ,pciutils)
1802 ("protobuf" ,protobuf)
1803 ("pulseaudio" ,pulseaudio)
1805 ("qtdeclarative" ,qtdeclarative)
1806 ("qtmultimedia" ,qtmultimedia)
1807 ("qtwebchannel" ,qtwebchannel)
1811 ("valgrind" ,valgrind)
1812 ("vulkan-headers" ,vulkan-headers)
1813 ("xcb-util" ,xcb-util)))
1815 (substitute-keyword-arguments (package-arguments qtsvg)
1817 `(modify-phases ,phases
1818 (add-after 'unpack 'fix-build-with-newer-re2
1820 ;; Adjust for API change in re2, taken from
1821 ;; https://chromium-review.googlesource.com/c/chromium/src/+/2145261
1822 (substitute* "src/3rdparty/chromium/components/autofill/core\
1823 /browser/address_rewriter.cc"
1824 (("options\\.set_utf8\\(true\\)")
1825 "options.set_encoding(RE2::Options::EncodingUTF8)"))
1827 (add-after 'unpack 'patch-ninja-version-check
1829 ;; The build system assumes the system Ninja is too old because
1830 ;; it only checks for versions 1.7 through 1.9. We have 1.10.
1831 (substitute* "configure.pri"
1832 (("1\\.\\[7-9\\]\\.\\*")
1833 "1.([7-9]|1[0-9]).*"))
1835 (add-before 'configure 'substitute-source
1836 (lambda* (#:key inputs outputs #:allow-other-keys)
1837 (let ((out (assoc-ref outputs "out"))
1838 (nss (assoc-ref inputs "nss"))
1839 (udev (assoc-ref inputs "udev")))
1840 ;; Qtwebengine is not installed into the same prefix as
1841 ;; qtbase. Some qtbase QTLibraryInfo constants will not
1842 ;; work. Replace with the full path to the qtwebengine
1843 ;; translations and locales in the store.
1844 (substitute* "src/core/web_engine_library_info.cpp"
1845 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
1846 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
1847 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
1848 (string-append "QLatin1String(\"" out "/share/qt5\")")))
1849 ;; Substitute full dynamic library path for nss.
1850 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
1852 (string-append nss "/lib/nss/libnssckbi.so")))
1853 ;; Substitute full dynamic library path for udev.
1854 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
1856 (string-append udev "/lib/libudev.so.1")))
1858 (add-before 'configure 'set-env
1860 ;; Avoids potential race conditions.
1861 (setenv "PYTHONDONTWRITEBYTECODE" "1")
1862 (setenv "NINJAFLAGS"
1863 (string-append "-k1" ;less verbose build output
1864 ;; Respect the '--cores' option of 'guix build'.
1865 " -j" (number->string (parallel-job-count))))
1869 ;; Valid QT_BUILD_PARTS variables are:
1870 ;; libs tools tests examples demos docs translations
1871 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
1872 "--webengine-printing-and-pdf=no"
1873 "--webengine-ffmpeg=system"
1874 "--webengine-icu=system"
1875 "--webengine-pepper-plugins=no")))))
1876 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
1877 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
1878 ;; before running tests.
1879 ((#:tests? _ #f) #f)))
1880 (native-search-paths
1881 (list (search-path-specification
1882 (file-type 'regular)
1884 (variable "QTWEBENGINEPROCESS_PATH")
1885 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
1886 (home-page "https://wiki.qt.io/QtWebEngine")
1887 (synopsis "Qt WebEngine module")
1888 (description "The Qt5WebEngine module provides support for web applications
1889 using the Chromium browser project. The Chromium source code has Google services
1890 and binaries removed, and adds modular support for using system libraries.")
1891 (license license:lgpl2.1+)))
1893 (define-public python-sip
1900 (uri (string-append "https://www.riverbankcomputing.com/static/"
1901 "Downloads/sip/" version "/sip-" version ".tar.gz"))
1904 "0idywc326l8v1m3maprg1aq2gph67mmnnsskvlwfx8n19s16idz1"))))
1905 (build-system gnu-build-system)
1907 `(("python" ,python-wrapper)))
1909 `(#:tests? #f ; no check target
1910 #:imported-modules ((guix build python-build-system)
1911 ,@%gnu-build-system-modules)
1912 #:modules ((srfi srfi-1)
1913 ((guix build python-build-system) #:select (python-version))
1914 ,@%gnu-build-system-modules)
1916 (modify-phases %standard-phases
1918 (lambda* (#:key inputs outputs #:allow-other-keys)
1919 (let* ((out (assoc-ref outputs "out"))
1920 (bin (string-append out "/bin"))
1921 (include (string-append out "/include"))
1922 (python (assoc-ref inputs "python"))
1923 (lib (string-append out "/lib/python"
1924 (python-version python)
1926 (invoke "python" "configure.py"
1929 "--incdir" include)))))))
1930 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1931 (synopsis "Python binding creator for C and C++ libraries")
1933 "SIP is a tool to create Python bindings for C and C++ libraries. It
1934 was originally developed to create PyQt, the Python bindings for the Qt
1935 toolkit, but can be used to create bindings for any C or C++ library.
1937 SIP comprises a code generator and a Python module. The code generator
1938 processes a set of specification files and generates C or C++ code, which
1939 is then compiled to create the bindings extension module. The SIP Python
1940 module provides support functions to the automatically generated code.")
1941 ;; There is a choice between a python like license, gpl2 and gpl3.
1942 ;; For compatibility with pyqt, we need gpl3.
1943 (license license:gpl3)))
1945 (define-public python2-sip
1946 (package (inherit python-sip)
1947 (name "python2-sip")
1949 `(("python" ,python-2)))))
1951 (define-public python-pyqt
1953 (name "python-pyqt")
1958 ;; PyPI is the canonical distribution point of PyQt. Older
1959 ;; releases are available from the web site.
1960 (uri (list (pypi-uri "PyQt5" version)
1961 (string-append "https://www.riverbankcomputing.com/static/"
1962 "Downloads/PyQt5/" version "/PyQt5-"
1963 version ".tar.gz")))
1964 (file-name (string-append "PyQt5-"version ".tar.gz"))
1967 "1c4y4qi1l540gd125ikj0al00k5pg65kmqaixcfbzslrsrphq8xx"))
1968 (patches (search-patches "pyqt-configure.patch"
1969 "pyqt-public-sip.patch"))))
1970 (build-system gnu-build-system)
1972 `(("qtbase" ,qtbase))) ; for qmake
1974 `(("python-sip" ,python-sip)))
1976 `(("python" ,python-wrapper)
1978 ("qtconnectivity" ,qtconnectivity)
1979 ("qtdeclarative" ,qtdeclarative)
1980 ("qtlocation" ,qtlocation)
1981 ("qtmultimedia" ,qtmultimedia)
1982 ("qtsensors" ,qtsensors)
1983 ("qtserialport" ,qtserialport)
1985 ("qttools" ,qttools)
1986 ("qtwebchannel" ,qtwebchannel)
1987 ("qtwebkit" ,qtwebkit)
1988 ("qtwebsockets" ,qtwebsockets)
1989 ("qtx11extras" ,qtx11extras)
1990 ("qtxmlpatterns" ,qtxmlpatterns)))
1992 `(#:modules ((srfi srfi-1)
1993 ((guix build python-build-system) #:select (python-version))
1994 ,@%gnu-build-system-modules)
1995 #:imported-modules ((guix build python-build-system)
1996 ,@%gnu-build-system-modules)
1998 (modify-phases %standard-phases
1999 ;; When building python-pyqtwebengine, <qprinter.h> can not be
2000 ;; included. Here we substitute the full path to the header in the
2002 (add-before 'configure 'substitute-source
2003 (lambda* (#:key inputs #:allow-other-keys)
2004 (let* ((qtbase (assoc-ref inputs "qtbase"))
2005 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
2006 (substitute* "sip/QtPrintSupport/qprinter.sip"
2011 (lambda* (#:key inputs outputs #:allow-other-keys)
2012 (let* ((out (assoc-ref outputs "out"))
2013 (bin (string-append out "/bin"))
2014 (sip (string-append out "/share/sip"))
2015 (plugins (string-append out "/lib/qt5/plugins"))
2016 (designer (string-append plugins "/designer"))
2017 (qml (string-append plugins "/PyQt5"))
2018 (python (assoc-ref inputs "python"))
2019 (lib (string-append out "/lib/python"
2020 (python-version python)
2022 (stubs (string-append lib "/PyQt5")))
2023 (invoke "python" "configure.py"
2027 "--designer-plugindir" designer
2028 "--qml-plugindir" qml
2029 ; Where to install the PEP 484 Type Hints stub
2030 ; files. Without this the stubs are tried to be
2031 ; installed into the python package's
2032 ; site-package directory, which is read-only.
2034 "--sipdir" sip)))))))
2035 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
2036 (synopsis "Python bindings for Qt")
2038 "PyQt is a set of Python v2 and v3 bindings for the Qt application
2039 framework. The bindings are implemented as a set of Python modules and
2040 contain over 620 classes.")
2041 (license license:gpl3)))
2043 (define-public python-pyqtwebengine
2045 (name "python-pyqtwebengine")
2050 ;; The newest releases are only available on PyPI. Older ones
2051 ;; are mirrored at the upstream home page.
2052 (uri (list (pypi-uri "PyQtWebEngine" version)
2053 (string-append "https://www.riverbankcomputing.com/static"
2054 "/Downloads/PyQtWebEngine/" version
2055 "/PyQtWebEngine-" version ".tar.gz")))
2058 "14hw49akb35n9pgiw564x8ykmsifihn9p2ax2x4zmywb3w2ra5g1"))))
2059 (build-system gnu-build-system)
2061 `(("python" ,python)
2062 ("python-sip" ,python-sip)
2063 ;; qtbase is required for qmake
2064 ("qtbase" ,qtbase)))
2066 `(("python" ,python-wrapper)
2067 ("python-sip" ,python-sip)
2068 ("python-pyqt" ,python-pyqt)
2071 ("qtdeclarative" ,qtdeclarative)
2072 ("qtwebchannel" ,qtwebchannel)
2073 ("qtwebengine" ,qtwebengine)))
2075 `(#:modules ((srfi srfi-1)
2076 ((guix build python-build-system) #:select (python-version))
2077 ,@%gnu-build-system-modules)
2078 #:imported-modules ((guix build python-build-system)
2079 ,@%gnu-build-system-modules)
2081 (modify-phases %standard-phases
2083 (lambda* (#:key inputs outputs #:allow-other-keys)
2084 (let* ((out (assoc-ref outputs "out"))
2085 (sipdir (string-append out "/share/sip"))
2086 (pyqt-sipdir (string-append
2087 (assoc-ref inputs "python-pyqt") "/share/sip"))
2088 (python (assoc-ref inputs "python"))
2089 (lib (string-append out "/lib/python"
2090 (python-version python)
2091 "/site-packages/PyQt5"))
2092 (stubs (string-append lib "/PyQt5")))
2095 (invoke "python" "configure.py"
2102 "--pyqt-sipdir" pyqt-sipdir))))
2103 ;; Because this has a different prefix than python-pyqt then we need
2104 ;; to make this a namespace of it's own
2105 (add-after 'install 'make-namespace
2106 (lambda* (#:key inputs outputs #:allow-other-keys)
2107 (let* ((__init__.py (string-append
2108 (assoc-ref outputs "out")
2110 (python-version (assoc-ref inputs "python"))
2111 "/site-packages/PyQt5/__init__.py")))
2112 (with-output-to-file __init__.py
2113 (lambda _ (display "
2114 from pkgutil import extend_path
2115 __path__ = extend_path(__path__, __name__)
2118 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
2119 (synopsis "Python bindings for QtWebEngine")
2121 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
2122 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
2123 set of three modules. Prior to v5.12 these bindings were part of PyQt
2125 (license license:gpl3)))
2127 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
2128 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
2129 ;; packages that could be used together.
2130 (define-public python-pyqt-without-qtwebkit
2131 (package (inherit python-pyqt)
2132 (name "python-pyqt-without-qtwebkit")
2134 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
2136 (define-public python2-pyqt
2137 (package (inherit python-pyqt)
2138 (name "python2-pyqt")
2140 `(("python-enum34" ,python2-enum34)
2141 ("python-sip" ,python2-sip)))
2143 `(("python-sip" ,python2-sip)
2144 ("qtbase" ,qtbase)))
2146 `(("python" ,python-2)
2147 ("python2-enum34" ,python2-enum34)
2148 ,@(alist-delete "python" (package-inputs python-pyqt))))))
2150 (define-public python2-pyqtwebengine
2152 python-pyqtwebengine
2153 (name "python2-pyqtwebengine")
2155 `(("python" ,python-2)
2156 ("python-sip" ,python2-sip)
2157 ;; qtbase is required for qmake
2158 ("qtbase" ,qtbase)))
2160 `(("python" ,python-2)
2161 ("python-sip" ,python2-sip)
2162 ("python-pyqt" ,python2-pyqt)
2165 ("qtdeclarative" ,qtdeclarative)
2166 ("qtwebchannel" ,qtwebchannel)
2167 ("qtwebengine" ,qtwebengine)))))
2169 (define-public python2-pyqt-4
2170 (package (inherit python-pyqt)
2171 (name "python2-pyqt")
2177 (string-append "mirror://sourceforge/pyqt/PyQt4/"
2178 "PyQt-" version "/PyQt4_gpl_x11-"
2182 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
2184 `(("python-sip" ,python2-sip)
2186 (inputs `(("python" ,python-2)))
2188 `(#:tests? #f ; no check target
2189 #:modules ((srfi srfi-1)
2190 ,@%gnu-build-system-modules)
2192 (modify-phases %standard-phases
2194 (lambda* (#:key inputs outputs #:allow-other-keys)
2195 (let* ((out (assoc-ref outputs "out"))
2196 (bin (string-append out "/bin"))
2197 (sip (string-append out "/share/sip"))
2198 (python (assoc-ref inputs "python"))
2200 (last (string-split python #\-)))
2203 (take (string-split python-version #\.) 2)
2205 (lib (string-append out "/lib/python"
2208 (invoke "python" "configure.py"
2212 "--sipdir" sip)))))))
2213 (license (list license:gpl2 license:gpl3)))) ; choice of either license
2215 (define-public qscintilla
2221 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
2222 "QScintilla-" version "/QScintilla_gpl-"
2226 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
2227 (build-system gnu-build-system)
2230 (modify-phases %standard-phases
2232 (lambda* (#:key outputs #:allow-other-keys)
2233 (let ((out (assoc-ref outputs "out")))
2235 (substitute* "qscintilla.pro"
2236 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
2237 (string-append out "/lib"))
2238 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
2239 (string-append out "/include"))
2240 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
2241 (string-append out "/translations"))
2242 (("\\$\\$\\[QT_INSTALL_DATA\\]")
2243 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
2244 (("\\$\\$\\[QT_HOST_DATA\\]")
2245 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
2246 (invoke "qmake")))))))
2247 (native-inputs `(("qtbase" ,qtbase)))
2248 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
2249 (synopsis "Qt port of the Scintilla C++ editor control")
2250 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2251 editor control. QScintilla includes features especially useful when editing
2252 and debugging source code. These include support for syntax styling, error
2253 indicators, code completion and call tips.")
2254 (license license:gpl3+)))
2256 (define-public python-qscintilla
2257 (package (inherit qscintilla)
2258 (name "python-qscintilla")
2261 (list "--pyqt=PyQt5"
2262 (string-append "--pyqt-sipdir="
2263 (assoc-ref %build-inputs "python-pyqt")
2265 (string-append "--qsci-incdir="
2266 (assoc-ref %build-inputs "qscintilla")
2268 (string-append "--qsci-libdir="
2269 (assoc-ref %build-inputs "qscintilla")
2272 (modify-phases %standard-phases
2274 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
2275 (let ((out (assoc-ref outputs "out"))
2276 (python (assoc-ref inputs "python")))
2278 (apply invoke "python3" "configure.py"
2280 ;; Install to the right directory
2281 (substitute* '("Makefile"
2283 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2284 (((string-append python "/lib"))
2285 (string-append out "/lib")))
2286 ;; And fix the installed.txt file
2287 (substitute* "installed.txt"
2288 (("/gnu/store/[^/]+") out)))
2291 `(("qscintilla" ,qscintilla)
2293 ("python-pyqt" ,python-pyqt)))
2294 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2295 editor control. QScintilla includes features especially useful when editing
2296 and debugging source code. These include support for syntax styling, error
2297 indicators, code completion and call tips.
2299 This package provides the Python bindings.")))
2301 ;; PyQt only looks for modules in its own directory. It ignores environment
2302 ;; variables such as PYTHONPATH, so we need to build a union package to make
2304 (define-public python-pyqt+qscintilla
2305 (package (inherit python-pyqt)
2306 (name "python-pyqt+qscintilla")
2308 (build-system trivial-build-system)
2310 '(#:modules ((guix build union))
2312 (use-modules (ice-9 match)
2314 (match %build-inputs
2315 (((names . directories) ...)
2316 (union-build (assoc-ref %outputs "out")
2320 `(("python-pyqt" ,python-pyqt)
2321 ("python-qscintilla" ,python-qscintilla)))
2322 (synopsis "Union of PyQt and the Qscintilla extension")
2324 "This package contains the union of PyQt and the Qscintilla extension.")))
2326 (define-public qtkeychain
2334 (url "https://github.com/frankosterfeld/qtkeychain/")
2335 (commit (string-append "v" version))))
2336 (file-name (git-file-name name version))
2339 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
2340 (build-system cmake-build-system)
2342 `(("pkg-config" ,pkg-config)
2343 ("qttools" ,qttools)))
2345 `(("qtbase" ,qtbase)))
2347 `(#:tests? #f ; No tests included
2349 (modify-phases %standard-phases
2350 (add-before 'configure 'set-qt-trans-dir
2352 (substitute* "CMakeLists.txt"
2353 (("\\$\\{qt_translations_dir\\}")
2354 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
2356 (home-page "https://github.com/frankosterfeld/qtkeychain")
2357 (synopsis "Qt API to store passwords")
2359 "QtKeychain is a Qt library to store passwords and other secret data
2360 securely. It will not store any data unencrypted unless explicitly requested.")
2361 (license license:bsd-3)))
2371 (string-append "mirror://sourceforge/qwt/qwt/"
2372 version "/qwt-" version ".tar.bz2"))
2374 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
2375 (build-system gnu-build-system)
2377 `(("qtbase" ,qtbase)
2379 ("qttools" ,qttools)))
2382 (modify-phases %standard-phases
2384 (lambda* (#:key outputs #:allow-other-keys)
2385 (let* ((out (assoc-ref outputs "out"))
2386 (docdir (string-append out "/share/doc/qwt"))
2387 (incdir (string-append out "/include/qwt"))
2388 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2389 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2390 (substitute* '("qwtconfig.pri")
2391 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2392 (format #f "~a = ~a\n" x out))
2393 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2394 (format #f "~a = ~a\n" x docdir))
2395 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2396 (format #f "~a = ~a\n" x incdir))
2397 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2398 (format #f "~a = ~a\n" x pluginsdir))
2399 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2400 (format #f "~a = ~a\n" x featuresdir)))
2401 (substitute* '("doc/doc.pro")
2402 ;; We'll install them in the 'install-man-pages' phase.
2403 (("^unix:doc\\.files.*") ""))
2405 (add-after 'install 'install-man-pages
2406 (lambda* (#:key outputs #:allow-other-keys)
2407 (let* ((out (assoc-ref outputs "out"))
2408 (man (string-append out "/share/man")))
2409 ;; Remove some incomplete manual pages.
2410 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2412 (copy-recursively "doc/man" man)
2414 (home-page "http://qwt.sourceforge.net")
2415 (synopsis "Qt widgets for plots, scales, dials and other technical software
2418 "The Qwt library contains widgets and components which are primarily useful
2419 for technical and scientific purposes. It includes a 2-D plotting widget,
2420 different kinds of sliders, and much more.")
2423 ;; The Qwt license is LGPL2.1 with some exceptions.
2424 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2425 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2426 license:lgpl2.1 license:gpl3))))
2428 (define-public qtwebkit
2431 (version "5.212.0-alpha4")
2435 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2436 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
2439 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
2440 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2441 (build-system cmake-build-system)
2449 ("pkg-config" ,pkg-config)))
2453 ("gst-plugins-base" ,gst-plugins-base)
2454 ("libjpeg" ,libjpeg-turbo)
2456 ("libwebp" ,libwebp)
2458 ("fontconfig" ,fontconfig)
2459 ("libxrender" ,libxrender)
2461 ("qtdeclarative" ,qtdeclarative)
2462 ("qtlocation" ,qtlocation)
2463 ("qtmultimedia" ,qtmultimedia)
2464 ("qtsensors" ,qtsensors)
2465 ("qtwebchannel" ,qtwebchannel)
2466 ("libxml2" ,libxml2)
2467 ("libxslt" ,libxslt)
2469 ("libxcomposite" ,libxcomposite)))
2471 `(#:tests? #f ; no apparent tests; it might be necessary to set
2472 ; ENABLE_API_TESTS, see CMakeLists.txt
2474 ;; Parallel builds fail due to a race condition:
2475 ;; <https://bugs.gnu.org/34062>.
2476 #:parallel-build? #f
2478 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2480 "-DUSE_LIBHYPHEN=OFF"
2481 "-DUSE_SYSTEM_MALLOC=ON"
2482 ;; XXX: relative dir installs to build dir?
2483 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2484 %output "/lib/qt5/mkspecs/modules")
2485 ;; Sacrifice a little speed in order to link
2486 ;; libraries and test executables in a
2487 ;; reasonable amount of memory.
2488 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2489 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2490 (home-page "https://www.webkit.org")
2491 (synopsis "Web browser engine and classes to render and interact with web
2493 (description "QtWebKit provides a Web browser engine that makes it easy to
2494 embed content from the World Wide Web into your Qt application. At the same
2495 time Web content can be enhanced with native controls.")
2496 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2497 ;; room for slower or busy hardware.
2498 (properties '((timeout . 64800))) ;18 hours
2500 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2501 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2502 ;; disable it on non-Intel platforms.
2503 (supported-systems '("x86_64-linux" "i686-linux"))
2505 (license license:lgpl2.1+)))
2507 (define-public dotherside
2515 (url "https://github.com/filcuc/DOtherSide")
2516 (commit (string-append "v" version))))
2517 (file-name (git-file-name name version))
2520 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
2521 (build-system cmake-build-system)
2523 `(("qttools" ,qttools)))
2525 `(("qtbase" ,qtbase)
2526 ("qtdeclarative" ,qtdeclarative)))
2527 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2528 (synopsis "C language library for creating bindings for the Qt QML language")
2530 "DOtherSide is a C language library for creating bindings for the
2531 QT QML language. The following features are implementable from
2534 @item Creating custom QObject
2535 @item Creating custom QAbstractListModels
2536 @item Creating custom properties, signals and slots
2537 @item Creating from QML QObject defined in the binded language
2538 @item Creating from Singleton QML QObject defined in the binded language
2540 (license license:lgpl3))) ;version 3 only (+ exception)
2542 ;; There have been no public releases yet.
2543 (define-public qtcolorwidgets
2544 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2547 (name "qtcolorwidgets")
2548 (version (git-version "0" revision commit))
2552 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2554 (file-name (git-file-name name version))
2557 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2558 (build-system cmake-build-system)
2559 (arguments `(#:tests? #f)) ; There are no tests
2561 `(("qttools" ,qttools)))
2563 `(("qtbase" ,qtbase)))
2564 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2565 (synopsis "Color management widgets")
2566 (description "QtColorWidgets provides a Qt color dialog that is more
2567 user-friendly than the default @code{QColorDialog} and several other
2568 color-related widgets.")
2569 ;; Includes a license exception for combining with GPL2 code.
2570 (license license:lgpl3+))))
2572 (define-public python-shiboken-2
2574 (name "python-shiboken-2")
2575 (version "5.14.2.3")
2578 (uri (string-append "https://download.qt.io/official_releases"
2579 "/QtForPython/pyside2/PySide2-" version
2580 "-src/pyside-setup-opensource-src-"
2584 "08lhqm0n3fjqpblcx9rshsp8g3bvf7yzbai5q99bly2wa04y6b83"))))
2585 (build-system cmake-build-system)
2587 `(("clang-toolchain" ,clang-toolchain)
2588 ("libxml2" ,libxml2)
2589 ("libxslt" ,libxslt)
2590 ("python-wrapper" ,python-wrapper)
2592 ("qtxmlpatterns" ,qtxmlpatterns)))
2595 ;; FIXME: Building tests fails
2596 #:configure-flags '("-DBUILD_TESTS=off")
2598 (modify-phases %standard-phases
2599 (add-after 'unpack 'use-shiboken-dir-only
2600 (lambda _ (chdir "sources/shiboken2") #t))
2601 (add-before 'configure 'make-files-writable-and-update-timestamps
2603 ;; The build scripts need to modify some files in
2604 ;; the read-only source directory, and also attempts
2605 ;; to create Zip files which fails because the Zip
2606 ;; format does not support timestamps before 1980.
2607 (let ((circa-1980 (* 10 366 24 60 60)))
2608 (for-each (lambda (file)
2609 (make-file-writable file)
2610 (utime file circa-1980 circa-1980))
2613 (add-before 'configure 'set-build-env
2614 (lambda* (#:key inputs #:allow-other-keys)
2615 (let ((llvm (assoc-ref inputs "clang-toolchain")))
2616 (setenv "CLANG_INSTALL_DIR" llvm)
2618 (home-page "https://wiki.qt.io/Qt_for_Python")
2620 "Shiboken generates bindings for C++ libraries using CPython source code")
2622 "Shiboken generates bindings for C++ libraries using CPython source code")
2625 ;; The main code is GPL3 or LGPL3.
2626 ;; Examples are BSD-3.
2631 (define-public python-pyside-2
2633 (name "python-pyside-2")
2634 (version (package-version python-shiboken-2))
2635 (source (package-source python-shiboken-2))
2636 (build-system cmake-build-system)
2638 `(("libxml2" ,libxml2)
2639 ("libxslt" ,libxslt)
2640 ("clang-toolchain" ,clang-toolchain)
2642 ("qtdatavis3d" ,qtdatavis3d)
2643 ("qtlocation" ,qtlocation)
2644 ("qtmultimedia" ,qtmultimedia)
2645 ("qtquickcontrols" ,qtquickcontrols)
2646 ("qtscript" ,qtscript)
2647 ("qtscxml" ,qtscxml)
2648 ("qtsensors" ,qtsensors)
2649 ("qtspeech" ,qtspeech)
2651 ("qtwebchannel" ,qtwebchannel)
2652 ("qtwebsockets" ,qtwebsockets)
2653 ("qtx11extras" ,qtx11extras)
2654 ("qtxmlpatterns" ,qtxmlpatterns)))
2656 `(("cmake" ,cmake-minimal)
2657 ("python-shiboken-2" ,python-shiboken-2)
2658 ("python" ,python-wrapper)
2659 ("qttools" ,qttools)
2663 ;; FIXME: Building tests fail.
2665 (list "-DBUILD_TESTS=FALSE"
2666 (string-append "-DPYTHON_EXECUTABLE="
2667 (assoc-ref %build-inputs "python")
2670 (modify-phases %standard-phases
2671 (add-after 'unpack 'go-to-source-dir
2672 (lambda _ (chdir "sources/pyside2") #t))
2673 (add-before 'configure 'set-clang-dir
2674 (lambda* (#:key inputs #:allow-other-keys)
2675 (let ((clang (assoc-ref inputs "clang-toolchain")))
2676 (setenv "CLANG_INSTALL_DIR" clang)
2678 (home-page "https://wiki.qt.io/Qt_for_Python")
2680 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2682 "The Qt for Python product enables the use of Qt5 APIs in Python
2683 applications. It lets Python developers utilize the full potential of Qt,
2684 using the PySide2 module. The PySide2 module provides access to the
2685 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2686 comes with the Shiboken2 CPython binding code generator, which can be used to
2687 generate Python bindings for your C or C++ code.")
2691 ;; this file may be used under the terms of the GNU General
2692 ;; Public License version 2.0 or (at your option) the GNU
2693 ;; General Public license version 3 or any later version
2694 ;; approved by the KDE Free Qt Foundation.
2695 ;; Thus, it is currently v2 or v3, but no "+".
2699 (define-public python-pyside-2-tools
2701 (name "python-pyside-2-tools")
2702 (version (package-version python-shiboken-2))
2703 (source (package-source python-shiboken-2))
2704 (build-system cmake-build-system)
2706 `(("python-pyside-2" ,python-pyside-2)
2707 ("python-shiboken-2" ,python-shiboken-2)
2708 ("qtbase" ,qtbase)))
2710 `(("python" ,python-wrapper)))
2714 (list "-DBUILD_TESTS=off"
2715 (string-append "-DPYTHON_EXECUTABLE="
2716 (assoc-ref %build-inputs "python")
2718 #:phases (modify-phases %standard-phases
2719 (add-after 'unpack 'go-to-source-dir
2720 (lambda _ (chdir "sources/pyside2-tools") #t)))))
2721 (home-page "https://wiki.qt.io/Qt_for_Python")
2723 "Contains command line tools for PySide2")
2725 "Contains lupdate, rcc and uic tools for PySide2")
2726 (license license:gpl2)))
2728 (define-public libqglviewer
2730 (name "libqglviewer")
2735 (string-append "http://libqglviewer.com/src/libQGLViewer-"
2739 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
2740 (build-system gnu-build-system)
2742 '(#:tests? #f ; no check target
2744 (list (string-append "PREFIX="
2745 (assoc-ref %outputs "out")))
2747 (modify-phases %standard-phases
2749 (lambda* (#:key make-flags #:allow-other-keys)
2750 (apply invoke (cons "qmake" make-flags)))))))
2752 `(("qtbase" ,qtbase)
2753 ("qttools" ,qttools)))
2756 (home-page "http://libqglviewer.com")
2757 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
2759 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
2760 of OpenGL 3D viewers.
2762 It provides some of the typical 3D viewer functionalities, such as the
2763 possibility to move the camera using the mouse, which lacks in most of the
2764 other APIs. Other features include mouse manipulated frames, interpolated
2765 keyFrames, object selection, stereo display, screenshot saving and much more.
2766 It can be used by OpenGL beginners as well as to create complex applications,
2767 being fully customizable and easy to extend.")
2768 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
2770 (license (list license:gpl2 license:gpl3))))