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 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017, 2018 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>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages qt)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix build utils)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system trivial)
37 #:use-module (guix packages)
38 #:use-module (guix utils)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages bison)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages cups)
43 #:use-module (gnu packages databases)
44 #:use-module (gnu packages documentation)
45 #:use-module (gnu packages fontutils)
46 #:use-module (gnu packages flex)
47 #:use-module (gnu packages freedesktop)
48 #:use-module (gnu packages gl)
49 #:use-module (gnu packages glib)
50 #:use-module (gnu packages gnuzilla)
51 #:use-module (gnu packages gperf)
52 #:use-module (gnu packages gstreamer)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages icu4c)
55 #:use-module (gnu packages image)
56 #:use-module (gnu packages linux)
57 #:use-module (gnu packages maths)
58 #:use-module (gnu packages pciutils)
59 #:use-module (gnu packages pcre)
60 #:use-module (gnu packages perl)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages pulseaudio)
63 #:use-module (gnu packages python)
64 #:use-module (gnu packages ruby)
65 #:use-module (gnu packages sdl)
66 #:use-module (gnu packages tls)
67 #:use-module (gnu packages xdisorg)
68 #:use-module (gnu packages xorg)
69 #:use-module (gnu packages xml))
71 (define-public grantlee
78 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
80 (file-name (string-append name "-" version ".tar.gz"))
82 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
84 ;; Optional: lcov and cccc, both are for code coverage
85 `(("doxygen" ,doxygen)))
88 ("qtscript" ,qtscript)))
89 (build-system cmake-build-system)
92 (modify-phases %standard-phases
93 (add-before 'check 'check-setup
95 ;; make Qt render "offscreen", required for tests
96 (setenv "QT_QPA_PLATFORM" "offscreen")
98 (home-page "https://github.com/steveire/grantlee")
99 (synopsis "Libraries for text templating with Qt")
100 (description "Grantlee Templates can be used for theming and generation of
101 other text such as code. The syntax uses the syntax of the Django template
102 system, and the core design of Django is reused in Grantlee.")
103 (license license:lgpl2.0+)))
109 (outputs '("out" "examples"))
114 "http://download.qt.io/official_releases/qt/"
115 (version-major+minor version)
117 "/single/qt-everywhere-opensource-src-"
121 "1mblh8k04l13nk9fhhrr43h5bcph1gbz94j5y7csx8zvxb5xkb73"))
122 (modules '((guix build utils)))
125 ;; Remove qtwebengine, which relies on a bundled copy of
126 ;; chromium. Not only does it fail compilation in qt 5.5:
127 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
128 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
129 ;; it might also pose security problems.
130 ;; Alternatively, we could use the "-skip qtwebengine"
131 ;; configuration option.
132 (delete-file-recursively "qtwebengine")
133 ;; The following snippets are copied from their mondular-qt counterparts.
136 (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
137 (list "double-conversion" "freetype" "harfbuzz-ng"
138 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
142 (delete-file-recursively dir))
143 (list "qtimageformats/src/3rdparty"
144 "qtmultimedia/examples/multimedia/spectrum/3rdparty"
146 "qtcanvas3d/examples/canvas3d/3rdparty"))
147 ;; Tests depend on this example, which depends on the 3rd party code.
148 (substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
151 (build-system gnu-build-system)
155 `(("alsa-lib" ,alsa-lib)
159 ("double-conversion" ,double-conversion)
161 ("fontconfig" ,fontconfig)
162 ("freetype" ,freetype)
164 ("gstreamer" ,gstreamer)
165 ("gst-plugins-base" ,gst-plugins-base)
166 ("harfbuzz" ,harfbuzz)
169 ("libinput" ,libinput-minimal)
177 ("libxcomposite" ,libxcomposite)
178 ("libxcursor" ,libxcursor)
180 ("libxfixes" ,libxfixes)
182 ("libxinerama" ,libxinerama)
183 ("libxkbcommon" ,libxkbcommon)
185 ("libxrandr" ,libxrandr)
186 ("libxrender" ,libxrender)
193 ("postgresql" ,postgresql)
194 ("pulseaudio" ,pulseaudio)
198 ("unixodbc" ,unixodbc)
200 ("xcb-util" ,xcb-util)
201 ("xcb-util-image" ,xcb-util-image)
202 ("xcb-util-keysyms" ,xcb-util-keysyms)
203 ("xcb-util-renderutil" ,xcb-util-renderutil)
204 ("xcb-util-wm" ,xcb-util-wm)
211 ("pkg-config" ,pkg-config)
214 ("which" ,(@ (gnu packages base) which))))
217 (modify-phases %standard-phases
218 (add-after 'configure 'patch-bin-sh
220 (substitute* '("qtbase/configure"
221 "qtbase/mkspecs/features/qt_functions.prf"
222 "qtbase/qmake/library/qmakebuiltins.cpp")
223 (("/bin/sh") (which "sh")))
226 (lambda* (#:key outputs #:allow-other-keys)
227 (let ((out (assoc-ref outputs "out"))
228 (examples (assoc-ref outputs "examples")))
229 (substitute* '("configure" "qtbase/configure")
230 (("/bin/pwd") (which "pwd")))
231 (substitute* "qtbase/src/corelib/global/global.pri"
232 (("/bin/ls") (which "ls")))
233 ;; do not pass "--enable-fast-install", which makes the
234 ;; configure process fail
239 "-examplesdir" examples ; 89MiB
242 ;; Do not build examples; for the time being, we
243 ;; prefer to save the space and build time.
244 "-no-compile-examples"
245 ;; Most "-system-..." are automatic, but some use
246 ;; the bundled copy by default.
249 ;; explicitly link with openssl instead of dlopening it
251 ;; explicitly link with dbus instead of dlopening it
253 ;; don't use the precompiled headers
255 ;; drop special machine instructions not supported
256 ;; on all instances of the target
257 ,@(if (string-prefix? "x86_64"
258 (or (%current-target-system)
263 "-no-mips_dspr2"))))))))
264 (home-page "https://www.qt.io/")
265 (synopsis "Cross-platform GUI library")
266 (description "Qt is a cross-platform application and UI framework for
267 developers using C++ or QML, a CSS & JavaScript like language.")
268 (license license:lgpl2.1)
270 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
271 ;; see <http://hydra.gnu.org/build/112828>.
272 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
273 (supported-systems (delete "mips64el-linux" %supported-systems))))
276 (package (inherit qt)
280 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
281 (string-copy version 0 (string-rindex version #\.))
283 "/qt-everywhere-opensource-src-"
287 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
288 (patches (search-patches "qt4-ldflags.patch"))
289 (modules '((guix build utils)))
291 ;; Remove webkit module, which is not built.
292 '(begin (delete-file-recursively "src/3rdparty/webkit")
294 (inputs `(,@(alist-delete "harfbuzz"
295 (alist-delete "libjpeg" (package-inputs qt)))
296 ("libjepg" ,libjpeg-8)
299 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
300 ;; but we can't make them a separate output because "out" and "examples"
301 ;; would refer to each other.
302 (outputs '("out" ;112MiB core + 37MiB examples
303 "doc")) ;280MiB of HTML + code
306 (modify-phases %standard-phases
309 (lambda* (#:key outputs #:allow-other-keys)
310 (let ((out (assoc-ref outputs "out"))
311 (doc (assoc-ref outputs "doc")))
312 (substitute* '("configure")
313 (("/bin/pwd") (which "pwd")))
319 ;; Note: Don't pass '-docdir' since 'qmake' and
320 ;; libQtCore would record its value, thereby defeating
321 ;; the whole point of having a separate output.
322 "-datadir" (string-append out "/share/qt-" ,version
324 "-importdir" (string-append out "/lib/qt-4"
326 "-plugindir" (string-append out "/lib/qt-4"
328 "-translationdir" (string-append out "/share/qt-" ,version
330 "-demosdir" (string-append out "/share/qt-" ,version
332 "-examplesdir" (string-append out "/share/qt-" ,version
336 ;; explicitly link with dbus instead of dlopening it
338 ;; Skip the webkit module; it fails to build on armhf
339 ;; and, apart from that, may pose security risks.
341 ;; drop special machine instructions not supported
342 ;; on all instances of the target
343 ,@(if (string-prefix? "x86_64"
344 (or (%current-target-system)
358 (lambda* (#:key outputs #:allow-other-keys)
359 ;; Because of qt4-documentation-path.patch, documentation ends up
360 ;; being installed in OUT. Move it to the right place.
361 (let* ((out (assoc-ref outputs "out"))
362 (doc (assoc-ref outputs "doc"))
363 (olddoc (string-append out "/doc"))
364 (docdir (string-append doc "/share/doc/qt-" ,version)))
365 (mkdir-p (dirname docdir))
367 ;; Note: We can't use 'rename-file' here because OUT and DOC are
368 ;; different "devices" due to bind-mounts.
369 (copy-recursively olddoc docdir)
370 (delete-file-recursively olddoc)
373 (define-public qtbase
379 (uri (string-append "https://download.qt.io/official_releases/qt/"
380 (version-major+minor version) "/" version
381 "/submodules/" name "-everywhere-src-"
385 "0ipv18ypbgpxhh49rfplqmflskmnhhwj1bjr5hrwi0jpvar4gl50"))
386 ;; Use TZDIR to avoid depending on package "tzdata".
387 (patches (search-patches "qtbase-use-TZDIR.patch"))
388 (modules '((guix build utils)))
390 ;; corelib uses bundled harfbuzz, md4, md5, sha3
394 (delete-file-recursively (string-append "src/3rdparty/" dir)))
395 (list "double-conversion" "freetype" "harfbuzz-ng"
396 "libpng" "libjpeg" "pcre2" "xcb"
399 (build-system gnu-build-system)
402 ("which" ,(@ (gnu packages base) which))))
404 `(("alsa-lib" ,alsa-lib)
407 ("double-conversion" ,double-conversion)
410 ("fontconfig" ,fontconfig)
411 ("freetype" ,freetype)
413 ("harfbuzz" ,harfbuzz)
415 ("libinput" ,libinput-minimal)
420 ("libxcomposite" ,libxcomposite)
421 ("libxcursor" ,libxcursor)
422 ("libxfixes" ,libxfixes)
424 ("libxinerama" ,libxinerama)
425 ("libxkbcommon" ,libxkbcommon)
427 ("libxrandr" ,libxrandr)
428 ("libxrender" ,libxrender)
436 ("postgresql" ,postgresql)
437 ("pulseaudio" ,pulseaudio)
439 ("unixodbc" ,unixodbc)
440 ("xcb-util" ,xcb-util)
441 ("xcb-util-image" ,xcb-util-image)
442 ("xcb-util-keysyms" ,xcb-util-keysyms)
443 ("xcb-util-renderutil" ,xcb-util-renderutil)
444 ("xcb-util-wm" ,xcb-util-wm)
451 ("pkg-config" ,pkg-config)
456 (modify-phases %standard-phases
457 (add-after 'configure 'patch-bin-sh
459 (substitute* '("config.status"
461 "mkspecs/features/qt_functions.prf"
462 "qmake/library/qmakebuiltins.cpp")
463 (("/bin/sh") (which "sh")))
466 (lambda* (#:key outputs #:allow-other-keys)
467 (let ((out (assoc-ref outputs "out")))
468 (substitute* "configure"
469 (("/bin/pwd") (which "pwd")))
470 (substitute* "src/corelib/global/global.pri"
471 (("/bin/ls") (which "ls")))
472 ;; The configuration files for other Qt5 packages are searched
473 ;; through a call to "find_package" in Qt5Config.cmake, which
474 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
475 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
476 ;; components can be installed in different places.
477 (substitute* (find-files "." ".*\\.cmake")
478 (("NO_DEFAULT_PATH") ""))
479 ;; do not pass "--enable-fast-install", which makes the
480 ;; configure process fail
485 "-docdir" (string-append out "/share/doc/qt5")
486 "-headerdir" (string-append out "/include/qt5")
487 "-archdatadir" (string-append out "/lib/qt5")
488 "-datadir" (string-append out "/share/qt5")
489 "-examplesdir" (string-append
490 out "/share/doc/qt5/examples")
494 ;; These features require higher versions of Linux than the
495 ;; minimum version of the glibc. See
496 ;; src/corelib/global/minimum-linux_p.h. By disabling these
497 ;; features Qt5 applications can be used on the oldest
498 ;; kernels that the glibc supports, including the RHEL6
499 ;; (2.6.32) and RHEL7 (3.10) kernels.
500 "-no-feature-getentropy" ; requires Linux 3.17
501 "-no-feature-renameat2" ; requires Linux 3.16
503 ;; Do not build examples; if desired, these could go
504 ;; into a separate output, but for the time being, we
505 ;; prefer to save the space and build time.
506 "-no-compile-examples"
507 ;; Most "-system-..." are automatic, but some use
508 ;; the bundled copy by default.
509 ;; System sqlite fails on 5.10+
510 ;;.obj/qsql_sqlite.o: In function `QSQLiteResultPrivate::initColumns(bool)':
511 ;;qsql_sqlite.cpp:(.text+0x190c): undefined reference to `sqlite3_column_table_name16'
515 ;; explicitly link with openssl instead of dlopening it
517 ;; explicitly link with dbus instead of dlopening it
519 ;; don't use the precompiled headers
521 ;; drop special machine instructions that do not have
523 ,@(if (string-prefix? "x86_64"
524 (or (%current-target-system)
530 (add-after 'install 'patch-mkspecs
531 (lambda* (#:key outputs #:allow-other-keys)
532 (let* ((out (assoc-ref outputs "out"))
533 (archdata (string-append out "/lib/qt5"))
534 (mkspecs (string-append archdata "/mkspecs"))
535 (qt_config.prf (string-append
536 mkspecs "/features/qt_config.prf")))
537 ;; For each Qt module, let `qmake' uses search paths in the
538 ;; module directory instead of all in QT_INSTALL_PREFIX.
539 (substitute* qt_config.prf
540 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
541 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
542 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
543 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
544 (("\\$\\$\\[QT_HOST_LIBS\\]")
545 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
546 (("\\$\\$\\[QT_INSTALL_BINS\\]")
547 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
549 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
550 (substitute* (string-append mkspecs "/features/qt_functions.prf")
551 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
552 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
554 ;; Resolve qmake spec files within qtbase by absolute paths.
557 (string-append mkspecs "/features/" file))
558 '("device_config.prf" "moc.prf" "qt_build_config.prf"
559 "qt_config.prf" "winrt/package_manifest.prf"))
560 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
561 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
563 (add-after 'unpack 'patch-paths
564 ;; Use the absolute paths for dynamically loaded libs, otherwise
565 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
567 (lambda* (#:key inputs #:allow-other-keys)
569 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
570 "cross-libc" "libc"))))
571 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
572 "src/network/kernel/qhostinfo_unix.cpp")
573 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
574 (string-append a glibc "/lib/lib" b))))
575 ;; X11/locale (compose path)
576 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
577 ;; Don't search in /usr/…/X11/locale, …
578 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
579 (string-append "// " line))
580 ;; … but use libx11's path
581 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
582 (string-append a "\"" (assoc-ref inputs "libx11") b)))
584 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
585 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
586 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
588 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
589 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
590 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
591 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
592 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
595 (list (search-path-specification
596 (variable "QMAKEPATH")
597 (files '("lib/qt5")))
598 (search-path-specification
599 (variable "QML2_IMPORT_PATH")
600 (files '("lib/qt5/qml")))
601 (search-path-specification
602 (variable "QT_PLUGIN_PATH")
603 (files '("lib/qt5/plugins")))
604 (search-path-specification
605 (variable "XDG_DATA_DIRS")
607 (search-path-specification
608 (variable "XDG_CONFIG_DIRS")
609 (files '("etc/xdg")))))
610 (home-page "https://www.qt.io/")
611 (synopsis "Cross-platform GUI library")
612 (description "Qt is a cross-platform application and UI framework for
613 developers using C++ or QML, a CSS & JavaScript like language.")
614 (license (list license:lgpl2.1 license:lgpl3))))
617 (package (inherit qtbase)
622 (uri (string-append "https://download.qt.io/official_releases/qt/"
623 (version-major+minor version) "/" version
624 "/submodules/" name "-everywhere-src-"
628 "0drhig0jcss3cf01aqfmafajf8gzf6bh468g1ikyrkh46czgyshx"))))
629 (propagated-inputs `())
630 (native-inputs `(("perl" ,perl)))
637 (modify-phases %standard-phases
638 (add-before 'configure 'configure-qmake
639 (lambda* (#:key inputs outputs #:allow-other-keys)
640 (let* ((out (assoc-ref outputs "out"))
641 (qtbase (assoc-ref inputs "qtbase"))
642 (tmpdir (string-append (getenv "TMPDIR")))
643 (qmake (string-append tmpdir "/qmake"))
644 (qt.conf (string-append tmpdir "/qt.conf")))
645 ;; Use qmake with a customized qt.conf to override install
647 (symlink (which "qmake") qmake)
648 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
649 (with-output-to-file qt.conf
655 Documentation=share/doc/qt5
658 LibraryExecutables=lib/qt5/libexec
661 Plugins=lib/qt5/plugins
662 Imports=lib/qt5/imports
663 Qml2Imports=lib/qt5/qml
664 Translations=share/qt5/translations
666 Examples=share/doc/qt5/examples
672 [EffectiveSourcePaths]
678 (lambda* (#:key inputs outputs #:allow-other-keys)
679 ;; Valid QT_BUILD_PARTS variables are:
680 ;; libs tools tests examples demos docs translations
681 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
682 (add-before 'check 'set-display
684 ;; make Qt render "offscreen", required for tests
685 (setenv "QT_QPA_PLATFORM" "offscreen")
687 (synopsis "Qt module for displaying SVGs")
688 (description "The QtSvg module provides classes for displaying the
689 contents of SVG files.")))
691 (define-public qtimageformats
692 (package (inherit qtsvg)
693 (name "qtimageformats")
697 (uri (string-append "https://download.qt.io/official_releases/qt/"
698 (version-major+minor version) "/" version
699 "/submodules/" name "-everywhere-src-"
703 "05jnyrq7klr3mdiz0r9c151vl829yc8y9cxfbw5dwbp1rkndwl7b"))
704 (modules '((guix build utils)))
707 (delete-file-recursively "src/3rdparty")
718 (synopsis "Additional Image Format plugins for Qt")
719 (description "The QtImageFormats module contains plugins for adding
720 support for MNG, TGA, TIFF and WBMP image formats.")))
722 (define-public qtx11extras
723 (package (inherit qtsvg)
728 (uri (string-append "https://download.qt.io/official_releases/qt/"
729 (version-major+minor version) "/" version
730 "/submodules/" name "-everywhere-src-"
734 "0rccpmhz48kq4xs441lj9mnwpbi6kxwl8y7dj7w7g5zvpv41kwmw"))))
736 (substitute-keyword-arguments (package-arguments qtsvg)
737 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
738 (native-inputs `(("perl" ,perl)))
742 (synopsis "Qt Extras for X11")
743 (description "The QtX11Extras module includes the library to access X11
744 from within Qt 5.")))
746 (define-public qtxmlpatterns
747 (package (inherit qtsvg)
748 (name "qtxmlpatterns")
752 (uri (string-append "https://download.qt.io/official_releases/qt/"
753 (version-major+minor version) "/" version
754 "/submodules/" name "-everywhere-src-"
758 "0n5gacpni019i2872m4b1p5qaqibhszsdl3xhw3xsckvr0hf25v1"))))
760 (substitute-keyword-arguments (package-arguments qtsvg)
762 `(modify-phases ,phases
763 (add-after 'unpack 'disable-network-tests
764 (lambda _ (substitute* "tests/auto/auto.pro"
765 (("qxmlquery") "# qxmlquery")
766 (("xmlpatterns ") "# xmlpatterns"))
768 (native-inputs `(("perl" ,perl)))
769 (inputs `(("qtbase" ,qtbase)))
770 (synopsis "Qt XML patterns module")
771 (description "The QtXmlPatterns module is a XQuery and XPath engine for
772 XML and custom data models. It contains programs such as xmlpatterns and
773 xmlpatternsvalidator.")))
775 (define-public qtdeclarative
776 (package (inherit qtsvg)
777 (name "qtdeclarative")
781 (uri (string-append "https://download.qt.io/official_releases/qt/"
782 (version-major+minor version) "/" version
783 "/submodules/" name "-everywhere-src-"
787 "0fjg9ii64mhx2ww70rj44cy65rwwkwyjxcm435kwp3v1pzv5xkwy"))))
789 (substitute-keyword-arguments (package-arguments qtsvg)
790 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
793 ("pkg-config" ,pkg-config)
796 ("qtxmlpatterns" ,qtxmlpatterns)))
800 (synopsis "Qt QML module (Quick 2)")
801 (description "The Qt QML module provides a framework for developing
802 applications and libraries with the QML language. It defines and implements the
803 language and engine infrastructure, and provides an API to enable application
804 developers to extend the QML language with custom types and integrate QML code
805 with JavaScript and C++.")))
807 (define-public qtconnectivity
808 (package (inherit qtsvg)
809 (name "qtconnectivity")
813 (uri (string-append "https://download.qt.io/official_releases/qt/"
814 (version-major+minor version) "/" version
815 "/submodules/" name "-everywhere-src-"
819 "0mz6mbf069yqdvi6mcvp6izskcn9wzig4s3dzmygwd430pmx93kk"))))
822 ("pkg-config" ,pkg-config)
823 ("qtdeclarative" ,qtdeclarative)))
827 (synopsis "Qt Connectivity module")
828 (description "The Qt Connectivity modules provides modules for interacting
829 with Bluetooth and NFC.")))
831 (define-public qtwebsockets
832 (package (inherit qtsvg)
833 (name "qtwebsockets")
837 (uri (string-append "https://download.qt.io/official_releases/qt/"
838 (version-major+minor version) "/" version
839 "/submodules/" name "-everywhere-src-"
843 "1bj82y3f1nd2adnj3ljfr4vlx4bkgdlm3zvhlsas2lz837vi5aks"))))
845 (substitute-keyword-arguments (package-arguments qtsvg)
846 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
849 ("qtdeclarative" ,qtdeclarative)))
850 (inputs `(("qtbase" ,qtbase)))
851 (synopsis "Qt Web Sockets module")
852 (description "WebSocket is a web-based protocol designed to enable two-way
853 communication between a client application and a remote host. The Qt
854 WebSockets module provides C++ and QML interfaces that enable Qt applications
855 to act as a server that can process WebSocket requests, or a client that can
856 consume data received from the server, or both.")))
858 (define-public qtsensors
859 (package (inherit qtsvg)
864 (uri (string-append "https://download.qt.io/official_releases/qt/"
865 (version-major+minor version) "/" version
866 "/submodules/" name "-everywhere-src-"
870 "1yn065l6kzs3fn74950pkxxglqi55lzk7alf15klsd1wnxc0zsfb"))))
872 (substitute-keyword-arguments (package-arguments qtsvg)
873 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
875 `(modify-phases ,phases
876 (add-after 'unpack 'fix-tests
878 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
879 (("2000") "5000") ;lengthen test timeout
880 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
884 ("qtdeclarative" ,qtdeclarative)))
885 (inputs `(("qtbase" ,qtbase)))
886 (synopsis "Qt Sensors module")
887 (description "The Qt Sensors API provides access to sensor hardware via QML
888 and C++ interfaces. The Qt Sensors API also provides a motion gesture
889 recognition API for devices.")))
891 (define-public qtmultimedia
892 (package (inherit qtsvg)
893 (name "qtmultimedia")
897 (uri (string-append "https://download.qt.io/official_releases/qt/"
898 (version-major+minor version) "/" version
899 "/submodules/" name "-everywhere-src-"
903 "0369b0mh7sr718l119b07grb1v8xqlq6l4damyd6lrmlj1wbb2zj"))
904 (modules '((guix build utils)))
907 (delete-file-recursively
908 "examples/multimedia/spectrum/3rdparty")
909 ;; We also prevent the spectrum example from being built.
910 (substitute* "examples/multimedia/multimedia.pro"
914 (substitute-keyword-arguments (package-arguments qtsvg)
916 `(modify-phases ,phases
918 (lambda* (#:key outputs #:allow-other-keys)
919 (let ((out (assoc-ref outputs "out")))
920 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
921 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
922 (string-append "PREFIX=" out)))))))
923 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
926 ("pkg-config" ,pkg-config)
928 ("qtdeclarative" ,qtdeclarative)))
930 `(("alsa-lib" ,alsa-lib)
932 ("pulseaudio" ,pulseaudio)
934 ;; Gstreamer is needed for the mediaplayer plugin
935 ("gstreamer" ,gstreamer)
936 ("gst-plugins-base" ,gst-plugins-base)))
937 (synopsis "Qt Multimedia module")
938 (description "The Qt Multimedia module provides set of APIs to play and
939 record media, and manage a collection of media content. It also contains a
940 set of plugins for interacting with pulseaudio and GStreamer.")))
942 (define-public qtwayland
943 (package (inherit qtsvg)
948 (uri (string-append "https://download.qt.io/official_releases/qt/"
949 (version-major+minor version) "/" version
950 "/submodules/" name "-everywhere-src-"
954 "1sj4lsza48xji1qhmi1wqpx07jgm1mpa95gmd2w1kxw240hbr6p0"))
955 (modules '((guix build utils)))
957 ;; The examples try to build and cause the build to fail
959 (delete-file-recursively "examples")
962 (substitute-keyword-arguments (package-arguments qtsvg)
964 `(modify-phases ,phases
965 (add-before 'check 'set-ld-library-path
966 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
968 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
969 ;; wayland platform plugin.
971 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
976 ("pkg-config" ,pkg-config)
977 ("qtdeclarative" ,qtdeclarative)))
979 `(("fontconfig" ,fontconfig)
980 ("freetype" ,freetype)
982 ("libxcomposite" ,libxcomposite)
984 ("libxkbcommon" ,libxkbcommon)
985 ("libxrender" ,libxrender)
989 ("wayland" ,wayland)))
990 (synopsis "Qt Wayland module")
991 (description "The Qt Wayland module provides the QtWayland client and
992 compositor libraries.")))
994 (define-public qtserialport
995 (package (inherit qtsvg)
996 (name "qtserialport")
1000 (uri (string-append "https://download.qt.io/official_releases/qt/"
1001 (version-major+minor version) "/" version
1002 "/submodules/" name "-everywhere-src-"
1006 "18v4pbq7bnmrl81m8s11ksbjlvzbb4kw5py6ji2dhmnm44w9k9sn"))))
1007 (native-inputs `(("perl" ,perl)))
1009 `(("qtbase" ,qtbase)
1012 (substitute-keyword-arguments (package-arguments qtsvg)
1014 `(modify-phases ,phases
1015 (add-after 'unpack 'patch-dlopen-paths
1016 (lambda* (#:key inputs #:allow-other-keys)
1017 (substitute* "src/serialport/qtudev_p.h"
1018 ;; Use the absolute paths for dynamically loaded libs,
1019 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1020 ;; typically is not set in guix.
1021 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1022 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1024 (synopsis "Qt Serial Port module")
1025 (description "The Qt Serial Port module provides the library for
1026 interacting with serial ports from within Qt.")))
1028 (define-public qtserialbus
1029 (package (inherit qtsvg)
1030 (name "qtserialbus")
1034 (uri (string-append "https://download.qt.io/official_releases/qt/"
1035 (version-major+minor version) "/" version
1036 "/submodules/" name "-everywhere-src-"
1040 "0jjmdd6vkvs5izqazp1rsrad0b1fzk6knrbdjl37lvcsawyfxfyk"))))
1042 `(("qtbase" ,qtbase)
1043 ("qtserialport" ,qtserialport)))
1044 (synopsis "Qt Serial Bus module")
1045 (description "The Qt Serial Bus API provides classes and functions to
1046 access the various industrial serial buses and protocols, such as CAN, ModBus,
1049 (define-public qtwebchannel
1050 (package (inherit qtsvg)
1051 (name "qtwebchannel")
1055 (uri (string-append "https://download.qt.io/official_releases/qt/"
1056 (version-major+minor version) "/" version
1057 "/submodules/" name "-everywhere-src-"
1061 "11rfjkb4h8dzxfmk889x7kkc73cbk26smc7h62lnh35f2nppd95r"))))
1064 ("qtdeclarative" ,qtdeclarative)
1065 ("qtwebsockets" ,qtwebsockets)))
1066 (inputs `(("qtbase" ,qtbase)))
1067 (synopsis "Web communication library for Qt")
1068 (description "The Qt WebChannel module enables peer-to-peer communication
1069 between the host (QML/C++ application) and the client (HTML/JavaScript
1070 application). The transport mechanism is supported out of the box by the two
1071 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1073 (define-public qtwebglplugin
1074 (package (inherit qtsvg)
1075 (name "qtwebglplugin")
1079 (uri (string-append "https://download.qt.io/official_releases/qt/"
1080 (version-major+minor version) "/" version
1081 "/submodules/" name "-everywhere-src-"
1085 "108yhi3sj6d1ysmlpka69ivb20mx9h6jpra6yq099i3jw4gc753x"))))
1087 (substitute-keyword-arguments (package-arguments qtsvg)
1089 `(modify-phases ,phases
1090 (add-after 'unpack 'disable-network-tests
1091 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1092 (("webgl") "# webgl"))
1098 ("qtdeclarative" ,qtdeclarative)
1099 ("qtwebsockets" ,qtwebsockets)))
1100 (synopsis "QPA plugin for running an application via a browser using
1101 streamed WebGL commands")
1102 (description "Qt back end that uses WebGL for rendering. It allows Qt
1103 applications (with some limitations) to run in a web browser that supports
1104 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1105 compatible web browser without the use of plug-ins. The API is similar to
1106 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1108 (define-public qtwebview
1109 (package (inherit qtsvg)
1114 (uri (string-append "https://download.qt.io/official_releases/qt/"
1115 (version-major+minor version) "/" version
1116 "/submodules/" name "-everywhere-src-"
1120 "18da6a13wpb23vb6mbg9v75gphdf5mjmch7q3v1qjrv2sdwbpjbp"))))
1124 `(("qtbase" ,qtbase)
1125 ("qtdeclarative" ,qtdeclarative)))
1126 (synopsis "Display web content in a QML application")
1127 (description "Qt WebView provides a way to display web content in a QML
1128 application without necessarily including a full web browser stack by using
1129 native APIs where it makes sense.")))
1131 (define-public qtlocation
1132 (package (inherit qtsvg)
1137 (uri (string-append "https://download.qt.io/official_releases/qt/"
1138 (version-major+minor version) "/" version
1139 "/submodules/" name "-everywhere-src-"
1143 "03vrbymwbn4nqsypcmr4ccqv20nvwdfs9gb01pi3jxr6x0wrlb0p"))))
1145 (substitute-keyword-arguments (package-arguments qtsvg)
1146 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1149 ("qtdeclarative" ,qtdeclarative)
1150 ("qtquickcontrols" ,qtquickcontrols)
1151 ("qtserialport" ,qtserialport)))
1154 ("openssl" ,openssl)
1157 (synopsis "Qt Location and Positioning modules")
1158 (description "The Qt Location module provides an interface for location,
1159 positioning and geolocation plugins.")))
1161 (define-public qttools
1162 (package (inherit qtsvg)
1167 (uri (string-append "https://download.qt.io/official_releases/qt/"
1168 (version-major+minor version) "/" version
1169 "/submodules/" name "-everywhere-src-"
1173 "1zhl8p29mbabf07rhaks13qcm45zdckzymvz9qn95nxfj9piiyxp"))))
1175 (substitute-keyword-arguments (package-arguments qtsvg)
1176 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1179 ("qtdeclarative" ,qtdeclarative)))
1182 ("qtbase" ,qtbase)))
1183 (synopsis "Qt Tools and Designer modules")
1184 (description "The Qt Tools module provides a set of applications to browse
1185 the documentation, translate applications, generate help files and other stuff
1186 that helps in Qt development.")))
1188 (define-public qtscript
1189 (package (inherit qtsvg)
1194 (uri (string-append "https://download.qt.io/official_releases/qt/"
1195 (version-major+minor version) "/" version
1196 "/submodules/" name "-everywhere-src-"
1200 "0z6sb4b9ds5lwkr0sxrnx6nim3aq2qx4a8illjy5vclfdv80yhqw"))
1201 (patches (search-patches "qtscript-disable-tests.patch"))))
1204 ("qttools" ,qttools)))
1206 `(("qtbase" ,qtbase)))
1207 (synopsis "Qt Script module")
1208 (description "Qt provides support for application scripting with ECMAScript.
1209 The following guides and references cover aspects of programming with
1210 ECMAScript and Qt.")))
1212 (define-public qtquickcontrols
1213 (package (inherit qtsvg)
1214 (name "qtquickcontrols")
1218 (uri (string-append "https://download.qt.io/official_releases/qt/"
1219 (version-major+minor version) "/" version
1220 "/submodules/" name "-everywhere-src-"
1224 "0mn662j0gkpama7zlrsn4h27sjrk49kpbha1h0zxxyiza5cpzsms"))))
1226 (substitute-keyword-arguments (package-arguments qtsvg)
1227 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1229 `(("qtbase" ,qtbase)
1230 ("qtdeclarative" ,qtdeclarative)))
1231 (synopsis "Qt Quick Controls and other Quick modules")
1232 (description "The QtScript module provides classes for making Qt
1233 applications scriptable. This module provides a set of extra components that
1234 can be used to build complete interfaces in Qt Quick.")))
1236 (define-public qtquickcontrols2
1237 (package (inherit qtsvg)
1238 (name "qtquickcontrols2")
1242 (uri (string-append "https://download.qt.io/official_releases/qt/"
1243 (version-major+minor version) "/" version
1244 "/submodules/" name "-everywhere-src-"
1248 "0hn4kvrkz5ivwrp9p6yzwlw7cn4j72kcpm2nqyi3dbai1px6dc5x"))))
1250 (substitute-keyword-arguments (package-arguments qtsvg)
1251 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1253 `(("qtbase" ,qtbase)
1254 ("qtdeclarative" ,qtdeclarative)))
1255 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1256 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1257 module that provides platform integration: native dialogs, menus and menu bars,
1258 and tray icons. It falls back to Qt Widgets when a native implementation is
1261 (define-public qtgraphicaleffects
1262 (package (inherit qtsvg)
1263 (name "qtgraphicaleffects")
1267 (uri (string-append "https://download.qt.io/official_releases/qt/"
1268 (version-major+minor version) "/" version
1269 "/submodules/" name "-everywhere-src-"
1273 "1ws8aj7bq3rxpzjs370dcyqk8a5v1y6fwvrdhf70j8b2d4v75lnr"))))
1275 (substitute-keyword-arguments (package-arguments qtsvg)
1276 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1278 `(("qtbase" ,qtbase)
1279 ("qtdeclarative" ,qtdeclarative)))
1280 (synopsis "Qt Graphical Effects module")
1281 (description "The Qt Graphical Effects module provides a set of QML types
1282 for adding visually impressive and configurable effects to user interfaces.
1283 Effects are visual items that can be added to Qt Quick user interface as UI
1284 components. The API consists of over 20 effects provided as separate QML
1285 types. The effects cover functional areas such as blending, masking, blurring,
1286 coloring, and many more.")))
1288 (define-public qtdeclarative-render2d
1289 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
1290 (package (inherit qtsvg)
1291 (name "qtdeclarative-render2d")
1295 (uri (string-append "https://download.qt.io/official_releases/qt/"
1296 (version-major+minor version) "/" version
1297 "/submodules/" name "-everywhere-src-"
1301 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1302 (modules '((guix build utils)))
1305 (delete-file-recursively "tools/opengldummy/3rdparty")
1309 `(("qtbase" ,qtbase)
1310 ("qtdeclarative" ,qtdeclarative)))
1311 (synopsis "Qt Declarative Render module")
1312 (description "The Qt Declarative Render 2D module provides a Raster
1313 backend for QtQuick scene graph.")
1314 (properties `((superseded . ,qtdeclarative)))))
1316 (define-public qtgamepad
1317 (package (inherit qtsvg)
1322 (uri (string-append "https://download.qt.io/official_releases/qt/"
1323 (version-major+minor version) "/" version
1324 "/submodules/" name "-everywhere-src-"
1328 "1n97w9rcbg8mzkvjgn3i8jbfmplp7w0p80ykdchpml47gxk1kwma"))))
1331 ("pkg-config" ,pkg-config)))
1333 `(("fontconfig" ,fontconfig)
1334 ("freetype" ,freetype)
1335 ("libxrender" ,libxrender)
1338 ("qtdeclarative" ,qtdeclarative)))
1339 (synopsis "Qt Gamepad module")
1340 (description "The Qt Gamepad module is an add-on library that enables Qt
1341 applications to support the use of gamepad hardware and in some cases remote
1342 control equipment. The module provides both QML and C++ interfaces. The
1343 primary target audience are embedded devices with fullscreen user interfaces,
1344 and mobile applications targeting TV-like form factors.")))
1346 (define-public qtscxml
1347 (package (inherit qtsvg)
1352 (uri (string-append "https://download.qt.io/official_releases/qt/"
1353 (version-major+minor version) "/" version
1354 "/submodules/" name "-everywhere-src-"
1358 "0f1k4fnk2aydagxqvkb636pcsi17sbq2zj2fn0ad50dvq013yiph"))
1359 (modules '((guix build utils)))
1362 (delete-file-recursively "tests/3rdparty")
1363 ;; the scion test refers to the bundled 3rd party test code.
1364 (substitute* "tests/auto/auto.pro"
1368 `(("qtbase" ,qtbase)
1369 ("qtdeclarative" ,qtdeclarative)))
1370 (synopsis "Qt SCXML module")
1371 (description "The Qt SCXML module provides functionality to create state
1372 machines from SCXML files. This includes both dynamically creating state
1373 machines (loading the SCXML file and instantiating states and transitions) and
1374 generating a C++ file that has a class implementing the state machine. It
1375 also contains functionality to support data models and executable content.")))
1377 (define-public qtpurchasing
1378 (package (inherit qtsvg)
1379 (name "qtpurchasing")
1383 (uri (string-append "https://download.qt.io/official_releases/qt/"
1384 (version-major+minor version) "/" version
1385 "/submodules/" name "-everywhere-src-"
1389 "0crm39fy9aqns10mjlbxvkkna9xklic49zfp3f7v7cwl66wap6dc"))))
1391 `(("qtbase" ,qtbase)
1392 ("qtdeclarative" ,qtdeclarative)))
1393 (synopsis "Qt Purchasing module")
1394 (description "The Qt Purchasing module provides and in-app API for
1395 purchasing goods and services.")))
1397 (define-public qtcanvas3d
1398 (package (inherit qtsvg)
1403 (uri (string-append "https://download.qt.io/official_releases/qt/"
1404 (version-major+minor version) "/" version
1405 "/submodules/" name "-everywhere-src-"
1409 "1pif3m1f44jrly2nh0hzid6dmdxqiy5qgx645hz6g5fmpl113d8g"))
1410 (modules '((guix build utils)))
1413 (delete-file-recursively "examples/canvas3d/3rdparty")
1416 (substitute-keyword-arguments (package-arguments qtsvg)
1417 ;; Building the tests depends on the bundled 3rd party javascript files,
1418 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1419 ;; fail, so we skip building them for now.
1421 `(modify-phases ,phases
1423 (lambda* (#:key outputs #:allow-other-keys)
1424 (let ((out (assoc-ref outputs "out")))
1425 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1426 (string-append "PREFIX=" out)))))))
1427 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1430 `(("qtbase" ,qtbase)
1431 ("qtdeclarative" ,qtdeclarative)))
1432 (synopsis "Qt Canvas 3D module")
1433 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1434 drawing calls from Qt Quick JavaScript.")))
1436 (define-public qtcharts
1437 (package (inherit qtsvg)
1442 (uri (string-append "https://download.qt.io/official_releases/qt/"
1443 (version-major+minor version) "/" version
1444 "/submodules/" name "-everywhere-src-"
1448 "0avscsni84zrzydilkkp456sbaypyzhkn42qygjdq7wcn045zxk2"))))
1450 (substitute-keyword-arguments (package-arguments qtsvg)
1451 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1453 `(("qtbase" ,qtbase)
1454 ("qtdeclarative" ,qtdeclarative)))
1455 (synopsis "Qt Charts module")
1456 (description "The Qt Charts module provides a set of easy to use chart
1457 components. It uses the Qt Graphics View Framework, therefore charts can be
1458 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1459 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1460 selecting one of the charts themes.")
1461 (license license:gpl3)))
1463 (define-public qtdatavis3d
1464 (package (inherit qtsvg)
1465 (name "qtdatavis3d")
1469 (uri (string-append "https://download.qt.io/official_releases/qt/"
1470 (version-major+minor version) "/" version
1471 "/submodules/" name "-everywhere-src-"
1475 "0gay0dsz05xfrlx190y95hp9wipzb988h02fqbqvyn00ds3s178w"))))
1477 (substitute-keyword-arguments (package-arguments qtsvg)
1478 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1480 `(("qtbase" ,qtbase)
1481 ("qtdeclarative" ,qtdeclarative)))
1482 (synopsis "Qt Data Visualization module")
1483 (description "The Qt Data Visualization module provides a way to visualize
1484 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1485 visualizing depth maps and large quantities of rapidly changing data, such as
1486 data received from multiple sensors. The look and feel of graphs can be
1487 customized by using themes or by adding custom items and labels to them.")
1488 (license license:gpl3)))
1490 (define-public qtnetworkauth
1491 (package (inherit qtsvg)
1492 (name "qtnetworkauth")
1496 (uri (string-append "https://download.qt.io/official_releases/qt/"
1497 (version-major+minor version) "/" version
1498 "/submodules/" name "-everywhere-src-"
1502 "05p4pvfp3k5612d54anvpj39bgc7v572x6kgk3fy69xgn7lhbd02"))))
1504 (substitute-keyword-arguments (package-arguments qtsvg)
1506 `(modify-phases ,phases
1507 (add-after 'unpack 'remove-failing-test
1509 ;; These tests can't find their test data.
1510 (substitute* "tests/auto/auto.pro"
1511 (("oauth1 ") "# oauth1 "))
1514 `(("qtbase" ,qtbase)))
1515 (synopsis "Qt Network Authorization module")
1516 (description "The Qt Network Authorization module provides an
1517 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1519 (define-public qtremoteobjects
1520 (package (inherit qtsvg)
1521 (name "qtremoteobjects")
1525 (uri (string-append "https://download.qt.io/official_releases/qt/"
1526 (version-major+minor version) "/" version
1527 "/submodules/" name "-everywhere-src-"
1531 "1yv9f2329nv4viiyqmq7ciz51574wd11grj8s88qm0ndcb36jbgb"))))
1533 (substitute-keyword-arguments (package-arguments qtsvg)
1535 `(modify-phases ,phases
1536 (add-after 'unpack 'remove-failing-test
1538 ;; This test can't find its imports.
1539 (substitute* "tests/auto/qml/qml.pro"
1540 (("integration") "# integration")
1541 (("usertypes") "# usertypes"))
1544 `(("qtbase" ,qtbase)
1545 ("qtdeclarative" ,qtdeclarative)))
1546 (synopsis "Qt Remote Objects module")
1547 (description "The Qt Remote Objects module is an @dfn{inter-process
1548 communication} (IPC) module developed for Qt. The idea is to extend existing
1549 Qt's functionalities to enable an easy exchange of information between
1550 processes or computers.")))
1552 (define-public qtspeech
1553 (package (inherit qtsvg)
1558 (uri (string-append "https://download.qt.io/official_releases/qt/"
1559 (version-major+minor version) "/" version
1560 "/submodules/" name "-everywhere-src-"
1564 "1nwvbaijg35i98yaiqgnyn5vv0cn4v3wrxhwi1s0hfv9sv3q5iyw"))))
1566 (substitute-keyword-arguments (package-arguments qtsvg)
1567 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1569 `(("qtbase" ,qtbase)))
1572 ("qtdeclarative" ,qtdeclarative)
1573 ("qtmultimedia" ,qtmultimedia)
1574 ("qtxmlpatterns" ,qtxmlpatterns)))
1575 (synopsis "Qt Speech module")
1576 (description "The Qt Speech module enables a Qt application to support
1577 accessibility features such as text-to-speech, which is useful for end-users
1578 who are visually challenged or cannot access the application for whatever
1579 reason. The most common use case where text-to-speech comes in handy is when
1580 the end-user is driving and cannot attend the incoming messages on the phone.
1581 In such a scenario, the messaging application can read out the incoming
1584 (define-public python-sip
1592 (string-append "mirror://sourceforge/pyqt/sip/"
1593 "sip-" version "/sip-" version ".tar.gz"))
1596 "1g4pq9vj753r2s061jc4y9ydzgb48ibhc9bdvmb8mlyllwp7mbvy"))))
1597 (build-system gnu-build-system)
1599 `(("python" ,python-wrapper)))
1601 `(#:tests? #f ; no check target
1602 #:modules ((srfi srfi-1)
1603 ,@%gnu-build-system-modules)
1605 (modify-phases %standard-phases
1607 (lambda* (#:key inputs outputs #:allow-other-keys)
1608 (let* ((out (assoc-ref outputs "out"))
1609 (bin (string-append out "/bin"))
1610 (include (string-append out "/include"))
1611 (python (assoc-ref inputs "python"))
1613 (last (string-split python #\-)))
1616 (take (string-split python-version #\.) 2)
1618 (lib (string-append out "/lib/python"
1622 (system* "python" "configure.py"
1625 "--incdir" include))))))))
1626 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1627 (synopsis "Python binding creator for C and C++ libraries")
1629 "SIP is a tool to create Python bindings for C and C++ libraries. It
1630 was originally developed to create PyQt, the Python bindings for the Qt
1631 toolkit, but can be used to create bindings for any C or C++ library.
1633 SIP comprises a code generator and a Python module. The code generator
1634 processes a set of specification files and generates C or C++ code, which
1635 is then compiled to create the bindings extension module. The SIP Python
1636 module provides support functions to the automatically generated code.")
1637 ;; There is a choice between a python like license, gpl2 and gpl3.
1638 ;; For compatibility with pyqt, we need gpl3.
1639 (license license:gpl3)))
1641 (define-public python2-sip
1642 (package (inherit python-sip)
1643 (name "python2-sip")
1645 `(("python" ,python-2)))))
1647 (define-public python-pyqt
1649 (name "python-pyqt")
1655 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1656 "PyQt-" version "/PyQt5_gpl-"
1660 "1vz9c4v0k8azk2b08swwybrshzw32x8djjpq13mf9v15x1qyjclr"))
1661 (patches (search-patches "pyqt-configure.patch"))))
1662 (build-system gnu-build-system)
1664 `(("qtbase" ,qtbase))) ; for qmake
1666 `(("python-sip" ,python-sip)))
1668 `(("python" ,python-wrapper)
1670 ("qtconnectivity" ,qtconnectivity)
1671 ("qtdeclarative" ,qtdeclarative)
1672 ("qtlocation" ,qtlocation)
1673 ("qtmultimedia" ,qtmultimedia)
1674 ("qtsensors" ,qtsensors)
1675 ("qtserialport" ,qtserialport)
1677 ("qttools" ,qttools)
1678 ("qtwebchannel" ,qtwebchannel)
1679 ;("qtwebkit" ,qtwebkit)
1680 ("qtwebsockets" ,qtwebsockets)
1681 ("qtx11extras" ,qtx11extras)
1682 ("qtxmlpatterns" ,qtxmlpatterns)))
1684 `(#:modules ((srfi srfi-1)
1685 ,@%gnu-build-system-modules)
1687 (modify-phases %standard-phases
1688 (add-after 'unpack 'fix-build-with-qt-5.11
1689 ;; See: https://bugs.gentoo.org/654742
1691 (substitute* "sip/QtTest/qtestmouse.sip"
1692 (("void waitForEvents\\(\\) /ReleaseGIL/;") ""))
1695 (lambda* (#:key inputs outputs #:allow-other-keys)
1696 (let* ((out (assoc-ref outputs "out"))
1697 (bin (string-append out "/bin"))
1698 (sip (string-append out "/share/sip"))
1699 (plugins (string-append out "/plugins"))
1700 (designer (string-append plugins "/designer"))
1701 (qml (string-append plugins "/PyQt5"))
1702 (python (assoc-ref inputs "python"))
1704 (last (string-split python #\-)))
1707 (take (string-split python-version #\.) 2)
1709 (lib (string-append out "/lib/python"
1712 (stubs (string-append lib "/PyQt5")))
1713 (zero? (system* "python" "configure.py"
1717 "--designer-plugindir" designer
1718 "--qml-plugindir" qml
1719 ; Where to install the PEP 484 Type Hints stub
1720 ; files. Without this the stubs are tried to be
1721 ; installed into the python package's
1722 ; site-package directory, which is read-only.
1724 "--sipdir" sip))))))))
1725 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1726 (synopsis "Python bindings for Qt")
1728 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1729 framework. The bindings are implemented as a set of Python modules and
1730 contain over 620 classes.")
1731 (license license:gpl3)))
1733 (define-public python2-pyqt
1734 (package (inherit python-pyqt)
1735 (name "python2-pyqt")
1737 `(("python-sip" ,python2-sip)
1738 ("qtbase" ,qtbase)))
1740 `(("python" ,python-2)
1741 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1743 (define-public python-pyqt-4
1744 (package (inherit python-pyqt)
1745 (name "python-pyqt")
1751 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1752 "PyQt-" version "/PyQt4_gpl_x11-"
1756 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
1758 `(("python-sip" ,python-sip)
1760 (inputs `(("python" ,python-wrapper)))
1762 `(#:tests? #f ; no check target
1763 #:modules ((srfi srfi-1)
1764 ,@%gnu-build-system-modules)
1766 (modify-phases %standard-phases
1768 (lambda* (#:key inputs outputs #:allow-other-keys)
1769 (let* ((out (assoc-ref outputs "out"))
1770 (bin (string-append out "/bin"))
1771 (sip (string-append out "/share/sip"))
1772 (python (assoc-ref inputs "python"))
1774 (last (string-split python #\-)))
1777 (take (string-split python-version #\.) 2)
1779 (lib (string-append out "/lib/python"
1782 (zero? (system* "python" "configure.py"
1786 "--sipdir" sip))))))))
1787 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1789 (define-public python2-pyqt-4
1790 (package (inherit python-pyqt-4)
1791 (name "python2-pyqt")
1793 `(("python-sip" ,python2-sip)
1796 `(("python" ,python-2)))))
1798 (define-public qscintilla
1804 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1805 "QScintilla-" version "/QScintilla_gpl-"
1809 "1rw1nlwnyzj5pb86cc5kk56qhrvwvrjvjzgrkwh3g7b9wxl7lrfj"))))
1810 (build-system gnu-build-system)
1813 (modify-phases %standard-phases
1815 (lambda* (#:key outputs #:allow-other-keys)
1816 (let ((out (assoc-ref outputs "out")))
1818 (substitute* "qscintilla.pro"
1819 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1820 (string-append out "/lib"))
1821 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1822 (string-append out "/include"))
1823 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1824 (string-append out "/translations"))
1825 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1826 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1827 (("\\$\\$\\[QT_HOST_DATA\\]")
1828 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
1829 (invoke "qmake")))))))
1830 (native-inputs `(("qtbase" ,qtbase)))
1831 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1832 (synopsis "Qt port of the Scintilla C++ editor control")
1833 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1834 editor control. QScintilla includes features especially useful when editing
1835 and debugging source code. These include support for syntax styling, error
1836 indicators, code completion and call tips.")
1837 (license license:gpl3+)))
1839 (define-public python-qscintilla
1840 (package (inherit qscintilla)
1841 (name "python-qscintilla")
1844 (list "--pyqt=PyQt5"
1845 (string-append "--pyqt-sipdir="
1846 (assoc-ref %build-inputs "python-pyqt")
1848 (string-append "--qsci-incdir="
1849 (assoc-ref %build-inputs "qscintilla")
1851 (string-append "--qsci-libdir="
1852 (assoc-ref %build-inputs "qscintilla")
1855 (modify-phases %standard-phases
1857 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1859 (apply invoke "python3" "configure.py"
1861 ;; Install to the right directory
1862 (substitute* '("Makefile"
1864 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
1865 (assoc-ref outputs "out")))
1868 `(("qscintilla" ,qscintilla)
1870 ("python-pyqt" ,python-pyqt)))
1871 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1872 editor control. QScintilla includes features especially useful when editing
1873 and debugging source code. These include support for syntax styling, error
1874 indicators, code completion and call tips.
1876 This package provides the Python bindings.")))
1878 ;; PyQt only looks for modules in its own directory. It ignores environment
1879 ;; variables such as PYTHONPATH, so we need to build a union package to make
1881 (define-public python-pyqt+qscintilla
1882 (package (inherit python-pyqt)
1883 (name "python-pyqt+qscintilla")
1885 (build-system trivial-build-system)
1887 '(#:modules ((guix build union))
1889 (use-modules (ice-9 match)
1891 (match %build-inputs
1892 (((names . directories) ...)
1893 (union-build (assoc-ref %outputs "out")
1897 `(("python-pyqt" ,python-pyqt)
1898 ("python-qscintilla" ,python-qscintilla)))
1899 (synopsis "Union of PyQt and the Qscintilla extension")
1901 "This package contains the union of PyQt and the Qscintilla extension.")))
1903 (define-public qtkeychain
1910 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1911 "archive/v" version ".tar.gz"))
1912 (file-name (string-append name "-" version ".tar.gz"))
1914 (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
1915 (build-system cmake-build-system)
1917 `(("pkg-config" ,pkg-config)
1918 ("qttools" ,qttools)))
1920 `(("qtbase" ,qtbase)))
1922 `(#:tests? #f ; No tests included
1924 (modify-phases %standard-phases
1926 'configure 'set-qt-trans-dir
1928 (substitute* "CMakeLists.txt"
1929 (("\\$\\{qt_translations_dir\\}")
1930 "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
1932 (home-page "https://github.com/frankosterfeld/qtkeychain")
1933 (synopsis "Qt API to store passwords")
1935 "QtKeychain is a Qt library to store passwords and other secret data
1936 securely. It will not store any data unencrypted unless explicitly requested.")
1937 (license license:bsd-3)))
1947 (string-append "mirror://sourceforge/qwt/qwt/"
1948 version "/qwt-" version ".tar.bz2"))
1950 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1951 (build-system gnu-build-system)
1953 `(("qtbase" ,qtbase)
1955 ("qttools" ,qttools)))
1958 (modify-phases %standard-phases
1960 (lambda* (#:key outputs #:allow-other-keys)
1961 (let* ((out (assoc-ref outputs "out"))
1962 (docdir (string-append out "/share/doc/qwt"))
1963 (incdir (string-append out "/include/qwt"))
1964 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
1965 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
1966 (substitute* '("qwtconfig.pri")
1967 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
1968 (format #f "~a = ~a\n" x out))
1969 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
1970 (format #f "~a = ~a\n" x docdir))
1971 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
1972 (format #f "~a = ~a\n" x incdir))
1973 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
1974 (format #f "~a = ~a\n" x pluginsdir))
1975 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
1976 (format #f "~a = ~a\n" x featuresdir)))
1977 (substitute* '("doc/doc.pro")
1978 ;; We'll install them in the 'install-man-pages' phase.
1979 (("^unix:doc\\.files.*") ""))
1980 (zero? (system* "qmake")))))
1981 (add-after 'install 'install-man-pages
1982 (lambda* (#:key outputs #:allow-other-keys)
1983 (let* ((out (assoc-ref outputs "out"))
1984 (man (string-append out "/share/man")))
1985 ;; Remove some incomplete manual pages.
1986 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1988 (copy-recursively "doc/man" man)
1990 (home-page "http://qwt.sourceforge.net")
1991 (synopsis "Qt widgets for plots, scales, dials and other technical software
1994 "The Qwt library contains widgets and components which are primarily useful
1995 for technical and scientific purposes. It includes a 2-D plotting widget,
1996 different kinds of sliders, and much more.")
1999 ;; The Qwt license is LGPL2.1 with some exceptions.
2000 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2001 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2002 license:lgpl2.1 license:gpl3))))
2004 (define-public qtwebkit
2011 (uri (string-append "https://download.qt.io/official_releases/qt/"
2012 (version-major+minor version) "/" version
2013 "/submodules/" name "-opensource-src-"
2017 "1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998"))))
2018 (build-system gnu-build-system)
2021 ("python" ,python-2.7)
2026 ("pkg-config" ,pkg-config)))
2029 ("libjpeg" ,libjpeg)
2031 ("libwebp" ,libwebp)
2033 ("fontconfig" ,fontconfig)
2034 ("libxrender" ,libxrender)
2036 ("qtdeclarative" ,qtdeclarative)
2037 ("qtmultimedia" ,qtmultimedia)
2038 ("libxml2" ,libxml2)
2039 ("libxslt" ,libxslt)
2041 ("libxcomposite" ,libxcomposite)))
2044 (modify-phases %standard-phases
2045 (add-before 'configure 'fix-qmlwebkit-plugins-rpath
2047 (substitute* "Source/WebKit/qt/declarative/experimental/experimental.pri"
2048 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
2049 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../../lib"))
2050 (substitute* "Source/WebKit/qt/declarative/public.pri"
2051 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
2052 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../lib"))
2055 (lambda* (#:key outputs #:allow-other-keys)
2056 (let ((out (assoc-ref outputs "out")))
2058 (string-append (getcwd) "/Tools/qmake:"
2059 (getenv "QMAKEPATH")))
2060 (system* "qmake"))))
2061 ;; prevent webkit from trying to install into the qtbase store directory,
2062 ;; and replace references to the build directory in linker options:
2063 (add-before 'build 'patch-installpaths
2064 (lambda* (#:key outputs inputs #:allow-other-keys)
2065 (let* ((out (assoc-ref outputs "out"))
2066 (qtbase (assoc-ref inputs "qtbase"))
2068 (linkbuild (string-append "-L" builddir))
2069 (linkout (string-append "-L" out))
2074 (mf (string-append (dirname in) "/"
2076 ;; by default, these Makefiles are
2077 ;; generated during install, but we need
2078 ;; to generate them now
2079 (system* "qmake" in "-o" mf)
2081 '(("Source/api.pri" . "Makefile.api")
2082 ("Source/widgetsapi.pri"
2083 . "Makefile.widgetsapi")
2084 ("Source/WebKit2/WebProcess.pro"
2085 . "Makefile.WebProcess")
2086 ("Source/WebKit2/PluginProcess.pro"
2087 . "Makefile.PluginProcess")
2088 ("Source/WebKit/qt/declarative/public.pri"
2089 . "Makefile.declarative.public")
2090 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
2091 . "Makefile.declarative.experimental")
2092 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
2094 ;; Order of qmake calls and substitutions matters here.
2095 (system* "qmake" "-prl" "Source/widgetsapi.pri"
2096 "-o" "Source/Makefile")
2097 (substitute* (find-files "lib" "libQt5.*\\.prl")
2098 ((linkbuild) linkout))
2099 (substitute* (find-files "lib"
2100 "libQt5WebKit.*\\.la")
2102 (string-append "libdir='" out "/lib'"))
2103 ((linkbuild) linkout))
2104 (substitute* (find-files "lib/pkgconfig"
2106 (((string-append "prefix=" qtbase))
2107 (string-append "prefix=" out))
2108 ((linkbuild) linkout))
2109 ;; Makefiles must be modified after .prl/.la/.pc
2110 ;; files, lest they get rebuilt:
2111 (substitute* makefiles
2112 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
2114 (((string-append "-Wl,-rpath," builddir))
2115 (string-append "-Wl,-rpath," out)))))))))
2116 (home-page "https://www.webkit.org")
2117 (synopsis "Web browser engine and classes to render and interact with web
2119 (description "QtWebKit provides a Web browser engine that makes it easy to
2120 embed content from the World Wide Web into your Qt application. At the same
2121 time Web content can be enhanced with native controls.")
2123 (license license:lgpl2.1+)))
2125 (define-public dotherside
2132 (uri (string-append "https://github.com/filcuc/DOtherSide/"
2133 "archive/v" version ".tar.gz"))
2134 (file-name (string-append name "-" version ".tar.gz"))
2137 "0azq7qlsrfdwbd6qsi7d3c1knn42qw0r47g43xf7clwbinapswpz"))))
2138 (build-system cmake-build-system)
2140 `(("qttools" ,qttools)))
2142 `(("qtbase" ,qtbase)
2143 ("qtdeclarative" ,qtdeclarative)))
2144 (home-page "https://github.com/frankosterfeld/qtkeychain")
2145 (synopsis "C language library for creating bindings for the Qt QML language")
2147 "DOtherSide is a C language library for creating bindings for the
2148 QT QML language. The following features are implementable from
2151 @item Creating custom QObject
2152 @item Creating custom QAbstractListModels
2153 @item Creating custom properties, signals and slots
2154 @item Creating from QML QObject defined in the binded language
2155 @item Creating from Singleton QML QObject defined in the binded language
2157 (license license:lgpl3))) ;version 3 only (+ exception)