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 ng0 <ng0@infotropique.org>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
10 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages qt)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix build utils)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system trivial)
36 #:use-module (guix packages)
37 #:use-module (guix utils)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages bison)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages cups)
42 #:use-module (gnu packages databases)
43 #:use-module (gnu packages documentation)
44 #:use-module (gnu packages fontutils)
45 #:use-module (gnu packages flex)
46 #:use-module (gnu packages freedesktop)
47 #:use-module (gnu packages gl)
48 #:use-module (gnu packages glib)
49 #:use-module (gnu packages gnuzilla)
50 #:use-module (gnu packages gperf)
51 #:use-module (gnu packages gstreamer)
52 #:use-module (gnu packages gtk)
53 #:use-module (gnu packages icu4c)
54 #:use-module (gnu packages image)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages maths)
57 #:use-module (gnu packages pciutils)
58 #:use-module (gnu packages pcre)
59 #:use-module (gnu packages perl)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages pulseaudio)
62 #:use-module (gnu packages python)
63 #:use-module (gnu packages ruby)
64 #:use-module (gnu packages sdl)
65 #:use-module (gnu packages tls)
66 #:use-module (gnu packages xdisorg)
67 #:use-module (gnu packages xorg)
68 #:use-module (gnu packages xml))
70 (define-public grantlee
77 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
79 (file-name (string-append name "-" version ".tar.gz"))
81 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
83 ;; Optional: lcov and cccc, both are for code coverage
84 `(("doxygen" ,doxygen)))
87 ("qtscript" ,qtscript)))
88 (build-system cmake-build-system)
91 (modify-phases %standard-phases
92 (add-before 'check 'check-setup
94 ;; make Qt render "offscreen", required for tests
95 (setenv "QT_QPA_PLATFORM" "offscreen")
97 (home-page "https://github.com/steveire/grantlee")
98 (synopsis "Libraries for text templating with Qt")
99 (description "Grantlee Templates can be used for theming and generation of
100 other text such as code. The syntax uses the syntax of the Django template
101 system, and the core design of Django is reused in Grantlee.")
102 (license license:lgpl2.0+)))
108 (outputs '("out" "examples"))
113 "http://download.qt.io/official_releases/qt/"
114 (version-major+minor version)
116 "/single/qt-everywhere-opensource-src-"
120 "1mblh8k04l13nk9fhhrr43h5bcph1gbz94j5y7csx8zvxb5xkb73"))
121 (modules '((guix build utils)))
124 ;; Remove qtwebengine, which relies on a bundled copy of
125 ;; chromium. Not only does it fail compilation in qt 5.5:
126 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
127 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
128 ;; it might also pose security problems.
129 ;; Alternatively, we could use the "-skip qtwebengine"
130 ;; configuration option.
131 (delete-file-recursively "qtwebengine")
132 ;; The following snippets are copied from their mondular-qt counterparts.
135 (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
136 (list "double-conversion" "freetype" "harfbuzz-ng"
137 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
141 (delete-file-recursively dir))
142 (list "qtimageformats/src/3rdparty"
143 "qtmultimedia/examples/multimedia/spectrum/3rdparty"
145 "qtcanvas3d/examples/canvas3d/3rdparty"))
146 ;; Tests depend on this example, which depends on the 3rd party code.
147 (substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
150 (build-system gnu-build-system)
154 `(("alsa-lib" ,alsa-lib)
158 ("double-conversion" ,double-conversion)
160 ("fontconfig" ,fontconfig)
161 ("freetype" ,freetype)
163 ("gstreamer" ,gstreamer)
164 ("gst-plugins-base" ,gst-plugins-base)
165 ("harfbuzz" ,harfbuzz)
168 ("libinput" ,libinput-minimal)
176 ("libxcomposite" ,libxcomposite)
177 ("libxcursor" ,libxcursor)
179 ("libxfixes" ,libxfixes)
181 ("libxinerama" ,libxinerama)
182 ("libxkbcommon" ,libxkbcommon)
184 ("libxrandr" ,libxrandr)
185 ("libxrender" ,libxrender)
192 ("postgresql" ,postgresql)
193 ("pulseaudio" ,pulseaudio)
197 ("unixodbc" ,unixodbc)
199 ("xcb-util" ,xcb-util)
200 ("xcb-util-image" ,xcb-util-image)
201 ("xcb-util-keysyms" ,xcb-util-keysyms)
202 ("xcb-util-renderutil" ,xcb-util-renderutil)
203 ("xcb-util-wm" ,xcb-util-wm)
210 ("pkg-config" ,pkg-config)
213 ("which" ,(@ (gnu packages base) which))))
216 (modify-phases %standard-phases
217 (add-after 'configure 'patch-bin-sh
219 (substitute* '("qtbase/configure"
220 "qtbase/mkspecs/features/qt_functions.prf"
221 "qtbase/qmake/library/qmakebuiltins.cpp")
222 (("/bin/sh") (which "sh")))
225 (lambda* (#:key outputs #:allow-other-keys)
226 (let ((out (assoc-ref outputs "out"))
227 (examples (assoc-ref outputs "examples")))
228 (substitute* '("configure" "qtbase/configure")
229 (("/bin/pwd") (which "pwd")))
230 (substitute* "qtbase/src/corelib/global/global.pri"
231 (("/bin/ls") (which "ls")))
232 ;; do not pass "--enable-fast-install", which makes the
233 ;; configure process fail
238 "-examplesdir" examples ; 89MiB
241 ;; Do not build examples; for the time being, we
242 ;; prefer to save the space and build time.
243 "-no-compile-examples"
244 ;; Most "-system-..." are automatic, but some use
245 ;; the bundled copy by default.
248 ;; explicitly link with openssl instead of dlopening it
250 ;; explicitly link with dbus instead of dlopening it
252 ;; don't use the precompiled headers
254 ;; drop special machine instructions not supported
255 ;; on all instances of the target
256 ,@(if (string-prefix? "x86_64"
257 (or (%current-target-system)
262 "-no-mips_dspr2"))))))))
263 (home-page "https://www.qt.io/")
264 (synopsis "Cross-platform GUI library")
265 (description "Qt is a cross-platform application and UI framework for
266 developers using C++ or QML, a CSS & JavaScript like language.")
267 (license license:lgpl2.1)
269 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
270 ;; see <http://hydra.gnu.org/build/112828>.
271 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
272 (supported-systems (delete "mips64el-linux" %supported-systems))))
275 (package (inherit qt)
279 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
280 (string-copy version 0 (string-rindex version #\.))
282 "/qt-everywhere-opensource-src-"
286 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
287 (patches (search-patches "qt4-ldflags.patch"))
288 (modules '((guix build utils)))
290 ;; Remove webkit module, which is not built.
291 '(begin (delete-file-recursively "src/3rdparty/webkit")
293 (inputs `(,@(alist-delete "harfbuzz"
294 (alist-delete "libjpeg" (package-inputs qt)))
295 ("libjepg" ,libjpeg-8)
298 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
299 ;; but we can't make them a separate output because "out" and "examples"
300 ;; would refer to each other.
301 (outputs '("out" ;112MiB core + 37MiB examples
302 "doc")) ;280MiB of HTML + code
305 (modify-phases %standard-phases
308 (lambda* (#:key outputs #:allow-other-keys)
309 (let ((out (assoc-ref outputs "out"))
310 (doc (assoc-ref outputs "doc")))
311 (substitute* '("configure")
312 (("/bin/pwd") (which "pwd")))
318 ;; Note: Don't pass '-docdir' since 'qmake' and
319 ;; libQtCore would record its value, thereby defeating
320 ;; the whole point of having a separate output.
321 "-datadir" (string-append out "/share/qt-" ,version
323 "-importdir" (string-append out "/lib/qt-4"
325 "-plugindir" (string-append out "/lib/qt-4"
327 "-translationdir" (string-append out "/share/qt-" ,version
329 "-demosdir" (string-append out "/share/qt-" ,version
331 "-examplesdir" (string-append out "/share/qt-" ,version
335 ;; explicitly link with dbus instead of dlopening it
337 ;; Skip the webkit module; it fails to build on armhf
338 ;; and, apart from that, may pose security risks.
340 ;; drop special machine instructions not supported
341 ;; on all instances of the target
342 ,@(if (string-prefix? "x86_64"
343 (or (%current-target-system)
357 (lambda* (#:key outputs #:allow-other-keys)
358 ;; Because of qt4-documentation-path.patch, documentation ends up
359 ;; being installed in OUT. Move it to the right place.
360 (let* ((out (assoc-ref outputs "out"))
361 (doc (assoc-ref outputs "doc"))
362 (olddoc (string-append out "/doc"))
363 (docdir (string-append doc "/share/doc/qt-" ,version)))
364 (mkdir-p (dirname docdir))
366 ;; Note: We can't use 'rename-file' here because OUT and DOC are
367 ;; different "devices" due to bind-mounts.
368 (copy-recursively olddoc docdir)
369 (delete-file-recursively olddoc)
372 (define-public qtbase
378 (uri (string-append "https://download.qt.io/official_releases/qt/"
379 (version-major+minor version) "/" version
380 "/submodules/" name "-opensource-src-"
384 "1kq422vb2zaic099pgzwk7c0qzgc3xap6qahw5vklrq0mgivvrk9"))
385 ;; Use TZDIR to avoid depending on package "tzdata".
386 (patches (search-patches "qtbase-use-TZDIR.patch"))
387 (modules '((guix build utils)))
389 ;; corelib uses bundled harfbuzz, md4, md5, sha3
393 (delete-file-recursively (string-append "src/3rdparty/" dir)))
394 (list "double-conversion" "freetype" "harfbuzz-ng"
395 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
398 (build-system gnu-build-system)
401 ("which" ,(@ (gnu packages base) which))))
403 `(("alsa-lib" ,alsa-lib)
406 ("double-conversion" ,double-conversion)
409 ("fontconfig" ,fontconfig)
410 ("freetype" ,freetype)
412 ("harfbuzz" ,harfbuzz)
414 ("libinput" ,libinput-minimal)
419 ("libxcomposite" ,libxcomposite)
420 ("libxcursor" ,libxcursor)
421 ("libxfixes" ,libxfixes)
423 ("libxinerama" ,libxinerama)
424 ("libxkbcommon" ,libxkbcommon)
426 ("libxrandr" ,libxrandr)
427 ("libxrender" ,libxrender)
435 ("postgresql" ,postgresql)
436 ("pulseaudio" ,pulseaudio)
438 ("unixodbc" ,unixodbc)
439 ("xcb-util" ,xcb-util)
440 ("xcb-util-image" ,xcb-util-image)
441 ("xcb-util-keysyms" ,xcb-util-keysyms)
442 ("xcb-util-renderutil" ,xcb-util-renderutil)
443 ("xcb-util-wm" ,xcb-util-wm)
450 ("pkg-config" ,pkg-config)
455 (modify-phases %standard-phases
456 (add-after 'configure 'patch-bin-sh
458 (substitute* '("config.status"
460 "mkspecs/features/qt_functions.prf"
461 "qmake/library/qmakebuiltins.cpp")
462 (("/bin/sh") (which "sh")))
465 (lambda* (#:key outputs #:allow-other-keys)
466 (let ((out (assoc-ref outputs "out")))
467 (substitute* "configure"
468 (("/bin/pwd") (which "pwd")))
469 (substitute* "src/corelib/global/global.pri"
470 (("/bin/ls") (which "ls")))
471 ;; The configuration files for other Qt5 packages are searched
472 ;; through a call to "find_package" in Qt5Config.cmake, which
473 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
474 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
475 ;; components can be installed in different places.
476 (substitute* (find-files "." ".*\\.cmake")
477 (("NO_DEFAULT_PATH") ""))
478 ;; do not pass "--enable-fast-install", which makes the
479 ;; configure process fail
484 "-docdir" (string-append out "/share/doc/qt5")
485 "-headerdir" (string-append out "/include/qt5")
486 "-archdatadir" (string-append out "/lib/qt5")
487 "-datadir" (string-append out "/share/qt5")
488 "-examplesdir" (string-append
489 out "/share/doc/qt5/examples")
492 ;; Do not build examples; if desired, these could go
493 ;; into a separate output, but for the time being, we
494 ;; prefer to save the space and build time.
495 "-no-compile-examples"
496 ;; Most "-system-..." are automatic, but some use
497 ;; the bundled copy by default.
501 ;; explicitly link with openssl instead of dlopening it
503 ;; explicitly link with dbus instead of dlopening it
505 ;; don't use the precompiled headers
507 ;; drop special machine instructions that do not have
509 ,@(if (string-prefix? "x86_64"
510 (or (%current-target-system)
515 "-no-mips_dspr2")))))
516 (add-after 'install 'patch-mkspecs
517 (lambda* (#:key outputs #:allow-other-keys)
518 (let* ((out (assoc-ref outputs "out"))
519 (archdata (string-append out "/lib/qt5"))
520 (mkspecs (string-append archdata "/mkspecs"))
521 (qt_config.prf (string-append
522 mkspecs "/features/qt_config.prf")))
523 ;; For each Qt module, let `qmake' uses search paths in the
524 ;; module directory instead of all in QT_INSTALL_PREFIX.
525 (substitute* qt_config.prf
526 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
527 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
528 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
529 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
530 (("\\$\\$\\[QT_HOST_LIBS\\]")
531 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
532 (("\\$\\$\\[QT_INSTALL_BINS\\]")
533 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
535 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
536 (substitute* (string-append mkspecs "/features/qt_functions.prf")
537 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
538 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
540 ;; Resolve qmake spec files within qtbase by absolute paths.
543 (string-append mkspecs "/features/" file))
544 '("device_config.prf" "moc.prf" "qt_build_config.prf"
545 "qt_config.prf" "winrt/package_manifest.prf"))
546 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
547 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
549 (add-after 'unpack 'patch-paths
550 ;; Use the absolute paths for dynamically loaded libs, otherwise
551 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
553 (lambda* (#:key inputs #:allow-other-keys)
555 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
556 "cross-libc" "libc"))))
557 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
558 "src/network/kernel/qhostinfo_unix.cpp")
559 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
560 (string-append a glibc "/lib/lib" b))))
561 ;; X11/locale (compose path)
562 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
563 ;; Don't search in /usr/…/X11/locale, …
564 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
565 (string-append "// " line))
566 ;; … but use libx11's path
567 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
568 (string-append a "\"" (assoc-ref inputs "libx11") b)))
570 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
571 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
572 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
574 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
575 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
576 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
577 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
578 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
581 (list (search-path-specification
582 (variable "QMAKEPATH")
583 (files '("lib/qt5")))
584 (search-path-specification
585 (variable "QML2_IMPORT_PATH")
586 (files '("lib/qt5/qml")))
587 (search-path-specification
588 (variable "QT_PLUGIN_PATH")
589 (files '("lib/qt5/plugins")))
590 (search-path-specification
591 (variable "XDG_DATA_DIRS")
593 (search-path-specification
594 (variable "XDG_CONFIG_DIRS")
595 (files '("etc/xdg")))))
596 (home-page "https://www.qt.io/")
597 (synopsis "Cross-platform GUI library")
598 (description "Qt is a cross-platform application and UI framework for
599 developers using C++ or QML, a CSS & JavaScript like language.")
600 (license (list license:lgpl2.1 license:lgpl3))))
603 (package (inherit qtbase)
608 (uri (string-append "https://download.qt.io/official_releases/qt/"
609 (version-major+minor version) "/" version
610 "/submodules/" name "-opensource-src-"
614 "0yh3an9rc7fh013cw3bm318ap6428icsmnj38hhg1w6lpwr2gwm2"))))
615 (propagated-inputs `())
616 (native-inputs `(("perl" ,perl)))
623 (modify-phases %standard-phases
624 (add-before 'configure 'configure-qmake
625 (lambda* (#:key inputs outputs #:allow-other-keys)
626 (let* ((out (assoc-ref outputs "out"))
627 (qtbase (assoc-ref inputs "qtbase"))
628 (tmpdir (string-append (getenv "TMPDIR")))
629 (qmake (string-append tmpdir "/qmake"))
630 (qt.conf (string-append tmpdir "/qt.conf")))
631 ;; Use qmake with a customized qt.conf to override install
633 (symlink (which "qmake") qmake)
634 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
635 (with-output-to-file qt.conf
641 Documentation=share/doc/qt5
644 LibraryExecutables=lib/qt5/libexec
647 Plugins=lib/qt5/plugins
648 Imports=lib/qt5/imports
649 Qml2Imports=lib/qt5/qml
650 Translations=share/qt5/translations
652 Examples=share/doc/qt5/examples
658 [EffectiveSourcePaths]
664 (lambda* (#:key inputs outputs #:allow-other-keys)
665 ;; Valid QT_BUILD_PARTS variables are:
666 ;; libs tools tests examples demos docs translations
667 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"))))
668 (add-before 'check 'set-display
670 ;; make Qt render "offscreen", required for tests
671 (setenv "QT_QPA_PLATFORM" "offscreen")
673 (synopsis "Qt module for displaying SVGs")
674 (description "The QtSvg module provides classes for displaying the
675 contents of SVG files.")))
677 (define-public qtimageformats
678 (package (inherit qtsvg)
679 (name "qtimageformats")
683 (uri (string-append "https://download.qt.io/official_releases/qt/"
684 (version-major+minor version) "/" version
685 "/submodules/" name "-opensource-src-"
689 "1nfxvf96wh1smdmcsk4m9f7zg69fgp844f8772qpv6v4m20p1qb9"))
690 (modules '((guix build utils)))
691 (snippet '(begin (delete-file-recursively "src/3rdparty")
702 (synopsis "Additional Image Format plugins for Qt")
703 (description "The QtImageFormats module contains plugins for adding
704 support for MNG, TGA, TIFF and WBMP image formats.")))
706 (define-public qtx11extras
707 (package (inherit qtsvg)
712 (uri (string-append "https://download.qt.io/official_releases/qt/"
713 (version-major+minor version) "/" version
714 "/submodules/" name "-opensource-src-"
718 "1a125fi7lbxfps207i12jammm4cjbiawmp4sqa3bxqah8p21i6w7"))))
720 (substitute-keyword-arguments (package-arguments qtsvg)
721 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
722 (native-inputs `(("perl" ,perl)))
726 (synopsis "Qt Extras for X11")
727 (description "The QtX11Extras module includes the library to access X11
728 from within Qt 5.")))
730 (define-public qtxmlpatterns
731 (package (inherit qtsvg)
732 (name "qtxmlpatterns")
736 (uri (string-append "https://download.qt.io/official_releases/qt/"
737 (version-major+minor version) "/" version
738 "/submodules/" name "-opensource-src-"
742 "0ybz0i3wblvrm958s9ykp3a79bakjbb7k74q71mqaaswkv9imxgs"))))
744 (substitute-keyword-arguments (package-arguments qtsvg)
746 `(modify-phases ,phases
747 (add-after 'unpack 'disable-network-tests
748 (lambda _ (substitute* "tests/auto/auto.pro"
749 (("qxmlquery") "# qxmlquery")
750 (("xmlpatterns ") "# xmlpatterns"))
752 (native-inputs `(("perl" ,perl)))
753 (inputs `(("qtbase" ,qtbase)))
754 (synopsis "Qt XML patterns module")
755 (description "The QtXmlPatterns module is a XQuery and XPath engine for
756 XML and custom data models. It contains programs such as xmlpatterns and
757 xmlpatternsvalidator.")))
759 (define-public qtdeclarative
760 (package (inherit qtsvg)
761 (name "qtdeclarative")
765 (uri (string-append "https://download.qt.io/official_releases/qt/"
766 (version-major+minor version) "/" version
767 "/submodules/" name "-opensource-src-"
771 "0r9dhfc6qmxlzn2v9r6z6n2mcq6pv1nmyh91g9hcdlkx40xqlqyw"))))
773 (substitute-keyword-arguments (package-arguments qtsvg)
774 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
777 ("pkg-config" ,pkg-config)
780 ("qtxmlpatterns" ,qtxmlpatterns)))
784 (synopsis "Qt QML module (Quick 2)")
785 (description "The Qt QML module provides a framework for developing
786 applications and libraries with the QML language. It defines and implements the
787 language and engine infrastructure, and provides an API to enable application
788 developers to extend the QML language with custom types and integrate QML code
789 with JavaScript and C++.")))
791 (define-public qtconnectivity
792 (package (inherit qtsvg)
793 (name "qtconnectivity")
797 (uri (string-append "https://download.qt.io/official_releases/qt/"
798 (version-major+minor version) "/" version
799 "/submodules/" name "-opensource-src-"
803 "12qckqz6ldvn1czkkigadmgl07yk4gs74hy4ifh4hmpm7cv519yv"))))
805 (substitute-keyword-arguments (package-arguments qtsvg)
807 `(modify-phases ,phases
808 (add-after 'unpack 'disable-failing-tests
809 ;; this test fails on armhf and aarch64
811 (substitute* "tests/auto/qndefnfcsmartposterrecord/tst_qndefnfcsmartposterrecord.cpp"
812 (("QCOMPARE\\(record.action\\(\\), QNdefNfcSmartPosterRecord::UnspecifiedAction")
813 "//QCOMPARE(record.action(), QNdefNfcSmartPosterRecord::UnspecifiedAction"))
817 ("pkg-config" ,pkg-config)
818 ("qtdeclarative" ,qtdeclarative)))
822 (synopsis "Qt Connectivity module")
823 (description "The Qt Connectivity modules provides modules for interacting
824 with Bluetooth and NFC.")))
826 (define-public qtwebsockets
827 (package (inherit qtsvg)
828 (name "qtwebsockets")
832 (uri (string-append "https://download.qt.io/official_releases/qt/"
833 (version-major+minor version) "/" version
834 "/submodules/" name "-opensource-src-"
838 "00786d9m8skj68n5x9d8151zmmskx7ckhgcdd08hs9nly04h55vj"))))
840 (substitute-keyword-arguments (package-arguments qtsvg)
841 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
844 ("qtdeclarative" ,qtdeclarative)))
845 (inputs `(("qtbase" ,qtbase)))
846 (synopsis "Qt Web Sockets module")
847 (description "WebSocket is a web-based protocol designed to enable two-way
848 communication between a client application and a remote host. The Qt
849 WebSockets module provides C++ and QML interfaces that enable Qt applications
850 to act as a server that can process WebSocket requests, or a client that can
851 consume data received from the server, or both.")))
853 (define-public qtsensors
854 (package (inherit qtsvg)
859 (uri (string-append "https://download.qt.io/official_releases/qt/"
860 (version-major+minor version) "/" version
861 "/submodules/" name "-opensource-src-"
865 "0n6lkkn7c9x8vcplmfvkx7jq6najh2mrwnfb3blrmkmpash3lgvr"))))
867 (substitute-keyword-arguments (package-arguments qtsvg)
868 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
870 `(modify-phases ,phases
871 (add-after 'unpack 'fix-tests
873 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
874 (("2000") "5000") ;lengthen test timeout
875 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
879 ("qtdeclarative" ,qtdeclarative)))
880 (inputs `(("qtbase" ,qtbase)))
881 (synopsis "Qt Sensors module")
882 (description "The Qt Sensors API provides access to sensor hardware via QML
883 and C++ interfaces. The Qt Sensors API also provides a motion gesture
884 recognition API for devices.")))
886 (define-public qtmultimedia
887 (package (inherit qtsvg)
888 (name "qtmultimedia")
892 (uri (string-append "https://download.qt.io/official_releases/qt/"
893 (version-major+minor version) "/" version
894 "/submodules/" name "-opensource-src-"
898 "0x2f3vpax7rq0lxnncbp5b248bxdicrwn8hv4hsas2g2283s0lj9"))
899 (modules '((guix build utils)))
902 (delete-file-recursively
903 "examples/multimedia/spectrum/3rdparty")
904 ;; We also prevent the spectrum example from being built.
905 (substitute* "examples/multimedia/multimedia.pro"
909 (substitute-keyword-arguments (package-arguments qtsvg)
911 `(modify-phases ,phases
913 (lambda* (#:key outputs #:allow-other-keys)
914 (let ((out (assoc-ref outputs "out")))
915 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
916 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
917 (string-append "PREFIX=" out))))))))
918 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
921 ("pkg-config" ,pkg-config)
923 ("qtdeclarative" ,qtdeclarative)))
925 `(("alsa-lib" ,alsa-lib)
927 ("pulseaudio" ,pulseaudio)
929 ;; Gstreamer is needed for the mediaplayer plugin
930 ("gstreamer" ,gstreamer)
931 ("gst-plugins-base" ,gst-plugins-base)))
932 (synopsis "Qt Multimedia module")
933 (description "The Qt Multimedia module provides set of APIs to play and
934 record media, and manage a collection of media content. It also contains a
935 set of plugins for interacting with pulseaudio and GStreamer.")))
937 (define-public qtwayland
938 (package (inherit qtsvg)
943 (uri (string-append "https://download.qt.io/official_releases/qt/"
944 (version-major+minor version) "/" version
945 "/submodules/" name "-opensource-src-"
949 "0x4q17k23akf14i3pyllr96s8lvprk1x006wp0mi5rhk4199cx1z"))
950 (modules '((guix build utils)))
952 ;; The examples try to build and cause the build to fail
953 '(begin (delete-file-recursively "examples")
956 (substitute-keyword-arguments (package-arguments qtsvg)
958 `(modify-phases ,phases
959 (add-before 'check 'set-ld-library-path
960 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
962 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
963 ;; wayland platform plugin.
965 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
970 ("pkg-config" ,pkg-config)
971 ("qtdeclarative" ,qtdeclarative)))
973 `(("fontconfig" ,fontconfig)
974 ("freetype" ,freetype)
976 ("libxcomposite" ,libxcomposite)
978 ("libxkbcommon" ,libxkbcommon)
979 ("libxrender" ,libxrender)
983 ("wayland" ,wayland)))
984 (synopsis "Qt Wayland module")
985 (description "The Qt Wayland module provides the QtWayland client and
986 compositor libraries.")))
988 (define-public qtserialport
989 (package (inherit qtsvg)
990 (name "qtserialport")
994 (uri (string-append "https://download.qt.io/official_releases/qt/"
995 (version-major+minor version) "/" version
996 "/submodules/" name "-opensource-src-"
1000 "172i5cpqnk0c3m0hg08hgj15qvsyd1xvw9yf2dqicg3l10lqwg8c"))))
1001 (native-inputs `(("perl" ,perl)))
1003 `(("qtbase" ,qtbase)
1006 (substitute-keyword-arguments (package-arguments qtsvg)
1008 `(modify-phases ,phases
1009 (add-after 'unpack 'patch-dlopen-paths
1010 (lambda* (#:key inputs #:allow-other-keys)
1011 (substitute* "src/serialport/qtudev_p.h"
1012 ;; Use the absolute paths for dynamically loaded libs,
1013 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1014 ;; typically is not set in guix.
1015 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1016 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1018 (synopsis "Qt Serial Port module")
1019 (description "The Qt Serial Port module provides the library for
1020 interacting with serial ports from within Qt.")))
1022 (define-public qtserialbus
1023 (package (inherit qtsvg)
1024 (name "qtserialbus")
1028 (uri (string-append "https://download.qt.io/official_releases/qt/"
1029 (version-major+minor version) "/" version
1030 "/submodules/" name "-opensource-src-"
1034 "1i6b7w9z30mzzi0dcmrxx1scpzpnnw2fag1igvrnzvw1jwp414ff"))))
1036 `(("qtbase" ,qtbase)
1037 ("qtserialport" ,qtserialport)))
1038 (synopsis "Qt Serial Bus module")
1039 (description "The Qt Serial Bus API provides classes and functions to
1040 access the various industrial serial buses and protocols, such as CAN, ModBus,
1043 (define-public qtwebchannel
1044 (package (inherit qtsvg)
1045 (name "qtwebchannel")
1049 (uri (string-append "https://download.qt.io/official_releases/qt/"
1050 (version-major+minor version) "/" version
1051 "/submodules/" name "-opensource-src-"
1055 "1acs0fa5rxm3cir0lydc9a8685qagf1786vkssv51wk3v9r3lc4h"))))
1058 ("qtdeclarative" ,qtdeclarative)
1059 ("qtwebsockets" ,qtwebsockets)))
1060 (inputs `(("qtbase" ,qtbase)))
1061 (synopsis "Web communication library for Qt")
1062 (description "The Qt WebChannel module enables peer-to-peer communication
1063 between the host (QML/C++ application) and the client (HTML/JavaScript
1064 application). The transport mechanism is supported out of the box by the two
1065 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1067 (define-public qtlocation
1068 (package (inherit qtsvg)
1073 (uri (string-append "https://download.qt.io/official_releases/qt/"
1074 (version-major+minor version) "/" version
1075 "/submodules/" name "-opensource-src-"
1079 "186jzv19v674n8jmm13v5xwv211lygih5657rlvbhc1s4jq6iv9p"))))
1081 (substitute-keyword-arguments (package-arguments qtsvg)
1082 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1085 ("qtdeclarative" ,qtdeclarative)
1086 ("qtquickcontrols" ,qtquickcontrols)
1087 ("qtserialport" ,qtserialport)))
1090 ("openssl" ,openssl)
1093 (synopsis "Qt Location and Positioning modules")
1094 (description "The Qt Location module provides an interface for location,
1095 positioning and geolocation plugins.")))
1097 (define-public qttools
1098 (package (inherit qtsvg)
1103 (uri (string-append "https://download.qt.io/official_releases/qt/"
1104 (version-major+minor version) "/" version
1105 "/submodules/" name "-opensource-src-"
1109 "11vfk6c8snsqwqj1xk53c0h2mkqr4gfa9kinp8py56x7sn15galm"))))
1111 (substitute-keyword-arguments (package-arguments qtsvg)
1112 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1115 ("qtdeclarative" ,qtdeclarative)))
1118 ("qtbase" ,qtbase)))
1119 (synopsis "Qt Tools and Designer modules")
1120 (description "The Qt Tools module provides a set of applications to browse
1121 the documentation, translate applications, generate help files and other stuff
1122 that helps in Qt development.")))
1124 (define-public qtscript
1125 (package (inherit qtsvg)
1130 (uri (string-append "https://download.qt.io/official_releases/qt/"
1131 (version-major+minor version) "/" version
1132 "/submodules/" name "-opensource-src-"
1136 "0lz0iv1baah7cxrpyiqzqp4fxxf75i21qd06ha7r5d80hq3xlia0"))
1137 (patches (search-patches "qtscript-disable-tests.patch"))))
1140 ("qttools" ,qttools)))
1142 `(("qtbase" ,qtbase)))
1143 (synopsis "Qt Script module")
1144 (description "Qt provides support for application scripting with ECMAScript.
1145 The following guides and references cover aspects of programming with
1146 ECMAScript and Qt.")))
1148 (define-public qtquickcontrols
1149 (package (inherit qtsvg)
1150 (name "qtquickcontrols")
1154 (uri (string-append "https://download.qt.io/official_releases/qt/"
1155 (version-major+minor version) "/" version
1156 "/submodules/" name "-opensource-src-"
1160 "12yrmv6afjbd1fw3r8zjdrbq5l7cy7k5bxcyiv1m97gykfh0b8hn"))))
1162 (substitute-keyword-arguments (package-arguments qtsvg)
1163 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1165 `(("qtbase" ,qtbase)
1166 ("qtdeclarative" ,qtdeclarative)))
1167 (synopsis "Qt Quick Controls and other Quick modules")
1168 (description "The QtScript module provides classes for making Qt
1169 applications scriptable. This module provides a set of extra components that
1170 can be used to build complete interfaces in Qt Quick.")))
1172 (define-public qtquickcontrols2
1173 (package (inherit qtsvg)
1174 (name "qtquickcontrols2")
1178 (uri (string-append "https://download.qt.io/official_releases/qt/"
1179 (version-major+minor version) "/" version
1180 "/submodules/" name "-opensource-src-"
1184 "0334ayansm743kf113rs3k9hi9qb6giscfx9xig3y1z7asisfa0m"))))
1186 (substitute-keyword-arguments (package-arguments qtsvg)
1187 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1189 `(("qtbase" ,qtbase)
1190 ("qtdeclarative" ,qtdeclarative)))
1191 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1192 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1193 module that provides platform integration: native dialogs, menus and menu bars,
1194 and tray icons. It falls back to Qt Widgets when a native implementation is
1197 (define-public qtgraphicaleffects
1198 (package (inherit qtsvg)
1199 (name "qtgraphicaleffects")
1203 (uri (string-append "https://download.qt.io/official_releases/qt/"
1204 (version-major+minor version) "/" version
1205 "/submodules/" name "-opensource-src-"
1209 "1vxq4j7cb5cya1g234rxhfb361n45gp8c70gj8pc03njswkm7xwp"))))
1211 (substitute-keyword-arguments (package-arguments qtsvg)
1212 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1214 `(("qtbase" ,qtbase)
1215 ("qtdeclarative" ,qtdeclarative)))
1216 (synopsis "Qt Graphical Effects module")
1217 (description "The Qt Graphical Effects module provides a set of QML types
1218 for adding visually impressive and configurable effects to user interfaces.
1219 Effects are visual items that can be added to Qt Quick user interface as UI
1220 components. The API consists of over 20 effects provided as separate QML
1221 types. The effects cover functional areas such as blending, masking, blurring,
1222 coloring, and many more.")))
1224 (define-public qtdeclarative-render2d
1225 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
1226 (package (inherit qtsvg)
1227 (name "qtdeclarative-render2d")
1231 (uri (string-append "https://download.qt.io/official_releases/qt/"
1232 (version-major+minor version) "/" version
1233 "/submodules/" name "-opensource-src-"
1237 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1238 (modules '((guix build utils)))
1240 '(begin (delete-file-recursively "tools/opengldummy/3rdparty")
1244 `(("qtbase" ,qtbase)
1245 ("qtdeclarative" ,qtdeclarative)))
1246 (synopsis "Qt Declarative Render module")
1247 (description "The Qt Declarative Render 2D module provides a Raster
1248 backend for QtQuick scene graph.")
1249 (properties `((superseded . ,qtdeclarative)))))
1251 (define-public qtgamepad
1252 (package (inherit qtsvg)
1257 (uri (string-append "https://download.qt.io/official_releases/qt/"
1258 (version-major+minor version) "/" version
1259 "/submodules/" name "-opensource-src-"
1263 "1ci6aapq0i8qbzkn9xxvxn1n81z3y28yrlyzw0anqzj9qp97cl6f"))))
1266 ("pkg-config" ,pkg-config)))
1268 `(("fontconfig" ,fontconfig)
1269 ("freetype" ,freetype)
1270 ("libxrender" ,libxrender)
1273 ("qtdeclarative" ,qtdeclarative)))
1274 (synopsis "Qt Gamepad module")
1275 (description "The Qt Gamepad module is an add-on library that enables Qt
1276 applications to support the use of gamepad hardware and in some cases remote
1277 control equipment. The module provides both QML and C++ interfaces. The
1278 primary target audience are embedded devices with fullscreen user interfaces,
1279 and mobile applications targeting TV-like form factors.")))
1281 (define-public qtscxml
1282 (package (inherit qtsvg)
1287 (uri (string-append "https://download.qt.io/official_releases/qt/"
1288 (version-major+minor version) "/" version
1289 "/submodules/" name "-opensource-src-"
1293 "0x8bjp9jzib4kfn7rbricw4qr259qqsdbrz0dw39453s2m7cbv0x"))
1294 (modules '((guix build utils)))
1297 (delete-file-recursively "tests/3rdparty")
1298 ;; the scion test refers to the bundled 3rd party test code.
1299 (substitute* "tests/auto/auto.pro"
1303 `(("qtbase" ,qtbase)
1304 ("qtdeclarative" ,qtdeclarative)))
1305 (synopsis "Qt SCXML module")
1306 (description "The Qt SCXML module provides functionality to create state
1307 machines from SCXML files. This includes both dynamically creating state
1308 machines (loading the SCXML file and instantiating states and transitions) and
1309 generating a C++ file that has a class implementing the state machine. It
1310 also contains functionality to support data models and executable content.")))
1312 (define-public qtpurchasing
1313 (package (inherit qtsvg)
1314 (name "qtpurchasing")
1318 (uri (string-append "https://download.qt.io/official_releases/qt/"
1319 (version-major+minor version) "/" version
1320 "/submodules/" name "-opensource-src-"
1324 "08sk8vw16pa1qv36rfr9dsbzlwlv6kznfpsq8wfabhkgbfl6awqs"))))
1326 `(("qtbase" ,qtbase)
1327 ("qtdeclarative" ,qtdeclarative)))
1328 (synopsis "Qt Purchasing module")
1329 (description "The Qt Purchasing module provides and in-app API for
1330 purchasing goods and services.")))
1332 (define-public qtcanvas3d
1333 (package (inherit qtsvg)
1338 (uri (string-append "https://download.qt.io/official_releases/qt/"
1339 (version-major+minor version) "/" version
1340 "/submodules/" name "-opensource-src-"
1344 "0agdxgk7knf6zkjdi6316y2k9zq72wcg5zn3cbhw4hzjw81qadgg"))
1345 (modules '((guix build utils)))
1347 '(begin (delete-file-recursively "examples/canvas3d/3rdparty")
1350 (substitute-keyword-arguments (package-arguments qtsvg)
1351 ;; Building the tests depends on the bundled 3rd party javascript files,
1352 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1353 ;; fail, so we skip building them for now.
1355 `(modify-phases ,phases
1357 (lambda* (#:key outputs #:allow-other-keys)
1358 (let ((out (assoc-ref outputs "out")))
1359 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools"
1360 (string-append "PREFIX=" out))))))))
1361 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1364 `(("qtbase" ,qtbase)
1365 ("qtdeclarative" ,qtdeclarative)))
1366 (synopsis "Qt Canvas 3D module")
1367 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1368 drawing calls from Qt Quick JavaScript.")))
1370 (define-public qtcharts
1371 (package (inherit qtsvg)
1376 (uri (string-append "https://download.qt.io/official_releases/qt/"
1377 (version-major+minor version) "/" version
1378 "/submodules/" name "-opensource-src-"
1382 "1rykb72gr95rxd0rvbl846ys8xvyyhrms1jz7l4hlwp6zn1jkxvm"))))
1384 (substitute-keyword-arguments (package-arguments qtsvg)
1385 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1387 `(("qtbase" ,qtbase)
1388 ("qtdeclarative" ,qtdeclarative)))
1389 (synopsis "Qt Charts module")
1390 (description "The Qt Charts module provides a set of easy to use chart
1391 components. It uses the Qt Graphics View Framework, therefore charts can be
1392 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1393 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1394 selecting one of the charts themes.")
1395 (license license:gpl3)))
1397 (define-public qtdatavis3d
1398 (package (inherit qtsvg)
1399 (name "qtdatavis3d")
1403 (uri (string-append "https://download.qt.io/official_releases/qt/"
1404 (version-major+minor version) "/" version
1405 "/submodules/" name "-opensource-src-"
1409 "1ggwfnqf17mp5dkfr82q1qrimkb6wv3304vl8mjv1nq0zisckhjv"))))
1411 (substitute-keyword-arguments (package-arguments qtsvg)
1412 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1414 `(("qtbase" ,qtbase)
1415 ("qtdeclarative" ,qtdeclarative)))
1416 (synopsis "Qt Data Visualization module")
1417 (description "The Qt Data Visualization module provides a way to visualize
1418 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1419 visualizing depth maps and large quantities of rapidly changing data, such as
1420 data received from multiple sensors. The look and feel of graphs can be
1421 customized by using themes or by adding custom items and labels to them.")
1422 (license license:gpl3)))
1424 (define-public qtnetworkauth
1425 (package (inherit qtsvg)
1426 (name "qtnetworkauth")
1430 (uri (string-append "https://download.qt.io/official_releases/qt/"
1431 (version-major+minor version) "/" version
1432 "/submodules/" name "-opensource-src-"
1436 "0mqcqkp9h5bgzb3wfy239wh1c9s9zxd7mww11c0jyp56wk5balcx"))))
1438 (substitute-keyword-arguments (package-arguments qtsvg)
1440 `(modify-phases ,phases
1441 (add-after 'unpack 'remove-failing-test
1443 ;; These tests can't find their test data.
1444 (substitute* "tests/auto/auto.pro"
1445 (("oauth1 ") "# oauth1 "))
1448 `(("qtbase" ,qtbase)))
1449 (synopsis "Qt Network Authorization module")
1450 (description "The Qt Network Authorization module provides an
1451 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1453 (define-public qtremoteobjects
1454 (package (inherit qtsvg)
1455 (name "qtremoteobjects")
1459 (uri (string-append "https://download.qt.io/official_releases/qt/"
1460 (version-major+minor version) "/" version
1461 "/submodules/" name "-opensource-src-"
1465 "1wb50dapv0l45c0rfmpiaddvwv9na50lmd5zmm052q9d1xb15f6b"))))
1467 `(("qtbase" ,qtbase)
1468 ("qtdeclarative" ,qtdeclarative)))
1469 (synopsis "Qt Remote Objects module")
1470 (description "The Qt Remote Objects module is an @dfn{inter-process
1471 communication} (IPC) module developed for Qt. The idea is to extend existing
1472 Qt's functionalities to enable an easy exchange of information between
1473 processes or computers.")))
1475 (define-public qtspeech
1476 (package (inherit qtsvg)
1481 (uri (string-append "https://download.qt.io/official_releases/qt/"
1482 (version-major+minor version) "/" version
1483 "/submodules/" name "-opensource-src-"
1487 "17h8hrixxcsn7pd5iipbj2hxpp5m2dhfq3w04wkamambb49qs80x"))))
1489 `(("qtbase" ,qtbase)))
1492 ("qtdeclarative" ,qtdeclarative)
1493 ("qtmultimedia" ,qtmultimedia)
1494 ("qtxmlpatterns" ,qtxmlpatterns)))
1495 (synopsis "Qt Speech module")
1496 (description "The Qt Speech module enables a Qt application to support
1497 accessibility features such as text-to-speech, which is useful for end-users
1498 who are visually challenged or cannot access the application for whatever
1499 reason. The most common use case where text-to-speech comes in handy is when
1500 the end-user is driving and cannot attend the incoming messages on the phone.
1501 In such a scenario, the messaging application can read out the incoming
1504 (define-public python-sip
1512 (string-append "mirror://sourceforge/pyqt/sip/"
1513 "sip-" version "/sip-" version ".tar.gz"))
1516 "0x2bghbprwl3az1ni3p87i0bq8r99694la93kg65vi0cz12gh3bl"))))
1517 (build-system gnu-build-system)
1519 `(("python" ,python-wrapper)))
1521 `(#:tests? #f ; no check target
1522 #:modules ((srfi srfi-1)
1523 ,@%gnu-build-system-modules)
1525 (modify-phases %standard-phases
1527 (lambda* (#:key inputs outputs #:allow-other-keys)
1528 (let* ((out (assoc-ref outputs "out"))
1529 (bin (string-append out "/bin"))
1530 (include (string-append out "/include"))
1531 (python (assoc-ref inputs "python"))
1533 (last (string-split python #\-)))
1536 (take (string-split python-version #\.) 2)
1538 (lib (string-append out "/lib/python"
1542 (system* "python" "configure.py"
1545 "--incdir" include))))))))
1546 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1547 (synopsis "Python binding creator for C and C++ libraries")
1549 "SIP is a tool to create Python bindings for C and C++ libraries. It
1550 was originally developed to create PyQt, the Python bindings for the Qt
1551 toolkit, but can be used to create bindings for any C or C++ library.
1553 SIP comprises a code generator and a Python module. The code generator
1554 processes a set of specification files and generates C or C++ code, which
1555 is then compiled to create the bindings extension module. The SIP Python
1556 module provides support functions to the automatically generated code.")
1557 ;; There is a choice between a python like license, gpl2 and gpl3.
1558 ;; For compatibility with pyqt, we need gpl3.
1559 (license license:gpl3)))
1561 (define-public python2-sip
1562 (package (inherit python-sip)
1563 (name "python2-sip")
1565 `(("python" ,python-2)))))
1567 (define-public python-pyqt
1569 (name "python-pyqt")
1575 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1576 "PyQt-" version "/PyQt5_gpl-"
1580 "15hh4z5vd45dcswjla58q6rrfr6ic7jfz2n7c8lwfb10rycpj3mb"))
1581 (patches (search-patches "pyqt-configure.patch"))))
1582 (build-system gnu-build-system)
1584 `(("qtbase" ,qtbase))) ; for qmake
1586 `(("python-sip" ,python-sip)))
1588 `(("python" ,python-wrapper)
1590 ("qtconnectivity" ,qtconnectivity)
1591 ("qtdeclarative" ,qtdeclarative)
1592 ("qtlocation" ,qtlocation)
1593 ("qtmultimedia" ,qtmultimedia)
1594 ("qtsensors" ,qtsensors)
1595 ("qtserialport" ,qtserialport)
1597 ("qttools" ,qttools)
1598 ("qtwebchannel" ,qtwebchannel)
1599 ("qtwebkit" ,qtwebkit)
1600 ("qtwebsockets" ,qtwebsockets)
1601 ("qtx11extras" ,qtx11extras)
1602 ("qtxmlpatterns" ,qtxmlpatterns)))
1604 `(#:modules ((srfi srfi-1)
1605 ,@%gnu-build-system-modules)
1607 (modify-phases %standard-phases
1609 (lambda* (#:key inputs outputs #:allow-other-keys)
1610 (let* ((out (assoc-ref outputs "out"))
1611 (bin (string-append out "/bin"))
1612 (sip (string-append out "/share/sip"))
1613 (plugins (string-append out "/plugins"))
1614 (designer (string-append plugins "/designer"))
1615 (qml (string-append plugins "/PyQt5"))
1616 (python (assoc-ref inputs "python"))
1618 (last (string-split python #\-)))
1621 (take (string-split python-version #\.) 2)
1623 (lib (string-append out "/lib/python"
1626 (stubs (string-append lib "/PyQt5")))
1627 (zero? (system* "python" "configure.py"
1631 "--designer-plugindir" designer
1632 "--qml-plugindir" qml
1633 ; Where to install the PEP 484 Type Hints stub
1634 ; files. Without this the stubs are tried to be
1635 ; installed into the python package's
1636 ; site-package directory, which is read-only.
1638 "--sipdir" sip))))))))
1639 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1640 (synopsis "Python bindings for Qt")
1642 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1643 framework. The bindings are implemented as a set of Python modules and
1644 contain over 620 classes.")
1645 (license license:gpl3)))
1647 (define-public python2-pyqt
1648 (package (inherit python-pyqt)
1649 (name "python2-pyqt")
1651 `(("python-sip" ,python2-sip)
1652 ("qtbase" ,qtbase)))
1654 `(("python" ,python-2)
1655 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1657 (define-public python-pyqt-4
1658 (package (inherit python-pyqt)
1659 (name "python-pyqt")
1665 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1666 "PyQt-" version "/PyQt4_gpl_x11-"
1670 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
1672 `(("python-sip" ,python-sip)
1674 (inputs `(("python" ,python-wrapper)))
1676 `(#:tests? #f ; no check target
1677 #:modules ((srfi srfi-1)
1678 ,@%gnu-build-system-modules)
1680 (modify-phases %standard-phases
1682 (lambda* (#:key inputs outputs #:allow-other-keys)
1683 (let* ((out (assoc-ref outputs "out"))
1684 (bin (string-append out "/bin"))
1685 (sip (string-append out "/share/sip"))
1686 (python (assoc-ref inputs "python"))
1688 (last (string-split python #\-)))
1691 (take (string-split python-version #\.) 2)
1693 (lib (string-append out "/lib/python"
1696 (zero? (system* "python" "configure.py"
1700 "--sipdir" sip))))))))
1701 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1703 (define-public python2-pyqt-4
1704 (package (inherit python-pyqt-4)
1705 (name "python2-pyqt")
1707 `(("python-sip" ,python2-sip)
1710 `(("python" ,python-2)))))
1712 (define-public qscintilla
1718 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1719 "QScintilla-" version "/QScintilla_gpl-"
1723 "1l2ylsv6s3wfhyx7qr5cxgkwwwhvbrpd2k7akgm9bvbyf4h1vcql"))))
1724 (build-system gnu-build-system)
1727 (modify-phases %standard-phases
1729 (lambda* (#:key outputs #:allow-other-keys)
1730 (let ((out (assoc-ref outputs "out")))
1732 (substitute* "qscintilla.pro"
1733 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1734 (string-append out "/lib"))
1735 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1736 (string-append out "/include"))
1737 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1738 (string-append out "/translations"))
1739 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1740 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1741 (("\\$\\$\\[QT_HOST_DATA\\]")
1742 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
1743 (invoke "qmake")))))))
1744 (native-inputs `(("qtbase" ,qtbase)))
1745 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1746 (synopsis "Qt port of the Scintilla C++ editor control")
1747 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1748 editor control. QScintilla includes features especially useful when editing
1749 and debugging source code. These include support for syntax styling, error
1750 indicators, code completion and call tips.")
1751 (license license:gpl3+)))
1753 (define-public python-qscintilla
1754 (package (inherit qscintilla)
1755 (name "python-qscintilla")
1758 (list "--pyqt=PyQt5"
1759 (string-append "--pyqt-sipdir="
1760 (assoc-ref %build-inputs "python-pyqt")
1762 (string-append "--qsci-incdir="
1763 (assoc-ref %build-inputs "qscintilla")
1765 (string-append "--qsci-libdir="
1766 (assoc-ref %build-inputs "qscintilla")
1769 (modify-phases %standard-phases
1771 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1773 (apply invoke "python3" "configure.py"
1775 ;; Install to the right directory
1776 (substitute* '("Makefile"
1778 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
1779 (assoc-ref outputs "out")))
1782 `(("qscintilla" ,qscintilla)
1784 ("python-pyqt" ,python-pyqt)))
1785 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1786 editor control. QScintilla includes features especially useful when editing
1787 and debugging source code. These include support for syntax styling, error
1788 indicators, code completion and call tips.
1790 This package provides the Python bindings.")))
1792 ;; PyQt only looks for modules in its own directory. It ignores environment
1793 ;; variables such as PYTHONPATH, so we need to build a union package to make
1795 (define-public python-pyqt+qscintilla
1796 (package (inherit python-pyqt)
1797 (name "python-pyqt+qscintilla")
1799 (build-system trivial-build-system)
1801 '(#:modules ((guix build union))
1803 (use-modules (ice-9 match)
1805 (match %build-inputs
1806 (((names . directories) ...)
1807 (union-build (assoc-ref %outputs "out")
1810 `(("python-pyqt" ,python-pyqt)
1811 ("python-qscintilla" ,python-qscintilla)))
1812 (synopsis "Union of PyQt and the Qscintilla extension")
1814 "This package contains the union of PyQt and the Qscintilla extension.")))
1816 (define-public qtkeychain
1823 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1824 "archive/v" version ".tar.gz"))
1825 (file-name (string-append name "-" version ".tar.gz"))
1827 (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
1828 (build-system cmake-build-system)
1830 `(("pkg-config" ,pkg-config)
1831 ("qttools" ,qttools)))
1833 `(("qtbase" ,qtbase)))
1835 `(#:tests? #f ; No tests included
1837 (modify-phases %standard-phases
1839 'configure 'set-qt-trans-dir
1841 (substitute* "CMakeLists.txt"
1842 (("\\$\\{qt_translations_dir\\}")
1843 "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
1845 (home-page "https://github.com/frankosterfeld/qtkeychain")
1846 (synopsis "Qt API to store passwords")
1848 "QtKeychain is a Qt library to store passwords and other secret data
1849 securely. It will not store any data unencrypted unless explicitly requested.")
1850 (license license:bsd-3)))
1860 (string-append "mirror://sourceforge/qwt/qwt/"
1861 version "/qwt-" version ".tar.bz2"))
1863 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1864 (build-system gnu-build-system)
1866 `(("qtbase" ,qtbase)
1868 ("qttools" ,qttools)))
1871 (modify-phases %standard-phases
1873 (lambda* (#:key outputs #:allow-other-keys)
1874 (let* ((out (assoc-ref outputs "out"))
1875 (docdir (string-append out "/share/doc/qwt"))
1876 (incdir (string-append out "/include/qwt"))
1877 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
1878 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
1879 (substitute* '("qwtconfig.pri")
1880 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
1881 (format #f "~a = ~a\n" x out))
1882 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
1883 (format #f "~a = ~a\n" x docdir))
1884 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
1885 (format #f "~a = ~a\n" x incdir))
1886 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
1887 (format #f "~a = ~a\n" x pluginsdir))
1888 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
1889 (format #f "~a = ~a\n" x featuresdir)))
1890 (substitute* '("doc/doc.pro")
1891 ;; We'll install them in the 'install-man-pages' phase.
1892 (("^unix:doc\\.files.*") ""))
1893 (zero? (system* "qmake")))))
1894 (add-after 'install 'install-man-pages
1895 (lambda* (#:key outputs #:allow-other-keys)
1896 (let* ((out (assoc-ref outputs "out"))
1897 (man (string-append out "/share/man")))
1898 ;; Remove some incomplete manual pages.
1899 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1901 (copy-recursively "doc/man" man)
1903 (home-page "http://qwt.sourceforge.net")
1904 (synopsis "Qt widgets for plots, scales, dials and other technical software
1907 "The Qwt library contains widgets and components which are primarily useful
1908 for technical and scientific purposes. It includes a 2-D plotting widget,
1909 different kinds of sliders, and much more.")
1912 ;; The Qwt license is LGPL2.1 with some exceptions.
1913 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1914 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1915 license:lgpl2.1 license:gpl3))))
1917 (define-public qtwebkit
1924 (uri (string-append "https://download.qt.io/official_releases/qt/"
1925 (version-major+minor version) "/" version
1926 "/submodules/" name "-opensource-src-"
1930 "1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998"))))
1931 (build-system gnu-build-system)
1934 ("python" ,python-2.7)
1939 ("pkg-config" ,pkg-config)))
1942 ("libjpeg" ,libjpeg)
1944 ("libwebp" ,libwebp)
1946 ("fontconfig" ,fontconfig)
1947 ("libxrender", libxrender)
1949 ("qtdeclarative" ,qtdeclarative)
1950 ("qtmultimedia" ,qtmultimedia)
1951 ("libxml2" ,libxml2)
1952 ("libxslt" ,libxslt)
1954 ("libxcomposite" ,libxcomposite)))
1957 (modify-phases %standard-phases
1958 (add-before 'configure 'fix-qmlwebkit-plugins-rpath
1960 (substitute* "Source/WebKit/qt/declarative/experimental/experimental.pri"
1961 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1962 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../../lib"))
1963 (substitute* "Source/WebKit/qt/declarative/public.pri"
1964 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1965 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../lib"))
1968 (lambda* (#:key outputs #:allow-other-keys)
1969 (let ((out (assoc-ref outputs "out")))
1971 (string-append (getcwd) "/Tools/qmake:"
1972 (getenv "QMAKEPATH")))
1973 (system* "qmake"))))
1974 ;; prevent webkit from trying to install into the qtbase store directory,
1975 ;; and replace references to the build directory in linker options:
1976 (add-before 'build 'patch-installpaths
1977 (lambda* (#:key outputs inputs #:allow-other-keys)
1978 (let* ((out (assoc-ref outputs "out"))
1979 (qtbase (assoc-ref inputs "qtbase"))
1981 (linkbuild (string-append "-L" builddir))
1982 (linkout (string-append "-L" out))
1987 (mf (string-append (dirname in) "/"
1989 ;; by default, these Makefiles are
1990 ;; generated during install, but we need
1991 ;; to generate them now
1992 (system* "qmake" in "-o" mf)
1994 '(("Source/api.pri" . "Makefile.api")
1995 ("Source/widgetsapi.pri"
1996 . "Makefile.widgetsapi")
1997 ("Source/WebKit2/WebProcess.pro"
1998 . "Makefile.WebProcess")
1999 ("Source/WebKit2/PluginProcess.pro"
2000 . "Makefile.PluginProcess")
2001 ("Source/WebKit/qt/declarative/public.pri"
2002 . "Makefile.declarative.public")
2003 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
2004 . "Makefile.declarative.experimental")
2005 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
2007 ;; Order of qmake calls and substitutions matters here.
2008 (system* "qmake" "-prl" "Source/widgetsapi.pri"
2009 "-o" "Source/Makefile")
2010 (substitute* (find-files "lib" "libQt5.*\\.prl")
2011 ((linkbuild) linkout))
2012 (substitute* (find-files "lib"
2013 "libQt5WebKit.*\\.la")
2015 (string-append "libdir='" out "/lib'"))
2016 ((linkbuild) linkout))
2017 (substitute* (find-files "lib/pkgconfig"
2019 (((string-append "prefix=" qtbase))
2020 (string-append "prefix=" out))
2021 ((linkbuild) linkout))
2022 ;; Makefiles must be modified after .prl/.la/.pc
2023 ;; files, lest they get rebuilt:
2024 (substitute* makefiles
2025 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
2027 (((string-append "-Wl,-rpath," builddir))
2028 (string-append "-Wl,-rpath," out)))))))))
2029 (home-page "https://www.webkit.org")
2030 (synopsis "Web browser engine and classes to render and interact with web
2032 (description "QtWebKit provides a Web browser engine that makes it easy to
2033 embed content from the World Wide Web into your Qt application. At the same
2034 time Web content can be enhanced with native controls.")
2036 (license license:lgpl2.1+)))
2038 (define-public dotherside
2045 (uri (string-append "https://github.com/filcuc/DOtherSide/"
2046 "archive/v" version ".tar.gz"))
2047 (file-name (string-append name "-" version ".tar.gz"))
2050 "0azq7qlsrfdwbd6qsi7d3c1knn42qw0r47g43xf7clwbinapswpz"))))
2051 (build-system cmake-build-system)
2053 `(("qttools" ,qttools)))
2055 `(("qtbase" ,qtbase)
2056 ("qtdeclarative" ,qtdeclarative)))
2057 (home-page "https://github.com/frankosterfeld/qtkeychain")
2058 (synopsis "C language library for creating bindings for the Qt QML language")
2060 "DOtherSide is a C language library for creating bindings for the
2061 QT QML language. The following features are implementable from
2064 @item Creating custom QObject
2065 @item Creating custom QAbstractListModels
2066 @item Creating custom properties, signals and slots
2067 @item Creating from QML QObject defined in the binded language
2068 @item Creating from Singleton QML QObject defined in the binded language
2070 (license license:lgpl3))) ;version 3 only (+ exception)