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 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 ng0 <ng0@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>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages qt)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix git-download)
38 #:use-module (guix build-system cmake)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system trivial)
41 #:use-module (guix packages)
42 #:use-module (guix deprecation)
43 #:use-module (guix utils)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages bison)
47 #:use-module (gnu packages cmake)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages cups)
50 #:use-module (gnu packages curl)
51 #:use-module (gnu packages databases)
52 #:use-module (gnu packages documentation)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages flex)
55 #:use-module (gnu packages freedesktop)
56 #:use-module (gnu packages gcc)
57 #:use-module (gnu packages ghostscript)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages glib)
60 #:use-module (gnu packages gnupg)
61 #:use-module (gnu packages gperf)
62 #:use-module (gnu packages gstreamer)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages icu4c)
65 #:use-module (gnu packages image)
66 #:use-module (gnu packages libevent)
67 #:use-module (gnu packages linux)
68 #:use-module (gnu packages llvm)
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages ninja)
71 #:use-module (gnu packages nss)
72 #:use-module (gnu packages pciutils)
73 #:use-module (gnu packages pcre)
74 #:use-module (gnu packages perl)
75 #:use-module (gnu packages pkg-config)
76 #:use-module (gnu packages pulseaudio)
77 #:use-module (gnu packages protobuf)
78 #:use-module (gnu packages python)
79 #:use-module (gnu packages python-xyz)
80 #:use-module (gnu packages regex)
81 #:use-module (gnu packages ruby)
82 #:use-module (gnu packages sdl)
83 #:use-module (gnu packages serialization)
84 #:use-module (gnu packages sqlite)
85 #:use-module (gnu packages telephony)
86 #:use-module (gnu packages tls)
87 #:use-module (gnu packages valgrind)
88 #:use-module (gnu packages video)
89 #:use-module (gnu packages vulkan)
90 #:use-module (gnu packages xdisorg)
91 #:use-module (gnu packages xiph)
92 #:use-module (gnu packages xorg)
93 #:use-module (gnu packages xml)
94 #:use-module (srfi srfi-1))
96 (define-public grantlee
104 (url "https://github.com/steveire/grantlee.git")
105 (commit (string-append "v" version))))
106 (file-name (git-file-name name version))
108 (base32 "1dmah2gd6zd4fgz2f4ir11dazqg067hjz8xshhywhfsmavchi626"))))
110 ;; Optional: lcov and cccc, both are for code coverage
111 `(("doxygen" ,doxygen)))
114 ("qtscript" ,qtscript)))
115 (build-system cmake-build-system)
117 `(#:configure-flags '("-DCMAKE_CXX_STANDARD=11")
119 (modify-phases %standard-phases
120 (add-after 'unpack 'delete-broken-tests
122 ;; TODO: Two date tests (for date01 and date02) fail for unknown
124 ;; Actual (result): ""
125 ;; Expected (output): "01"
126 ;; Actual (result): ""
127 ;; Expected (output): "Jan. 1, 2008"
128 (delete-file "templates/tests/testfilters.cpp")
129 (substitute* "templates/tests/CMakeLists.txt"
130 (("testfilters") ""))
132 (add-before 'check 'check-setup
134 ;; make Qt render "offscreen", required for tests
135 (setenv "QT_QPA_PLATFORM" "offscreen")
137 (home-page "https://github.com/steveire/grantlee")
138 (synopsis "Libraries for text templating with Qt")
139 (description "Grantlee Templates can be used for theming and generation of
140 other text such as code. The syntax uses the syntax of the Django template
141 system, and the core design of Django is reused in Grantlee.")
142 (license license:lgpl2.0+)))
150 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
151 (string-copy version 0 (string-rindex version #\.))
153 "/qt-everywhere-opensource-src-"
157 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
158 (patches (search-patches "qt4-ldflags.patch"))
159 (modules '((guix build utils)))
161 ;; Remove webkit module, which is not built.
162 '(begin (delete-file-recursively "src/3rdparty/webkit")
164 (build-system gnu-build-system)
168 `(("alsa-lib" ,alsa-lib)
172 ("double-conversion" ,double-conversion)
174 ("fontconfig" ,fontconfig)
175 ("freetype" ,freetype)
177 ("gstreamer" ,gstreamer)
178 ("gst-plugins-base" ,gst-plugins-base)
181 ("libinput" ,libinput-minimal)
188 ("libxcomposite" ,libxcomposite)
189 ("libxcursor" ,libxcursor)
191 ("libxfixes" ,libxfixes)
193 ("libxinerama" ,libxinerama)
194 ("libxkbcommon" ,libxkbcommon)
196 ("libxrandr" ,libxrandr)
197 ("libxrender" ,libxrender)
201 ("mariadb" ,mariadb "lib")
202 ("mariadb-dev" ,mariadb "dev")
204 ("postgresql" ,postgresql)
205 ("pulseaudio" ,pulseaudio)
207 ("sqlite" ,sqlite-with-column-metadata)
209 ("unixodbc" ,unixodbc)
211 ("xcb-util" ,xcb-util)
212 ("xcb-util-image" ,xcb-util-image)
213 ("xcb-util-keysyms" ,xcb-util-keysyms)
214 ("xcb-util-renderutil" ,xcb-util-renderutil)
215 ("xcb-util-wm" ,xcb-util-wm)
217 ("libjpeg" ,libjpeg-8)
219 ("openssl" ,openssl-1.0)))
221 `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
222 ;; We could build it with -std=gnu++98, but then we'll get in trouble with
223 ;; ICU later. Just keep using GCC 5 for now.
229 ("pkg-config" ,pkg-config)
232 ("which" ,(@ (gnu packages base) which))))
233 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
234 ;; but we can't make them a separate output because "out" and "examples"
235 ;; would refer to each other.
236 (outputs '("out" ;112MiB core + 37MiB examples
237 "doc")) ;280MiB of HTML + code
240 (modify-phases %standard-phases
243 (lambda* (#:key outputs #:allow-other-keys)
244 (let ((out (assoc-ref outputs "out"))
245 (doc (assoc-ref outputs "doc")))
246 (substitute* '("configure")
247 (("/bin/pwd") (which "pwd")))
248 (substitute* "src/corelib/global/global.pri"
249 (("/bin/ls") (which "ls")))
255 "-nomake" "examples demos"
256 ;; Note: Don't pass '-docdir' since 'qmake' and
257 ;; libQtCore would record its value, thereby defeating
258 ;; the whole point of having a separate output.
259 "-datadir" (string-append out "/share/qt-" ,version
261 "-importdir" (string-append out "/lib/qt-4"
263 "-plugindir" (string-append out "/lib/qt-4"
265 "-translationdir" (string-append out "/share/qt-" ,version
267 "-demosdir" (string-append out "/share/qt-" ,version
269 "-examplesdir" (string-append out "/share/qt-" ,version
273 ;; explicitly link with dbus instead of dlopening it
275 ;; Skip the webkit module; it fails to build on armhf
276 ;; and, apart from that, may pose security risks.
278 ;; don't use the precompiled headers
280 ;; drop special machine instructions not supported
281 ;; on all instances of the target
282 ,@(if (string-prefix? "x86_64"
283 (or (%current-target-system)
297 (lambda* (#:key outputs #:allow-other-keys)
298 ;; Because of qt4-documentation-path.patch, documentation ends up
299 ;; being installed in OUT. Move it to the right place.
300 (let* ((out (assoc-ref outputs "out"))
301 (doc (assoc-ref outputs "doc"))
302 (olddoc (string-append out "/doc"))
303 (docdir (string-append doc "/share/doc/qt-" ,version)))
304 (mkdir-p (dirname docdir))
306 ;; Note: We can't use 'rename-file' here because OUT and DOC are
307 ;; different "devices" due to bind-mounts.
308 (copy-recursively olddoc docdir)
309 (delete-file-recursively olddoc)
312 (list (search-path-specification
313 (variable "QMAKEPATH")
314 (files '("lib/qt5")))
315 (search-path-specification
316 (variable "QML2_IMPORT_PATH")
317 (files '("lib/qt5/qml")))
318 (search-path-specification
319 (variable "QT_PLUGIN_PATH")
320 (files '("lib/qt5/plugins")))
321 (search-path-specification
322 (variable "XDG_DATA_DIRS")
324 (search-path-specification
325 (variable "XDG_CONFIG_DIRS")
326 (files '("etc/xdg")))))
327 (home-page "https://www.qt.io/")
328 (synopsis "Cross-platform GUI library")
329 (description "Qt is a cross-platform application and UI framework for
330 developers using C++ or QML, a CSS & JavaScript like language.")
331 (license (list license:lgpl2.1 license:lgpl3))
333 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
334 ;; see <http://hydra.gnu.org/build/112828>.
335 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
336 (supported-systems (delete "mips64el-linux" %supported-systems))))
338 (define-public qtbase
344 (uri (string-append "https://download.qt.io/official_releases/qt/"
345 (version-major+minor version) "/" version
346 "/submodules/" name "-everywhere-src-"
350 "09wz7zs1x5mpgs2y4xnl2zv3naqls4sz6v2arwl1fz2dsx4jddba"))
351 ;; Use TZDIR to avoid depending on package "tzdata".
352 (patches (search-patches "qtbase-use-TZDIR.patch"))
353 (modules '((guix build utils)))
355 ;; corelib uses bundled harfbuzz, md4, md5, sha3
357 (with-directory-excursion "src/3rdparty"
358 (for-each delete-file-recursively
359 (list "double-conversion" "freetype" "harfbuzz-ng"
360 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
363 (build-system gnu-build-system)
366 ("which" ,(@ (gnu packages base) which))))
368 `(("alsa-lib" ,alsa-lib)
371 ("double-conversion" ,double-conversion)
374 ("fontconfig" ,fontconfig)
375 ("freetype" ,freetype)
377 ("harfbuzz" ,harfbuzz)
379 ("libinput" ,libinput-minimal)
384 ("libxcomposite" ,libxcomposite)
385 ("libxcursor" ,libxcursor)
386 ("libxfixes" ,libxfixes)
388 ("libxinerama" ,libxinerama)
389 ("libxkbcommon" ,libxkbcommon)
391 ("libxrandr" ,libxrandr)
392 ("libxrender" ,libxrender)
396 ("mariadb" ,mariadb "lib")
397 ("mariadb-dev" ,mariadb "dev")
401 ("postgresql" ,postgresql)
402 ("pulseaudio" ,pulseaudio)
403 ("sqlite" ,sqlite-with-column-metadata)
404 ("unixodbc" ,unixodbc)
405 ("xcb-util" ,xcb-util)
406 ("xcb-util-image" ,xcb-util-image)
407 ("xcb-util-keysyms" ,xcb-util-keysyms)
408 ("xcb-util-renderutil" ,xcb-util-renderutil)
409 ("xcb-util-wm" ,xcb-util-wm)
416 ("pkg-config" ,pkg-config)
418 ("vulkan-headers" ,vulkan-headers)
422 (modify-phases %standard-phases
423 (add-after 'configure 'patch-bin-sh
425 (substitute* '("config.status"
427 "mkspecs/features/qt_functions.prf"
428 "qmake/library/qmakebuiltins.cpp")
429 (("/bin/sh") (which "sh")))
432 (lambda* (#:key outputs #:allow-other-keys)
433 (let ((out (assoc-ref outputs "out")))
434 (substitute* "configure"
435 (("/bin/pwd") (which "pwd")))
436 (substitute* "src/corelib/global/global.pri"
437 (("/bin/ls") (which "ls")))
438 ;; The configuration files for other Qt5 packages are searched
439 ;; through a call to "find_package" in Qt5Config.cmake, which
440 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
441 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
442 ;; components can be installed in different places.
443 (substitute* (find-files "." ".*\\.cmake")
444 (("NO_DEFAULT_PATH") ""))
445 ;; do not pass "--enable-fast-install", which makes the
446 ;; configure process fail
451 "-docdir" (string-append out "/share/doc/qt5")
452 "-headerdir" (string-append out "/include/qt5")
453 "-archdatadir" (string-append out "/lib/qt5")
454 "-datadir" (string-append out "/share/qt5")
455 "-examplesdir" (string-append
456 out "/share/doc/qt5/examples")
460 ;; These features require higher versions of Linux than the
461 ;; minimum version of the glibc. See
462 ;; src/corelib/global/minimum-linux_p.h. By disabling these
463 ;; features Qt5 applications can be used on the oldest
464 ;; kernels that the glibc supports, including the RHEL6
465 ;; (2.6.32) and RHEL7 (3.10) kernels.
466 "-no-feature-getentropy" ; requires Linux 3.17
467 "-no-feature-renameat2" ; requires Linux 3.16
469 ;; Do not build examples; if desired, these could go
470 ;; into a separate output, but for the time being, we
471 ;; prefer to save the space and build time.
472 "-no-compile-examples"
473 ;; Most "-system-..." are automatic, but some use
474 ;; the bundled copy by default.
478 ;; explicitly link with openssl instead of dlopening it
480 ;; explicitly link with dbus instead of dlopening it
482 ;; don't use the precompiled headers
484 ;; drop special machine instructions that do not have
486 ,@(if (string-prefix? "x86_64"
487 (or (%current-target-system)
493 (add-after 'install 'patch-mkspecs
494 (lambda* (#:key outputs #:allow-other-keys)
495 (let* ((out (assoc-ref outputs "out"))
496 (archdata (string-append out "/lib/qt5"))
497 (mkspecs (string-append archdata "/mkspecs"))
498 (qt_config.prf (string-append
499 mkspecs "/features/qt_config.prf")))
500 ;; For each Qt module, let `qmake' uses search paths in the
501 ;; module directory instead of all in QT_INSTALL_PREFIX.
502 (substitute* qt_config.prf
503 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
504 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
505 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
506 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
507 (("\\$\\$\\[QT_HOST_LIBS\\]")
508 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
509 (("\\$\\$\\[QT_INSTALL_BINS\\]")
510 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
512 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
513 (substitute* (string-append mkspecs "/features/qt_functions.prf")
514 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
515 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
517 ;; Resolve qmake spec files within qtbase by absolute paths.
520 (string-append mkspecs "/features/" file))
521 '("device_config.prf" "moc.prf" "qt_build_config.prf"
522 "qt_config.prf" "winrt/package_manifest.prf"))
523 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
524 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
526 (add-after 'patch-mkspecs 'patch-prl-files
527 (lambda* (#:key outputs #:allow-other-keys)
528 (let ((out (assoc-ref outputs "out")))
529 ;; Insert absolute references to the qtbase libraries because
530 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
531 ;; on context. See <https://bugs.gnu.org/38405>
532 (substitute* (find-files (string-append out "/lib") "\\.prl$")
533 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
534 (string-append out "/lib")))
536 (add-after 'unpack 'patch-paths
537 ;; Use the absolute paths for dynamically loaded libs, otherwise
538 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
540 (lambda* (#:key inputs #:allow-other-keys)
542 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
543 "cross-libc" "libc"))))
544 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
545 "src/network/kernel/qhostinfo_unix.cpp")
546 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
547 (string-append a glibc "/lib/lib" b))))
548 ;; X11/locale (compose path)
549 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
550 ;; Don't search in /usr/…/X11/locale, …
551 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
552 (string-append "// " line))
553 ;; … but use libx11's path
554 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
555 (string-append a "\"" (assoc-ref inputs "libx11") b)))
557 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
558 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
559 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
561 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
562 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
563 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
564 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
565 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
568 (list (search-path-specification
569 (variable "QMAKEPATH")
570 (files '("lib/qt5")))
571 (search-path-specification
572 (variable "QML2_IMPORT_PATH")
573 (files '("lib/qt5/qml")))
574 (search-path-specification
575 (variable "QT_PLUGIN_PATH")
576 (files '("lib/qt5/plugins")))
577 (search-path-specification
578 (variable "XDG_DATA_DIRS")
580 (search-path-specification
581 (variable "XDG_CONFIG_DIRS")
582 (files '("etc/xdg")))))
583 (home-page "https://www.qt.io/")
584 (synopsis "Cross-platform GUI library")
585 (description "Qt is a cross-platform application and UI framework for
586 developers using C++ or QML, a CSS & JavaScript like language.")
587 (license (list license:lgpl2.1 license:lgpl3))))
590 ;; qt used to refer to the monolithic Qt 5.x package
591 (define-deprecated qt qtbase qtbase)
595 (package (inherit qtbase)
600 (uri (string-append "https://download.qt.io/official_releases/qt/"
601 (version-major+minor version) "/" version
602 "/submodules/" name "-everywhere-src-"
606 "13zg5095ffm88dsrybyi075i9zw3yrkibqzvj57an9sq89n3w926"))))
607 (propagated-inputs `())
608 (native-inputs `(("perl" ,perl)))
615 (modify-phases %standard-phases
616 (add-before 'configure 'configure-qmake
617 (lambda* (#:key inputs outputs #:allow-other-keys)
618 (let* ((out (assoc-ref outputs "out"))
619 (qtbase (assoc-ref inputs "qtbase"))
620 (tmpdir (string-append (getenv "TMPDIR")))
621 (qmake (string-append tmpdir "/qmake"))
622 (qt.conf (string-append tmpdir "/qt.conf")))
623 ;; Use qmake with a customized qt.conf to override install
625 (symlink (which "qmake") qmake)
626 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
627 (with-output-to-file qt.conf
633 Documentation=share/doc/qt5
636 LibraryExecutables=lib/qt5/libexec
639 Plugins=lib/qt5/plugins
640 Imports=lib/qt5/imports
641 Qml2Imports=lib/qt5/qml
642 Translations=share/qt5/translations
644 Examples=share/doc/qt5/examples
650 [EffectiveSourcePaths]
656 (lambda* (#:key inputs outputs #:allow-other-keys)
657 ;; Valid QT_BUILD_PARTS variables are:
658 ;; libs tools tests examples demos docs translations
659 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
660 (add-before 'check 'set-display
662 ;; make Qt render "offscreen", required for tests
663 (setenv "QT_QPA_PLATFORM" "offscreen")
665 (synopsis "Qt module for displaying SVGs")
666 (description "The QtSvg module provides classes for displaying the
667 contents of SVG files.")))
669 (define-public qtimageformats
670 (package (inherit qtsvg)
671 (name "qtimageformats")
675 (uri (string-append "https://download.qt.io/official_releases/qt/"
676 (version-major+minor version) "/" version
677 "/submodules/" name "-everywhere-src-"
681 "0n3qc5rx7kzb4csmcxaxdm2bqpciz2j2pz2zdfrlpi1ml4liq39k"))
682 (modules '((guix build utils)))
685 (delete-file-recursively "src/3rdparty")
696 (synopsis "Additional Image Format plugins for Qt")
697 (description "The QtImageFormats module contains plugins for adding
698 support for MNG, TGA, TIFF and WBMP image formats.")))
700 (define-public qtx11extras
701 (package (inherit qtsvg)
706 (uri (string-append "https://download.qt.io/official_releases/qt/"
707 (version-major+minor version) "/" version
708 "/submodules/" name "-everywhere-src-"
712 "0sqx785kb4kfxfl3cmg848dlxlxmfdg8jnfh3rrk8q0iazsr2faz"))))
714 (substitute-keyword-arguments (package-arguments qtsvg)
715 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
716 (native-inputs `(("perl" ,perl)))
720 (synopsis "Qt Extras for X11")
721 (description "The QtX11Extras module includes the library to access X11
722 from within Qt 5.")))
724 (define-public qtxmlpatterns
725 (package (inherit qtsvg)
726 (name "qtxmlpatterns")
730 (uri (string-append "https://download.qt.io/official_releases/qt/"
731 (version-major+minor version) "/" version
732 "/submodules/" name "-everywhere-src-"
736 "1l44476ibb8rv4rf80vbjdc3712lmrl1xcxswa513ip66k47p5vn"))))
738 (substitute-keyword-arguments (package-arguments qtsvg)
739 ((#:tests? _ #f) #f) ; TODO: Enable the tests
741 `(modify-phases ,phases
742 (add-after 'unpack 'disable-network-tests
743 (lambda _ (substitute* "tests/auto/auto.pro"
744 (("qxmlquery") "# qxmlquery")
745 (("xmlpatterns ") "# xmlpatterns"))
747 (native-inputs `(("perl" ,perl)
748 ("qtdeclarative" ,qtdeclarative)))
749 (inputs `(("qtbase" ,qtbase)))
750 (synopsis "Qt XML patterns module")
751 (description "The QtXmlPatterns module is a XQuery and XPath engine for
752 XML and custom data models. It contains programs such as xmlpatterns and
753 xmlpatternsvalidator.")))
755 (define-public qtdeclarative
756 (package (inherit qtsvg)
757 (name "qtdeclarative")
761 (uri (string-append "https://download.qt.io/official_releases/qt/"
762 (version-major+minor version) "/" version
763 "/submodules/" name "-everywhere-src-"
767 "1lw6nr26cjdrshin3gq5xwqb0bvslg0ml99cw8rx9wb2anpd3c9l"))))
769 (substitute-keyword-arguments (package-arguments qtsvg)
770 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
773 ("pkg-config" ,pkg-config)
775 ("python-wrapper" ,python-wrapper)
780 (synopsis "Qt QML module (Quick 2)")
781 (description "The Qt QML module provides a framework for developing
782 applications and libraries with the QML language. It defines and implements the
783 language and engine infrastructure, and provides an API to enable application
784 developers to extend the QML language with custom types and integrate QML code
785 with JavaScript and C++.")))
787 (define-public qtconnectivity
788 (package (inherit qtsvg)
789 (name "qtconnectivity")
793 (uri (string-append "https://download.qt.io/official_releases/qt/"
794 (version-major+minor version) "/" version
795 "/submodules/" name "-everywhere-src-"
799 "1ni2x848dxf0c7ilk461vz0z46qis8zv6jxbpyhpbhzdg9rcdw8h"))))
802 ("pkg-config" ,pkg-config)
803 ("qtdeclarative" ,qtdeclarative)))
807 (synopsis "Qt Connectivity module")
808 (description "The Qt Connectivity modules provides modules for interacting
809 with Bluetooth and NFC.")))
811 (define-public qtwebsockets
812 (package (inherit qtsvg)
813 (name "qtwebsockets")
817 (uri (string-append "https://download.qt.io/official_releases/qt/"
818 (version-major+minor version) "/" version
819 "/submodules/" name "-everywhere-src-"
823 "07nnzqhsnb4q8pbka9dk5nxmqinbg9yicag7f4rlq2p6ffmgn2zh"))))
825 (substitute-keyword-arguments (package-arguments qtsvg)
826 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
829 ("qtdeclarative" ,qtdeclarative)))
830 (inputs `(("qtbase" ,qtbase)))
831 (synopsis "Qt Web Sockets module")
832 (description "WebSocket is a web-based protocol designed to enable two-way
833 communication between a client application and a remote host. The Qt
834 WebSockets module provides C++ and QML interfaces that enable Qt applications
835 to act as a server that can process WebSocket requests, or a client that can
836 consume data received from the server, or both.")))
838 (define-public qtsensors
839 (package (inherit qtsvg)
844 (uri (string-append "https://download.qt.io/official_releases/qt/"
845 (version-major+minor version) "/" version
846 "/submodules/" name "-everywhere-src-"
850 "1x8f55qyix5bsd0hl9rzi56ndyv4h16z2qh8is9nv13jpk0a9nsr"))))
852 (substitute-keyword-arguments (package-arguments qtsvg)
853 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
855 `(modify-phases ,phases
856 (add-after 'unpack 'fix-tests
858 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
859 (("2000") "5000") ;lengthen test timeout
860 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
864 ("qtdeclarative" ,qtdeclarative)))
865 (inputs `(("qtbase" ,qtbase)))
866 (synopsis "Qt Sensors module")
867 (description "The Qt Sensors API provides access to sensor hardware via QML
868 and C++ interfaces. The Qt Sensors API also provides a motion gesture
869 recognition API for devices.")))
871 (define-public qtmultimedia
872 (package (inherit qtsvg)
873 (name "qtmultimedia")
877 (uri (string-append "https://download.qt.io/official_releases/qt/"
878 (version-major+minor version) "/" version
879 "/submodules/" name "-everywhere-src-"
883 "0w4mcxmj41b9phwirppn9ws1vxy3sww7prvhhmh0jsnaca4hwn4z"))
884 (modules '((guix build utils)))
887 (delete-file-recursively
888 "examples/multimedia/spectrum/3rdparty")
889 ;; We also prevent the spectrum example from being built.
890 (substitute* "examples/multimedia/multimedia.pro"
894 (substitute-keyword-arguments (package-arguments qtsvg)
896 `(modify-phases ,phases
898 (lambda* (#:key outputs #:allow-other-keys)
899 (let ((out (assoc-ref outputs "out")))
900 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
901 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
902 (string-append "PREFIX=" out)))))))
903 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
906 ("pkg-config" ,pkg-config)
908 ("qtdeclarative" ,qtdeclarative)))
910 `(("alsa-lib" ,alsa-lib)
912 ("pulseaudio" ,pulseaudio)
914 ;; Gstreamer is needed for the mediaplayer plugin
915 ("gstreamer" ,gstreamer)
916 ("gst-plugins-base" ,gst-plugins-base)))
917 (synopsis "Qt Multimedia module")
918 (description "The Qt Multimedia module provides set of APIs to play and
919 record media, and manage a collection of media content. It also contains a
920 set of plugins for interacting with pulseaudio and GStreamer.")))
922 (define-public qtwayland
923 (package (inherit qtsvg)
928 (uri (string-append "https://download.qt.io/official_releases/qt/"
929 (version-major+minor version) "/" version
930 "/submodules/" name "-everywhere-src-"
934 "1i2i4d6qa512njm6gvd1ygcyb5p4d6axciqg9ys380yw9nl6m77s"))
935 (modules '((guix build utils)))
937 ;; The examples try to build and cause the build to fail
939 (delete-file-recursively "examples")
942 (substitute-keyword-arguments (package-arguments qtsvg)
944 `(modify-phases ,phases
945 (add-before 'check 'set-ld-library-path
946 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
948 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
949 ;; wayland platform plugin.
951 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
956 ("pkg-config" ,pkg-config)
957 ("qtdeclarative" ,qtdeclarative)))
959 `(("fontconfig" ,fontconfig)
960 ("freetype" ,freetype)
962 ("libxcomposite" ,libxcomposite)
964 ("libxkbcommon" ,libxkbcommon)
965 ("libxrender" ,libxrender)
969 ("wayland" ,wayland)))
970 (synopsis "Qt Wayland module")
971 (description "The Qt Wayland module provides the QtWayland client and
972 compositor libraries.")))
974 (define-public qtserialport
975 (package (inherit qtsvg)
976 (name "qtserialport")
980 (uri (string-append "https://download.qt.io/official_releases/qt/"
981 (version-major+minor version) "/" version
982 "/submodules/" name "-everywhere-src-"
986 "0qmq3yppc54vf7xrwyrwk91h6x04w0hf4bnw5b3y5kwyllhh7vzq"))))
987 (native-inputs `(("perl" ,perl)))
992 (substitute-keyword-arguments (package-arguments qtsvg)
994 `(modify-phases ,phases
995 (add-after 'unpack 'patch-dlopen-paths
996 (lambda* (#:key inputs #:allow-other-keys)
997 (substitute* "src/serialport/qtudev_p.h"
998 ;; Use the absolute paths for dynamically loaded libs,
999 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1000 ;; typically is not set in guix.
1001 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1002 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1004 (synopsis "Qt Serial Port module")
1005 (description "The Qt Serial Port module provides the library for
1006 interacting with serial ports from within Qt.")))
1008 (define-public qtserialbus
1009 (package (inherit qtsvg)
1010 (name "qtserialbus")
1014 (uri (string-append "https://download.qt.io/official_releases/qt/"
1015 (version-major+minor version) "/" version
1016 "/submodules/" name "-everywhere-src-"
1020 "1ppmrwshj42lpx21m2gxblrlbigjf10fwg3fk5x5130ih89446q7"))))
1022 `(("qtbase" ,qtbase)
1023 ("qtserialport" ,qtserialport)))
1024 (synopsis "Qt Serial Bus module")
1025 (description "The Qt Serial Bus API provides classes and functions to
1026 access the various industrial serial buses and protocols, such as CAN, ModBus,
1029 (define-public qtwebchannel
1030 (package (inherit qtsvg)
1031 (name "qtwebchannel")
1035 (uri (string-append "https://download.qt.io/official_releases/qt/"
1036 (version-major+minor version) "/" version
1037 "/submodules/" name "-everywhere-src-"
1041 "1my8vcsidx9r5wpd1iax8skhp5ac3234g9r7ax04k9z17mqd2i97"))))
1044 ("qtdeclarative" ,qtdeclarative)
1045 ("qtwebsockets" ,qtwebsockets)))
1046 (inputs `(("qtbase" ,qtbase)))
1047 (synopsis "Web communication library for Qt")
1048 (description "The Qt WebChannel module enables peer-to-peer communication
1049 between the host (QML/C++ application) and the client (HTML/JavaScript
1050 application). The transport mechanism is supported out of the box by the two
1051 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1053 (define-public qtwebglplugin
1054 (package (inherit qtsvg)
1055 (name "qtwebglplugin")
1059 (uri (string-append "https://download.qt.io/official_releases/qt/"
1060 (version-major+minor version) "/" version
1061 "/submodules/" name "-everywhere-src-"
1065 "1pahdyhinhq1xhsc7lsfprjjpz6fn9vgwqcyi72hc3wzyr98in11"))))
1067 (substitute-keyword-arguments (package-arguments qtsvg)
1069 `(modify-phases ,phases
1070 (add-after 'unpack 'disable-network-tests
1071 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1072 (("webgl") "# webgl"))
1078 ("qtdeclarative" ,qtdeclarative)
1079 ("qtwebsockets" ,qtwebsockets)))
1080 (synopsis "QPA plugin for running an application via a browser using
1081 streamed WebGL commands")
1082 (description "Qt back end that uses WebGL for rendering. It allows Qt
1083 applications (with some limitations) to run in a web browser that supports
1084 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1085 compatible web browser without the use of plug-ins. The API is similar to
1086 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1088 (define-public qtwebview
1089 (package (inherit qtsvg)
1094 (uri (string-append "https://download.qt.io/official_releases/qt/"
1095 (version-major+minor version) "/" version
1096 "/submodules/" name "-everywhere-src-"
1100 "0ykjwz3cwv718gvgvnlhq7wia8gllnj3cdzw3amj0rh63hy65h22"))))
1104 `(("qtbase" ,qtbase)
1105 ("qtdeclarative" ,qtdeclarative)))
1106 (synopsis "Display web content in a QML application")
1107 (description "Qt WebView provides a way to display web content in a QML
1108 application without necessarily including a full web browser stack by using
1109 native APIs where it makes sense.")))
1111 (define-public qtlocation
1112 (package (inherit qtsvg)
1117 (uri (string-append "https://download.qt.io/official_releases/qt/"
1118 (version-major+minor version) "/" version
1119 "/submodules/" name "-everywhere-src-"
1123 "0y12vs6jwiwljdn57jqs1dwi6wfw1l5l95dvj9g93h739p533qks"))))
1125 (substitute-keyword-arguments (package-arguments qtsvg)
1126 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1129 ("qtdeclarative" ,qtdeclarative)
1130 ("qtquickcontrols" ,qtquickcontrols)
1131 ("qtserialport" ,qtserialport)))
1134 ("openssl" ,openssl)
1137 (synopsis "Qt Location and Positioning modules")
1138 (description "The Qt Location module provides an interface for location,
1139 positioning and geolocation plugins.")))
1141 (define-public qttools
1142 (package (inherit qtsvg)
1147 (uri (string-append "https://download.qt.io/official_releases/qt/"
1148 (version-major+minor version) "/" version
1149 "/submodules/" name "-everywhere-src-"
1153 "0xy7sf8w2lln1l59lhrf0kb687avwirrh63izp7509jwi33r2jg9"))))
1155 (substitute-keyword-arguments (package-arguments qtsvg)
1156 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1159 ("qtdeclarative" ,qtdeclarative)
1160 ("vulkan-headers" ,vulkan-headers)))
1163 ("qtbase" ,qtbase)))
1164 (synopsis "Qt Tools and Designer modules")
1165 (description "The Qt Tools module provides a set of applications to browse
1166 the documentation, translate applications, generate help files and other stuff
1167 that helps in Qt development.")))
1169 (define-public qtscript
1170 (package (inherit qtsvg)
1175 (uri (string-append "https://download.qt.io/official_releases/qt/"
1176 (version-major+minor version) "/" version
1177 "/submodules/" name "-everywhere-src-"
1181 "0z3p4bb2ddylb7y2xvagjbn7fc5d0ic08cmrrb67h8wf6fnq5051"))
1182 (patches (search-patches "qtscript-disable-tests.patch"))))
1185 ("qttools" ,qttools)))
1187 `(("qtbase" ,qtbase)))
1188 (synopsis "Qt Script module")
1189 (description "Qt provides support for application scripting with ECMAScript.
1190 The following guides and references cover aspects of programming with
1191 ECMAScript and Qt.")))
1193 (define-public qtquickcontrols
1194 (package (inherit qtsvg)
1195 (name "qtquickcontrols")
1199 (uri (string-append "https://download.qt.io/official_releases/qt/"
1200 (version-major+minor version) "/" version
1201 "/submodules/" name "-everywhere-src-"
1205 "169cvwiav5d538cw81rbdimb1pis0z6fkaxlwhd4z4pzhyhrd3f4"))))
1207 (substitute-keyword-arguments (package-arguments qtsvg)
1208 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1210 `(("qtbase" ,qtbase)
1211 ("qtdeclarative" ,qtdeclarative)))
1212 (synopsis "Qt Quick Controls and other Quick modules")
1213 (description "The QtScript module provides classes for making Qt
1214 applications scriptable. This module provides a set of extra components that
1215 can be used to build complete interfaces in Qt Quick.")))
1217 (define-public qtquickcontrols2
1218 (package (inherit qtsvg)
1219 (name "qtquickcontrols2")
1223 (uri (string-append "https://download.qt.io/official_releases/qt/"
1224 (version-major+minor version) "/" version
1225 "/submodules/" name "-everywhere-src-"
1229 "0w5910wblzc7q2llyb7fyfcbmy1fl369c6w5d6r5sh26z490gasw"))))
1231 (substitute-keyword-arguments (package-arguments qtsvg)
1232 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1234 `(("qtbase" ,qtbase)
1235 ("qtdeclarative" ,qtdeclarative)))
1236 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1237 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1238 module that provides platform integration: native dialogs, menus and menu bars,
1239 and tray icons. It falls back to Qt Widgets when a native implementation is
1242 (define-public qtgraphicaleffects
1243 (package (inherit qtsvg)
1244 (name "qtgraphicaleffects")
1248 (uri (string-append "https://download.qt.io/official_releases/qt/"
1249 (version-major+minor version) "/" version
1250 "/submodules/" name "-everywhere-src-"
1254 "1vvpq34433j94n9yyhh4if4yv51i8xiffpvyn3xgffx14iv35l6y"))))
1256 (substitute-keyword-arguments (package-arguments qtsvg)
1257 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1259 `(("qtbase" ,qtbase)
1260 ("qtdeclarative" ,qtdeclarative)))
1261 (synopsis "Qt Graphical Effects module")
1262 (description "The Qt Graphical Effects module provides a set of QML types
1263 for adding visually impressive and configurable effects to user interfaces.
1264 Effects are visual items that can be added to Qt Quick user interface as UI
1265 components. The API consists of over 20 effects provided as separate QML
1266 types. The effects cover functional areas such as blending, masking, blurring,
1267 coloring, and many more.")))
1269 (define-public qtgamepad
1270 (package (inherit qtsvg)
1275 (uri (string-append "https://download.qt.io/official_releases/qt/"
1276 (version-major+minor version) "/" version
1277 "/submodules/" name "-everywhere-src-"
1281 "1cxkqnhx0baxh3csjl7ar151v0zizf86f4338rr38liwb7rwbsz1"))))
1284 ("pkg-config" ,pkg-config)))
1286 `(("fontconfig" ,fontconfig)
1287 ("freetype" ,freetype)
1288 ("libxrender" ,libxrender)
1291 ("qtdeclarative" ,qtdeclarative)))
1292 (synopsis "Qt Gamepad module")
1293 (description "The Qt Gamepad module is an add-on library that enables Qt
1294 applications to support the use of gamepad hardware and in some cases remote
1295 control equipment. The module provides both QML and C++ interfaces. The
1296 primary target audience are embedded devices with fullscreen user interfaces,
1297 and mobile applications targeting TV-like form factors.")))
1299 (define-public qtscxml
1300 (package (inherit qtsvg)
1305 (uri (string-append "https://download.qt.io/official_releases/qt/"
1306 (version-major+minor version) "/" version
1307 "/submodules/" name "-everywhere-src-"
1311 "12y6ga7j6xby9rz1c9h17r9ih4i16i1ylr6b4vmrn7svidy87msk"))
1312 (modules '((guix build utils)))
1315 (delete-file-recursively "tests/3rdparty")
1316 ;; the scion test refers to the bundled 3rd party test code.
1317 (substitute* "tests/auto/auto.pro"
1321 `(("qtbase" ,qtbase)
1322 ("qtdeclarative" ,qtdeclarative)))
1323 (synopsis "Qt SCXML module")
1324 (description "The Qt SCXML module provides functionality to create state
1325 machines from SCXML files. This includes both dynamically creating state
1326 machines (loading the SCXML file and instantiating states and transitions) and
1327 generating a C++ file that has a class implementing the state machine. It
1328 also contains functionality to support data models and executable content.")))
1330 (define-public qtpurchasing
1331 (package (inherit qtsvg)
1332 (name "qtpurchasing")
1336 (uri (string-append "https://download.qt.io/official_releases/qt/"
1337 (version-major+minor version) "/" version
1338 "/submodules/" name "-everywhere-src-"
1342 "1kbhmzrw612yb4brxi3fwslil31j31vm0zqpb52vcma7vbivg80z"))))
1344 `(("qtbase" ,qtbase)
1345 ("qtdeclarative" ,qtdeclarative)))
1346 (synopsis "Qt Purchasing module")
1347 (description "The Qt Purchasing module provides and in-app API for
1348 purchasing goods and services.")))
1350 (define-public qtcanvas3d
1351 (package (inherit qtsvg)
1356 (uri (string-append "https://download.qt.io/official_releases/qt/"
1357 (version-major+minor version) "/" version
1358 "/submodules/" name "-everywhere-src-"
1362 "024xglrb321rp3wb3fhprw7pl6zvmpgfkpwgabbyx8p58k4yccrd"))
1363 (modules '((guix build utils)))
1366 (delete-file-recursively "examples/canvas3d/3rdparty")
1369 (substitute-keyword-arguments (package-arguments qtsvg)
1370 ;; Building the tests depends on the bundled 3rd party javascript files,
1371 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1372 ;; fail, so we skip building them for now.
1374 `(modify-phases ,phases
1376 (lambda* (#:key outputs #:allow-other-keys)
1377 (let ((out (assoc-ref outputs "out")))
1378 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1379 (string-append "PREFIX=" out)))))))
1380 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1383 `(("qtbase" ,qtbase)
1384 ("qtdeclarative" ,qtdeclarative)))
1385 (synopsis "Qt Canvas 3D module")
1386 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1387 drawing calls from Qt Quick JavaScript.")))
1389 (define-public qtcharts
1390 (package (inherit qtsvg)
1395 (uri (string-append "https://download.qt.io/official_releases/qt/"
1396 (version-major+minor version) "/" version
1397 "/submodules/" name "-everywhere-src-"
1401 "0gdark4z2g8j0kzjg1aqq91ap04h6hzjl163g8xlwxwdn5dxpnql"))))
1403 (substitute-keyword-arguments (package-arguments qtsvg)
1404 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1406 `(("qtbase" ,qtbase)
1407 ("qtdeclarative" ,qtdeclarative)))
1408 (synopsis "Qt Charts module")
1409 (description "The Qt Charts module provides a set of easy to use chart
1410 components. It uses the Qt Graphics View Framework, therefore charts can be
1411 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1412 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1413 selecting one of the charts themes.")
1414 (license license:gpl3)))
1416 (define-public qtdatavis3d
1417 (package (inherit qtsvg)
1418 (name "qtdatavis3d")
1422 (uri (string-append "https://download.qt.io/official_releases/qt/"
1423 (version-major+minor version) "/" version
1424 "/submodules/" name "-everywhere-src-"
1428 "1zm4xfi2ijqr3n3g0lfs3yzil6w7c54r8vsj1d541lz7wnm92ka1"))))
1430 (substitute-keyword-arguments (package-arguments qtsvg)
1431 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1433 `(("qtbase" ,qtbase)
1434 ("qtdeclarative" ,qtdeclarative)))
1435 (synopsis "Qt Data Visualization module")
1436 (description "The Qt Data Visualization module provides a way to visualize
1437 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1438 visualizing depth maps and large quantities of rapidly changing data, such as
1439 data received from multiple sensors. The look and feel of graphs can be
1440 customized by using themes or by adding custom items and labels to them.")
1441 (license license:gpl3)))
1443 (define-public qtnetworkauth
1444 (package (inherit qtsvg)
1445 (name "qtnetworkauth")
1449 (uri (string-append "https://download.qt.io/official_releases/qt/"
1450 (version-major+minor version) "/" version
1451 "/submodules/" name "-everywhere-src-"
1455 "1gba6rdhcvljc4dnzhnkxrdlaxm3y095ljqg1sz3p1k0m632s4pa"))))
1457 (substitute-keyword-arguments (package-arguments qtsvg)
1459 `(modify-phases ,phases
1460 (add-after 'unpack 'remove-failing-test
1462 ;; These tests can't find their test data.
1463 (substitute* "tests/auto/auto.pro"
1464 (("oauth1 ") "# oauth1 "))
1467 `(("qtbase" ,qtbase)))
1468 (synopsis "Qt Network Authorization module")
1469 (description "The Qt Network Authorization module provides an
1470 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1472 (define-public qtremoteobjects
1473 (package (inherit qtsvg)
1474 (name "qtremoteobjects")
1478 (uri (string-append "https://download.qt.io/official_releases/qt/"
1479 (version-major+minor version) "/" version
1480 "/submodules/" name "-everywhere-src-"
1484 "16fna70pljn45yj6hv3g4qvb1imcnfj43jchvydspdhg08ykbda9"))))
1486 (substitute-keyword-arguments (package-arguments qtsvg)
1488 `(modify-phases ,phases
1489 (add-after 'unpack 'remove-failing-test
1491 ;; This test can't find its imports.
1492 (substitute* "tests/auto/qml/qml.pro"
1493 (("integration") "# integration")
1494 (("usertypes") "# usertypes"))
1497 `(("qtbase" ,qtbase)
1498 ("qtdeclarative" ,qtdeclarative)))
1499 (synopsis "Qt Remote Objects module")
1500 (description "The Qt Remote Objects module is an @dfn{inter-process
1501 communication} (IPC) module developed for Qt. The idea is to extend existing
1502 Qt's functionalities to enable an easy exchange of information between
1503 processes or computers.")))
1505 (define-public qtspeech
1506 (package (inherit qtsvg)
1511 (uri (string-append "https://download.qt.io/official_releases/qt/"
1512 (version-major+minor version) "/" version
1513 "/submodules/" name "-everywhere-src-"
1517 "12l7rycjfa6d9gnnjd6i097pf1qqzjnz9c1jgxhpldvkf0n7pbi7"))))
1520 (substitute-keyword-arguments (package-arguments qtsvg)
1521 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1523 `(("qtbase" ,qtbase)))
1526 ("qtdeclarative" ,qtdeclarative)
1527 ("qtmultimedia" ,qtmultimedia)
1528 ("qtxmlpatterns" ,qtxmlpatterns)))
1529 (synopsis "Qt Speech module")
1530 (description "The Qt Speech module enables a Qt application to support
1531 accessibility features such as text-to-speech, which is useful for end-users
1532 who are visually challenged or cannot access the application for whatever
1533 reason. The most common use case where text-to-speech comes in handy is when
1534 the end-user is driving and cannot attend the incoming messages on the phone.
1535 In such a scenario, the messaging application can read out the incoming
1538 (define-public qtwebengine
1541 (name "qtwebengine")
1542 (version (package-version qtbase))
1546 (uri (string-append "https://download.qt.io/official_releases/qt/"
1547 (version-major+minor version) "/" version
1548 "/submodules/" name "-everywhere-src-"
1551 (base32 "08c60nh95m98mcqk444axs76xi6m9x0wvdxrzk9c2cxwqdbz59fa"))
1552 (modules '((ice-9 ftw)
1556 (guix build utils)))
1559 (let ((preserved-third-party-files
1560 '("base/third_party/dmg_fp"
1561 "base/third_party/dynamic_annotations"
1562 "base/third_party/icu"
1563 "base/third_party/libevent"
1564 "base/third_party/nspr"
1565 "base/third_party/superfasthash"
1566 "base/third_party/symbolize"
1567 "base/third_party/xdg_mime"
1568 "base/third_party/xdg_user_dirs"
1569 "net/third_party/http2"
1570 "net/third_party/mozilla_security_manager"
1571 "net/third_party/nss"
1572 "net/third_party/spdy"
1573 "net/third_party/quic"
1574 "third_party/abseil-cpp"
1576 "third_party/angle/src/common/third_party/base"
1577 "third_party/angle/src/common/third_party/smhasher"
1578 "third_party/angle/src/third_party/compiler"
1580 "third_party/boringssl"
1581 "third_party/boringssl/src/third_party/fiat"
1582 "third_party/breakpad"
1583 "third_party/brotli"
1585 "third_party/crc32c"
1586 "third_party/ffmpeg"
1587 "third_party/googletest"
1588 "third_party/hunspell"
1589 "third_party/iccjpeg"
1591 "third_party/inspector_protocol"
1592 "third_party/jinja2"
1593 "third_party/jstemplate"
1594 "third_party/khronos"
1595 "third_party/leveldatabase"
1596 "third_party/libaddressinput"
1597 "third_party/libjingle_xmpp"
1598 "third_party/libpng"
1599 "third_party/libsrtp"
1600 "third_party/libsync"
1601 "third_party/libudev"
1602 "third_party/libvpx"
1603 "third_party/libwebm"
1604 "third_party/libwebp"
1605 "third_party/libxml"
1606 "third_party/libxslt"
1607 "third_party/libyuv"
1609 "third_party/markupsafe"
1611 "third_party/metrics_proto"
1612 "third_party/modp_b64"
1616 "third_party/polymer"
1617 "third_party/protobuf"
1618 "third_party/pyjson5"
1620 "third_party/rnnoise"
1622 "third_party/skia/third_party/gif"
1623 "third_party/skia/third_party/skcms"
1624 "third_party/smhasher"
1625 "third_party/snappy"
1626 "third_party/sqlite"
1627 "third_party/usrsctp"
1628 "third_party/web-animations-js"
1629 "third_party/webrtc"
1630 "third_party/webrtc_overrides"
1631 "third_party/widevine/cdm/widevine_cdm_common.h"
1632 "third_party/widevine/cdm/widevine_cdm_version.h"
1636 "url/third_party/mozilla"
1637 "v8/src/third_party/utf8-decoder"
1638 "v8/src/third_party/valgrind"
1639 "v8/third_party/antlr4"
1640 "v8/third_party/inspector_protocol"))
1641 (protected (make-regexp "\\.(gn|gyp)i?$")))
1642 (define preserved-club
1643 (map (lambda (member)
1644 (string-append "./" member))
1645 preserved-third-party-files))
1646 (define (empty? dir)
1647 (equal? (scandir dir) '("." "..")))
1648 (define (third-party? file)
1649 (string-contains file "third_party/"))
1650 (define (useless? file)
1651 (any (cute string-suffix? <> file)
1652 '(".zip" ".so" ".dll" ".exe" ".jar")))
1653 (define (parents child)
1654 ;; Return all parent directories of CHILD up to and including
1655 ;; the closest "third_party".
1656 (let* ((dirs (match (string-split child #\/)
1657 ((dirs ... last) dirs)))
1658 (closest (list-index (lambda (dir)
1659 (string=? "third_party" dir))
1661 (delim (- (length dirs) closest)))
1662 (fold (lambda (dir prev)
1663 (cons (string-append (car prev) "/" dir)
1665 (list (string-join (list-head dirs delim) "/"))
1666 (list-tail dirs delim))))
1667 (define (remove-loudly file)
1668 (format #t "deleting ~a...~%" file)
1671 (define (delete-unwanted-files child stat flag base level)
1673 ((or 'regular 'symlink 'stale-symlink)
1674 (when (third-party? child)
1675 (unless (or (member child preserved-club)
1676 (any (cute member <> preserved-club)
1678 (regexp-exec protected child))
1679 (remove-loudly child)))
1680 (when (and (useless? child) (file-exists? child))
1681 (remove-loudly child))
1683 ('directory-processed
1684 (when (empty? child)
1689 (with-directory-excursion "src/3rdparty"
1690 ;; TODO: Try removing "gn" too for future versions of qtwebengine.
1691 (delete-file-recursively "ninja")
1693 (with-directory-excursion "chromium"
1694 ;; Delete bundled software and binaries that were not explicitly
1696 (nftw "." delete-unwanted-files 'depth 'physical)
1698 ;; Assert that each preserved item is present to catch removals.
1699 (for-each (lambda (third-party)
1700 (unless (file-exists? third-party)
1701 (error (format #f "~s does not exist!~%" third-party))))
1704 ;; Use relative header locations instead of hard coded ones.
1706 "base/third_party/dynamic_annotations/dynamic_annotations.c"
1707 (("base/third_party/valgrind") "valgrind"))
1709 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
1710 (("third_party/curl") "curl"))
1712 ;; Replace Google Analytics bundle with an empty file and hope
1714 (mkdir-p "third_party/analytics")
1715 (call-with-output-file
1716 "third_party/analytics/google-analytics-bundle.js"
1720 ;; Do not enable support for loading the Widevine DRM plugin.
1721 (substitute* "src/core/config/common.pri"
1722 (("enable_widevine=true")
1723 "enable_widevine=false"))
1725 (build-system gnu-build-system)
1732 ("pkg-config" ,pkg-config)
1733 ("python-2" ,python-2)
1736 `(("alsa-lib" ,alsa-lib)
1738 ("cups-minimal" ,cups-minimal)
1742 ("fontconfig" ,fontconfig)
1743 ("harbuzz" ,harfbuzz)
1745 ("jsoncpp" ,jsoncpp)
1748 ("libevent" ,libevent)
1749 ("libgcrypt" ,libgcrypt)
1750 ("libjpeg" ,libjpeg-turbo)
1752 ;; FIXME: configure does not find system lcms
1754 ("libwebp" ,libwebp)
1757 ("libxcomposite" ,libxcomposite)
1758 ("libxcursor" ,libxcursor)
1760 ("libxkbcommon" ,libxkbcommon)
1761 ;; FIXME: libxml2 needs to built with icu support though it links to
1762 ;; libxml2 configure summary still states "Checking for compatible
1763 ;; system libxml2... no"
1764 ("libxml2" ,libxml2)
1765 ("libxrandr" ,libxrandr)
1766 ("libxrender" ,libxrender)
1767 ("libxslt" ,libxslt)
1768 ("libxtst" ,libxtst)
1770 ("minizip" ,minizip)
1773 ("pciutils" ,pciutils)
1774 ("protobuf" ,protobuf)
1775 ("pulseaudio" ,pulseaudio)
1777 ("qtdeclarative" ,qtdeclarative)
1778 ("qtmultimedia" ,qtmultimedia)
1779 ("qtwebchannel" ,qtwebchannel)
1783 ("valgrind" ,valgrind)
1784 ("xcb-util" ,xcb-util)))
1786 (substitute-keyword-arguments (package-arguments qtsvg)
1788 `(modify-phases ,phases
1789 (add-before 'configure 'substitute-source
1790 (lambda* (#:key inputs outputs #:allow-other-keys)
1791 (let ((out (assoc-ref outputs "out"))
1792 (nss (assoc-ref inputs "nss"))
1793 (udev (assoc-ref inputs "udev")))
1794 ;; Qtwebengine is not installed into the same prefix as
1795 ;; qtbase. Some qtbase QTLibraryInfo constants will not
1796 ;; work. Replace with the full path to the qtwebengine
1797 ;; translations and locales in the store.
1798 (substitute* "src/core/web_engine_library_info.cpp"
1799 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
1800 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
1801 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
1802 (string-append "QLatin1String(\"" out "/share/qt5\")")))
1803 ;; Substitute full dynamic library path for nss.
1804 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
1806 (string-append nss "/lib/nss/libnssckbi.so")))
1807 ;; Substitute full dynamic library path for udev.
1808 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
1810 (string-append udev "/lib/libudev.so.1")))
1812 (add-before 'configure 'set-env
1814 ;; Avoids potential race conditions.
1815 (setenv "PYTHONDONTWRITEBYTECODE" "1")
1816 (setenv "NINJAFLAGS"
1817 (string-append "-k1" ;less verbose build output
1818 ;; Respect the '--cores' option of 'guix build'.
1819 " -j" (number->string (parallel-job-count))))
1823 ;; Valid QT_BUILD_PARTS variables are:
1824 ;; libs tools tests examples demos docs translations
1825 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
1826 "--webengine-printing-and-pdf=no"
1827 "--webengine-ffmpeg=system"
1828 "--webengine-icu=system"
1829 "--webengine-pepper-plugins=no")))))
1830 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
1831 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
1832 ;; before running tests.
1833 ((#:tests? _ #f) #f)))
1834 (native-search-paths
1835 (list (search-path-specification
1836 (file-type 'regular)
1838 (variable "QTWEBENGINEPROCESS_PATH")
1839 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
1840 (home-page "https://wiki.qt.io/QtWebEngine")
1841 (synopsis "Qt WebEngine module")
1842 (description "The Qt5WebEngine module provides support for web applications
1843 using the Chromium browser project. The Chromium source code has Google services
1844 and binaries removed, and adds modular support for using system libraries.")
1845 (license license:lgpl2.1+)))
1847 (define-public python-sip
1854 (uri (string-append "https://www.riverbankcomputing.com/static/"
1855 "Downloads/sip/" version "/sip-" version ".tar.gz"))
1858 "07kyd56xgbb40ljb022rq82shgxprlbl0z27mpf1b6zd00w8dgf0"))))
1859 (build-system gnu-build-system)
1861 `(("python" ,python-wrapper)))
1863 `(#:tests? #f ; no check target
1864 #:modules ((srfi srfi-1)
1865 ,@%gnu-build-system-modules)
1867 (modify-phases %standard-phases
1869 (lambda* (#:key inputs outputs #:allow-other-keys)
1870 (let* ((out (assoc-ref outputs "out"))
1871 (bin (string-append out "/bin"))
1872 (include (string-append out "/include"))
1873 (python (assoc-ref inputs "python"))
1875 (last (string-split python #\-)))
1878 (take (string-split python-version #\.) 2)
1880 (lib (string-append out "/lib/python"
1883 (invoke "python" "configure.py"
1886 "--incdir" include)))))))
1887 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1888 (synopsis "Python binding creator for C and C++ libraries")
1890 "SIP is a tool to create Python bindings for C and C++ libraries. It
1891 was originally developed to create PyQt, the Python bindings for the Qt
1892 toolkit, but can be used to create bindings for any C or C++ library.
1894 SIP comprises a code generator and a Python module. The code generator
1895 processes a set of specification files and generates C or C++ code, which
1896 is then compiled to create the bindings extension module. The SIP Python
1897 module provides support functions to the automatically generated code.")
1898 ;; There is a choice between a python like license, gpl2 and gpl3.
1899 ;; For compatibility with pyqt, we need gpl3.
1900 (license license:gpl3)))
1902 (define-public python2-sip
1903 (package (inherit python-sip)
1904 (name "python2-sip")
1906 `(("python" ,python-2)))))
1908 (define-public python-pyqt
1910 (name "python-pyqt")
1915 (uri (string-append "https://www.riverbankcomputing.com/static/"
1916 "Downloads/PyQt5/" version "/PyQt5_gpl-"
1920 "041155bdzp57jy747p5d59740c55yy3241cy1x2lgcdsvqvzmc0d"))
1921 (patches (search-patches "pyqt-configure.patch"
1922 "pyqt-unbundled-qt.patch"
1923 "pyqt-public-sip.patch"))))
1924 (build-system gnu-build-system)
1926 `(("qtbase" ,qtbase))) ; for qmake
1928 `(("python-sip" ,python-sip)))
1930 `(("python" ,python-wrapper)
1932 ("qtconnectivity" ,qtconnectivity)
1933 ("qtdeclarative" ,qtdeclarative)
1934 ("qtlocation" ,qtlocation)
1935 ("qtmultimedia" ,qtmultimedia)
1936 ("qtsensors" ,qtsensors)
1937 ("qtserialport" ,qtserialport)
1939 ("qttools" ,qttools)
1940 ("qtwebchannel" ,qtwebchannel)
1941 ("qtwebkit" ,qtwebkit)
1942 ("qtwebsockets" ,qtwebsockets)
1943 ("qtx11extras" ,qtx11extras)
1944 ("qtxmlpatterns" ,qtxmlpatterns)))
1946 `(#:modules ((srfi srfi-1)
1947 ,@%gnu-build-system-modules)
1949 (modify-phases %standard-phases
1951 (lambda* (#:key inputs outputs #:allow-other-keys)
1952 (let* ((out (assoc-ref outputs "out"))
1953 (bin (string-append out "/bin"))
1954 (sip (string-append out "/share/sip"))
1955 (plugins (string-append out "/lib/qt5/plugins"))
1956 (designer (string-append plugins "/designer"))
1957 (qml (string-append plugins "/PyQt5"))
1958 (python (assoc-ref inputs "python"))
1960 (last (string-split python #\-)))
1963 (take (string-split python-version #\.) 2)
1965 (lib (string-append out "/lib/python"
1968 (stubs (string-append lib "/PyQt5")))
1969 (invoke "python" "configure.py"
1973 "--designer-plugindir" designer
1974 "--qml-plugindir" qml
1975 ; Where to install the PEP 484 Type Hints stub
1976 ; files. Without this the stubs are tried to be
1977 ; installed into the python package's
1978 ; site-package directory, which is read-only.
1980 "--sipdir" sip)))))))
1981 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1982 (synopsis "Python bindings for Qt")
1984 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1985 framework. The bindings are implemented as a set of Python modules and
1986 contain over 620 classes.")
1987 (license license:gpl3)))
1989 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
1990 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
1991 ;; packages that could be used together.
1992 (define-public python-pyqt-without-qtwebkit
1993 (package (inherit python-pyqt)
1994 (name "python-pyqt-without-qtwebkit")
1996 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
1998 (define-public python2-pyqt
1999 (package (inherit python-pyqt)
2000 (name "python2-pyqt")
2002 `(("python-sip" ,python2-sip)
2003 ("qtbase" ,qtbase)))
2005 `(("python" ,python-2)
2006 ("python2-enum34" ,python2-enum34)
2007 ,@(alist-delete "python" (package-inputs python-pyqt))))))
2009 (define-public python2-pyqt-4
2010 (package (inherit python-pyqt)
2011 (name "python2-pyqt")
2017 (string-append "mirror://sourceforge/pyqt/PyQt4/"
2018 "PyQt-" version "/PyQt4_gpl_x11-"
2022 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
2024 `(("python-sip" ,python2-sip)
2026 (inputs `(("python" ,python-2)))
2028 `(#:tests? #f ; no check target
2029 #:modules ((srfi srfi-1)
2030 ,@%gnu-build-system-modules)
2032 (modify-phases %standard-phases
2034 (lambda* (#:key inputs outputs #:allow-other-keys)
2035 (let* ((out (assoc-ref outputs "out"))
2036 (bin (string-append out "/bin"))
2037 (sip (string-append out "/share/sip"))
2038 (python (assoc-ref inputs "python"))
2040 (last (string-split python #\-)))
2043 (take (string-split python-version #\.) 2)
2045 (lib (string-append out "/lib/python"
2048 (invoke "python" "configure.py"
2052 "--sipdir" sip)))))))
2053 (license (list license:gpl2 license:gpl3)))) ; choice of either license
2055 (define-public qscintilla
2061 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
2062 "QScintilla-" version "/QScintilla_gpl-"
2066 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
2067 (build-system gnu-build-system)
2070 (modify-phases %standard-phases
2072 (lambda* (#:key outputs #:allow-other-keys)
2073 (let ((out (assoc-ref outputs "out")))
2075 (substitute* "qscintilla.pro"
2076 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
2077 (string-append out "/lib"))
2078 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
2079 (string-append out "/include"))
2080 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
2081 (string-append out "/translations"))
2082 (("\\$\\$\\[QT_INSTALL_DATA\\]")
2083 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
2084 (("\\$\\$\\[QT_HOST_DATA\\]")
2085 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
2086 (invoke "qmake")))))))
2087 (native-inputs `(("qtbase" ,qtbase)))
2088 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
2089 (synopsis "Qt port of the Scintilla C++ editor control")
2090 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2091 editor control. QScintilla includes features especially useful when editing
2092 and debugging source code. These include support for syntax styling, error
2093 indicators, code completion and call tips.")
2094 (license license:gpl3+)))
2096 (define-public python-qscintilla
2097 (package (inherit qscintilla)
2098 (name "python-qscintilla")
2101 (list "--pyqt=PyQt5"
2102 (string-append "--pyqt-sipdir="
2103 (assoc-ref %build-inputs "python-pyqt")
2105 (string-append "--qsci-incdir="
2106 (assoc-ref %build-inputs "qscintilla")
2108 (string-append "--qsci-libdir="
2109 (assoc-ref %build-inputs "qscintilla")
2112 (modify-phases %standard-phases
2114 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
2115 (let ((out (assoc-ref outputs "out"))
2116 (python (assoc-ref inputs "python")))
2118 (apply invoke "python3" "configure.py"
2120 ;; Install to the right directory
2121 (substitute* '("Makefile"
2123 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2124 (((string-append python "/lib"))
2125 (string-append out "/lib")))
2126 ;; And fix the installed.txt file
2127 (substitute* "installed.txt"
2128 (("/gnu/store/[^/]+") out)))
2131 `(("qscintilla" ,qscintilla)
2133 ("python-pyqt" ,python-pyqt)))
2134 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2135 editor control. QScintilla includes features especially useful when editing
2136 and debugging source code. These include support for syntax styling, error
2137 indicators, code completion and call tips.
2139 This package provides the Python bindings.")))
2141 ;; PyQt only looks for modules in its own directory. It ignores environment
2142 ;; variables such as PYTHONPATH, so we need to build a union package to make
2144 (define-public python-pyqt+qscintilla
2145 (package (inherit python-pyqt)
2146 (name "python-pyqt+qscintilla")
2148 (build-system trivial-build-system)
2150 '(#:modules ((guix build union))
2152 (use-modules (ice-9 match)
2154 (match %build-inputs
2155 (((names . directories) ...)
2156 (union-build (assoc-ref %outputs "out")
2160 `(("python-pyqt" ,python-pyqt)
2161 ("python-qscintilla" ,python-qscintilla)))
2162 (synopsis "Union of PyQt and the Qscintilla extension")
2164 "This package contains the union of PyQt and the Qscintilla extension.")))
2166 (define-public qtkeychain
2174 (url "https://github.com/frankosterfeld/qtkeychain/")
2175 (commit (string-append "v" version))))
2176 (file-name (git-file-name name version))
2179 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
2180 (build-system cmake-build-system)
2182 `(("pkg-config" ,pkg-config)
2183 ("qttools" ,qttools)))
2185 `(("qtbase" ,qtbase)))
2187 `(#:tests? #f ; No tests included
2189 (modify-phases %standard-phases
2190 (add-before 'configure 'set-qt-trans-dir
2192 (substitute* "CMakeLists.txt"
2193 (("\\$\\{qt_translations_dir\\}")
2194 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
2196 (home-page "https://github.com/frankosterfeld/qtkeychain")
2197 (synopsis "Qt API to store passwords")
2199 "QtKeychain is a Qt library to store passwords and other secret data
2200 securely. It will not store any data unencrypted unless explicitly requested.")
2201 (license license:bsd-3)))
2211 (string-append "mirror://sourceforge/qwt/qwt/"
2212 version "/qwt-" version ".tar.bz2"))
2214 (base32 "1navkcnmn0qz8kzsyqmk32d929zl72l0b580w1ica7z5559j2a8m"))))
2215 (build-system gnu-build-system)
2217 `(("qtbase" ,qtbase)
2219 ("qttools" ,qttools)))
2222 (modify-phases %standard-phases
2224 (lambda* (#:key outputs #:allow-other-keys)
2225 (let* ((out (assoc-ref outputs "out"))
2226 (docdir (string-append out "/share/doc/qwt"))
2227 (incdir (string-append out "/include/qwt"))
2228 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2229 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2230 (substitute* '("qwtconfig.pri")
2231 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2232 (format #f "~a = ~a\n" x out))
2233 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2234 (format #f "~a = ~a\n" x docdir))
2235 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2236 (format #f "~a = ~a\n" x incdir))
2237 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2238 (format #f "~a = ~a\n" x pluginsdir))
2239 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2240 (format #f "~a = ~a\n" x featuresdir)))
2241 (substitute* '("doc/doc.pro")
2242 ;; We'll install them in the 'install-man-pages' phase.
2243 (("^unix:doc\\.files.*") ""))
2245 (add-after 'install 'install-man-pages
2246 (lambda* (#:key outputs #:allow-other-keys)
2247 (let* ((out (assoc-ref outputs "out"))
2248 (man (string-append out "/share/man")))
2249 ;; Remove some incomplete manual pages.
2250 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2252 (copy-recursively "doc/man" man)
2254 (home-page "http://qwt.sourceforge.net")
2255 (synopsis "Qt widgets for plots, scales, dials and other technical software
2258 "The Qwt library contains widgets and components which are primarily useful
2259 for technical and scientific purposes. It includes a 2-D plotting widget,
2260 different kinds of sliders, and much more.")
2263 ;; The Qwt license is LGPL2.1 with some exceptions.
2264 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2265 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2266 license:lgpl2.1 license:gpl3))))
2268 (define-public qtwebkit
2271 (version "5.212.0-alpha3")
2275 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2276 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
2279 "05syvwi3jw9abwsc93rmjkna0vyh6bkfrsqhwir48ms54icfwzim"))
2280 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2281 (build-system cmake-build-system)
2284 ("python" ,python-2.7)
2289 ("pkg-config" ,pkg-config)))
2293 ("gst-plugins-base" ,gst-plugins-base)
2294 ("libjpeg" ,libjpeg)
2296 ("libwebp" ,libwebp)
2297 ("sqlite" ,sqlite-with-column-metadata)
2298 ("fontconfig" ,fontconfig)
2299 ("libxrender" ,libxrender)
2301 ("qtdeclarative" ,qtdeclarative)
2302 ("qtlocation" ,qtlocation)
2303 ("qtmultimedia" ,qtmultimedia)
2304 ("qtsensors" ,qtsensors)
2305 ("qtwebchannel" ,qtwebchannel)
2306 ("libxml2" ,libxml2)
2307 ("libxslt" ,libxslt)
2309 ("libxcomposite" ,libxcomposite)))
2311 `(#:tests? #f ; no apparent tests; it might be necessary to set
2312 ; ENABLE_API_TESTS, see CMakeLists.txt
2314 ;; Parallel builds fail due to a race condition:
2315 ;; <https://bugs.gnu.org/34062>.
2316 #:parallel-build? #f
2318 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2320 "-DUSE_LIBHYPHEN=OFF"
2321 "-DUSE_SYSTEM_MALLOC=ON"
2322 ;; XXX: relative dir installs to build dir?
2323 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2324 %output "/lib/qt5/mkspecs/modules")
2325 ;; Sacrifice a little speed in order to link
2326 ;; libraries and test executables in a
2327 ;; reasonable amount of memory.
2328 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2329 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2330 (home-page "https://www.webkit.org")
2331 (synopsis "Web browser engine and classes to render and interact with web
2333 (description "QtWebKit provides a Web browser engine that makes it easy to
2334 embed content from the World Wide Web into your Qt application. At the same
2335 time Web content can be enhanced with native controls.")
2336 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2337 ;; room for slower or busy hardware.
2338 (properties '((timeout . 64800))) ;18 hours
2340 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2341 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2342 ;; disable it on non-Intel platforms.
2343 (supported-systems '("x86_64-linux" "i686-linux"))
2345 (license license:lgpl2.1+)))
2347 (define-public dotherside
2355 (url "https://github.com/filcuc/DOtherSide")
2356 (commit (string-append "v" version))))
2357 (file-name (git-file-name name version))
2360 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
2361 (build-system cmake-build-system)
2363 `(("qttools" ,qttools)))
2365 `(("qtbase" ,qtbase)
2366 ("qtdeclarative" ,qtdeclarative)))
2367 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2368 (synopsis "C language library for creating bindings for the Qt QML language")
2370 "DOtherSide is a C language library for creating bindings for the
2371 QT QML language. The following features are implementable from
2374 @item Creating custom QObject
2375 @item Creating custom QAbstractListModels
2376 @item Creating custom properties, signals and slots
2377 @item Creating from QML QObject defined in the binded language
2378 @item Creating from Singleton QML QObject defined in the binded language
2380 (license license:lgpl3))) ;version 3 only (+ exception)
2382 ;; There have been no public releases yet.
2383 (define-public qtcolorwidgets
2384 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2387 (name "qtcolorwidgets")
2388 (version (git-version "0" revision commit))
2392 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2394 (file-name (git-file-name name version))
2397 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2398 (build-system cmake-build-system)
2399 (arguments `(#:tests? #f)) ; There are no tests
2401 `(("qttools" ,qttools)))
2403 `(("qtbase" ,qtbase)))
2404 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2405 (synopsis "Color management widgets")
2406 (description "QtColorWidgets provides a Qt color dialog that is more
2407 user-friendly than the default @code{QColorDialog} and several other
2408 color-related widgets.")
2409 ;; Includes a license exception for combining with GPL2 code.
2410 (license license:lgpl3+))))
2412 (define-public python-shiboken-2
2413 (let ((revision "1")
2414 ;; Pinned to branches with support for qt 5.11.3
2415 (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
2417 (name "python-shiboken-2")
2418 (version (git-version "v5.11.3" revision commit))
2423 ;; The latest versions of Shiboken live in the pyside repo.
2424 ;; There is another standalone repo only for Shiboken
2425 ;; but it is outdated
2426 (url "https://code.qt.io/pyside/pyside-setup")
2428 (file-name (git-file-name name version))
2431 "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
2432 (build-system cmake-build-system)
2434 `(("clang-toolchain" ,clang-toolchain-6)
2435 ("libxml2" ,libxml2)
2436 ("libxslt" ,libxslt)
2437 ("python-wrapper" ,python-wrapper)
2439 ("qtxmlpatterns" ,qtxmlpatterns)))
2442 ;; FIXME: Building tests fails
2443 #:configure-flags '("-DBUILD_TESTS=off")
2445 (modify-phases %standard-phases
2446 (add-after 'unpack 'use-shiboken-dir-only
2447 (lambda _ (chdir "sources/shiboken2") #t))
2448 (add-before 'configure 'set-build-env
2449 (lambda* (#:key inputs #:allow-other-keys)
2450 (let ((llvm (assoc-ref inputs "clang-toolchain")))
2451 (setenv "CLANG_INSTALL_DIR" llvm)
2453 (home-page "https://wiki.qt.io/Qt_for_Python")
2455 "Shiboken generates bindings for C++ libraries using CPython source code")
2457 "Shiboken generates bindings for C++ libraries using CPython source code")
2460 ;; The main code is GPL3 or LGPL3.
2461 ;; Examples are BSD-3.
2466 (define-public python-pyside-2
2467 (let ((revision "1")
2468 ;; Pinned to branches with support for qt 5.11.3
2469 (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
2471 (name "python-pyside-2")
2472 (version (git-version "v5.11.3" revision commit))
2477 (url "https://code.qt.io/pyside/pyside-setup")
2479 (file-name (git-file-name name version))
2482 "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
2483 (build-system cmake-build-system)
2485 `(("libcxx" ,libcxx-6)
2486 ("libxml2" ,libxml2)
2487 ("libxslt" ,libxslt)
2488 ("clang-toolchain" ,clang-toolchain-6)
2490 ("qtdatavis3d" ,qtdatavis3d)
2491 ("qtlocation" ,qtlocation)
2492 ("qtmultimedia" ,qtmultimedia)
2493 ("qtquickcontrols" ,qtquickcontrols)
2494 ("qtscript" ,qtscript)
2495 ("qtscxml" ,qtscxml)
2496 ("qtsensors" ,qtsensors)
2497 ("qtspeech" ,qtspeech)
2499 ("qtwebchannel" ,qtwebchannel)
2500 ("qtwebsockets" ,qtwebsockets)
2501 ("qtx11extras" ,qtx11extras)
2502 ("qtxmlpatterns" ,qtxmlpatterns)))
2505 ("python-shiboken-2" ,python-shiboken-2)
2506 ("python-wrapper" ,python-wrapper)
2507 ("qttools" ,qttools)
2511 ;; FIXME: Building tests fail.
2512 #:configure-flags '("-DBUILD_TESTS=FALSE")
2514 (modify-phases %standard-phases
2515 (add-after 'unpack 'go-to-source-dir
2516 (lambda _ (chdir "sources/pyside2") #t))
2517 (add-before 'configure 'set-clang-dir
2518 (lambda* (#:key inputs #:allow-other-keys)
2519 (let ((clang (assoc-ref inputs "clang-toolchain"))
2520 (libcxx (assoc-ref inputs "libcxx")))
2521 (setenv "CLANG_INSTALL_DIR" clang)
2522 (substitute* "cmake/Macros/PySideModules.cmake"
2523 (("--include-paths=")
2524 (string-append "--include-paths=" libcxx "/include/c++/v1:")))
2526 (home-page "https://wiki.qt.io/Qt_for_Python")
2528 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2530 "The Qt for Python product enables the use of Qt5 APIs in Python
2531 applications. It lets Python developers utilize the full potential of Qt,
2532 using the PySide2 module. The PySide2 module provides access to the
2533 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2534 comes with the Shiboken2 CPython binding code generator, which can be used to
2535 generate Python bindings for your C or C++ code.")
2539 ;; this file may be used under the terms of the GNU General
2540 ;; Public License version 2.0 or (at your option) the GNU
2541 ;; General Public license version 3 or any later version
2542 ;; approved by the KDE Free Qt Foundation.
2543 ;; Thus, it is currently v2 or v3, but no "+".
2547 (define-public python-pyside-2-tools
2548 (let ((revision "1")
2549 ;; Pinned to branches with support for qt 5.11.3
2550 (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
2552 (name "python-pyside-2-tools")
2553 (version (git-version "v5.11.2" revision commit))
2558 (url "https://code.qt.io/pyside/pyside-tools")
2560 (file-name (git-file-name name version))
2563 "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
2564 (build-system cmake-build-system)
2566 `(("python-pyside-2" ,python-pyside-2)
2567 ("python-shiboken-2" ,python-shiboken-2)
2568 ("qtbase" ,qtbase)))
2571 #:configure-flags '("-DBUILD_TESTS=off")))
2572 (home-page "https://wiki.qt.io/Qt_for_Python")
2574 "Contains command line tools for PySide2")
2576 "Contains lupdate, rcc and uic tools for PySide2")
2577 (license license:gpl2))))