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>
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 "-everywhere-src-"
384 "0rny87ypnkkvyp9p76nim77v6np0cdf1dbjfmcilklzphkdlcvpd"))
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" "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.
498 ;; System sqlite fails on 5.10+
499 ;;.obj/qsql_sqlite.o: In function `QSQLiteResultPrivate::initColumns(bool)':
500 ;;qsql_sqlite.cpp:(.text+0x190c): undefined reference to `sqlite3_column_table_name16'
504 ;; explicitly link with openssl instead of dlopening it
506 ;; explicitly link with dbus instead of dlopening it
508 ;; don't use the precompiled headers
510 ;; drop special machine instructions that do not have
512 ,@(if (string-prefix? "x86_64"
513 (or (%current-target-system)
519 (add-after 'install 'patch-mkspecs
520 (lambda* (#:key outputs #:allow-other-keys)
521 (let* ((out (assoc-ref outputs "out"))
522 (archdata (string-append out "/lib/qt5"))
523 (mkspecs (string-append archdata "/mkspecs"))
524 (qt_config.prf (string-append
525 mkspecs "/features/qt_config.prf")))
526 ;; For each Qt module, let `qmake' uses search paths in the
527 ;; module directory instead of all in QT_INSTALL_PREFIX.
528 (substitute* qt_config.prf
529 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
530 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
531 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
532 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
533 (("\\$\\$\\[QT_HOST_LIBS\\]")
534 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
535 (("\\$\\$\\[QT_INSTALL_BINS\\]")
536 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
538 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
539 (substitute* (string-append mkspecs "/features/qt_functions.prf")
540 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
541 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
543 ;; Resolve qmake spec files within qtbase by absolute paths.
546 (string-append mkspecs "/features/" file))
547 '("device_config.prf" "moc.prf" "qt_build_config.prf"
548 "qt_config.prf" "winrt/package_manifest.prf"))
549 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
550 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
552 (add-after 'unpack 'patch-paths
553 ;; Use the absolute paths for dynamically loaded libs, otherwise
554 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
556 (lambda* (#:key inputs #:allow-other-keys)
558 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
559 "cross-libc" "libc"))))
560 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
561 "src/network/kernel/qhostinfo_unix.cpp")
562 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
563 (string-append a glibc "/lib/lib" b))))
564 ;; X11/locale (compose path)
565 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
566 ;; Don't search in /usr/…/X11/locale, …
567 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
568 (string-append "// " line))
569 ;; … but use libx11's path
570 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
571 (string-append a "\"" (assoc-ref inputs "libx11") b)))
573 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
574 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
575 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
577 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
578 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
579 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
580 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
581 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
584 (list (search-path-specification
585 (variable "QMAKEPATH")
586 (files '("lib/qt5")))
587 (search-path-specification
588 (variable "QML2_IMPORT_PATH")
589 (files '("lib/qt5/qml")))
590 (search-path-specification
591 (variable "QT_PLUGIN_PATH")
592 (files '("lib/qt5/plugins")))
593 (search-path-specification
594 (variable "XDG_DATA_DIRS")
596 (search-path-specification
597 (variable "XDG_CONFIG_DIRS")
598 (files '("etc/xdg")))))
599 (home-page "https://www.qt.io/")
600 (synopsis "Cross-platform GUI library")
601 (description "Qt is a cross-platform application and UI framework for
602 developers using C++ or QML, a CSS & JavaScript like language.")
603 (license (list license:lgpl2.1 license:lgpl3))))
606 (package (inherit qtbase)
611 (uri (string-append "https://download.qt.io/official_releases/qt/"
612 (version-major+minor version) "/" version
613 "/submodules/" name "-everywhere-src-"
617 "0m0zglp0m5gv75ivma6l3hm8brb0cf44dhbc6lqwfdwacxhgx3jb"))))
618 (propagated-inputs `())
619 (native-inputs `(("perl" ,perl)))
626 (modify-phases %standard-phases
627 (add-before 'configure 'configure-qmake
628 (lambda* (#:key inputs outputs #:allow-other-keys)
629 (let* ((out (assoc-ref outputs "out"))
630 (qtbase (assoc-ref inputs "qtbase"))
631 (tmpdir (string-append (getenv "TMPDIR")))
632 (qmake (string-append tmpdir "/qmake"))
633 (qt.conf (string-append tmpdir "/qt.conf")))
634 ;; Use qmake with a customized qt.conf to override install
636 (symlink (which "qmake") qmake)
637 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
638 (with-output-to-file qt.conf
644 Documentation=share/doc/qt5
647 LibraryExecutables=lib/qt5/libexec
650 Plugins=lib/qt5/plugins
651 Imports=lib/qt5/imports
652 Qml2Imports=lib/qt5/qml
653 Translations=share/qt5/translations
655 Examples=share/doc/qt5/examples
661 [EffectiveSourcePaths]
667 (lambda* (#:key inputs outputs #:allow-other-keys)
668 ;; Valid QT_BUILD_PARTS variables are:
669 ;; libs tools tests examples demos docs translations
670 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
671 (add-before 'check 'set-display
673 ;; make Qt render "offscreen", required for tests
674 (setenv "QT_QPA_PLATFORM" "offscreen")
676 (synopsis "Qt module for displaying SVGs")
677 (description "The QtSvg module provides classes for displaying the
678 contents of SVG files.")))
680 (define-public qtimageformats
681 (package (inherit qtsvg)
682 (name "qtimageformats")
686 (uri (string-append "https://download.qt.io/official_releases/qt/"
687 (version-major+minor version) "/" version
688 "/submodules/" name "-everywhere-src-"
692 "0w0yy7zzln3v7dm7ksjxkzhq8r0a9nwk823wv4f1x7vsa3pnyh2q"))
693 (modules '((guix build utils)))
696 (delete-file-recursively "src/3rdparty")
707 (synopsis "Additional Image Format plugins for Qt")
708 (description "The QtImageFormats module contains plugins for adding
709 support for MNG, TGA, TIFF and WBMP image formats.")))
711 (define-public qtx11extras
712 (package (inherit qtsvg)
717 (uri (string-append "https://download.qt.io/official_releases/qt/"
718 (version-major+minor version) "/" version
719 "/submodules/" name "-everywhere-src-"
723 "13vbx61wcd8pnpgk3j5r665pm03s7jp2s98apvc6fhp1njlr0rhi"))))
725 (substitute-keyword-arguments (package-arguments qtsvg)
726 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
727 (native-inputs `(("perl" ,perl)))
731 (synopsis "Qt Extras for X11")
732 (description "The QtX11Extras module includes the library to access X11
733 from within Qt 5.")))
735 (define-public qtxmlpatterns
736 (package (inherit qtsvg)
737 (name "qtxmlpatterns")
741 (uri (string-append "https://download.qt.io/official_releases/qt/"
742 (version-major+minor version) "/" version
743 "/submodules/" name "-everywhere-src-"
747 "13nj2pa706sy874bqbv7y94ypicr4k09x6n2jyxkw93flb5pi8qr"))))
749 (substitute-keyword-arguments (package-arguments qtsvg)
751 `(modify-phases ,phases
752 (add-after 'unpack 'disable-network-tests
753 (lambda _ (substitute* "tests/auto/auto.pro"
754 (("qxmlquery") "# qxmlquery")
755 (("xmlpatterns ") "# xmlpatterns"))
757 (native-inputs `(("perl" ,perl)))
758 (inputs `(("qtbase" ,qtbase)))
759 (synopsis "Qt XML patterns module")
760 (description "The QtXmlPatterns module is a XQuery and XPath engine for
761 XML and custom data models. It contains programs such as xmlpatterns and
762 xmlpatternsvalidator.")))
764 (define-public qtdeclarative
765 (package (inherit qtsvg)
766 (name "qtdeclarative")
770 (uri (string-append "https://download.qt.io/official_releases/qt/"
771 (version-major+minor version) "/" version
772 "/submodules/" name "-everywhere-src-"
776 "1h2pbyr7dnak4q96373xpa6gk6rl528rnqima8xnvhdi2y5kgagf"))))
778 (substitute-keyword-arguments (package-arguments qtsvg)
779 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
782 ("pkg-config" ,pkg-config)
785 ("qtxmlpatterns" ,qtxmlpatterns)))
789 (synopsis "Qt QML module (Quick 2)")
790 (description "The Qt QML module provides a framework for developing
791 applications and libraries with the QML language. It defines and implements the
792 language and engine infrastructure, and provides an API to enable application
793 developers to extend the QML language with custom types and integrate QML code
794 with JavaScript and C++.")))
796 (define-public qtconnectivity
797 (package (inherit qtsvg)
798 (name "qtconnectivity")
802 (uri (string-append "https://download.qt.io/official_releases/qt/"
803 (version-major+minor version) "/" version
804 "/submodules/" name "-everywhere-src-"
808 "0wqq5q5saf007aphvpn5pvj6l0qp0z7wxvfba6v9iq5ylyqm6bnd"))))
811 ("pkg-config" ,pkg-config)
812 ("qtdeclarative" ,qtdeclarative)))
816 (synopsis "Qt Connectivity module")
817 (description "The Qt Connectivity modules provides modules for interacting
818 with Bluetooth and NFC.")))
820 (define-public qtwebsockets
821 (package (inherit qtsvg)
822 (name "qtwebsockets")
826 (uri (string-append "https://download.qt.io/official_releases/qt/"
827 (version-major+minor version) "/" version
828 "/submodules/" name "-everywhere-src-"
832 "1drr6nxxbkwpmz39bhyfmmsqjhy11bj3w1nc3q9dwhpcbf04an3x"))))
834 (substitute-keyword-arguments (package-arguments qtsvg)
835 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
838 ("qtdeclarative" ,qtdeclarative)))
839 (inputs `(("qtbase" ,qtbase)))
840 (synopsis "Qt Web Sockets module")
841 (description "WebSocket is a web-based protocol designed to enable two-way
842 communication between a client application and a remote host. The Qt
843 WebSockets module provides C++ and QML interfaces that enable Qt applications
844 to act as a server that can process WebSocket requests, or a client that can
845 consume data received from the server, or both.")))
847 (define-public qtsensors
848 (package (inherit qtsvg)
853 (uri (string-append "https://download.qt.io/official_releases/qt/"
854 (version-major+minor version) "/" version
855 "/submodules/" name "-everywhere-src-"
859 "1az22rdkpc1m44qb3dyh7cpiprplkvynzjr629ai05i8ngbfdi0g"))))
861 (substitute-keyword-arguments (package-arguments qtsvg)
862 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
864 `(modify-phases ,phases
865 (add-after 'unpack 'fix-tests
867 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
868 (("2000") "5000") ;lengthen test timeout
869 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
873 ("qtdeclarative" ,qtdeclarative)))
874 (inputs `(("qtbase" ,qtbase)))
875 (synopsis "Qt Sensors module")
876 (description "The Qt Sensors API provides access to sensor hardware via QML
877 and C++ interfaces. The Qt Sensors API also provides a motion gesture
878 recognition API for devices.")))
880 (define-public qtmultimedia
881 (package (inherit qtsvg)
882 (name "qtmultimedia")
886 (uri (string-append "https://download.qt.io/official_releases/qt/"
887 (version-major+minor version) "/" version
888 "/submodules/" name "-everywhere-src-"
892 "0g4x1w251imq58zp1px6yschwj6icsxzwl3fy7pjfbgd27qjhlzg"))
893 (modules '((guix build utils)))
896 (delete-file-recursively
897 "examples/multimedia/spectrum/3rdparty")
898 ;; We also prevent the spectrum example from being built.
899 (substitute* "examples/multimedia/multimedia.pro"
903 (substitute-keyword-arguments (package-arguments qtsvg)
905 `(modify-phases ,phases
907 (lambda* (#:key outputs #:allow-other-keys)
908 (let ((out (assoc-ref outputs "out")))
909 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
910 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
911 (string-append "PREFIX=" out)))))))
912 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
915 ("pkg-config" ,pkg-config)
917 ("qtdeclarative" ,qtdeclarative)))
919 `(("alsa-lib" ,alsa-lib)
921 ("pulseaudio" ,pulseaudio)
923 ;; Gstreamer is needed for the mediaplayer plugin
924 ("gstreamer" ,gstreamer)
925 ("gst-plugins-base" ,gst-plugins-base)))
926 (synopsis "Qt Multimedia module")
927 (description "The Qt Multimedia module provides set of APIs to play and
928 record media, and manage a collection of media content. It also contains a
929 set of plugins for interacting with pulseaudio and GStreamer.")))
931 (define-public qtwayland
932 (package (inherit qtsvg)
937 (uri (string-append "https://download.qt.io/official_releases/qt/"
938 (version-major+minor version) "/" version
939 "/submodules/" name "-everywhere-src-"
943 "09s1ckqj0cgjmmi7jylsf039vgzlq7i9rr4swb590fkz427lx0b8"))
944 (modules '((guix build utils)))
946 ;; The examples try to build and cause the build to fail
948 (delete-file-recursively "examples")
951 (substitute-keyword-arguments (package-arguments qtsvg)
953 `(modify-phases ,phases
954 (add-before 'check 'set-ld-library-path
955 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
957 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
958 ;; wayland platform plugin.
960 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
965 ("pkg-config" ,pkg-config)
966 ("qtdeclarative" ,qtdeclarative)))
968 `(("fontconfig" ,fontconfig)
969 ("freetype" ,freetype)
971 ("libxcomposite" ,libxcomposite)
973 ("libxkbcommon" ,libxkbcommon)
974 ("libxrender" ,libxrender)
978 ("wayland" ,wayland)))
979 (synopsis "Qt Wayland module")
980 (description "The Qt Wayland module provides the QtWayland client and
981 compositor libraries.")))
983 (define-public qtserialport
984 (package (inherit qtsvg)
985 (name "qtserialport")
989 (uri (string-append "https://download.qt.io/official_releases/qt/"
990 (version-major+minor version) "/" version
991 "/submodules/" name "-everywhere-src-"
995 "1cbf1jsginp5p3y17cyb6dfhsafxal0bn9pya6aybz0q799zgvl5"))))
996 (native-inputs `(("perl" ,perl)))
1001 (substitute-keyword-arguments (package-arguments qtsvg)
1003 `(modify-phases ,phases
1004 (add-after 'unpack 'patch-dlopen-paths
1005 (lambda* (#:key inputs #:allow-other-keys)
1006 (substitute* "src/serialport/qtudev_p.h"
1007 ;; Use the absolute paths for dynamically loaded libs,
1008 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1009 ;; typically is not set in guix.
1010 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1011 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1013 (synopsis "Qt Serial Port module")
1014 (description "The Qt Serial Port module provides the library for
1015 interacting with serial ports from within Qt.")))
1017 (define-public qtserialbus
1018 (package (inherit qtsvg)
1019 (name "qtserialbus")
1023 (uri (string-append "https://download.qt.io/official_releases/qt/"
1024 (version-major+minor version) "/" version
1025 "/submodules/" name "-everywhere-src-"
1029 "0r3crk7gw0xs6wk1gvw2k8r9s9vam3sfwrji1njhswavii9fbp85"))))
1031 `(("qtbase" ,qtbase)
1032 ("qtserialport" ,qtserialport)))
1033 (synopsis "Qt Serial Bus module")
1034 (description "The Qt Serial Bus API provides classes and functions to
1035 access the various industrial serial buses and protocols, such as CAN, ModBus,
1038 (define-public qtwebchannel
1039 (package (inherit qtsvg)
1040 (name "qtwebchannel")
1044 (uri (string-append "https://download.qt.io/official_releases/qt/"
1045 (version-major+minor version) "/" version
1046 "/submodules/" name "-everywhere-src-"
1050 "05fa5pwvk24cjp8m6pbw3ma95vnls762crpjdgvygfk0h8xilxmh"))))
1053 ("qtdeclarative" ,qtdeclarative)
1054 ("qtwebsockets" ,qtwebsockets)))
1055 (inputs `(("qtbase" ,qtbase)))
1056 (synopsis "Web communication library for Qt")
1057 (description "The Qt WebChannel module enables peer-to-peer communication
1058 between the host (QML/C++ application) and the client (HTML/JavaScript
1059 application). The transport mechanism is supported out of the box by the two
1060 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1062 (define-public qtlocation
1063 (package (inherit qtsvg)
1068 (uri (string-append "https://download.qt.io/official_releases/qt/"
1069 (version-major+minor version) "/" version
1070 "/submodules/" name "-everywhere-src-"
1074 "074cjqhr14mqlsqj9rzagzdcqnayyichp31lq02k05q07wg93xi8"))))
1076 (substitute-keyword-arguments (package-arguments qtsvg)
1077 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1080 ("qtdeclarative" ,qtdeclarative)
1081 ("qtquickcontrols" ,qtquickcontrols)
1082 ("qtserialport" ,qtserialport)))
1085 ("openssl" ,openssl)
1088 (synopsis "Qt Location and Positioning modules")
1089 (description "The Qt Location module provides an interface for location,
1090 positioning and geolocation plugins.")))
1092 (define-public qttools
1093 (package (inherit qtsvg)
1098 (uri (string-append "https://download.qt.io/official_releases/qt/"
1099 (version-major+minor version) "/" version
1100 "/submodules/" name "-everywhere-src-"
1104 "1nb77bfs63nyy0wkhsci9qbqmahncy3sdcrwj4qr1prc4y2cm4wx"))))
1106 (substitute-keyword-arguments (package-arguments qtsvg)
1107 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1110 ("qtdeclarative" ,qtdeclarative)))
1113 ("qtbase" ,qtbase)))
1114 (synopsis "Qt Tools and Designer modules")
1115 (description "The Qt Tools module provides a set of applications to browse
1116 the documentation, translate applications, generate help files and other stuff
1117 that helps in Qt development.")))
1119 (define-public qtscript
1120 (package (inherit qtsvg)
1125 (uri (string-append "https://download.qt.io/official_releases/qt/"
1126 (version-major+minor version) "/" version
1127 "/submodules/" name "-everywhere-src-"
1131 "1ib8a5gsxarbm2j94j5d097ly3ap4snqkx2imz3sl6xk6gknm4i5"))
1132 (patches (search-patches "qtscript-disable-tests.patch"))))
1135 ("qttools" ,qttools)))
1137 `(("qtbase" ,qtbase)))
1138 (synopsis "Qt Script module")
1139 (description "Qt provides support for application scripting with ECMAScript.
1140 The following guides and references cover aspects of programming with
1141 ECMAScript and Qt.")))
1143 (define-public qtquickcontrols
1144 (package (inherit qtsvg)
1145 (name "qtquickcontrols")
1149 (uri (string-append "https://download.qt.io/official_releases/qt/"
1150 (version-major+minor version) "/" version
1151 "/submodules/" name "-everywhere-src-"
1155 "01ziibf4afdhb5b3gfci8maprmviqwhdvma2z1jlq2ck45cpsqi6"))))
1157 (substitute-keyword-arguments (package-arguments qtsvg)
1158 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1160 `(("qtbase" ,qtbase)
1161 ("qtdeclarative" ,qtdeclarative)))
1162 (synopsis "Qt Quick Controls and other Quick modules")
1163 (description "The QtScript module provides classes for making Qt
1164 applications scriptable. This module provides a set of extra components that
1165 can be used to build complete interfaces in Qt Quick.")))
1167 (define-public qtquickcontrols2
1168 (package (inherit qtsvg)
1169 (name "qtquickcontrols2")
1173 (uri (string-append "https://download.qt.io/official_releases/qt/"
1174 (version-major+minor version) "/" version
1175 "/submodules/" name "-everywhere-src-"
1179 "1hsa8n4dlqpyz9xq2kq1hsxrxsjc7ywzzfhqijylgzzclvlqgb7y"))))
1181 (substitute-keyword-arguments (package-arguments qtsvg)
1182 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1184 `(("qtbase" ,qtbase)
1185 ("qtdeclarative" ,qtdeclarative)))
1186 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1187 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1188 module that provides platform integration: native dialogs, menus and menu bars,
1189 and tray icons. It falls back to Qt Widgets when a native implementation is
1192 (define-public qtgraphicaleffects
1193 (package (inherit qtsvg)
1194 (name "qtgraphicaleffects")
1198 (uri (string-append "https://download.qt.io/official_releases/qt/"
1199 (version-major+minor version) "/" version
1200 "/submodules/" name "-everywhere-src-"
1204 "0xzr4421w7idlgndxnd68wwc2asabycjiskkyl1f8nwqv34lcy3j"))))
1206 (substitute-keyword-arguments (package-arguments qtsvg)
1207 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1209 `(("qtbase" ,qtbase)
1210 ("qtdeclarative" ,qtdeclarative)))
1211 (synopsis "Qt Graphical Effects module")
1212 (description "The Qt Graphical Effects module provides a set of QML types
1213 for adding visually impressive and configurable effects to user interfaces.
1214 Effects are visual items that can be added to Qt Quick user interface as UI
1215 components. The API consists of over 20 effects provided as separate QML
1216 types. The effects cover functional areas such as blending, masking, blurring,
1217 coloring, and many more.")))
1219 (define-public qtdeclarative-render2d
1220 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
1221 (package (inherit qtsvg)
1222 (name "qtdeclarative-render2d")
1226 (uri (string-append "https://download.qt.io/official_releases/qt/"
1227 (version-major+minor version) "/" version
1228 "/submodules/" name "-everywhere-src-"
1232 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1233 (modules '((guix build utils)))
1236 (delete-file-recursively "tools/opengldummy/3rdparty")
1240 `(("qtbase" ,qtbase)
1241 ("qtdeclarative" ,qtdeclarative)))
1242 (synopsis "Qt Declarative Render module")
1243 (description "The Qt Declarative Render 2D module provides a Raster
1244 backend for QtQuick scene graph.")
1245 (properties `((superseded . ,qtdeclarative)))))
1247 (define-public qtgamepad
1248 (package (inherit qtsvg)
1253 (uri (string-append "https://download.qt.io/official_releases/qt/"
1254 (version-major+minor version) "/" version
1255 "/submodules/" name "-everywhere-src-"
1259 "0g52c03gdgz57h7szdxvc5hdy45l7q7m29yfzhwqc57hwdfl98bi"))))
1262 ("pkg-config" ,pkg-config)))
1264 `(("fontconfig" ,fontconfig)
1265 ("freetype" ,freetype)
1266 ("libxrender" ,libxrender)
1269 ("qtdeclarative" ,qtdeclarative)))
1270 (synopsis "Qt Gamepad module")
1271 (description "The Qt Gamepad module is an add-on library that enables Qt
1272 applications to support the use of gamepad hardware and in some cases remote
1273 control equipment. The module provides both QML and C++ interfaces. The
1274 primary target audience are embedded devices with fullscreen user interfaces,
1275 and mobile applications targeting TV-like form factors.")))
1277 (define-public qtscxml
1278 (package (inherit qtsvg)
1283 (uri (string-append "https://download.qt.io/official_releases/qt/"
1284 (version-major+minor version) "/" version
1285 "/submodules/" name "-everywhere-src-"
1289 "00wb89ris8fyivhz9qpqn72mzpkh6mqdjss82j3q10g3c142072k"))
1290 (modules '((guix build utils)))
1293 (delete-file-recursively "tests/3rdparty")
1294 ;; the scion test refers to the bundled 3rd party test code.
1295 (substitute* "tests/auto/auto.pro"
1299 `(("qtbase" ,qtbase)
1300 ("qtdeclarative" ,qtdeclarative)))
1301 (synopsis "Qt SCXML module")
1302 (description "The Qt SCXML module provides functionality to create state
1303 machines from SCXML files. This includes both dynamically creating state
1304 machines (loading the SCXML file and instantiating states and transitions) and
1305 generating a C++ file that has a class implementing the state machine. It
1306 also contains functionality to support data models and executable content.")))
1308 (define-public qtpurchasing
1309 (package (inherit qtsvg)
1310 (name "qtpurchasing")
1314 (uri (string-append "https://download.qt.io/official_releases/qt/"
1315 (version-major+minor version) "/" version
1316 "/submodules/" name "-everywhere-src-"
1320 "1c92yv2yi38sic06nyr9r6zpq3y4sxnasmj14d3jmg50gc1ncqfs"))))
1322 `(("qtbase" ,qtbase)
1323 ("qtdeclarative" ,qtdeclarative)))
1324 (synopsis "Qt Purchasing module")
1325 (description "The Qt Purchasing module provides and in-app API for
1326 purchasing goods and services.")))
1328 (define-public qtcanvas3d
1329 (package (inherit qtsvg)
1334 (uri (string-append "https://download.qt.io/official_releases/qt/"
1335 (version-major+minor version) "/" version
1336 "/submodules/" name "-everywhere-src-"
1340 "1kqcaks6lkz8cp9s3pwrvgrr8381rjzf5fbf2bzshdw7psphxiiz"))
1341 (modules '((guix build utils)))
1344 (delete-file-recursively "examples/canvas3d/3rdparty")
1347 (substitute-keyword-arguments (package-arguments qtsvg)
1348 ;; Building the tests depends on the bundled 3rd party javascript files,
1349 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1350 ;; fail, so we skip building them for now.
1352 `(modify-phases ,phases
1354 (lambda* (#:key outputs #:allow-other-keys)
1355 (let ((out (assoc-ref outputs "out")))
1356 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1357 (string-append "PREFIX=" out)))))))
1358 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1361 `(("qtbase" ,qtbase)
1362 ("qtdeclarative" ,qtdeclarative)))
1363 (synopsis "Qt Canvas 3D module")
1364 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1365 drawing calls from Qt Quick JavaScript.")))
1367 (define-public qtcharts
1368 (package (inherit qtsvg)
1373 (uri (string-append "https://download.qt.io/official_releases/qt/"
1374 (version-major+minor version) "/" version
1375 "/submodules/" name "-everywhere-src-"
1379 "0lg39vd6i0l76spjz6bhb1kkpbk2mgc0hxccj7733xxbxaz14vn4"))))
1381 (substitute-keyword-arguments (package-arguments qtsvg)
1382 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1384 `(("qtbase" ,qtbase)
1385 ("qtdeclarative" ,qtdeclarative)))
1386 (synopsis "Qt Charts module")
1387 (description "The Qt Charts module provides a set of easy to use chart
1388 components. It uses the Qt Graphics View Framework, therefore charts can be
1389 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1390 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1391 selecting one of the charts themes.")
1392 (license license:gpl3)))
1394 (define-public qtdatavis3d
1395 (package (inherit qtsvg)
1396 (name "qtdatavis3d")
1400 (uri (string-append "https://download.qt.io/official_releases/qt/"
1401 (version-major+minor version) "/" version
1402 "/submodules/" name "-everywhere-src-"
1406 "1s7gmgh6g3aia74yiqahffrc6n8f4491vb7g3i4i10ilandipg34"))))
1408 (substitute-keyword-arguments (package-arguments qtsvg)
1409 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1411 `(("qtbase" ,qtbase)
1412 ("qtdeclarative" ,qtdeclarative)))
1413 (synopsis "Qt Data Visualization module")
1414 (description "The Qt Data Visualization module provides a way to visualize
1415 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1416 visualizing depth maps and large quantities of rapidly changing data, such as
1417 data received from multiple sensors. The look and feel of graphs can be
1418 customized by using themes or by adding custom items and labels to them.")
1419 (license license:gpl3)))
1421 (define-public qtnetworkauth
1422 (package (inherit qtsvg)
1423 (name "qtnetworkauth")
1427 (uri (string-append "https://download.qt.io/official_releases/qt/"
1428 (version-major+minor version) "/" version
1429 "/submodules/" name "-everywhere-src-"
1433 "1kr8hwjsb8a5cypvqj48vrnkcvm2rcni102dh6i909i70a7hcsym"))))
1435 (substitute-keyword-arguments (package-arguments qtsvg)
1437 `(modify-phases ,phases
1438 (add-after 'unpack 'remove-failing-test
1440 ;; These tests can't find their test data.
1441 (substitute* "tests/auto/auto.pro"
1442 (("oauth1 ") "# oauth1 "))
1445 `(("qtbase" ,qtbase)))
1446 (synopsis "Qt Network Authorization module")
1447 (description "The Qt Network Authorization module provides an
1448 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1450 (define-public qtremoteobjects
1451 (package (inherit qtsvg)
1452 (name "qtremoteobjects")
1456 (uri (string-append "https://download.qt.io/official_releases/qt/"
1457 (version-major+minor version) "/" version
1458 "/submodules/" name "-everywhere-src-"
1462 "1chn1xxhapfwvhrlv4chwfgf2dw8x8kn1lssdmpmg5s420z3pbq9"))))
1464 (substitute-keyword-arguments (package-arguments qtsvg)
1466 `(modify-phases ,phases
1467 (add-after 'unpack 'remove-failing-test
1469 ;; This test can't find its imports.
1470 (substitute* "tests/auto/qml/qml.pro"
1471 (("integration") "# integration"))
1474 `(("qtbase" ,qtbase)
1475 ("qtdeclarative" ,qtdeclarative)))
1476 (synopsis "Qt Remote Objects module")
1477 (description "The Qt Remote Objects module is an @dfn{inter-process
1478 communication} (IPC) module developed for Qt. The idea is to extend existing
1479 Qt's functionalities to enable an easy exchange of information between
1480 processes or computers.")))
1482 (define-public qtspeech
1483 (package (inherit qtsvg)
1488 (uri (string-append "https://download.qt.io/official_releases/qt/"
1489 (version-major+minor version) "/" version
1490 "/submodules/" name "-everywhere-src-"
1494 "1bgfg0akqf1nfzm28n8dhvhj0p1niwxrfs763gj7m0g6vpwjbhd1"))))
1496 `(("qtbase" ,qtbase)))
1499 ("qtdeclarative" ,qtdeclarative)
1500 ("qtmultimedia" ,qtmultimedia)
1501 ("qtxmlpatterns" ,qtxmlpatterns)))
1502 (synopsis "Qt Speech module")
1503 (description "The Qt Speech module enables a Qt application to support
1504 accessibility features such as text-to-speech, which is useful for end-users
1505 who are visually challenged or cannot access the application for whatever
1506 reason. The most common use case where text-to-speech comes in handy is when
1507 the end-user is driving and cannot attend the incoming messages on the phone.
1508 In such a scenario, the messaging application can read out the incoming
1511 (define-public python-sip
1519 (string-append "mirror://sourceforge/pyqt/sip/"
1520 "sip-" version "/sip-" version ".tar.gz"))
1523 "0x2bghbprwl3az1ni3p87i0bq8r99694la93kg65vi0cz12gh3bl"))))
1524 (build-system gnu-build-system)
1526 `(("python" ,python-wrapper)))
1528 `(#:tests? #f ; no check target
1529 #:modules ((srfi srfi-1)
1530 ,@%gnu-build-system-modules)
1532 (modify-phases %standard-phases
1534 (lambda* (#:key inputs outputs #:allow-other-keys)
1535 (let* ((out (assoc-ref outputs "out"))
1536 (bin (string-append out "/bin"))
1537 (include (string-append out "/include"))
1538 (python (assoc-ref inputs "python"))
1540 (last (string-split python #\-)))
1543 (take (string-split python-version #\.) 2)
1545 (lib (string-append out "/lib/python"
1549 (system* "python" "configure.py"
1552 "--incdir" include))))))))
1553 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1554 (synopsis "Python binding creator for C and C++ libraries")
1556 "SIP is a tool to create Python bindings for C and C++ libraries. It
1557 was originally developed to create PyQt, the Python bindings for the Qt
1558 toolkit, but can be used to create bindings for any C or C++ library.
1560 SIP comprises a code generator and a Python module. The code generator
1561 processes a set of specification files and generates C or C++ code, which
1562 is then compiled to create the bindings extension module. The SIP Python
1563 module provides support functions to the automatically generated code.")
1564 ;; There is a choice between a python like license, gpl2 and gpl3.
1565 ;; For compatibility with pyqt, we need gpl3.
1566 (license license:gpl3)))
1568 (define-public python2-sip
1569 (package (inherit python-sip)
1570 (name "python2-sip")
1572 `(("python" ,python-2)))))
1574 (define-public python-pyqt
1576 (name "python-pyqt")
1582 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1583 "PyQt-" version "/PyQt5_gpl-"
1587 "15hh4z5vd45dcswjla58q6rrfr6ic7jfz2n7c8lwfb10rycpj3mb"))
1588 (patches (search-patches "pyqt-configure.patch"))))
1589 (build-system gnu-build-system)
1591 `(("qtbase" ,qtbase))) ; for qmake
1593 `(("python-sip" ,python-sip)))
1595 `(("python" ,python-wrapper)
1597 ("qtconnectivity" ,qtconnectivity)
1598 ("qtdeclarative" ,qtdeclarative)
1599 ("qtlocation" ,qtlocation)
1600 ("qtmultimedia" ,qtmultimedia)
1601 ("qtsensors" ,qtsensors)
1602 ("qtserialport" ,qtserialport)
1604 ("qttools" ,qttools)
1605 ("qtwebchannel" ,qtwebchannel)
1606 ("qtwebkit" ,qtwebkit)
1607 ("qtwebsockets" ,qtwebsockets)
1608 ("qtx11extras" ,qtx11extras)
1609 ("qtxmlpatterns" ,qtxmlpatterns)))
1611 `(#:modules ((srfi srfi-1)
1612 ,@%gnu-build-system-modules)
1614 (modify-phases %standard-phases
1616 (lambda* (#:key inputs outputs #:allow-other-keys)
1617 (let* ((out (assoc-ref outputs "out"))
1618 (bin (string-append out "/bin"))
1619 (sip (string-append out "/share/sip"))
1620 (plugins (string-append out "/plugins"))
1621 (designer (string-append plugins "/designer"))
1622 (qml (string-append plugins "/PyQt5"))
1623 (python (assoc-ref inputs "python"))
1625 (last (string-split python #\-)))
1628 (take (string-split python-version #\.) 2)
1630 (lib (string-append out "/lib/python"
1633 (stubs (string-append lib "/PyQt5")))
1634 (zero? (system* "python" "configure.py"
1638 "--designer-plugindir" designer
1639 "--qml-plugindir" qml
1640 ; Where to install the PEP 484 Type Hints stub
1641 ; files. Without this the stubs are tried to be
1642 ; installed into the python package's
1643 ; site-package directory, which is read-only.
1645 "--sipdir" sip))))))))
1646 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1647 (synopsis "Python bindings for Qt")
1649 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1650 framework. The bindings are implemented as a set of Python modules and
1651 contain over 620 classes.")
1652 (license license:gpl3)))
1654 (define-public python2-pyqt
1655 (package (inherit python-pyqt)
1656 (name "python2-pyqt")
1658 `(("python-sip" ,python2-sip)
1659 ("qtbase" ,qtbase)))
1661 `(("python" ,python-2)
1662 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1664 (define-public python-pyqt-4
1665 (package (inherit python-pyqt)
1666 (name "python-pyqt")
1672 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1673 "PyQt-" version "/PyQt4_gpl_x11-"
1677 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
1679 `(("python-sip" ,python-sip)
1681 (inputs `(("python" ,python-wrapper)))
1683 `(#:tests? #f ; no check target
1684 #:modules ((srfi srfi-1)
1685 ,@%gnu-build-system-modules)
1687 (modify-phases %standard-phases
1689 (lambda* (#:key inputs outputs #:allow-other-keys)
1690 (let* ((out (assoc-ref outputs "out"))
1691 (bin (string-append out "/bin"))
1692 (sip (string-append out "/share/sip"))
1693 (python (assoc-ref inputs "python"))
1695 (last (string-split python #\-)))
1698 (take (string-split python-version #\.) 2)
1700 (lib (string-append out "/lib/python"
1703 (zero? (system* "python" "configure.py"
1707 "--sipdir" sip))))))))
1708 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1710 (define-public python2-pyqt-4
1711 (package (inherit python-pyqt-4)
1712 (name "python2-pyqt")
1714 `(("python-sip" ,python2-sip)
1717 `(("python" ,python-2)))))
1719 (define-public qscintilla
1725 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1726 "QScintilla-" version "/QScintilla_gpl-"
1730 "1rw1nlwnyzj5pb86cc5kk56qhrvwvrjvjzgrkwh3g7b9wxl7lrfj"))))
1731 (build-system gnu-build-system)
1734 (modify-phases %standard-phases
1736 (lambda* (#:key outputs #:allow-other-keys)
1737 (let ((out (assoc-ref outputs "out")))
1739 (substitute* "qscintilla.pro"
1740 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1741 (string-append out "/lib"))
1742 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1743 (string-append out "/include"))
1744 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1745 (string-append out "/translations"))
1746 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1747 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1748 (("\\$\\$\\[QT_HOST_DATA\\]")
1749 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
1750 (invoke "qmake")))))))
1751 (native-inputs `(("qtbase" ,qtbase)))
1752 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1753 (synopsis "Qt port of the Scintilla C++ editor control")
1754 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1755 editor control. QScintilla includes features especially useful when editing
1756 and debugging source code. These include support for syntax styling, error
1757 indicators, code completion and call tips.")
1758 (license license:gpl3+)))
1760 (define-public python-qscintilla
1761 (package (inherit qscintilla)
1762 (name "python-qscintilla")
1765 (list "--pyqt=PyQt5"
1766 (string-append "--pyqt-sipdir="
1767 (assoc-ref %build-inputs "python-pyqt")
1769 (string-append "--qsci-incdir="
1770 (assoc-ref %build-inputs "qscintilla")
1772 (string-append "--qsci-libdir="
1773 (assoc-ref %build-inputs "qscintilla")
1776 (modify-phases %standard-phases
1778 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1780 (apply invoke "python3" "configure.py"
1782 ;; Install to the right directory
1783 (substitute* '("Makefile"
1785 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
1786 (assoc-ref outputs "out")))
1789 `(("qscintilla" ,qscintilla)
1791 ("python-pyqt" ,python-pyqt)))
1792 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1793 editor control. QScintilla includes features especially useful when editing
1794 and debugging source code. These include support for syntax styling, error
1795 indicators, code completion and call tips.
1797 This package provides the Python bindings.")))
1799 ;; PyQt only looks for modules in its own directory. It ignores environment
1800 ;; variables such as PYTHONPATH, so we need to build a union package to make
1802 (define-public python-pyqt+qscintilla
1803 (package (inherit python-pyqt)
1804 (name "python-pyqt+qscintilla")
1806 (build-system trivial-build-system)
1808 '(#:modules ((guix build union))
1810 (use-modules (ice-9 match)
1812 (match %build-inputs
1813 (((names . directories) ...)
1814 (union-build (assoc-ref %outputs "out")
1818 `(("python-pyqt" ,python-pyqt)
1819 ("python-qscintilla" ,python-qscintilla)))
1820 (synopsis "Union of PyQt and the Qscintilla extension")
1822 "This package contains the union of PyQt and the Qscintilla extension.")))
1824 (define-public qtkeychain
1831 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1832 "archive/v" version ".tar.gz"))
1833 (file-name (string-append name "-" version ".tar.gz"))
1835 (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
1836 (build-system cmake-build-system)
1838 `(("pkg-config" ,pkg-config)
1839 ("qttools" ,qttools)))
1841 `(("qtbase" ,qtbase)))
1843 `(#:tests? #f ; No tests included
1845 (modify-phases %standard-phases
1847 'configure 'set-qt-trans-dir
1849 (substitute* "CMakeLists.txt"
1850 (("\\$\\{qt_translations_dir\\}")
1851 "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
1853 (home-page "https://github.com/frankosterfeld/qtkeychain")
1854 (synopsis "Qt API to store passwords")
1856 "QtKeychain is a Qt library to store passwords and other secret data
1857 securely. It will not store any data unencrypted unless explicitly requested.")
1858 (license license:bsd-3)))
1868 (string-append "mirror://sourceforge/qwt/qwt/"
1869 version "/qwt-" version ".tar.bz2"))
1871 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1872 (build-system gnu-build-system)
1874 `(("qtbase" ,qtbase)
1876 ("qttools" ,qttools)))
1879 (modify-phases %standard-phases
1881 (lambda* (#:key outputs #:allow-other-keys)
1882 (let* ((out (assoc-ref outputs "out"))
1883 (docdir (string-append out "/share/doc/qwt"))
1884 (incdir (string-append out "/include/qwt"))
1885 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
1886 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
1887 (substitute* '("qwtconfig.pri")
1888 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
1889 (format #f "~a = ~a\n" x out))
1890 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
1891 (format #f "~a = ~a\n" x docdir))
1892 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
1893 (format #f "~a = ~a\n" x incdir))
1894 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
1895 (format #f "~a = ~a\n" x pluginsdir))
1896 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
1897 (format #f "~a = ~a\n" x featuresdir)))
1898 (substitute* '("doc/doc.pro")
1899 ;; We'll install them in the 'install-man-pages' phase.
1900 (("^unix:doc\\.files.*") ""))
1901 (zero? (system* "qmake")))))
1902 (add-after 'install 'install-man-pages
1903 (lambda* (#:key outputs #:allow-other-keys)
1904 (let* ((out (assoc-ref outputs "out"))
1905 (man (string-append out "/share/man")))
1906 ;; Remove some incomplete manual pages.
1907 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1909 (copy-recursively "doc/man" man)
1911 (home-page "http://qwt.sourceforge.net")
1912 (synopsis "Qt widgets for plots, scales, dials and other technical software
1915 "The Qwt library contains widgets and components which are primarily useful
1916 for technical and scientific purposes. It includes a 2-D plotting widget,
1917 different kinds of sliders, and much more.")
1920 ;; The Qwt license is LGPL2.1 with some exceptions.
1921 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1922 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1923 license:lgpl2.1 license:gpl3))))
1925 (define-public qtwebkit
1932 (uri (string-append "https://download.qt.io/official_releases/qt/"
1933 (version-major+minor version) "/" version
1934 "/submodules/" name "-opensource-src-"
1938 "1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998"))))
1939 (build-system gnu-build-system)
1942 ("python" ,python-2.7)
1947 ("pkg-config" ,pkg-config)))
1950 ("libjpeg" ,libjpeg)
1952 ("libwebp" ,libwebp)
1954 ("fontconfig" ,fontconfig)
1955 ("libxrender" ,libxrender)
1957 ("qtdeclarative" ,qtdeclarative)
1958 ("qtmultimedia" ,qtmultimedia)
1959 ("libxml2" ,libxml2)
1960 ("libxslt" ,libxslt)
1962 ("libxcomposite" ,libxcomposite)))
1965 (modify-phases %standard-phases
1966 (add-before 'configure 'fix-qmlwebkit-plugins-rpath
1968 (substitute* "Source/WebKit/qt/declarative/experimental/experimental.pri"
1969 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1970 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../../lib"))
1971 (substitute* "Source/WebKit/qt/declarative/public.pri"
1972 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1973 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../lib"))
1976 (lambda* (#:key outputs #:allow-other-keys)
1977 (let ((out (assoc-ref outputs "out")))
1979 (string-append (getcwd) "/Tools/qmake:"
1980 (getenv "QMAKEPATH")))
1981 (system* "qmake"))))
1982 ;; prevent webkit from trying to install into the qtbase store directory,
1983 ;; and replace references to the build directory in linker options:
1984 (add-before 'build 'patch-installpaths
1985 (lambda* (#:key outputs inputs #:allow-other-keys)
1986 (let* ((out (assoc-ref outputs "out"))
1987 (qtbase (assoc-ref inputs "qtbase"))
1989 (linkbuild (string-append "-L" builddir))
1990 (linkout (string-append "-L" out))
1995 (mf (string-append (dirname in) "/"
1997 ;; by default, these Makefiles are
1998 ;; generated during install, but we need
1999 ;; to generate them now
2000 (system* "qmake" in "-o" mf)
2002 '(("Source/api.pri" . "Makefile.api")
2003 ("Source/widgetsapi.pri"
2004 . "Makefile.widgetsapi")
2005 ("Source/WebKit2/WebProcess.pro"
2006 . "Makefile.WebProcess")
2007 ("Source/WebKit2/PluginProcess.pro"
2008 . "Makefile.PluginProcess")
2009 ("Source/WebKit/qt/declarative/public.pri"
2010 . "Makefile.declarative.public")
2011 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
2012 . "Makefile.declarative.experimental")
2013 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
2015 ;; Order of qmake calls and substitutions matters here.
2016 (system* "qmake" "-prl" "Source/widgetsapi.pri"
2017 "-o" "Source/Makefile")
2018 (substitute* (find-files "lib" "libQt5.*\\.prl")
2019 ((linkbuild) linkout))
2020 (substitute* (find-files "lib"
2021 "libQt5WebKit.*\\.la")
2023 (string-append "libdir='" out "/lib'"))
2024 ((linkbuild) linkout))
2025 (substitute* (find-files "lib/pkgconfig"
2027 (((string-append "prefix=" qtbase))
2028 (string-append "prefix=" out))
2029 ((linkbuild) linkout))
2030 ;; Makefiles must be modified after .prl/.la/.pc
2031 ;; files, lest they get rebuilt:
2032 (substitute* makefiles
2033 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
2035 (((string-append "-Wl,-rpath," builddir))
2036 (string-append "-Wl,-rpath," out)))))))))
2037 (home-page "https://www.webkit.org")
2038 (synopsis "Web browser engine and classes to render and interact with web
2040 (description "QtWebKit provides a Web browser engine that makes it easy to
2041 embed content from the World Wide Web into your Qt application. At the same
2042 time Web content can be enhanced with native controls.")
2044 (license license:lgpl2.1+)))
2046 (define-public dotherside
2053 (uri (string-append "https://github.com/filcuc/DOtherSide/"
2054 "archive/v" version ".tar.gz"))
2055 (file-name (string-append name "-" version ".tar.gz"))
2058 "0azq7qlsrfdwbd6qsi7d3c1knn42qw0r47g43xf7clwbinapswpz"))))
2059 (build-system cmake-build-system)
2061 `(("qttools" ,qttools)))
2063 `(("qtbase" ,qtbase)
2064 ("qtdeclarative" ,qtdeclarative)))
2065 (home-page "https://github.com/frankosterfeld/qtkeychain")
2066 (synopsis "C language library for creating bindings for the Qt QML language")
2068 "DOtherSide is a C language library for creating bindings for the
2069 QT QML language. The following features are implementable from
2072 @item Creating custom QObject
2073 @item Creating custom QAbstractListModels
2074 @item Creating custom properties, signals and slots
2075 @item Creating from QML QObject defined in the binded language
2076 @item Creating from Singleton QML QObject defined in the binded language
2078 (license license:lgpl3))) ;version 3 only (+ exception)