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")
493 ;; These features require higher versions of Linux than the
494 ;; minimum version of the glibc. See
495 ;; src/corelib/global/minimum-linux_p.h. By disabling these
496 ;; features Qt5 applications can be used on the oldest
497 ;; kernels that the glibc supports, including the RHEL6
498 ;; (2.6.32) and RHEL7 (3.10) kernels.
499 "-no-feature-getentropy" ; requires Linux 3.17
500 "-no-feature-renameat2" ; requires Linux 3.16
502 ;; Do not build examples; if desired, these could go
503 ;; into a separate output, but for the time being, we
504 ;; prefer to save the space and build time.
505 "-no-compile-examples"
506 ;; Most "-system-..." are automatic, but some use
507 ;; the bundled copy by default.
508 ;; System sqlite fails on 5.10+
509 ;;.obj/qsql_sqlite.o: In function `QSQLiteResultPrivate::initColumns(bool)':
510 ;;qsql_sqlite.cpp:(.text+0x190c): undefined reference to `sqlite3_column_table_name16'
514 ;; explicitly link with openssl instead of dlopening it
516 ;; explicitly link with dbus instead of dlopening it
518 ;; don't use the precompiled headers
520 ;; drop special machine instructions that do not have
522 ,@(if (string-prefix? "x86_64"
523 (or (%current-target-system)
529 (add-after 'install 'patch-mkspecs
530 (lambda* (#:key outputs #:allow-other-keys)
531 (let* ((out (assoc-ref outputs "out"))
532 (archdata (string-append out "/lib/qt5"))
533 (mkspecs (string-append archdata "/mkspecs"))
534 (qt_config.prf (string-append
535 mkspecs "/features/qt_config.prf")))
536 ;; For each Qt module, let `qmake' uses search paths in the
537 ;; module directory instead of all in QT_INSTALL_PREFIX.
538 (substitute* qt_config.prf
539 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
540 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
541 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
542 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
543 (("\\$\\$\\[QT_HOST_LIBS\\]")
544 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
545 (("\\$\\$\\[QT_INSTALL_BINS\\]")
546 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
548 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
549 (substitute* (string-append mkspecs "/features/qt_functions.prf")
550 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
551 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
553 ;; Resolve qmake spec files within qtbase by absolute paths.
556 (string-append mkspecs "/features/" file))
557 '("device_config.prf" "moc.prf" "qt_build_config.prf"
558 "qt_config.prf" "winrt/package_manifest.prf"))
559 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
560 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
562 (add-after 'unpack 'patch-paths
563 ;; Use the absolute paths for dynamically loaded libs, otherwise
564 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
566 (lambda* (#:key inputs #:allow-other-keys)
568 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
569 "cross-libc" "libc"))))
570 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
571 "src/network/kernel/qhostinfo_unix.cpp")
572 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
573 (string-append a glibc "/lib/lib" b))))
574 ;; X11/locale (compose path)
575 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
576 ;; Don't search in /usr/…/X11/locale, …
577 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
578 (string-append "// " line))
579 ;; … but use libx11's path
580 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
581 (string-append a "\"" (assoc-ref inputs "libx11") b)))
583 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
584 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
585 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
587 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
588 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
589 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
590 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
591 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
594 (list (search-path-specification
595 (variable "QMAKEPATH")
596 (files '("lib/qt5")))
597 (search-path-specification
598 (variable "QML2_IMPORT_PATH")
599 (files '("lib/qt5/qml")))
600 (search-path-specification
601 (variable "QT_PLUGIN_PATH")
602 (files '("lib/qt5/plugins")))
603 (search-path-specification
604 (variable "XDG_DATA_DIRS")
606 (search-path-specification
607 (variable "XDG_CONFIG_DIRS")
608 (files '("etc/xdg")))))
609 (home-page "https://www.qt.io/")
610 (synopsis "Cross-platform GUI library")
611 (description "Qt is a cross-platform application and UI framework for
612 developers using C++ or QML, a CSS & JavaScript like language.")
613 (license (list license:lgpl2.1 license:lgpl3))))
616 (package (inherit qtbase)
621 (uri (string-append "https://download.qt.io/official_releases/qt/"
622 (version-major+minor version) "/" version
623 "/submodules/" name "-everywhere-src-"
627 "0m0zglp0m5gv75ivma6l3hm8brb0cf44dhbc6lqwfdwacxhgx3jb"))))
628 (propagated-inputs `())
629 (native-inputs `(("perl" ,perl)))
636 (modify-phases %standard-phases
637 (add-before 'configure 'configure-qmake
638 (lambda* (#:key inputs outputs #:allow-other-keys)
639 (let* ((out (assoc-ref outputs "out"))
640 (qtbase (assoc-ref inputs "qtbase"))
641 (tmpdir (string-append (getenv "TMPDIR")))
642 (qmake (string-append tmpdir "/qmake"))
643 (qt.conf (string-append tmpdir "/qt.conf")))
644 ;; Use qmake with a customized qt.conf to override install
646 (symlink (which "qmake") qmake)
647 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
648 (with-output-to-file qt.conf
654 Documentation=share/doc/qt5
657 LibraryExecutables=lib/qt5/libexec
660 Plugins=lib/qt5/plugins
661 Imports=lib/qt5/imports
662 Qml2Imports=lib/qt5/qml
663 Translations=share/qt5/translations
665 Examples=share/doc/qt5/examples
671 [EffectiveSourcePaths]
677 (lambda* (#:key inputs outputs #:allow-other-keys)
678 ;; Valid QT_BUILD_PARTS variables are:
679 ;; libs tools tests examples demos docs translations
680 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
681 (add-before 'check 'set-display
683 ;; make Qt render "offscreen", required for tests
684 (setenv "QT_QPA_PLATFORM" "offscreen")
686 (synopsis "Qt module for displaying SVGs")
687 (description "The QtSvg module provides classes for displaying the
688 contents of SVG files.")))
690 (define-public qtimageformats
691 (package (inherit qtsvg)
692 (name "qtimageformats")
696 (uri (string-append "https://download.qt.io/official_releases/qt/"
697 (version-major+minor version) "/" version
698 "/submodules/" name "-everywhere-src-"
702 "0w0yy7zzln3v7dm7ksjxkzhq8r0a9nwk823wv4f1x7vsa3pnyh2q"))
703 (modules '((guix build utils)))
706 (delete-file-recursively "src/3rdparty")
717 (synopsis "Additional Image Format plugins for Qt")
718 (description "The QtImageFormats module contains plugins for adding
719 support for MNG, TGA, TIFF and WBMP image formats.")))
721 (define-public qtx11extras
722 (package (inherit qtsvg)
727 (uri (string-append "https://download.qt.io/official_releases/qt/"
728 (version-major+minor version) "/" version
729 "/submodules/" name "-everywhere-src-"
733 "13vbx61wcd8pnpgk3j5r665pm03s7jp2s98apvc6fhp1njlr0rhi"))))
735 (substitute-keyword-arguments (package-arguments qtsvg)
736 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
737 (native-inputs `(("perl" ,perl)))
741 (synopsis "Qt Extras for X11")
742 (description "The QtX11Extras module includes the library to access X11
743 from within Qt 5.")))
745 (define-public qtxmlpatterns
746 (package (inherit qtsvg)
747 (name "qtxmlpatterns")
751 (uri (string-append "https://download.qt.io/official_releases/qt/"
752 (version-major+minor version) "/" version
753 "/submodules/" name "-everywhere-src-"
757 "13nj2pa706sy874bqbv7y94ypicr4k09x6n2jyxkw93flb5pi8qr"))))
759 (substitute-keyword-arguments (package-arguments qtsvg)
761 `(modify-phases ,phases
762 (add-after 'unpack 'disable-network-tests
763 (lambda _ (substitute* "tests/auto/auto.pro"
764 (("qxmlquery") "# qxmlquery")
765 (("xmlpatterns ") "# xmlpatterns"))
767 (native-inputs `(("perl" ,perl)))
768 (inputs `(("qtbase" ,qtbase)))
769 (synopsis "Qt XML patterns module")
770 (description "The QtXmlPatterns module is a XQuery and XPath engine for
771 XML and custom data models. It contains programs such as xmlpatterns and
772 xmlpatternsvalidator.")))
774 (define-public qtdeclarative
775 (package (inherit qtsvg)
776 (name "qtdeclarative")
780 (uri (string-append "https://download.qt.io/official_releases/qt/"
781 (version-major+minor version) "/" version
782 "/submodules/" name "-everywhere-src-"
786 "1h2pbyr7dnak4q96373xpa6gk6rl528rnqima8xnvhdi2y5kgagf"))))
788 (substitute-keyword-arguments (package-arguments qtsvg)
789 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
792 ("pkg-config" ,pkg-config)
795 ("qtxmlpatterns" ,qtxmlpatterns)))
799 (synopsis "Qt QML module (Quick 2)")
800 (description "The Qt QML module provides a framework for developing
801 applications and libraries with the QML language. It defines and implements the
802 language and engine infrastructure, and provides an API to enable application
803 developers to extend the QML language with custom types and integrate QML code
804 with JavaScript and C++.")))
806 (define-public qtconnectivity
807 (package (inherit qtsvg)
808 (name "qtconnectivity")
812 (uri (string-append "https://download.qt.io/official_releases/qt/"
813 (version-major+minor version) "/" version
814 "/submodules/" name "-everywhere-src-"
818 "0wqq5q5saf007aphvpn5pvj6l0qp0z7wxvfba6v9iq5ylyqm6bnd"))))
821 ("pkg-config" ,pkg-config)
822 ("qtdeclarative" ,qtdeclarative)))
826 (synopsis "Qt Connectivity module")
827 (description "The Qt Connectivity modules provides modules for interacting
828 with Bluetooth and NFC.")))
830 (define-public qtwebsockets
831 (package (inherit qtsvg)
832 (name "qtwebsockets")
836 (uri (string-append "https://download.qt.io/official_releases/qt/"
837 (version-major+minor version) "/" version
838 "/submodules/" name "-everywhere-src-"
842 "1drr6nxxbkwpmz39bhyfmmsqjhy11bj3w1nc3q9dwhpcbf04an3x"))))
844 (substitute-keyword-arguments (package-arguments qtsvg)
845 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
848 ("qtdeclarative" ,qtdeclarative)))
849 (inputs `(("qtbase" ,qtbase)))
850 (synopsis "Qt Web Sockets module")
851 (description "WebSocket is a web-based protocol designed to enable two-way
852 communication between a client application and a remote host. The Qt
853 WebSockets module provides C++ and QML interfaces that enable Qt applications
854 to act as a server that can process WebSocket requests, or a client that can
855 consume data received from the server, or both.")))
857 (define-public qtsensors
858 (package (inherit qtsvg)
863 (uri (string-append "https://download.qt.io/official_releases/qt/"
864 (version-major+minor version) "/" version
865 "/submodules/" name "-everywhere-src-"
869 "1az22rdkpc1m44qb3dyh7cpiprplkvynzjr629ai05i8ngbfdi0g"))))
871 (substitute-keyword-arguments (package-arguments qtsvg)
872 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
874 `(modify-phases ,phases
875 (add-after 'unpack 'fix-tests
877 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
878 (("2000") "5000") ;lengthen test timeout
879 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
883 ("qtdeclarative" ,qtdeclarative)))
884 (inputs `(("qtbase" ,qtbase)))
885 (synopsis "Qt Sensors module")
886 (description "The Qt Sensors API provides access to sensor hardware via QML
887 and C++ interfaces. The Qt Sensors API also provides a motion gesture
888 recognition API for devices.")))
890 (define-public qtmultimedia
891 (package (inherit qtsvg)
892 (name "qtmultimedia")
896 (uri (string-append "https://download.qt.io/official_releases/qt/"
897 (version-major+minor version) "/" version
898 "/submodules/" name "-everywhere-src-"
902 "0g4x1w251imq58zp1px6yschwj6icsxzwl3fy7pjfbgd27qjhlzg"))
903 (modules '((guix build utils)))
906 (delete-file-recursively
907 "examples/multimedia/spectrum/3rdparty")
908 ;; We also prevent the spectrum example from being built.
909 (substitute* "examples/multimedia/multimedia.pro"
913 (substitute-keyword-arguments (package-arguments qtsvg)
915 `(modify-phases ,phases
917 (lambda* (#:key outputs #:allow-other-keys)
918 (let ((out (assoc-ref outputs "out")))
919 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
920 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
921 (string-append "PREFIX=" out)))))))
922 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
925 ("pkg-config" ,pkg-config)
927 ("qtdeclarative" ,qtdeclarative)))
929 `(("alsa-lib" ,alsa-lib)
931 ("pulseaudio" ,pulseaudio)
933 ;; Gstreamer is needed for the mediaplayer plugin
934 ("gstreamer" ,gstreamer)
935 ("gst-plugins-base" ,gst-plugins-base)))
936 (synopsis "Qt Multimedia module")
937 (description "The Qt Multimedia module provides set of APIs to play and
938 record media, and manage a collection of media content. It also contains a
939 set of plugins for interacting with pulseaudio and GStreamer.")))
941 (define-public qtwayland
942 (package (inherit qtsvg)
947 (uri (string-append "https://download.qt.io/official_releases/qt/"
948 (version-major+minor version) "/" version
949 "/submodules/" name "-everywhere-src-"
953 "09s1ckqj0cgjmmi7jylsf039vgzlq7i9rr4swb590fkz427lx0b8"))
954 (modules '((guix build utils)))
956 ;; The examples try to build and cause the build to fail
958 (delete-file-recursively "examples")
961 (substitute-keyword-arguments (package-arguments qtsvg)
963 `(modify-phases ,phases
964 (add-before 'check 'set-ld-library-path
965 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
967 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
968 ;; wayland platform plugin.
970 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
975 ("pkg-config" ,pkg-config)
976 ("qtdeclarative" ,qtdeclarative)))
978 `(("fontconfig" ,fontconfig)
979 ("freetype" ,freetype)
981 ("libxcomposite" ,libxcomposite)
983 ("libxkbcommon" ,libxkbcommon)
984 ("libxrender" ,libxrender)
988 ("wayland" ,wayland)))
989 (synopsis "Qt Wayland module")
990 (description "The Qt Wayland module provides the QtWayland client and
991 compositor libraries.")))
993 (define-public qtserialport
994 (package (inherit qtsvg)
995 (name "qtserialport")
999 (uri (string-append "https://download.qt.io/official_releases/qt/"
1000 (version-major+minor version) "/" version
1001 "/submodules/" name "-everywhere-src-"
1005 "1cbf1jsginp5p3y17cyb6dfhsafxal0bn9pya6aybz0q799zgvl5"))))
1006 (native-inputs `(("perl" ,perl)))
1008 `(("qtbase" ,qtbase)
1011 (substitute-keyword-arguments (package-arguments qtsvg)
1013 `(modify-phases ,phases
1014 (add-after 'unpack 'patch-dlopen-paths
1015 (lambda* (#:key inputs #:allow-other-keys)
1016 (substitute* "src/serialport/qtudev_p.h"
1017 ;; Use the absolute paths for dynamically loaded libs,
1018 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1019 ;; typically is not set in guix.
1020 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1021 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1023 (synopsis "Qt Serial Port module")
1024 (description "The Qt Serial Port module provides the library for
1025 interacting with serial ports from within Qt.")))
1027 (define-public qtserialbus
1028 (package (inherit qtsvg)
1029 (name "qtserialbus")
1033 (uri (string-append "https://download.qt.io/official_releases/qt/"
1034 (version-major+minor version) "/" version
1035 "/submodules/" name "-everywhere-src-"
1039 "0r3crk7gw0xs6wk1gvw2k8r9s9vam3sfwrji1njhswavii9fbp85"))))
1041 `(("qtbase" ,qtbase)
1042 ("qtserialport" ,qtserialport)))
1043 (synopsis "Qt Serial Bus module")
1044 (description "The Qt Serial Bus API provides classes and functions to
1045 access the various industrial serial buses and protocols, such as CAN, ModBus,
1048 (define-public qtwebchannel
1049 (package (inherit qtsvg)
1050 (name "qtwebchannel")
1054 (uri (string-append "https://download.qt.io/official_releases/qt/"
1055 (version-major+minor version) "/" version
1056 "/submodules/" name "-everywhere-src-"
1060 "05fa5pwvk24cjp8m6pbw3ma95vnls762crpjdgvygfk0h8xilxmh"))))
1063 ("qtdeclarative" ,qtdeclarative)
1064 ("qtwebsockets" ,qtwebsockets)))
1065 (inputs `(("qtbase" ,qtbase)))
1066 (synopsis "Web communication library for Qt")
1067 (description "The Qt WebChannel module enables peer-to-peer communication
1068 between the host (QML/C++ application) and the client (HTML/JavaScript
1069 application). The transport mechanism is supported out of the box by the two
1070 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1072 (define-public qtlocation
1073 (package (inherit qtsvg)
1078 (uri (string-append "https://download.qt.io/official_releases/qt/"
1079 (version-major+minor version) "/" version
1080 "/submodules/" name "-everywhere-src-"
1084 "074cjqhr14mqlsqj9rzagzdcqnayyichp31lq02k05q07wg93xi8"))))
1086 (substitute-keyword-arguments (package-arguments qtsvg)
1087 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1090 ("qtdeclarative" ,qtdeclarative)
1091 ("qtquickcontrols" ,qtquickcontrols)
1092 ("qtserialport" ,qtserialport)))
1095 ("openssl" ,openssl)
1098 (synopsis "Qt Location and Positioning modules")
1099 (description "The Qt Location module provides an interface for location,
1100 positioning and geolocation plugins.")))
1102 (define-public qttools
1103 (package (inherit qtsvg)
1108 (uri (string-append "https://download.qt.io/official_releases/qt/"
1109 (version-major+minor version) "/" version
1110 "/submodules/" name "-everywhere-src-"
1114 "1nb77bfs63nyy0wkhsci9qbqmahncy3sdcrwj4qr1prc4y2cm4wx"))))
1116 (substitute-keyword-arguments (package-arguments qtsvg)
1117 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1120 ("qtdeclarative" ,qtdeclarative)))
1123 ("qtbase" ,qtbase)))
1124 (synopsis "Qt Tools and Designer modules")
1125 (description "The Qt Tools module provides a set of applications to browse
1126 the documentation, translate applications, generate help files and other stuff
1127 that helps in Qt development.")))
1129 (define-public qtscript
1130 (package (inherit qtsvg)
1135 (uri (string-append "https://download.qt.io/official_releases/qt/"
1136 (version-major+minor version) "/" version
1137 "/submodules/" name "-everywhere-src-"
1141 "1ib8a5gsxarbm2j94j5d097ly3ap4snqkx2imz3sl6xk6gknm4i5"))
1142 (patches (search-patches "qtscript-disable-tests.patch"))))
1145 ("qttools" ,qttools)))
1147 `(("qtbase" ,qtbase)))
1148 (synopsis "Qt Script module")
1149 (description "Qt provides support for application scripting with ECMAScript.
1150 The following guides and references cover aspects of programming with
1151 ECMAScript and Qt.")))
1153 (define-public qtquickcontrols
1154 (package (inherit qtsvg)
1155 (name "qtquickcontrols")
1159 (uri (string-append "https://download.qt.io/official_releases/qt/"
1160 (version-major+minor version) "/" version
1161 "/submodules/" name "-everywhere-src-"
1165 "01ziibf4afdhb5b3gfci8maprmviqwhdvma2z1jlq2ck45cpsqi6"))))
1167 (substitute-keyword-arguments (package-arguments qtsvg)
1168 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1170 `(("qtbase" ,qtbase)
1171 ("qtdeclarative" ,qtdeclarative)))
1172 (synopsis "Qt Quick Controls and other Quick modules")
1173 (description "The QtScript module provides classes for making Qt
1174 applications scriptable. This module provides a set of extra components that
1175 can be used to build complete interfaces in Qt Quick.")))
1177 (define-public qtquickcontrols2
1178 (package (inherit qtsvg)
1179 (name "qtquickcontrols2")
1183 (uri (string-append "https://download.qt.io/official_releases/qt/"
1184 (version-major+minor version) "/" version
1185 "/submodules/" name "-everywhere-src-"
1189 "1hsa8n4dlqpyz9xq2kq1hsxrxsjc7ywzzfhqijylgzzclvlqgb7y"))))
1191 (substitute-keyword-arguments (package-arguments qtsvg)
1192 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1194 `(("qtbase" ,qtbase)
1195 ("qtdeclarative" ,qtdeclarative)))
1196 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1197 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1198 module that provides platform integration: native dialogs, menus and menu bars,
1199 and tray icons. It falls back to Qt Widgets when a native implementation is
1202 (define-public qtgraphicaleffects
1203 (package (inherit qtsvg)
1204 (name "qtgraphicaleffects")
1208 (uri (string-append "https://download.qt.io/official_releases/qt/"
1209 (version-major+minor version) "/" version
1210 "/submodules/" name "-everywhere-src-"
1214 "0xzr4421w7idlgndxnd68wwc2asabycjiskkyl1f8nwqv34lcy3j"))))
1216 (substitute-keyword-arguments (package-arguments qtsvg)
1217 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1219 `(("qtbase" ,qtbase)
1220 ("qtdeclarative" ,qtdeclarative)))
1221 (synopsis "Qt Graphical Effects module")
1222 (description "The Qt Graphical Effects module provides a set of QML types
1223 for adding visually impressive and configurable effects to user interfaces.
1224 Effects are visual items that can be added to Qt Quick user interface as UI
1225 components. The API consists of over 20 effects provided as separate QML
1226 types. The effects cover functional areas such as blending, masking, blurring,
1227 coloring, and many more.")))
1229 (define-public qtdeclarative-render2d
1230 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
1231 (package (inherit qtsvg)
1232 (name "qtdeclarative-render2d")
1236 (uri (string-append "https://download.qt.io/official_releases/qt/"
1237 (version-major+minor version) "/" version
1238 "/submodules/" name "-everywhere-src-"
1242 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1243 (modules '((guix build utils)))
1246 (delete-file-recursively "tools/opengldummy/3rdparty")
1250 `(("qtbase" ,qtbase)
1251 ("qtdeclarative" ,qtdeclarative)))
1252 (synopsis "Qt Declarative Render module")
1253 (description "The Qt Declarative Render 2D module provides a Raster
1254 backend for QtQuick scene graph.")
1255 (properties `((superseded . ,qtdeclarative)))))
1257 (define-public qtgamepad
1258 (package (inherit qtsvg)
1263 (uri (string-append "https://download.qt.io/official_releases/qt/"
1264 (version-major+minor version) "/" version
1265 "/submodules/" name "-everywhere-src-"
1269 "0g52c03gdgz57h7szdxvc5hdy45l7q7m29yfzhwqc57hwdfl98bi"))))
1272 ("pkg-config" ,pkg-config)))
1274 `(("fontconfig" ,fontconfig)
1275 ("freetype" ,freetype)
1276 ("libxrender" ,libxrender)
1279 ("qtdeclarative" ,qtdeclarative)))
1280 (synopsis "Qt Gamepad module")
1281 (description "The Qt Gamepad module is an add-on library that enables Qt
1282 applications to support the use of gamepad hardware and in some cases remote
1283 control equipment. The module provides both QML and C++ interfaces. The
1284 primary target audience are embedded devices with fullscreen user interfaces,
1285 and mobile applications targeting TV-like form factors.")))
1287 (define-public qtscxml
1288 (package (inherit qtsvg)
1293 (uri (string-append "https://download.qt.io/official_releases/qt/"
1294 (version-major+minor version) "/" version
1295 "/submodules/" name "-everywhere-src-"
1299 "00wb89ris8fyivhz9qpqn72mzpkh6mqdjss82j3q10g3c142072k"))
1300 (modules '((guix build utils)))
1303 (delete-file-recursively "tests/3rdparty")
1304 ;; the scion test refers to the bundled 3rd party test code.
1305 (substitute* "tests/auto/auto.pro"
1309 `(("qtbase" ,qtbase)
1310 ("qtdeclarative" ,qtdeclarative)))
1311 (synopsis "Qt SCXML module")
1312 (description "The Qt SCXML module provides functionality to create state
1313 machines from SCXML files. This includes both dynamically creating state
1314 machines (loading the SCXML file and instantiating states and transitions) and
1315 generating a C++ file that has a class implementing the state machine. It
1316 also contains functionality to support data models and executable content.")))
1318 (define-public qtpurchasing
1319 (package (inherit qtsvg)
1320 (name "qtpurchasing")
1324 (uri (string-append "https://download.qt.io/official_releases/qt/"
1325 (version-major+minor version) "/" version
1326 "/submodules/" name "-everywhere-src-"
1330 "1c92yv2yi38sic06nyr9r6zpq3y4sxnasmj14d3jmg50gc1ncqfs"))))
1332 `(("qtbase" ,qtbase)
1333 ("qtdeclarative" ,qtdeclarative)))
1334 (synopsis "Qt Purchasing module")
1335 (description "The Qt Purchasing module provides and in-app API for
1336 purchasing goods and services.")))
1338 (define-public qtcanvas3d
1339 (package (inherit qtsvg)
1344 (uri (string-append "https://download.qt.io/official_releases/qt/"
1345 (version-major+minor version) "/" version
1346 "/submodules/" name "-everywhere-src-"
1350 "1kqcaks6lkz8cp9s3pwrvgrr8381rjzf5fbf2bzshdw7psphxiiz"))
1351 (modules '((guix build utils)))
1354 (delete-file-recursively "examples/canvas3d/3rdparty")
1357 (substitute-keyword-arguments (package-arguments qtsvg)
1358 ;; Building the tests depends on the bundled 3rd party javascript files,
1359 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1360 ;; fail, so we skip building them for now.
1362 `(modify-phases ,phases
1364 (lambda* (#:key outputs #:allow-other-keys)
1365 (let ((out (assoc-ref outputs "out")))
1366 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1367 (string-append "PREFIX=" out)))))))
1368 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1371 `(("qtbase" ,qtbase)
1372 ("qtdeclarative" ,qtdeclarative)))
1373 (synopsis "Qt Canvas 3D module")
1374 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1375 drawing calls from Qt Quick JavaScript.")))
1377 (define-public qtcharts
1378 (package (inherit qtsvg)
1383 (uri (string-append "https://download.qt.io/official_releases/qt/"
1384 (version-major+minor version) "/" version
1385 "/submodules/" name "-everywhere-src-"
1389 "0lg39vd6i0l76spjz6bhb1kkpbk2mgc0hxccj7733xxbxaz14vn4"))))
1391 (substitute-keyword-arguments (package-arguments qtsvg)
1392 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1394 `(("qtbase" ,qtbase)
1395 ("qtdeclarative" ,qtdeclarative)))
1396 (synopsis "Qt Charts module")
1397 (description "The Qt Charts module provides a set of easy to use chart
1398 components. It uses the Qt Graphics View Framework, therefore charts can be
1399 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1400 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1401 selecting one of the charts themes.")
1402 (license license:gpl3)))
1404 (define-public qtdatavis3d
1405 (package (inherit qtsvg)
1406 (name "qtdatavis3d")
1410 (uri (string-append "https://download.qt.io/official_releases/qt/"
1411 (version-major+minor version) "/" version
1412 "/submodules/" name "-everywhere-src-"
1416 "1s7gmgh6g3aia74yiqahffrc6n8f4491vb7g3i4i10ilandipg34"))))
1418 (substitute-keyword-arguments (package-arguments qtsvg)
1419 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1421 `(("qtbase" ,qtbase)
1422 ("qtdeclarative" ,qtdeclarative)))
1423 (synopsis "Qt Data Visualization module")
1424 (description "The Qt Data Visualization module provides a way to visualize
1425 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1426 visualizing depth maps and large quantities of rapidly changing data, such as
1427 data received from multiple sensors. The look and feel of graphs can be
1428 customized by using themes or by adding custom items and labels to them.")
1429 (license license:gpl3)))
1431 (define-public qtnetworkauth
1432 (package (inherit qtsvg)
1433 (name "qtnetworkauth")
1437 (uri (string-append "https://download.qt.io/official_releases/qt/"
1438 (version-major+minor version) "/" version
1439 "/submodules/" name "-everywhere-src-"
1443 "1kr8hwjsb8a5cypvqj48vrnkcvm2rcni102dh6i909i70a7hcsym"))))
1445 (substitute-keyword-arguments (package-arguments qtsvg)
1447 `(modify-phases ,phases
1448 (add-after 'unpack 'remove-failing-test
1450 ;; These tests can't find their test data.
1451 (substitute* "tests/auto/auto.pro"
1452 (("oauth1 ") "# oauth1 "))
1455 `(("qtbase" ,qtbase)))
1456 (synopsis "Qt Network Authorization module")
1457 (description "The Qt Network Authorization module provides an
1458 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1460 (define-public qtremoteobjects
1461 (package (inherit qtsvg)
1462 (name "qtremoteobjects")
1466 (uri (string-append "https://download.qt.io/official_releases/qt/"
1467 (version-major+minor version) "/" version
1468 "/submodules/" name "-everywhere-src-"
1472 "1chn1xxhapfwvhrlv4chwfgf2dw8x8kn1lssdmpmg5s420z3pbq9"))))
1474 (substitute-keyword-arguments (package-arguments qtsvg)
1476 `(modify-phases ,phases
1477 (add-after 'unpack 'remove-failing-test
1479 ;; This test can't find its imports.
1480 (substitute* "tests/auto/qml/qml.pro"
1481 (("integration") "# integration"))
1484 `(("qtbase" ,qtbase)
1485 ("qtdeclarative" ,qtdeclarative)))
1486 (synopsis "Qt Remote Objects module")
1487 (description "The Qt Remote Objects module is an @dfn{inter-process
1488 communication} (IPC) module developed for Qt. The idea is to extend existing
1489 Qt's functionalities to enable an easy exchange of information between
1490 processes or computers.")))
1492 (define-public qtspeech
1493 (package (inherit qtsvg)
1498 (uri (string-append "https://download.qt.io/official_releases/qt/"
1499 (version-major+minor version) "/" version
1500 "/submodules/" name "-everywhere-src-"
1504 "1bgfg0akqf1nfzm28n8dhvhj0p1niwxrfs763gj7m0g6vpwjbhd1"))))
1506 `(("qtbase" ,qtbase)))
1509 ("qtdeclarative" ,qtdeclarative)
1510 ("qtmultimedia" ,qtmultimedia)
1511 ("qtxmlpatterns" ,qtxmlpatterns)))
1512 (synopsis "Qt Speech module")
1513 (description "The Qt Speech module enables a Qt application to support
1514 accessibility features such as text-to-speech, which is useful for end-users
1515 who are visually challenged or cannot access the application for whatever
1516 reason. The most common use case where text-to-speech comes in handy is when
1517 the end-user is driving and cannot attend the incoming messages on the phone.
1518 In such a scenario, the messaging application can read out the incoming
1521 (define-public python-sip
1529 (string-append "mirror://sourceforge/pyqt/sip/"
1530 "sip-" version "/sip-" version ".tar.gz"))
1533 "0x2bghbprwl3az1ni3p87i0bq8r99694la93kg65vi0cz12gh3bl"))))
1534 (build-system gnu-build-system)
1536 `(("python" ,python-wrapper)))
1538 `(#:tests? #f ; no check target
1539 #:modules ((srfi srfi-1)
1540 ,@%gnu-build-system-modules)
1542 (modify-phases %standard-phases
1544 (lambda* (#:key inputs outputs #:allow-other-keys)
1545 (let* ((out (assoc-ref outputs "out"))
1546 (bin (string-append out "/bin"))
1547 (include (string-append out "/include"))
1548 (python (assoc-ref inputs "python"))
1550 (last (string-split python #\-)))
1553 (take (string-split python-version #\.) 2)
1555 (lib (string-append out "/lib/python"
1559 (system* "python" "configure.py"
1562 "--incdir" include))))))))
1563 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1564 (synopsis "Python binding creator for C and C++ libraries")
1566 "SIP is a tool to create Python bindings for C and C++ libraries. It
1567 was originally developed to create PyQt, the Python bindings for the Qt
1568 toolkit, but can be used to create bindings for any C or C++ library.
1570 SIP comprises a code generator and a Python module. The code generator
1571 processes a set of specification files and generates C or C++ code, which
1572 is then compiled to create the bindings extension module. The SIP Python
1573 module provides support functions to the automatically generated code.")
1574 ;; There is a choice between a python like license, gpl2 and gpl3.
1575 ;; For compatibility with pyqt, we need gpl3.
1576 (license license:gpl3)))
1578 (define-public python2-sip
1579 (package (inherit python-sip)
1580 (name "python2-sip")
1582 `(("python" ,python-2)))))
1584 (define-public python-pyqt
1586 (name "python-pyqt")
1592 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1593 "PyQt-" version "/PyQt5_gpl-"
1597 "15hh4z5vd45dcswjla58q6rrfr6ic7jfz2n7c8lwfb10rycpj3mb"))
1598 (patches (search-patches "pyqt-configure.patch"))))
1599 (build-system gnu-build-system)
1601 `(("qtbase" ,qtbase))) ; for qmake
1603 `(("python-sip" ,python-sip)))
1605 `(("python" ,python-wrapper)
1607 ("qtconnectivity" ,qtconnectivity)
1608 ("qtdeclarative" ,qtdeclarative)
1609 ("qtlocation" ,qtlocation)
1610 ("qtmultimedia" ,qtmultimedia)
1611 ("qtsensors" ,qtsensors)
1612 ("qtserialport" ,qtserialport)
1614 ("qttools" ,qttools)
1615 ("qtwebchannel" ,qtwebchannel)
1616 ("qtwebkit" ,qtwebkit)
1617 ("qtwebsockets" ,qtwebsockets)
1618 ("qtx11extras" ,qtx11extras)
1619 ("qtxmlpatterns" ,qtxmlpatterns)))
1621 `(#:modules ((srfi srfi-1)
1622 ,@%gnu-build-system-modules)
1624 (modify-phases %standard-phases
1626 (lambda* (#:key inputs outputs #:allow-other-keys)
1627 (let* ((out (assoc-ref outputs "out"))
1628 (bin (string-append out "/bin"))
1629 (sip (string-append out "/share/sip"))
1630 (plugins (string-append out "/plugins"))
1631 (designer (string-append plugins "/designer"))
1632 (qml (string-append plugins "/PyQt5"))
1633 (python (assoc-ref inputs "python"))
1635 (last (string-split python #\-)))
1638 (take (string-split python-version #\.) 2)
1640 (lib (string-append out "/lib/python"
1643 (stubs (string-append lib "/PyQt5")))
1644 (zero? (system* "python" "configure.py"
1648 "--designer-plugindir" designer
1649 "--qml-plugindir" qml
1650 ; Where to install the PEP 484 Type Hints stub
1651 ; files. Without this the stubs are tried to be
1652 ; installed into the python package's
1653 ; site-package directory, which is read-only.
1655 "--sipdir" sip))))))))
1656 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1657 (synopsis "Python bindings for Qt")
1659 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1660 framework. The bindings are implemented as a set of Python modules and
1661 contain over 620 classes.")
1662 (license license:gpl3)))
1664 (define-public python2-pyqt
1665 (package (inherit python-pyqt)
1666 (name "python2-pyqt")
1668 `(("python-sip" ,python2-sip)
1669 ("qtbase" ,qtbase)))
1671 `(("python" ,python-2)
1672 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1674 (define-public python-pyqt-4
1675 (package (inherit python-pyqt)
1676 (name "python-pyqt")
1682 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1683 "PyQt-" version "/PyQt4_gpl_x11-"
1687 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
1689 `(("python-sip" ,python-sip)
1691 (inputs `(("python" ,python-wrapper)))
1693 `(#:tests? #f ; no check target
1694 #:modules ((srfi srfi-1)
1695 ,@%gnu-build-system-modules)
1697 (modify-phases %standard-phases
1699 (lambda* (#:key inputs outputs #:allow-other-keys)
1700 (let* ((out (assoc-ref outputs "out"))
1701 (bin (string-append out "/bin"))
1702 (sip (string-append out "/share/sip"))
1703 (python (assoc-ref inputs "python"))
1705 (last (string-split python #\-)))
1708 (take (string-split python-version #\.) 2)
1710 (lib (string-append out "/lib/python"
1713 (zero? (system* "python" "configure.py"
1717 "--sipdir" sip))))))))
1718 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1720 (define-public python2-pyqt-4
1721 (package (inherit python-pyqt-4)
1722 (name "python2-pyqt")
1724 `(("python-sip" ,python2-sip)
1727 `(("python" ,python-2)))))
1729 (define-public qscintilla
1735 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1736 "QScintilla-" version "/QScintilla_gpl-"
1740 "1rw1nlwnyzj5pb86cc5kk56qhrvwvrjvjzgrkwh3g7b9wxl7lrfj"))))
1741 (build-system gnu-build-system)
1744 (modify-phases %standard-phases
1746 (lambda* (#:key outputs #:allow-other-keys)
1747 (let ((out (assoc-ref outputs "out")))
1749 (substitute* "qscintilla.pro"
1750 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1751 (string-append out "/lib"))
1752 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1753 (string-append out "/include"))
1754 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1755 (string-append out "/translations"))
1756 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1757 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1758 (("\\$\\$\\[QT_HOST_DATA\\]")
1759 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
1760 (invoke "qmake")))))))
1761 (native-inputs `(("qtbase" ,qtbase)))
1762 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1763 (synopsis "Qt port of the Scintilla C++ editor control")
1764 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1765 editor control. QScintilla includes features especially useful when editing
1766 and debugging source code. These include support for syntax styling, error
1767 indicators, code completion and call tips.")
1768 (license license:gpl3+)))
1770 (define-public python-qscintilla
1771 (package (inherit qscintilla)
1772 (name "python-qscintilla")
1775 (list "--pyqt=PyQt5"
1776 (string-append "--pyqt-sipdir="
1777 (assoc-ref %build-inputs "python-pyqt")
1779 (string-append "--qsci-incdir="
1780 (assoc-ref %build-inputs "qscintilla")
1782 (string-append "--qsci-libdir="
1783 (assoc-ref %build-inputs "qscintilla")
1786 (modify-phases %standard-phases
1788 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1790 (apply invoke "python3" "configure.py"
1792 ;; Install to the right directory
1793 (substitute* '("Makefile"
1795 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
1796 (assoc-ref outputs "out")))
1799 `(("qscintilla" ,qscintilla)
1801 ("python-pyqt" ,python-pyqt)))
1802 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1803 editor control. QScintilla includes features especially useful when editing
1804 and debugging source code. These include support for syntax styling, error
1805 indicators, code completion and call tips.
1807 This package provides the Python bindings.")))
1809 ;; PyQt only looks for modules in its own directory. It ignores environment
1810 ;; variables such as PYTHONPATH, so we need to build a union package to make
1812 (define-public python-pyqt+qscintilla
1813 (package (inherit python-pyqt)
1814 (name "python-pyqt+qscintilla")
1816 (build-system trivial-build-system)
1818 '(#:modules ((guix build union))
1820 (use-modules (ice-9 match)
1822 (match %build-inputs
1823 (((names . directories) ...)
1824 (union-build (assoc-ref %outputs "out")
1828 `(("python-pyqt" ,python-pyqt)
1829 ("python-qscintilla" ,python-qscintilla)))
1830 (synopsis "Union of PyQt and the Qscintilla extension")
1832 "This package contains the union of PyQt and the Qscintilla extension.")))
1834 (define-public qtkeychain
1841 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1842 "archive/v" version ".tar.gz"))
1843 (file-name (string-append name "-" version ".tar.gz"))
1845 (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
1846 (build-system cmake-build-system)
1848 `(("pkg-config" ,pkg-config)
1849 ("qttools" ,qttools)))
1851 `(("qtbase" ,qtbase)))
1853 `(#:tests? #f ; No tests included
1855 (modify-phases %standard-phases
1857 'configure 'set-qt-trans-dir
1859 (substitute* "CMakeLists.txt"
1860 (("\\$\\{qt_translations_dir\\}")
1861 "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
1863 (home-page "https://github.com/frankosterfeld/qtkeychain")
1864 (synopsis "Qt API to store passwords")
1866 "QtKeychain is a Qt library to store passwords and other secret data
1867 securely. It will not store any data unencrypted unless explicitly requested.")
1868 (license license:bsd-3)))
1878 (string-append "mirror://sourceforge/qwt/qwt/"
1879 version "/qwt-" version ".tar.bz2"))
1881 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1882 (build-system gnu-build-system)
1884 `(("qtbase" ,qtbase)
1886 ("qttools" ,qttools)))
1889 (modify-phases %standard-phases
1891 (lambda* (#:key outputs #:allow-other-keys)
1892 (let* ((out (assoc-ref outputs "out"))
1893 (docdir (string-append out "/share/doc/qwt"))
1894 (incdir (string-append out "/include/qwt"))
1895 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
1896 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
1897 (substitute* '("qwtconfig.pri")
1898 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
1899 (format #f "~a = ~a\n" x out))
1900 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
1901 (format #f "~a = ~a\n" x docdir))
1902 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
1903 (format #f "~a = ~a\n" x incdir))
1904 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
1905 (format #f "~a = ~a\n" x pluginsdir))
1906 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
1907 (format #f "~a = ~a\n" x featuresdir)))
1908 (substitute* '("doc/doc.pro")
1909 ;; We'll install them in the 'install-man-pages' phase.
1910 (("^unix:doc\\.files.*") ""))
1911 (zero? (system* "qmake")))))
1912 (add-after 'install 'install-man-pages
1913 (lambda* (#:key outputs #:allow-other-keys)
1914 (let* ((out (assoc-ref outputs "out"))
1915 (man (string-append out "/share/man")))
1916 ;; Remove some incomplete manual pages.
1917 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1919 (copy-recursively "doc/man" man)
1921 (home-page "http://qwt.sourceforge.net")
1922 (synopsis "Qt widgets for plots, scales, dials and other technical software
1925 "The Qwt library contains widgets and components which are primarily useful
1926 for technical and scientific purposes. It includes a 2-D plotting widget,
1927 different kinds of sliders, and much more.")
1930 ;; The Qwt license is LGPL2.1 with some exceptions.
1931 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1932 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1933 license:lgpl2.1 license:gpl3))))
1935 (define-public qtwebkit
1942 (uri (string-append "https://download.qt.io/official_releases/qt/"
1943 (version-major+minor version) "/" version
1944 "/submodules/" name "-opensource-src-"
1948 "1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998"))))
1949 (build-system gnu-build-system)
1952 ("python" ,python-2.7)
1957 ("pkg-config" ,pkg-config)))
1960 ("libjpeg" ,libjpeg)
1962 ("libwebp" ,libwebp)
1964 ("fontconfig" ,fontconfig)
1965 ("libxrender" ,libxrender)
1967 ("qtdeclarative" ,qtdeclarative)
1968 ("qtmultimedia" ,qtmultimedia)
1969 ("libxml2" ,libxml2)
1970 ("libxslt" ,libxslt)
1972 ("libxcomposite" ,libxcomposite)))
1975 (modify-phases %standard-phases
1976 (add-before 'configure 'fix-qmlwebkit-plugins-rpath
1978 (substitute* "Source/WebKit/qt/declarative/experimental/experimental.pri"
1979 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1980 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../../lib"))
1981 (substitute* "Source/WebKit/qt/declarative/public.pri"
1982 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1983 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../lib"))
1986 (lambda* (#:key outputs #:allow-other-keys)
1987 (let ((out (assoc-ref outputs "out")))
1989 (string-append (getcwd) "/Tools/qmake:"
1990 (getenv "QMAKEPATH")))
1991 (system* "qmake"))))
1992 ;; prevent webkit from trying to install into the qtbase store directory,
1993 ;; and replace references to the build directory in linker options:
1994 (add-before 'build 'patch-installpaths
1995 (lambda* (#:key outputs inputs #:allow-other-keys)
1996 (let* ((out (assoc-ref outputs "out"))
1997 (qtbase (assoc-ref inputs "qtbase"))
1999 (linkbuild (string-append "-L" builddir))
2000 (linkout (string-append "-L" out))
2005 (mf (string-append (dirname in) "/"
2007 ;; by default, these Makefiles are
2008 ;; generated during install, but we need
2009 ;; to generate them now
2010 (system* "qmake" in "-o" mf)
2012 '(("Source/api.pri" . "Makefile.api")
2013 ("Source/widgetsapi.pri"
2014 . "Makefile.widgetsapi")
2015 ("Source/WebKit2/WebProcess.pro"
2016 . "Makefile.WebProcess")
2017 ("Source/WebKit2/PluginProcess.pro"
2018 . "Makefile.PluginProcess")
2019 ("Source/WebKit/qt/declarative/public.pri"
2020 . "Makefile.declarative.public")
2021 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
2022 . "Makefile.declarative.experimental")
2023 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
2025 ;; Order of qmake calls and substitutions matters here.
2026 (system* "qmake" "-prl" "Source/widgetsapi.pri"
2027 "-o" "Source/Makefile")
2028 (substitute* (find-files "lib" "libQt5.*\\.prl")
2029 ((linkbuild) linkout))
2030 (substitute* (find-files "lib"
2031 "libQt5WebKit.*\\.la")
2033 (string-append "libdir='" out "/lib'"))
2034 ((linkbuild) linkout))
2035 (substitute* (find-files "lib/pkgconfig"
2037 (((string-append "prefix=" qtbase))
2038 (string-append "prefix=" out))
2039 ((linkbuild) linkout))
2040 ;; Makefiles must be modified after .prl/.la/.pc
2041 ;; files, lest they get rebuilt:
2042 (substitute* makefiles
2043 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
2045 (((string-append "-Wl,-rpath," builddir))
2046 (string-append "-Wl,-rpath," out)))))))))
2047 (home-page "https://www.webkit.org")
2048 (synopsis "Web browser engine and classes to render and interact with web
2050 (description "QtWebKit provides a Web browser engine that makes it easy to
2051 embed content from the World Wide Web into your Qt application. At the same
2052 time Web content can be enhanced with native controls.")
2054 (license license:lgpl2.1+)))
2056 (define-public dotherside
2063 (uri (string-append "https://github.com/filcuc/DOtherSide/"
2064 "archive/v" version ".tar.gz"))
2065 (file-name (string-append name "-" version ".tar.gz"))
2068 "0azq7qlsrfdwbd6qsi7d3c1knn42qw0r47g43xf7clwbinapswpz"))))
2069 (build-system cmake-build-system)
2071 `(("qttools" ,qttools)))
2073 `(("qtbase" ,qtbase)
2074 ("qtdeclarative" ,qtdeclarative)))
2075 (home-page "https://github.com/frankosterfeld/qtkeychain")
2076 (synopsis "C language library for creating bindings for the Qt QML language")
2078 "DOtherSide is a C language library for creating bindings for the
2079 QT QML language. The following features are implementable from
2082 @item Creating custom QObject
2083 @item Creating custom QAbstractListModels
2084 @item Creating custom properties, signals and slots
2085 @item Creating from QML QObject defined in the binded language
2086 @item Creating from Singleton QML QObject defined in the binded language
2088 (license license:lgpl3))) ;version 3 only (+ exception)