1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 ng0 <ng0@infotropique.org>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
10 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages qt)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix build utils)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system trivial)
36 #:use-module (guix packages)
37 #:use-module (guix utils)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages bison)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages cups)
42 #:use-module (gnu packages databases)
43 #:use-module (gnu packages documentation)
44 #:use-module (gnu packages fontutils)
45 #:use-module (gnu packages flex)
46 #:use-module (gnu packages freedesktop)
47 #:use-module (gnu packages gl)
48 #:use-module (gnu packages glib)
49 #:use-module (gnu packages gnuzilla)
50 #:use-module (gnu packages gperf)
51 #:use-module (gnu packages gstreamer)
52 #:use-module (gnu packages gtk)
53 #:use-module (gnu packages icu4c)
54 #:use-module (gnu packages image)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages maths)
57 #:use-module (gnu packages pciutils)
58 #:use-module (gnu packages pcre)
59 #:use-module (gnu packages perl)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages pulseaudio)
62 #:use-module (gnu packages python)
63 #:use-module (gnu packages ruby)
64 #:use-module (gnu packages sdl)
65 #:use-module (gnu packages tls)
66 #:use-module (gnu packages xdisorg)
67 #:use-module (gnu packages xorg)
68 #:use-module (gnu packages xml))
70 (define-public grantlee
77 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
79 (file-name (string-append name "-" version ".tar.gz"))
81 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
83 ;; Optional: lcov and cccc, both are for code coverage
84 `(("doxygen" ,doxygen)))
87 ("qtscript" ,qtscript)))
88 (build-system cmake-build-system)
91 (modify-phases %standard-phases
92 (add-before 'check 'check-setup
94 ;; make Qt render "offscreen", required for tests
95 (setenv "QT_QPA_PLATFORM" "offscreen")
97 (home-page "https://github.com/steveire/grantlee")
98 (synopsis "Libraries for text templating with Qt")
99 (description "Grantlee Templates can be used for theming and generation of
100 other text such as code. The syntax uses the syntax of the Django template
101 system, and the core design of Django is reused in Grantlee.")
102 (license license:lgpl2.0+)))
108 (outputs '("out" "examples"))
113 "http://download.qt.io/official_releases/qt/"
114 (version-major+minor version)
116 "/single/qt-everywhere-opensource-src-"
120 "1mblh8k04l13nk9fhhrr43h5bcph1gbz94j5y7csx8zvxb5xkb73"))
121 (modules '((guix build utils)))
124 ;; Remove qtwebengine, which relies on a bundled copy of
125 ;; chromium. Not only does it fail compilation in qt 5.5:
126 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
127 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
128 ;; it might also pose security problems.
129 ;; Alternatively, we could use the "-skip qtwebengine"
130 ;; configuration option.
131 (delete-file-recursively "qtwebengine")
132 ;; The following snippets are copied from their mondular-qt counterparts.
135 (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
136 (list "double-conversion" "freetype" "harfbuzz-ng"
137 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
141 (delete-file-recursively dir))
142 (list "qtimageformats/src/3rdparty"
143 "qtmultimedia/examples/multimedia/spectrum/3rdparty"
145 "qtcanvas3d/examples/canvas3d/3rdparty"))
146 ;; Tests depend on this example, which depends on the 3rd party code.
147 (substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
148 (("spectrum") "#"))))))
149 (build-system gnu-build-system)
153 `(("alsa-lib" ,alsa-lib)
157 ("double-conversion" ,double-conversion)
159 ("fontconfig" ,fontconfig)
160 ("freetype" ,freetype)
162 ("gstreamer" ,gstreamer)
163 ("gst-plugins-base" ,gst-plugins-base)
164 ("harfbuzz" ,harfbuzz)
167 ("libinput" ,libinput-minimal)
175 ("libxcomposite" ,libxcomposite)
176 ("libxcursor" ,libxcursor)
178 ("libxfixes" ,libxfixes)
180 ("libxinerama" ,libxinerama)
181 ("libxkbcommon" ,libxkbcommon)
183 ("libxrandr" ,libxrandr)
184 ("libxrender" ,libxrender)
191 ("postgresql" ,postgresql)
192 ("pulseaudio" ,pulseaudio)
196 ("unixodbc" ,unixodbc)
198 ("xcb-util" ,xcb-util)
199 ("xcb-util-image" ,xcb-util-image)
200 ("xcb-util-keysyms" ,xcb-util-keysyms)
201 ("xcb-util-renderutil" ,xcb-util-renderutil)
202 ("xcb-util-wm" ,xcb-util-wm)
209 ("pkg-config" ,pkg-config)
212 ("which" ,(@ (gnu packages base) which))))
215 (modify-phases %standard-phases
216 (add-after 'configure 'patch-bin-sh
218 (substitute* '("qtbase/configure"
219 "qtbase/mkspecs/features/qt_functions.prf"
220 "qtbase/qmake/library/qmakebuiltins.cpp")
221 (("/bin/sh") (which "sh")))
224 (lambda* (#:key outputs #:allow-other-keys)
225 (let ((out (assoc-ref outputs "out"))
226 (examples (assoc-ref outputs "examples")))
227 (substitute* '("configure" "qtbase/configure")
228 (("/bin/pwd") (which "pwd")))
229 (substitute* "qtbase/src/corelib/global/global.pri"
230 (("/bin/ls") (which "ls")))
231 ;; do not pass "--enable-fast-install", which makes the
232 ;; configure process fail
237 "-examplesdir" examples ; 89MiB
240 ;; Do not build examples; for the time being, we
241 ;; prefer to save the space and build time.
242 "-no-compile-examples"
243 ;; Most "-system-..." are automatic, but some use
244 ;; the bundled copy by default.
247 ;; explicitly link with openssl instead of dlopening it
249 ;; explicitly link with dbus instead of dlopening it
251 ;; don't use the precompiled headers
253 ;; drop special machine instructions not supported
254 ;; on all instances of the target
255 ,@(if (string-prefix? "x86_64"
256 (or (%current-target-system)
261 "-no-mips_dspr2"))))))))
262 (home-page "https://www.qt.io/")
263 (synopsis "Cross-platform GUI library")
264 (description "Qt is a cross-platform application and UI framework for
265 developers using C++ or QML, a CSS & JavaScript like language.")
266 (license license:lgpl2.1)
268 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
269 ;; see <http://hydra.gnu.org/build/112828>.
270 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
271 (supported-systems (delete "mips64el-linux" %supported-systems))))
274 (package (inherit qt)
278 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
279 (string-copy version 0 (string-rindex version #\.))
281 "/qt-everywhere-opensource-src-"
285 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
286 (patches (search-patches "qt4-ldflags.patch"))
287 (modules '((guix build utils)))
289 ;; Remove webkit module, which is not built.
290 '(delete-file-recursively "src/3rdparty/webkit"))))
291 (inputs `(,@(alist-delete "harfbuzz"
292 (alist-delete "libjpeg" (package-inputs qt)))
293 ("libjepg" ,libjpeg-8)
296 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
297 ;; but we can't make them a separate output because "out" and "examples"
298 ;; would refer to each other.
299 (outputs '("out" ;112MiB core + 37MiB examples
300 "doc")) ;280MiB of HTML + code
303 (modify-phases %standard-phases
306 (lambda* (#:key outputs #:allow-other-keys)
307 (let ((out (assoc-ref outputs "out"))
308 (doc (assoc-ref outputs "doc")))
309 (substitute* '("configure")
310 (("/bin/pwd") (which "pwd")))
316 ;; Note: Don't pass '-docdir' since 'qmake' and
317 ;; libQtCore would record its value, thereby defeating
318 ;; the whole point of having a separate output.
319 "-datadir" (string-append out "/share/qt-" ,version
321 "-importdir" (string-append out "/lib/qt-4"
323 "-plugindir" (string-append out "/lib/qt-4"
325 "-translationdir" (string-append out "/share/qt-" ,version
327 "-demosdir" (string-append out "/share/qt-" ,version
329 "-examplesdir" (string-append out "/share/qt-" ,version
333 ;; explicitly link with dbus instead of dlopening it
335 ;; Skip the webkit module; it fails to build on armhf
336 ;; and, apart from that, may pose security risks.
338 ;; drop special machine instructions not supported
339 ;; on all instances of the target
340 ,@(if (string-prefix? "x86_64"
341 (or (%current-target-system)
355 (lambda* (#:key outputs #:allow-other-keys)
356 ;; Because of qt4-documentation-path.patch, documentation ends up
357 ;; being installed in OUT. Move it to the right place.
358 (let* ((out (assoc-ref outputs "out"))
359 (doc (assoc-ref outputs "doc"))
360 (olddoc (string-append out "/doc"))
361 (docdir (string-append doc "/share/doc/qt-" ,version)))
362 (mkdir-p (dirname docdir))
364 ;; Note: We can't use 'rename-file' here because OUT and DOC are
365 ;; different "devices" due to bind-mounts.
366 (copy-recursively olddoc docdir)
367 (delete-file-recursively olddoc)
370 (define-public qtbase
376 (uri (string-append "https://download.qt.io/official_releases/qt/"
377 (version-major+minor version) "/" version
378 "/submodules/" name "-opensource-src-"
382 "1kq422vb2zaic099pgzwk7c0qzgc3xap6qahw5vklrq0mgivvrk9"))
383 ;; Use TZDIR to avoid depending on package "tzdata".
384 (patches (search-patches "qtbase-use-TZDIR.patch"))
385 (modules '((guix build utils)))
387 ;; corelib uses bundled harfbuzz, md4, md5, sha3
391 (delete-file-recursively (string-append "src/3rdparty/" dir)))
392 (list "double-conversion" "freetype" "harfbuzz-ng"
393 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
396 (build-system gnu-build-system)
399 ("which" ,(@ (gnu packages base) which))))
401 `(("alsa-lib" ,alsa-lib)
404 ("double-conversion" ,double-conversion)
407 ("fontconfig" ,fontconfig)
408 ("freetype" ,freetype)
410 ("harfbuzz" ,harfbuzz)
412 ("libinput" ,libinput-minimal)
417 ("libxcomposite" ,libxcomposite)
418 ("libxcursor" ,libxcursor)
419 ("libxfixes" ,libxfixes)
421 ("libxinerama" ,libxinerama)
422 ("libxkbcommon" ,libxkbcommon)
424 ("libxrandr" ,libxrandr)
425 ("libxrender" ,libxrender)
433 ("postgresql" ,postgresql)
434 ("pulseaudio" ,pulseaudio)
436 ("unixodbc" ,unixodbc)
437 ("xcb-util" ,xcb-util)
438 ("xcb-util-image" ,xcb-util-image)
439 ("xcb-util-keysyms" ,xcb-util-keysyms)
440 ("xcb-util-renderutil" ,xcb-util-renderutil)
441 ("xcb-util-wm" ,xcb-util-wm)
448 ("pkg-config" ,pkg-config)
453 (modify-phases %standard-phases
454 (add-after 'configure 'patch-bin-sh
456 (substitute* '("config.status"
458 "mkspecs/features/qt_functions.prf"
459 "qmake/library/qmakebuiltins.cpp")
460 (("/bin/sh") (which "sh")))
463 (lambda* (#:key outputs #:allow-other-keys)
464 (let ((out (assoc-ref outputs "out")))
465 (substitute* "configure"
466 (("/bin/pwd") (which "pwd")))
467 (substitute* "src/corelib/global/global.pri"
468 (("/bin/ls") (which "ls")))
469 ;; The configuration files for other Qt5 packages are searched
470 ;; through a call to "find_package" in Qt5Config.cmake, which
471 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
472 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
473 ;; components can be installed in different places.
474 (substitute* (find-files "." ".*\\.cmake")
475 (("NO_DEFAULT_PATH") ""))
476 ;; do not pass "--enable-fast-install", which makes the
477 ;; configure process fail
482 "-docdir" (string-append out "/share/doc/qt5")
483 "-headerdir" (string-append out "/include/qt5")
484 "-archdatadir" (string-append out "/lib/qt5")
485 "-datadir" (string-append out "/share/qt5")
486 "-examplesdir" (string-append
487 out "/share/doc/qt5/examples")
490 ;; Do not build examples; if desired, these could go
491 ;; into a separate output, but for the time being, we
492 ;; prefer to save the space and build time.
493 "-no-compile-examples"
494 ;; Most "-system-..." are automatic, but some use
495 ;; the bundled copy by default.
499 ;; explicitly link with openssl instead of dlopening it
501 ;; explicitly link with dbus instead of dlopening it
503 ;; don't use the precompiled headers
505 ;; drop special machine instructions that do not have
507 ,@(if (string-prefix? "x86_64"
508 (or (%current-target-system)
513 "-no-mips_dspr2")))))
514 (add-after 'install 'patch-mkspecs
515 (lambda* (#:key outputs #:allow-other-keys)
516 (let* ((out (assoc-ref outputs "out"))
517 (archdata (string-append out "/lib/qt5"))
518 (mkspecs (string-append archdata "/mkspecs"))
519 (qt_config.prf (string-append
520 mkspecs "/features/qt_config.prf")))
521 ;; For each Qt module, let `qmake' uses search paths in the
522 ;; module directory instead of all in QT_INSTALL_PREFIX.
523 (substitute* qt_config.prf
524 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
525 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
526 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
527 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
528 (("\\$\\$\\[QT_HOST_LIBS\\]")
529 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
530 (("\\$\\$\\[QT_INSTALL_BINS\\]")
531 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
533 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
534 (substitute* (string-append mkspecs "/features/qt_functions.prf")
535 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
536 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
538 ;; Resolve qmake spec files within qtbase by absolute paths.
541 (string-append mkspecs "/features/" file))
542 '("device_config.prf" "moc.prf" "qt_build_config.prf"
543 "qt_config.prf" "winrt/package_manifest.prf"))
544 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
545 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
547 (add-after 'unpack 'patch-paths
548 ;; Use the absolute paths for dynamically loaded libs, otherwise
549 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
551 (lambda* (#:key inputs #:allow-other-keys)
553 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
554 "cross-libc" "libc"))))
555 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
556 "src/network/kernel/qhostinfo_unix.cpp")
557 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
558 (string-append a glibc "/lib/lib" b))))
559 ;; X11/locale (compose path)
560 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
561 ;; Don't search in /usr/…/X11/locale, …
562 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
563 (string-append "// " line))
564 ;; … but use libx11's path
565 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
566 (string-append a "\"" (assoc-ref inputs "libx11") b)))
568 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
569 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
570 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
572 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
573 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
574 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
575 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
576 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
579 (list (search-path-specification
580 (variable "QMAKEPATH")
581 (files '("lib/qt5")))
582 (search-path-specification
583 (variable "QML2_IMPORT_PATH")
584 (files '("lib/qt5/qml")))
585 (search-path-specification
586 (variable "QT_PLUGIN_PATH")
587 (files '("lib/qt5/plugins")))
588 (search-path-specification
589 (variable "XDG_DATA_DIRS")
591 (search-path-specification
592 (variable "XDG_CONFIG_DIRS")
593 (files '("etc/xdg")))))
594 (home-page "https://www.qt.io/")
595 (synopsis "Cross-platform GUI library")
596 (description "Qt is a cross-platform application and UI framework for
597 developers using C++ or QML, a CSS & JavaScript like language.")
598 (license (list license:lgpl2.1 license:lgpl3))))
601 (package (inherit qtbase)
606 (uri (string-append "https://download.qt.io/official_releases/qt/"
607 (version-major+minor version) "/" version
608 "/submodules/" name "-opensource-src-"
612 "0yh3an9rc7fh013cw3bm318ap6428icsmnj38hhg1w6lpwr2gwm2"))))
613 (propagated-inputs `())
614 (native-inputs `(("perl" ,perl)))
621 (modify-phases %standard-phases
622 (add-before 'configure 'configure-qmake
623 (lambda* (#:key inputs outputs #:allow-other-keys)
624 (let* ((out (assoc-ref outputs "out"))
625 (qtbase (assoc-ref inputs "qtbase"))
626 (tmpdir (string-append (getenv "TMPDIR")))
627 (qmake (string-append tmpdir "/qmake"))
628 (qt.conf (string-append tmpdir "/qt.conf")))
629 ;; Use qmake with a customized qt.conf to override install
631 (symlink (which "qmake") qmake)
632 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
633 (with-output-to-file qt.conf
639 Documentation=share/doc/qt5
642 LibraryExecutables=lib/qt5/libexec
645 Plugins=lib/qt5/plugins
646 Imports=lib/qt5/imports
647 Qml2Imports=lib/qt5/qml
648 Translations=share/qt5/translations
650 Examples=share/doc/qt5/examples
656 [EffectiveSourcePaths]
662 (lambda* (#:key inputs outputs #:allow-other-keys)
663 ;; Valid QT_BUILD_PARTS variables are:
664 ;; libs tools tests examples demos docs translations
665 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"))))
666 (add-before 'check 'set-display
668 ;; make Qt render "offscreen", required for tests
669 (setenv "QT_QPA_PLATFORM" "offscreen")
671 (synopsis "Qt module for displaying SVGs")
672 (description "The QtSvg module provides classes for displaying the
673 contents of SVG files.")))
675 (define-public qtimageformats
676 (package (inherit qtsvg)
677 (name "qtimageformats")
681 (uri (string-append "https://download.qt.io/official_releases/qt/"
682 (version-major+minor version) "/" version
683 "/submodules/" name "-opensource-src-"
687 "1nfxvf96wh1smdmcsk4m9f7zg69fgp844f8772qpv6v4m20p1qb9"))
688 (modules '((guix build utils)))
690 '(delete-file-recursively "src/3rdparty"))))
700 (synopsis "Additional Image Format plugins for Qt")
701 (description "The QtImageFormats module contains plugins for adding
702 support for MNG, TGA, TIFF and WBMP image formats.")))
704 (define-public qtx11extras
705 (package (inherit qtsvg)
710 (uri (string-append "https://download.qt.io/official_releases/qt/"
711 (version-major+minor version) "/" version
712 "/submodules/" name "-opensource-src-"
716 "1a125fi7lbxfps207i12jammm4cjbiawmp4sqa3bxqah8p21i6w7"))))
718 (substitute-keyword-arguments (package-arguments qtsvg)
719 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
720 (native-inputs `(("perl" ,perl)))
724 (synopsis "Qt Extras for X11")
725 (description "The QtX11Extras module includes the library to access X11
726 from within Qt 5.")))
728 (define-public qtxmlpatterns
729 (package (inherit qtsvg)
730 (name "qtxmlpatterns")
734 (uri (string-append "https://download.qt.io/official_releases/qt/"
735 (version-major+minor version) "/" version
736 "/submodules/" name "-opensource-src-"
740 "0ybz0i3wblvrm958s9ykp3a79bakjbb7k74q71mqaaswkv9imxgs"))))
742 (substitute-keyword-arguments (package-arguments qtsvg)
744 `(modify-phases ,phases
745 (add-after 'unpack 'disable-network-tests
746 (lambda _ (substitute* "tests/auto/auto.pro"
747 (("qxmlquery") "# qxmlquery")
748 (("xmlpatterns ") "# xmlpatterns"))
750 (native-inputs `(("perl" ,perl)))
751 (inputs `(("qtbase" ,qtbase)))
752 (synopsis "Qt XML patterns module")
753 (description "The QtXmlPatterns module is a XQuery and XPath engine for
754 XML and custom data models. It contains programs such as xmlpatterns and
755 xmlpatternsvalidator.")))
757 (define-public qtdeclarative
758 (package (inherit qtsvg)
759 (name "qtdeclarative")
763 (uri (string-append "https://download.qt.io/official_releases/qt/"
764 (version-major+minor version) "/" version
765 "/submodules/" name "-opensource-src-"
769 "0r9dhfc6qmxlzn2v9r6z6n2mcq6pv1nmyh91g9hcdlkx40xqlqyw"))))
771 (substitute-keyword-arguments (package-arguments qtsvg)
772 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
775 ("pkg-config" ,pkg-config)
778 ("qtxmlpatterns" ,qtxmlpatterns)))
782 (synopsis "Qt QML module (Quick 2)")
783 (description "The Qt QML module provides a framework for developing
784 applications and libraries with the QML language. It defines and implements the
785 language and engine infrastructure, and provides an API to enable application
786 developers to extend the QML language with custom types and integrate QML code
787 with JavaScript and C++.")))
789 (define-public qtconnectivity
790 (package (inherit qtsvg)
791 (name "qtconnectivity")
795 (uri (string-append "https://download.qt.io/official_releases/qt/"
796 (version-major+minor version) "/" version
797 "/submodules/" name "-opensource-src-"
801 "12qckqz6ldvn1czkkigadmgl07yk4gs74hy4ifh4hmpm7cv519yv"))))
803 (substitute-keyword-arguments (package-arguments qtsvg)
805 `(modify-phases ,phases
806 (add-after 'unpack 'disable-failing-tests
807 ;; this test fails on armhf and aarch64
809 (substitute* "tests/auto/qndefnfcsmartposterrecord/tst_qndefnfcsmartposterrecord.cpp"
810 (("QCOMPARE\\(record.action\\(\\), QNdefNfcSmartPosterRecord::UnspecifiedAction")
811 "//QCOMPARE(record.action(), QNdefNfcSmartPosterRecord::UnspecifiedAction"))
815 ("pkg-config" ,pkg-config)
816 ("qtdeclarative" ,qtdeclarative)))
820 (synopsis "Qt Connectivity module")
821 (description "The Qt Connectivity modules provides modules for interacting
822 with Bluetooth and NFC.")))
824 (define-public qtwebsockets
825 (package (inherit qtsvg)
826 (name "qtwebsockets")
830 (uri (string-append "https://download.qt.io/official_releases/qt/"
831 (version-major+minor version) "/" version
832 "/submodules/" name "-opensource-src-"
836 "00786d9m8skj68n5x9d8151zmmskx7ckhgcdd08hs9nly04h55vj"))))
838 (substitute-keyword-arguments (package-arguments qtsvg)
839 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
842 ("qtdeclarative" ,qtdeclarative)))
843 (inputs `(("qtbase" ,qtbase)))
844 (synopsis "Qt Web Sockets module")
845 (description "WebSocket is a web-based protocol designed to enable two-way
846 communication between a client application and a remote host. The Qt
847 WebSockets module provides C++ and QML interfaces that enable Qt applications
848 to act as a server that can process WebSocket requests, or a client that can
849 consume data received from the server, or both.")))
851 (define-public qtsensors
852 (package (inherit qtsvg)
857 (uri (string-append "https://download.qt.io/official_releases/qt/"
858 (version-major+minor version) "/" version
859 "/submodules/" name "-opensource-src-"
863 "0n6lkkn7c9x8vcplmfvkx7jq6najh2mrwnfb3blrmkmpash3lgvr"))))
865 (substitute-keyword-arguments (package-arguments qtsvg)
866 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
868 `(modify-phases ,phases
869 (add-after 'unpack 'fix-tests
871 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
872 (("2000") "5000") ;lengthen test timeout
873 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
877 ("qtdeclarative" ,qtdeclarative)))
878 (inputs `(("qtbase" ,qtbase)))
879 (synopsis "Qt Sensors module")
880 (description "The Qt Sensors API provides access to sensor hardware via QML
881 and C++ interfaces. The Qt Sensors API also provides a motion gesture
882 recognition API for devices.")))
884 (define-public qtmultimedia
885 (package (inherit qtsvg)
886 (name "qtmultimedia")
890 (uri (string-append "https://download.qt.io/official_releases/qt/"
891 (version-major+minor version) "/" version
892 "/submodules/" name "-opensource-src-"
896 "0x2f3vpax7rq0lxnncbp5b248bxdicrwn8hv4hsas2g2283s0lj9"))
897 (modules '((guix build utils)))
900 (delete-file-recursively
901 "examples/multimedia/spectrum/3rdparty")
902 ;; We also prevent the spectrum example from being built.
903 (substitute* "examples/multimedia/multimedia.pro"
904 (("spectrum") "#"))))))
906 (substitute-keyword-arguments (package-arguments qtsvg)
908 `(modify-phases ,phases
910 (lambda* (#:key outputs #:allow-other-keys)
911 (let ((out (assoc-ref outputs "out")))
912 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
913 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
914 (string-append "PREFIX=" out))))))))
915 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
918 ("pkg-config" ,pkg-config)
920 ("qtdeclarative" ,qtdeclarative)))
922 `(("alsa-lib" ,alsa-lib)
924 ("pulseaudio" ,pulseaudio)
926 ;; Gstreamer is needed for the mediaplayer plugin
927 ("gstreamer" ,gstreamer)
928 ("gst-plugins-base" ,gst-plugins-base)))
929 (synopsis "Qt Multimedia module")
930 (description "The Qt Multimedia module provides set of APIs to play and
931 record media, and manage a collection of media content. It also contains a
932 set of plugins for interacting with pulseaudio and GStreamer.")))
934 (define-public qtwayland
935 (package (inherit qtsvg)
940 (uri (string-append "https://download.qt.io/official_releases/qt/"
941 (version-major+minor version) "/" version
942 "/submodules/" name "-opensource-src-"
946 "0x4q17k23akf14i3pyllr96s8lvprk1x006wp0mi5rhk4199cx1z"))
947 (modules '((guix build utils)))
949 ;; The examples try to build and cause the build to fail
950 '(delete-file-recursively "examples"))))
952 (substitute-keyword-arguments (package-arguments qtsvg)
954 `(modify-phases ,phases
955 (add-before 'check 'set-ld-library-path
956 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
958 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
959 ;; wayland platform plugin.
961 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
966 ("pkg-config" ,pkg-config)
967 ("qtdeclarative" ,qtdeclarative)))
969 `(("fontconfig" ,fontconfig)
970 ("freetype" ,freetype)
972 ("libxcomposite" ,libxcomposite)
974 ("libxkbcommon" ,libxkbcommon)
975 ("libxrender" ,libxrender)
979 ("wayland" ,wayland)))
980 (synopsis "Qt Wayland module")
981 (description "The Qt Wayland module provides the QtWayland client and
982 compositor libraries.")))
984 (define-public qtserialport
985 (package (inherit qtsvg)
986 (name "qtserialport")
990 (uri (string-append "https://download.qt.io/official_releases/qt/"
991 (version-major+minor version) "/" version
992 "/submodules/" name "-opensource-src-"
996 "172i5cpqnk0c3m0hg08hgj15qvsyd1xvw9yf2dqicg3l10lqwg8c"))))
997 (native-inputs `(("perl" ,perl)))
1002 (substitute-keyword-arguments (package-arguments qtsvg)
1004 `(modify-phases ,phases
1005 (add-after 'unpack 'patch-dlopen-paths
1006 (lambda* (#:key inputs #:allow-other-keys)
1007 (substitute* "src/serialport/qtudev_p.h"
1008 ;; Use the absolute paths for dynamically loaded libs,
1009 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1010 ;; typically is not set in guix.
1011 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1012 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1014 (synopsis "Qt Serial Port module")
1015 (description "The Qt Serial Port module provides the library for
1016 interacting with serial ports from within Qt.")))
1018 (define-public qtserialbus
1019 (package (inherit qtsvg)
1020 (name "qtserialbus")
1024 (uri (string-append "https://download.qt.io/official_releases/qt/"
1025 (version-major+minor version) "/" version
1026 "/submodules/" name "-opensource-src-"
1030 "1i6b7w9z30mzzi0dcmrxx1scpzpnnw2fag1igvrnzvw1jwp414ff"))))
1032 `(("qtbase" ,qtbase)
1033 ("qtserialport" ,qtserialport)))
1034 (synopsis "Qt Serial Bus module")
1035 (description "The Qt Serial Bus API provides classes and functions to
1036 access the various industrial serial buses and protocols, such as CAN, ModBus,
1039 (define-public qtwebchannel
1040 (package (inherit qtsvg)
1041 (name "qtwebchannel")
1045 (uri (string-append "https://download.qt.io/official_releases/qt/"
1046 (version-major+minor version) "/" version
1047 "/submodules/" name "-opensource-src-"
1051 "1acs0fa5rxm3cir0lydc9a8685qagf1786vkssv51wk3v9r3lc4h"))))
1054 ("qtdeclarative" ,qtdeclarative)
1055 ("qtwebsockets" ,qtwebsockets)))
1056 (inputs `(("qtbase" ,qtbase)))
1057 (synopsis "Web communication library for Qt")
1058 (description "The Qt WebChannel module enables peer-to-peer communication
1059 between the host (QML/C++ application) and the client (HTML/JavaScript
1060 application). The transport mechanism is supported out of the box by the two
1061 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1063 (define-public qtlocation
1064 (package (inherit qtsvg)
1069 (uri (string-append "https://download.qt.io/official_releases/qt/"
1070 (version-major+minor version) "/" version
1071 "/submodules/" name "-opensource-src-"
1075 "186jzv19v674n8jmm13v5xwv211lygih5657rlvbhc1s4jq6iv9p"))))
1077 (substitute-keyword-arguments (package-arguments qtsvg)
1078 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1081 ("qtdeclarative" ,qtdeclarative)
1082 ("qtquickcontrols" ,qtquickcontrols)
1083 ("qtserialport" ,qtserialport)))
1086 ("openssl" ,openssl)
1089 (synopsis "Qt Location and Positioning modules")
1090 (description "The Qt Location module provides an interface for location,
1091 positioning and geolocation plugins.")))
1093 (define-public qttools
1094 (package (inherit qtsvg)
1099 (uri (string-append "https://download.qt.io/official_releases/qt/"
1100 (version-major+minor version) "/" version
1101 "/submodules/" name "-opensource-src-"
1105 "11vfk6c8snsqwqj1xk53c0h2mkqr4gfa9kinp8py56x7sn15galm"))))
1107 (substitute-keyword-arguments (package-arguments qtsvg)
1108 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1111 ("qtdeclarative" ,qtdeclarative)))
1114 ("qtbase" ,qtbase)))
1115 (synopsis "Qt Tools and Designer modules")
1116 (description "The Qt Tools module provides a set of applications to browse
1117 the documentation, translate applications, generate help files and other stuff
1118 that helps in Qt development.")))
1120 (define-public qtscript
1121 (package (inherit qtsvg)
1126 (uri (string-append "https://download.qt.io/official_releases/qt/"
1127 (version-major+minor version) "/" version
1128 "/submodules/" name "-opensource-src-"
1132 "0lz0iv1baah7cxrpyiqzqp4fxxf75i21qd06ha7r5d80hq3xlia0"))
1133 (patches (search-patches "qtscript-disable-tests.patch"))))
1136 ("qttools" ,qttools)))
1138 `(("qtbase" ,qtbase)))
1139 (synopsis "Qt Script module")
1140 (description "Qt provides support for application scripting with ECMAScript.
1141 The following guides and references cover aspects of programming with
1142 ECMAScript and Qt.")))
1144 (define-public qtquickcontrols
1145 (package (inherit qtsvg)
1146 (name "qtquickcontrols")
1150 (uri (string-append "https://download.qt.io/official_releases/qt/"
1151 (version-major+minor version) "/" version
1152 "/submodules/" name "-opensource-src-"
1156 "12yrmv6afjbd1fw3r8zjdrbq5l7cy7k5bxcyiv1m97gykfh0b8hn"))))
1158 (substitute-keyword-arguments (package-arguments qtsvg)
1159 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1161 `(("qtbase" ,qtbase)
1162 ("qtdeclarative" ,qtdeclarative)))
1163 (synopsis "Qt Quick Controls and other Quick modules")
1164 (description "The QtScript module provides classes for making Qt
1165 applications scriptable. This module provides a set of extra components that
1166 can be used to build complete interfaces in Qt Quick.")))
1168 (define-public qtquickcontrols2
1169 (package (inherit qtsvg)
1170 (name "qtquickcontrols2")
1174 (uri (string-append "https://download.qt.io/official_releases/qt/"
1175 (version-major+minor version) "/" version
1176 "/submodules/" name "-opensource-src-"
1180 "0334ayansm743kf113rs3k9hi9qb6giscfx9xig3y1z7asisfa0m"))))
1182 (substitute-keyword-arguments (package-arguments qtsvg)
1183 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1185 `(("qtbase" ,qtbase)
1186 ("qtdeclarative" ,qtdeclarative)))
1187 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1188 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1189 module that provides platform integration: native dialogs, menus and menu bars,
1190 and tray icons. It falls back to Qt Widgets when a native implementation is
1193 (define-public qtgraphicaleffects
1194 (package (inherit qtsvg)
1195 (name "qtgraphicaleffects")
1199 (uri (string-append "https://download.qt.io/official_releases/qt/"
1200 (version-major+minor version) "/" version
1201 "/submodules/" name "-opensource-src-"
1205 "1vxq4j7cb5cya1g234rxhfb361n45gp8c70gj8pc03njswkm7xwp"))))
1207 (substitute-keyword-arguments (package-arguments qtsvg)
1208 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1210 `(("qtbase" ,qtbase)
1211 ("qtdeclarative" ,qtdeclarative)))
1212 (synopsis "Qt Graphical Effects module")
1213 (description "The Qt Graphical Effects module provides a set of QML types
1214 for adding visually impressive and configurable effects to user interfaces.
1215 Effects are visual items that can be added to Qt Quick user interface as UI
1216 components. The API consists of over 20 effects provided as separate QML
1217 types. The effects cover functional areas such as blending, masking, blurring,
1218 coloring, and many more.")))
1220 (define-public qtdeclarative-render2d
1221 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
1222 (package (inherit qtsvg)
1223 (name "qtdeclarative-render2d")
1227 (uri (string-append "https://download.qt.io/official_releases/qt/"
1228 (version-major+minor version) "/" version
1229 "/submodules/" name "-opensource-src-"
1233 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1234 (modules '((guix build utils)))
1236 '(delete-file-recursively "tools/opengldummy/3rdparty"))))
1239 `(("qtbase" ,qtbase)
1240 ("qtdeclarative" ,qtdeclarative)))
1241 (synopsis "Qt Declarative Render module")
1242 (description "The Qt Declarative Render 2D module provides a Raster
1243 backend for QtQuick scene graph.")
1244 (properties `((superseded . ,qtdeclarative)))))
1246 (define-public qtgamepad
1247 (package (inherit qtsvg)
1252 (uri (string-append "https://download.qt.io/official_releases/qt/"
1253 (version-major+minor version) "/" version
1254 "/submodules/" name "-opensource-src-"
1258 "1ci6aapq0i8qbzkn9xxvxn1n81z3y28yrlyzw0anqzj9qp97cl6f"))))
1261 ("pkg-config" ,pkg-config)))
1263 `(("fontconfig" ,fontconfig)
1264 ("freetype" ,freetype)
1265 ("libxrender" ,libxrender)
1268 ("qtdeclarative" ,qtdeclarative)))
1269 (synopsis "Qt Gamepad module")
1270 (description "The Qt Gamepad module is an add-on library that enables Qt
1271 applications to support the use of gamepad hardware and in some cases remote
1272 control equipment. The module provides both QML and C++ interfaces. The
1273 primary target audience are embedded devices with fullscreen user interfaces,
1274 and mobile applications targeting TV-like form factors.")))
1276 (define-public qtscxml
1277 (package (inherit qtsvg)
1282 (uri (string-append "https://download.qt.io/official_releases/qt/"
1283 (version-major+minor version) "/" version
1284 "/submodules/" name "-opensource-src-"
1288 "0x8bjp9jzib4kfn7rbricw4qr259qqsdbrz0dw39453s2m7cbv0x"))
1289 (modules '((guix build utils)))
1292 (delete-file-recursively "tests/3rdparty")
1293 ;; the scion test refers to the bundled 3rd party test code.
1294 (substitute* "tests/auto/auto.pro"
1295 (("scion") "#"))))))
1297 `(("qtbase" ,qtbase)
1298 ("qtdeclarative" ,qtdeclarative)))
1299 (synopsis "Qt SCXML module")
1300 (description "The Qt SCXML module provides functionality to create state
1301 machines from SCXML files. This includes both dynamically creating state
1302 machines (loading the SCXML file and instantiating states and transitions) and
1303 generating a C++ file that has a class implementing the state machine. It
1304 also contains functionality to support data models and executable content.")))
1306 (define-public qtpurchasing
1307 (package (inherit qtsvg)
1308 (name "qtpurchasing")
1312 (uri (string-append "https://download.qt.io/official_releases/qt/"
1313 (version-major+minor version) "/" version
1314 "/submodules/" name "-opensource-src-"
1318 "08sk8vw16pa1qv36rfr9dsbzlwlv6kznfpsq8wfabhkgbfl6awqs"))))
1320 `(("qtbase" ,qtbase)
1321 ("qtdeclarative" ,qtdeclarative)))
1322 (synopsis "Qt Purchasing module")
1323 (description "The Qt Purchasing module provides and in-app API for
1324 purchasing goods and services.")))
1326 (define-public qtcanvas3d
1327 (package (inherit qtsvg)
1332 (uri (string-append "https://download.qt.io/official_releases/qt/"
1333 (version-major+minor version) "/" version
1334 "/submodules/" name "-opensource-src-"
1338 "0agdxgk7knf6zkjdi6316y2k9zq72wcg5zn3cbhw4hzjw81qadgg"))
1339 (modules '((guix build utils)))
1341 '(delete-file-recursively "examples/canvas3d/3rdparty"))))
1343 (substitute-keyword-arguments (package-arguments qtsvg)
1344 ;; Building the tests depends on the bundled 3rd party javascript files,
1345 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1346 ;; fail, so we skip building them for now.
1348 `(modify-phases ,phases
1350 (lambda* (#:key outputs #:allow-other-keys)
1351 (let ((out (assoc-ref outputs "out")))
1352 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools"
1353 (string-append "PREFIX=" out))))))))
1354 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1357 `(("qtbase" ,qtbase)
1358 ("qtdeclarative" ,qtdeclarative)))
1359 (synopsis "Qt Canvas 3D module")
1360 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1361 drawing calls from Qt Quick JavaScript.")))
1363 (define-public qtcharts
1364 (package (inherit qtsvg)
1369 (uri (string-append "https://download.qt.io/official_releases/qt/"
1370 (version-major+minor version) "/" version
1371 "/submodules/" name "-opensource-src-"
1375 "1rykb72gr95rxd0rvbl846ys8xvyyhrms1jz7l4hlwp6zn1jkxvm"))))
1377 (substitute-keyword-arguments (package-arguments qtsvg)
1378 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1380 `(("qtbase" ,qtbase)
1381 ("qtdeclarative" ,qtdeclarative)))
1382 (synopsis "Qt Charts module")
1383 (description "The Qt Charts module provides a set of easy to use chart
1384 components. It uses the Qt Graphics View Framework, therefore charts can be
1385 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1386 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1387 selecting one of the charts themes.")
1388 (license license:gpl3)))
1390 (define-public qtdatavis3d
1391 (package (inherit qtsvg)
1392 (name "qtdatavis3d")
1396 (uri (string-append "https://download.qt.io/official_releases/qt/"
1397 (version-major+minor version) "/" version
1398 "/submodules/" name "-opensource-src-"
1402 "1ggwfnqf17mp5dkfr82q1qrimkb6wv3304vl8mjv1nq0zisckhjv"))))
1404 (substitute-keyword-arguments (package-arguments qtsvg)
1405 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1407 `(("qtbase" ,qtbase)
1408 ("qtdeclarative" ,qtdeclarative)))
1409 (synopsis "Qt Data Visualization module")
1410 (description "The Qt Data Visualization module provides a way to visualize
1411 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1412 visualizing depth maps and large quantities of rapidly changing data, such as
1413 data received from multiple sensors. The look and feel of graphs can be
1414 customized by using themes or by adding custom items and labels to them.")
1415 (license license:gpl3)))
1417 (define-public qtnetworkauth
1418 (package (inherit qtsvg)
1419 (name "qtnetworkauth")
1423 (uri (string-append "https://download.qt.io/official_releases/qt/"
1424 (version-major+minor version) "/" version
1425 "/submodules/" name "-opensource-src-"
1429 "0mqcqkp9h5bgzb3wfy239wh1c9s9zxd7mww11c0jyp56wk5balcx"))))
1431 (substitute-keyword-arguments (package-arguments qtsvg)
1433 `(modify-phases ,phases
1434 (add-after 'unpack 'remove-failing-test
1436 ;; These tests can't find their test data.
1437 (substitute* "tests/auto/auto.pro"
1438 (("oauth1 ") "# oauth1 "))
1441 `(("qtbase" ,qtbase)))
1442 (synopsis "Qt Network Authorization module")
1443 (description "The Qt Network Authorization module provides an
1444 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1446 (define-public qtremoteobjects
1447 (package (inherit qtsvg)
1448 (name "qtremoteobjects")
1452 (uri (string-append "https://download.qt.io/official_releases/qt/"
1453 (version-major+minor version) "/" version
1454 "/submodules/" name "-opensource-src-"
1458 "1wb50dapv0l45c0rfmpiaddvwv9na50lmd5zmm052q9d1xb15f6b"))))
1460 `(("qtbase" ,qtbase)
1461 ("qtdeclarative" ,qtdeclarative)))
1462 (synopsis "Qt Remote Objects module")
1463 (description "The Qt Remote Objects module is an @dfn{inter-process
1464 communication} (IPC) module developed for Qt. The idea is to extend existing
1465 Qt's functionalities to enable an easy exchange of information between
1466 processes or computers.")))
1468 (define-public qtspeech
1469 (package (inherit qtsvg)
1474 (uri (string-append "https://download.qt.io/official_releases/qt/"
1475 (version-major+minor version) "/" version
1476 "/submodules/" name "-opensource-src-"
1480 "17h8hrixxcsn7pd5iipbj2hxpp5m2dhfq3w04wkamambb49qs80x"))))
1482 `(("qtbase" ,qtbase)))
1485 ("qtdeclarative" ,qtdeclarative)
1486 ("qtmultimedia" ,qtmultimedia)
1487 ("qtxmlpatterns" ,qtxmlpatterns)))
1488 (synopsis "Qt Speech module")
1489 (description "The Qt Speech module enables a Qt application to support
1490 accessibility features such as text-to-speech, which is useful for end-users
1491 who are visually challenged or cannot access the application for whatever
1492 reason. The most common use case where text-to-speech comes in handy is when
1493 the end-user is driving and cannot attend the incoming messages on the phone.
1494 In such a scenario, the messaging application can read out the incoming
1497 (define-public python-sip
1505 (string-append "mirror://sourceforge/pyqt/sip/"
1506 "sip-" version "/sip-" version ".tar.gz"))
1509 "0x2bghbprwl3az1ni3p87i0bq8r99694la93kg65vi0cz12gh3bl"))))
1510 (build-system gnu-build-system)
1512 `(("python" ,python-wrapper)))
1514 `(#:tests? #f ; no check target
1515 #:modules ((srfi srfi-1)
1516 ,@%gnu-build-system-modules)
1518 (modify-phases %standard-phases
1520 (lambda* (#:key inputs outputs #:allow-other-keys)
1521 (let* ((out (assoc-ref outputs "out"))
1522 (bin (string-append out "/bin"))
1523 (include (string-append out "/include"))
1524 (python (assoc-ref inputs "python"))
1526 (last (string-split python #\-)))
1529 (take (string-split python-version #\.) 2)
1531 (lib (string-append out "/lib/python"
1535 (system* "python" "configure.py"
1538 "--incdir" include))))))))
1539 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1540 (synopsis "Python binding creator for C and C++ libraries")
1542 "SIP is a tool to create Python bindings for C and C++ libraries. It
1543 was originally developed to create PyQt, the Python bindings for the Qt
1544 toolkit, but can be used to create bindings for any C or C++ library.
1546 SIP comprises a code generator and a Python module. The code generator
1547 processes a set of specification files and generates C or C++ code, which
1548 is then compiled to create the bindings extension module. The SIP Python
1549 module provides support functions to the automatically generated code.")
1550 ;; There is a choice between a python like license, gpl2 and gpl3.
1551 ;; For compatibility with pyqt, we need gpl3.
1552 (license license:gpl3)))
1554 (define-public python2-sip
1555 (package (inherit python-sip)
1556 (name "python2-sip")
1558 `(("python" ,python-2)))))
1560 (define-public python-pyqt
1562 (name "python-pyqt")
1568 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1569 "PyQt-" version "/PyQt5_gpl-"
1573 "15hh4z5vd45dcswjla58q6rrfr6ic7jfz2n7c8lwfb10rycpj3mb"))
1574 (patches (search-patches "pyqt-configure.patch"))))
1575 (build-system gnu-build-system)
1577 `(("qtbase" ,qtbase))) ; for qmake
1579 `(("python-sip" ,python-sip)))
1581 `(("python" ,python-wrapper)
1583 ("qtconnectivity" ,qtconnectivity)
1584 ("qtdeclarative" ,qtdeclarative)
1585 ("qtlocation" ,qtlocation)
1586 ("qtmultimedia" ,qtmultimedia)
1587 ("qtsensors" ,qtsensors)
1588 ("qtserialport" ,qtserialport)
1590 ("qttools" ,qttools)
1591 ("qtwebchannel" ,qtwebchannel)
1592 ("qtwebkit" ,qtwebkit)
1593 ("qtwebsockets" ,qtwebsockets)
1594 ("qtx11extras" ,qtx11extras)
1595 ("qtxmlpatterns" ,qtxmlpatterns)))
1597 `(#:modules ((srfi srfi-1)
1598 ,@%gnu-build-system-modules)
1600 (modify-phases %standard-phases
1602 (lambda* (#:key inputs outputs #:allow-other-keys)
1603 (let* ((out (assoc-ref outputs "out"))
1604 (bin (string-append out "/bin"))
1605 (sip (string-append out "/share/sip"))
1606 (plugins (string-append out "/plugins"))
1607 (designer (string-append plugins "/designer"))
1608 (qml (string-append plugins "/PyQt5"))
1609 (python (assoc-ref inputs "python"))
1611 (last (string-split python #\-)))
1614 (take (string-split python-version #\.) 2)
1616 (lib (string-append out "/lib/python"
1619 (stubs (string-append lib "/PyQt5")))
1620 (zero? (system* "python" "configure.py"
1624 "--designer-plugindir" designer
1625 "--qml-plugindir" qml
1626 ; Where to install the PEP 484 Type Hints stub
1627 ; files. Without this the stubs are tried to be
1628 ; installed into the python package's
1629 ; site-package directory, which is read-only.
1631 "--sipdir" sip))))))))
1632 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1633 (synopsis "Python bindings for Qt")
1635 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1636 framework. The bindings are implemented as a set of Python modules and
1637 contain over 620 classes.")
1638 (license license:gpl3)))
1640 (define-public python2-pyqt
1641 (package (inherit python-pyqt)
1642 (name "python2-pyqt")
1644 `(("python-sip" ,python2-sip)
1645 ("qtbase" ,qtbase)))
1647 `(("python" ,python-2)
1648 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1650 (define-public python-pyqt-4
1651 (package (inherit python-pyqt)
1652 (name "python-pyqt")
1658 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1659 "PyQt-" version "/PyQt4_gpl_x11-"
1663 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
1665 `(("python-sip" ,python-sip)
1667 (inputs `(("python" ,python-wrapper)))
1669 `(#:tests? #f ; no check target
1670 #:modules ((srfi srfi-1)
1671 ,@%gnu-build-system-modules)
1673 (modify-phases %standard-phases
1675 (lambda* (#:key inputs outputs #:allow-other-keys)
1676 (let* ((out (assoc-ref outputs "out"))
1677 (bin (string-append out "/bin"))
1678 (sip (string-append out "/share/sip"))
1679 (python (assoc-ref inputs "python"))
1681 (last (string-split python #\-)))
1684 (take (string-split python-version #\.) 2)
1686 (lib (string-append out "/lib/python"
1689 (zero? (system* "python" "configure.py"
1693 "--sipdir" sip))))))))
1694 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1696 (define-public python2-pyqt-4
1697 (package (inherit python-pyqt-4)
1698 (name "python2-pyqt")
1700 `(("python-sip" ,python2-sip)
1703 `(("python" ,python-2)))))
1705 (define-public qscintilla
1711 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1712 "QScintilla-" version "/QScintilla_gpl-"
1716 "1l2ylsv6s3wfhyx7qr5cxgkwwwhvbrpd2k7akgm9bvbyf4h1vcql"))))
1717 (build-system gnu-build-system)
1720 (modify-phases %standard-phases
1722 (lambda* (#:key outputs #:allow-other-keys)
1723 (let ((out (assoc-ref outputs "out")))
1725 (substitute* "qscintilla.pro"
1726 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1727 (string-append out "/lib"))
1728 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1729 (string-append out "/include"))
1730 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1731 (string-append out "/translations"))
1732 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1733 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1734 (("\\$\\$\\[QT_HOST_DATA\\]")
1735 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
1736 (invoke "qmake")))))))
1737 (native-inputs `(("qtbase" ,qtbase)))
1738 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1739 (synopsis "Qt port of the Scintilla C++ editor control")
1740 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1741 editor control. QScintilla includes features especially useful when editing
1742 and debugging source code. These include support for syntax styling, error
1743 indicators, code completion and call tips.")
1744 (license license:gpl3+)))
1746 (define-public python-qscintilla
1747 (package (inherit qscintilla)
1748 (name "python-qscintilla")
1751 (list "--pyqt=PyQt5"
1752 (string-append "--pyqt-sipdir="
1753 (assoc-ref %build-inputs "python-pyqt")
1755 (string-append "--qsci-incdir="
1756 (assoc-ref %build-inputs "qscintilla")
1758 (string-append "--qsci-libdir="
1759 (assoc-ref %build-inputs "qscintilla")
1762 (modify-phases %standard-phases
1764 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1766 (apply invoke "python3" "configure.py"
1768 ;; Install to the right directory
1769 (substitute* '("Makefile"
1771 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
1772 (assoc-ref outputs "out")))
1775 `(("qscintilla" ,qscintilla)
1777 ("python-pyqt" ,python-pyqt)))
1778 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1779 editor control. QScintilla includes features especially useful when editing
1780 and debugging source code. These include support for syntax styling, error
1781 indicators, code completion and call tips.
1783 This package provides the Python bindings.")))
1785 ;; PyQt only looks for modules in its own directory. It ignores environment
1786 ;; variables such as PYTHONPATH, so we need to build a union package to make
1788 (define-public python-pyqt+qscintilla
1789 (package (inherit python-pyqt)
1790 (name "python-pyqt+qscintilla")
1792 (build-system trivial-build-system)
1794 '(#:modules ((guix build union))
1796 (use-modules (ice-9 match)
1798 (match %build-inputs
1799 (((names . directories) ...)
1800 (union-build (assoc-ref %outputs "out")
1803 `(("python-pyqt" ,python-pyqt)
1804 ("python-qscintilla" ,python-qscintilla)))
1805 (synopsis "Union of PyQt and the Qscintilla extension")
1807 "This package contains the union of PyQt and the Qscintilla extension.")))
1809 (define-public qtkeychain
1816 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1817 "archive/v" version ".tar.gz"))
1818 (file-name (string-append name "-" version ".tar.gz"))
1820 (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
1821 (build-system cmake-build-system)
1823 `(("pkg-config" ,pkg-config)
1824 ("qttools" ,qttools)))
1826 `(("qtbase" ,qtbase)))
1828 `(#:tests? #f ; No tests included
1830 (modify-phases %standard-phases
1832 'configure 'set-qt-trans-dir
1834 (substitute* "CMakeLists.txt"
1835 (("\\$\\{qt_translations_dir\\}")
1836 "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
1838 (home-page "https://github.com/frankosterfeld/qtkeychain")
1839 (synopsis "Qt API to store passwords")
1841 "QtKeychain is a Qt library to store passwords and other secret data
1842 securely. It will not store any data unencrypted unless explicitly requested.")
1843 (license license:bsd-3)))
1853 (string-append "mirror://sourceforge/qwt/qwt/"
1854 version "/qwt-" version ".tar.bz2"))
1856 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1857 (build-system gnu-build-system)
1859 `(("qtbase" ,qtbase)
1861 ("qttools" ,qttools)))
1864 (modify-phases %standard-phases
1866 (lambda* (#:key outputs #:allow-other-keys)
1867 (let* ((out (assoc-ref outputs "out"))
1868 (docdir (string-append out "/share/doc/qwt"))
1869 (incdir (string-append out "/include/qwt"))
1870 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
1871 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
1872 (substitute* '("qwtconfig.pri")
1873 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
1874 (format #f "~a = ~a\n" x out))
1875 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
1876 (format #f "~a = ~a\n" x docdir))
1877 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
1878 (format #f "~a = ~a\n" x incdir))
1879 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
1880 (format #f "~a = ~a\n" x pluginsdir))
1881 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
1882 (format #f "~a = ~a\n" x featuresdir)))
1883 (substitute* '("doc/doc.pro")
1884 ;; We'll install them in the 'install-man-pages' phase.
1885 (("^unix:doc\\.files.*") ""))
1886 (zero? (system* "qmake")))))
1887 (add-after 'install 'install-man-pages
1888 (lambda* (#:key outputs #:allow-other-keys)
1889 (let* ((out (assoc-ref outputs "out"))
1890 (man (string-append out "/share/man")))
1891 ;; Remove some incomplete manual pages.
1892 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1894 (copy-recursively "doc/man" man)
1896 (home-page "http://qwt.sourceforge.net")
1897 (synopsis "Qt widgets for plots, scales, dials and other technical software
1900 "The Qwt library contains widgets and components which are primarily useful
1901 for technical and scientific purposes. It includes a 2-D plotting widget,
1902 different kinds of sliders, and much more.")
1905 ;; The Qwt license is LGPL2.1 with some exceptions.
1906 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1907 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1908 license:lgpl2.1 license:gpl3))))
1910 (define-public qtwebkit
1917 (uri (string-append "https://download.qt.io/official_releases/qt/"
1918 (version-major+minor version) "/" version
1919 "/submodules/" name "-opensource-src-"
1923 "1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998"))))
1924 (build-system gnu-build-system)
1927 ("python" ,python-2.7)
1932 ("pkg-config" ,pkg-config)))
1935 ("libjpeg" ,libjpeg)
1937 ("libwebp" ,libwebp)
1939 ("fontconfig" ,fontconfig)
1940 ("libxrender" ,libxrender)
1942 ("qtdeclarative" ,qtdeclarative)
1943 ("qtmultimedia" ,qtmultimedia)
1944 ("libxml2" ,libxml2)
1945 ("libxslt" ,libxslt)
1947 ("libxcomposite" ,libxcomposite)))
1950 (modify-phases %standard-phases
1951 (add-before 'configure 'fix-qmlwebkit-plugins-rpath
1953 (substitute* "Source/WebKit/qt/declarative/experimental/experimental.pri"
1954 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1955 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../../lib"))
1956 (substitute* "Source/WebKit/qt/declarative/public.pri"
1957 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1958 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../lib"))
1961 (lambda* (#:key outputs #:allow-other-keys)
1962 (let ((out (assoc-ref outputs "out")))
1964 (string-append (getcwd) "/Tools/qmake:"
1965 (getenv "QMAKEPATH")))
1966 (system* "qmake"))))
1967 ;; prevent webkit from trying to install into the qtbase store directory,
1968 ;; and replace references to the build directory in linker options:
1969 (add-before 'build 'patch-installpaths
1970 (lambda* (#:key outputs inputs #:allow-other-keys)
1971 (let* ((out (assoc-ref outputs "out"))
1972 (qtbase (assoc-ref inputs "qtbase"))
1974 (linkbuild (string-append "-L" builddir))
1975 (linkout (string-append "-L" out))
1980 (mf (string-append (dirname in) "/"
1982 ;; by default, these Makefiles are
1983 ;; generated during install, but we need
1984 ;; to generate them now
1985 (system* "qmake" in "-o" mf)
1987 '(("Source/api.pri" . "Makefile.api")
1988 ("Source/widgetsapi.pri"
1989 . "Makefile.widgetsapi")
1990 ("Source/WebKit2/WebProcess.pro"
1991 . "Makefile.WebProcess")
1992 ("Source/WebKit2/PluginProcess.pro"
1993 . "Makefile.PluginProcess")
1994 ("Source/WebKit/qt/declarative/public.pri"
1995 . "Makefile.declarative.public")
1996 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1997 . "Makefile.declarative.experimental")
1998 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
2000 ;; Order of qmake calls and substitutions matters here.
2001 (system* "qmake" "-prl" "Source/widgetsapi.pri"
2002 "-o" "Source/Makefile")
2003 (substitute* (find-files "lib" "libQt5.*\\.prl")
2004 ((linkbuild) linkout))
2005 (substitute* (find-files "lib"
2006 "libQt5WebKit.*\\.la")
2008 (string-append "libdir='" out "/lib'"))
2009 ((linkbuild) linkout))
2010 (substitute* (find-files "lib/pkgconfig"
2012 (((string-append "prefix=" qtbase))
2013 (string-append "prefix=" out))
2014 ((linkbuild) linkout))
2015 ;; Makefiles must be modified after .prl/.la/.pc
2016 ;; files, lest they get rebuilt:
2017 (substitute* makefiles
2018 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
2020 (((string-append "-Wl,-rpath," builddir))
2021 (string-append "-Wl,-rpath," out)))))))))
2022 (home-page "https://www.webkit.org")
2023 (synopsis "Web browser engine and classes to render and interact with web
2025 (description "QtWebKit provides a Web browser engine that makes it easy to
2026 embed content from the World Wide Web into your Qt application. At the same
2027 time Web content can be enhanced with native controls.")
2029 (license license:lgpl2.1+)))
2031 (define-public dotherside
2038 (uri (string-append "https://github.com/filcuc/DOtherSide/"
2039 "archive/v" version ".tar.gz"))
2040 (file-name (string-append name "-" version ".tar.gz"))
2043 "0azq7qlsrfdwbd6qsi7d3c1knn42qw0r47g43xf7clwbinapswpz"))))
2044 (build-system cmake-build-system)
2046 `(("qttools" ,qttools)))
2048 `(("qtbase" ,qtbase)
2049 ("qtdeclarative" ,qtdeclarative)))
2050 (home-page "https://github.com/frankosterfeld/qtkeychain")
2051 (synopsis "C language library for creating bindings for the Qt QML language")
2053 "DOtherSide is a C language library for creating bindings for the
2054 QT QML language. The following features are implementable from
2057 @item Creating custom QObject
2058 @item Creating custom QAbstractListModels
2059 @item Creating custom properties, signals and slots
2060 @item Creating from QML QObject defined in the binded language
2061 @item Creating from Singleton QML QObject defined in the binded language
2063 (license license:lgpl3))) ;version 3 only (+ exception)