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 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages qt)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build utils)
31 #:use-module (guix build-system cmake)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system trivial)
34 #:use-module (guix packages)
35 #:use-module (guix utils)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages bison)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages cups)
40 #:use-module (gnu packages databases)
41 #:use-module (gnu packages documentation)
42 #:use-module (gnu packages fontutils)
43 #:use-module (gnu packages flex)
44 #:use-module (gnu packages freedesktop)
45 #:use-module (gnu packages gl)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gnuzilla)
48 #:use-module (gnu packages gperf)
49 #:use-module (gnu packages gstreamer)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages icu4c)
52 #:use-module (gnu packages image)
53 #:use-module (gnu packages linux)
54 #:use-module (gnu packages maths)
55 #:use-module (gnu packages pciutils)
56 #:use-module (gnu packages pcre)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages pulseaudio)
60 #:use-module (gnu packages python)
61 #:use-module (gnu packages ruby)
62 #:use-module (gnu packages sdl)
63 #:use-module (gnu packages tls)
64 #:use-module (gnu packages xdisorg)
65 #:use-module (gnu packages xorg)
66 #:use-module (gnu packages xml))
68 (define-public grantlee
75 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
77 (file-name (string-append name "-" version ".tar.gz"))
79 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
81 ;; Optional: lcov and cccc, both are for code coverage
82 `(("doxygen" ,doxygen)))
85 ("qtscript" ,qtscript)))
86 (build-system cmake-build-system)
89 (modify-phases %standard-phases
90 (add-before 'check 'check-setup
92 ;; make Qt render "offscreen", required for tests
93 (setenv "QT_QPA_PLATFORM" "offscreen")
95 (home-page "https://github.com/steveire/grantlee")
96 (synopsis "Libraries for text templating with Qt")
97 (description "Grantlee Templates can be used for theming and generation of
98 other text such as code. The syntax uses the syntax of the Django template
99 system, and the core design of Django is reused in Grantlee.")
100 (license license:lgpl2.0+)))
106 (outputs '("out" "examples"))
111 "http://download.qt.io/official_releases/qt/"
112 (version-major+minor version)
114 "/single/qt-everywhere-opensource-src-"
118 "1zr0hvhryn2ada53ln7cycymh602cncli86n291bsgzas6j72qbc"))
119 (modules '((guix build utils)))
122 ;; Remove qtwebengine, which relies on a bundled copy of
123 ;; chromium. Not only does it fail compilation in qt 5.5:
124 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
125 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
126 ;; it might also pose security problems.
127 ;; Alternatively, we could use the "-skip qtwebengine"
128 ;; configuration option.
129 (delete-file-recursively "qtwebengine")
130 ;; The following snippets are copied from their mondular-qt counterparts.
133 (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
134 (list "double-conversion" "freetype" "harfbuzz-ng"
135 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
139 (delete-file-recursively dir))
140 (list "qtimageformats/src/3rdparty"
141 "qtmultimedia/examples/multimedia/spectrum/3rdparty"
143 "qtcanvas3d/examples/canvas3d/3rdparty"))
144 ;; Tests depend on this example, which depends on the 3rd party code.
145 (substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
146 (("spectrum") "#"))))))
147 (build-system gnu-build-system)
151 `(("alsa-lib" ,alsa-lib)
155 ("double-conversion" ,double-conversion)
157 ("fontconfig" ,fontconfig)
158 ("freetype" ,freetype)
160 ("gstreamer" ,gstreamer)
161 ("gst-plugins-base" ,gst-plugins-base)
162 ("harfbuzz" ,harfbuzz)
165 ("libinput" ,libinput-minimal)
173 ("libxcomposite" ,libxcomposite)
174 ("libxcursor" ,libxcursor)
176 ("libxfixes" ,libxfixes)
178 ("libxinerama" ,libxinerama)
179 ("libxkbcommon" ,libxkbcommon)
181 ("libxrandr" ,libxrandr)
182 ("libxrender" ,libxrender)
189 ("postgresql" ,postgresql)
190 ("pulseaudio" ,pulseaudio)
194 ("unixodbc" ,unixodbc)
196 ("xcb-util" ,xcb-util)
197 ("xcb-util-image" ,xcb-util-image)
198 ("xcb-util-keysyms" ,xcb-util-keysyms)
199 ("xcb-util-renderutil" ,xcb-util-renderutil)
200 ("xcb-util-wm" ,xcb-util-wm)
207 ("pkg-config" ,pkg-config)
210 ("which" ,(@ (gnu packages base) which))))
213 (modify-phases %standard-phases
214 (add-after 'configure 'patch-bin-sh
216 (substitute* '("qtbase/configure"
217 "qtbase/mkspecs/features/qt_functions.prf"
218 "qtbase/qmake/library/qmakebuiltins.cpp")
219 (("/bin/sh") (which "sh")))
222 (lambda* (#:key outputs #:allow-other-keys)
223 (let ((out (assoc-ref outputs "out"))
224 (examples (assoc-ref outputs "examples")))
225 (substitute* '("configure" "qtbase/configure")
226 (("/bin/pwd") (which "pwd")))
227 (substitute* "qtbase/src/corelib/global/global.pri"
228 (("/bin/ls") (which "ls")))
229 ;; do not pass "--enable-fast-install", which makes the
230 ;; configure process fail
235 "-examplesdir" examples ; 89MiB
238 ;; Do not build examples; for the time being, we
239 ;; prefer to save the space and build time.
240 "-no-compile-examples"
241 ;; Most "-system-..." are automatic, but some use
242 ;; the bundled copy by default.
245 ;; explicitly link with openssl instead of dlopening it
247 ;; explicitly link with dbus instead of dlopening it
249 ;; don't use the precompiled headers
251 ;; drop special machine instructions not supported
252 ;; on all instances of the target
253 ,@(if (string-prefix? "x86_64"
254 (or (%current-target-system)
259 "-no-mips_dspr2"))))))))
260 (home-page "https://www.qt.io/")
261 (synopsis "Cross-platform GUI library")
262 (description "Qt is a cross-platform application and UI framework for
263 developers using C++ or QML, a CSS & JavaScript like language.")
264 (license license:lgpl2.1)
266 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
267 ;; see <http://hydra.gnu.org/build/112828>.
268 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
269 (supported-systems (delete "mips64el-linux" %supported-systems))))
272 (package (inherit qt)
276 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
277 (string-copy version 0 (string-rindex version #\.))
279 "/qt-everywhere-opensource-src-"
283 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
284 (patches (search-patches "qt4-ldflags.patch"))
285 (modules '((guix build utils)))
287 ;; Remove webkit module, which is not built.
288 '(delete-file-recursively "src/3rdparty/webkit"))))
289 (inputs `(,@(alist-delete "harfbuzz"
290 (alist-delete "libjpeg" (package-inputs qt)))
291 ("libjepg" ,libjpeg-8)
294 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
295 ;; but we can't make them a separate output because "out" and "examples"
296 ;; would refer to each other.
297 (outputs '("out" ;112MiB core + 37MiB examples
298 "doc")) ;280MiB of HTML + code
301 (modify-phases %standard-phases
304 (lambda* (#:key outputs #:allow-other-keys)
305 (let ((out (assoc-ref outputs "out"))
306 (doc (assoc-ref outputs "doc")))
307 (substitute* '("configure")
308 (("/bin/pwd") (which "pwd")))
314 ;; Note: Don't pass '-docdir' since 'qmake' and
315 ;; libQtCore would record its value, thereby defeating
316 ;; the whole point of having a separate output.
317 "-datadir" (string-append out "/share/qt-" ,version
319 "-importdir" (string-append out "/lib/qt-4"
321 "-plugindir" (string-append out "/lib/qt-4"
323 "-translationdir" (string-append out "/share/qt-" ,version
325 "-demosdir" (string-append out "/share/qt-" ,version
327 "-examplesdir" (string-append out "/share/qt-" ,version
331 ;; explicitly link with dbus instead of dlopening it
333 ;; Skip the webkit module; it fails to build on armhf
334 ;; and, apart from that, may pose security risks.
336 ;; drop special machine instructions not supported
337 ;; on all instances of the target
338 ,@(if (string-prefix? "x86_64"
339 (or (%current-target-system)
353 (lambda* (#:key outputs #:allow-other-keys)
354 ;; Because of qt4-documentation-path.patch, documentation ends up
355 ;; being installed in OUT. Move it to the right place.
356 (let* ((out (assoc-ref outputs "out"))
357 (doc (assoc-ref outputs "doc"))
358 (olddoc (string-append out "/doc"))
359 (docdir (string-append doc "/share/doc/qt-" ,version)))
360 (mkdir-p (dirname docdir))
362 ;; Note: We can't use 'rename-file' here because OUT and DOC are
363 ;; different "devices" due to bind-mounts.
364 (copy-recursively olddoc docdir)
365 (delete-file-recursively olddoc)
368 (define-public qtbase
374 (uri (string-append "https://download.qt.io/official_releases/qt/"
375 (version-major+minor version) "/" version
376 "/submodules/" name "-opensource-src-"
380 "16v0dny4rcyd5p8qsnsfg89w98k8kqk3rp9x3g3k7xjmi53bpqkz"))
381 (modules '((guix build utils)))
383 ;; corelib uses bundled harfbuzz, md4, md5, sha3
387 (delete-file-recursively (string-append "src/3rdparty/" dir)))
388 (list "double-conversion" "freetype" "harfbuzz-ng"
389 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
392 (build-system gnu-build-system)
395 ("which" ,(@ (gnu packages base) which))))
397 `(("alsa-lib" ,alsa-lib)
400 ("double-conversion" ,double-conversion)
403 ("fontconfig" ,fontconfig)
404 ("freetype" ,freetype)
406 ("harfbuzz" ,harfbuzz)
408 ("libinput" ,libinput-minimal)
413 ("libxcomposite" ,libxcomposite)
414 ("libxcursor" ,libxcursor)
415 ("libxfixes" ,libxfixes)
417 ("libxinerama" ,libxinerama)
418 ("libxkbcommon" ,libxkbcommon)
420 ("libxrandr" ,libxrandr)
421 ("libxrender" ,libxrender)
429 ("postgresql" ,postgresql)
430 ("pulseaudio" ,pulseaudio)
432 ("unixodbc" ,unixodbc)
433 ("xcb-util" ,xcb-util)
434 ("xcb-util-image" ,xcb-util-image)
435 ("xcb-util-keysyms" ,xcb-util-keysyms)
436 ("xcb-util-renderutil" ,xcb-util-renderutil)
437 ("xcb-util-wm" ,xcb-util-wm)
444 ("pkg-config" ,pkg-config)
449 (modify-phases %standard-phases
450 (add-after 'configure 'patch-bin-sh
452 (substitute* '("config.status"
454 "mkspecs/features/qt_functions.prf"
455 "qmake/library/qmakebuiltins.cpp")
456 (("/bin/sh") (which "sh")))
459 (lambda* (#:key outputs #:allow-other-keys)
460 (let ((out (assoc-ref outputs "out")))
461 (substitute* "configure"
462 (("/bin/pwd") (which "pwd")))
463 (substitute* "src/corelib/global/global.pri"
464 (("/bin/ls") (which "ls")))
465 ;; The configuration files for other Qt5 packages are searched
466 ;; through a call to "find_package" in Qt5Config.cmake, which
467 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
468 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
469 ;; components can be installed in different places.
470 (substitute* (find-files "." ".*\\.cmake")
471 (("NO_DEFAULT_PATH") ""))
472 ;; do not pass "--enable-fast-install", which makes the
473 ;; configure process fail
478 "-docdir" (string-append out "/share/doc/qt5")
479 "-headerdir" (string-append out "/include/qt5")
480 "-archdatadir" (string-append out "/lib/qt5")
481 "-datadir" (string-append out "/share/qt5")
482 "-examplesdir" (string-append
483 out "/share/doc/qt5/examples")
486 ;; Do not build examples; if desired, these could go
487 ;; into a separate output, but for the time being, we
488 ;; prefer to save the space and build time.
489 "-no-compile-examples"
490 ;; Most "-system-..." are automatic, but some use
491 ;; the bundled copy by default.
495 ;; explicitly link with openssl instead of dlopening it
497 ;; explicitly link with dbus instead of dlopening it
499 ;; don't use the precompiled headers
501 ;; drop special machine instructions that do not have
503 ,@(if (string-prefix? "x86_64"
504 (or (%current-target-system)
509 "-no-mips_dspr2")))))
510 (add-after 'install 'patch-mkspecs
511 (lambda* (#:key outputs #:allow-other-keys)
512 (let* ((out (assoc-ref outputs "out"))
513 (archdata (string-append out "/lib/qt5"))
514 (mkspecs (string-append archdata "/mkspecs"))
515 (qt_config.prf (string-append
516 mkspecs "/features/qt_config.prf")))
517 ;; For each Qt module, let `qmake' uses search paths in the
518 ;; module directory instead of all in QT_INSTALL_PREFIX.
519 (substitute* qt_config.prf
520 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
521 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
522 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
523 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
524 (("\\$\\$\\[QT_HOST_LIBS\\]")
525 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
526 (("\\$\\$\\[QT_INSTALL_BINS\\]")
527 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
529 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
530 (substitute* (string-append mkspecs "/features/qt_functions.prf")
531 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
532 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
534 ;; Resolve qmake spec files within qtbase by absolute paths.
537 (string-append mkspecs "/features/" file))
538 '("device_config.prf" "moc.prf" "qt_build_config.prf"
539 "qt_config.prf" "winrt/package_manifest.prf"))
540 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
541 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
544 (list (search-path-specification
545 (variable "QMAKEPATH")
546 (files '("lib/qt5")))
547 (search-path-specification
548 (variable "QML2_IMPORT_PATH")
549 (files '("lib/qt5/qml")))
550 (search-path-specification
551 (variable "QT_PLUGIN_PATH")
552 (files '("lib/qt5/plugins")))
553 (search-path-specification
554 (variable "XDG_DATA_DIRS")
556 (search-path-specification
557 (variable "XDG_CONFIG_DIRS")
558 (files '("etc/xdg")))))
559 (home-page "https://www.qt.io/")
560 (synopsis "Cross-platform GUI library")
561 (description "Qt is a cross-platform application and UI framework for
562 developers using C++ or QML, a CSS & JavaScript like language.")
563 (license (list license:lgpl2.1 license:lgpl3))))
566 (package (inherit qtbase)
571 (uri (string-append "https://download.qt.io/official_releases/qt/"
572 (version-major+minor version) "/" version
573 "/submodules/" name "-opensource-src-"
577 "020icrl9vi8jh8ygsssqrx2bl8bx28m15dwmf9a969qdnvxyp5ms"))))
578 (propagated-inputs `())
579 (native-inputs `(("perl" ,perl)))
586 (modify-phases %standard-phases
587 (add-before 'configure 'configure-qmake
588 (lambda* (#:key inputs outputs #:allow-other-keys)
589 (let* ((out (assoc-ref outputs "out"))
590 (qtbase (assoc-ref inputs "qtbase"))
591 (tmpdir (string-append (getenv "TMPDIR")))
592 (qmake (string-append tmpdir "/qmake"))
593 (qt.conf (string-append tmpdir "/qt.conf")))
594 ;; Use qmake with a customized qt.conf to override install
596 (symlink (which "qmake") qmake)
597 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
598 (with-output-to-file qt.conf
604 Documentation=share/doc/qt5
607 LibraryExecutables=lib/qt5/libexec
610 Plugins=lib/qt5/plugins
611 Imports=lib/qt5/imports
612 Qml2Imports=lib/qt5/qml
613 Translations=share/qt5/translations
615 Examples=share/doc/qt5/examples
621 [EffectiveSourcePaths]
627 (lambda* (#:key inputs outputs #:allow-other-keys)
628 ;; Valid QT_BUILD_PARTS variables are:
629 ;; libs tools tests examples demos docs translations
630 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"))))
631 (add-before 'check 'set-display
633 ;; make Qt render "offscreen", required for tests
634 (setenv "QT_QPA_PLATFORM" "offscreen")
636 (synopsis "Qt module for displaying SVGs")
637 (description "The QtSvg module provides classes for displaying the
638 contents of SVG files.")))
640 (define-public qtimageformats
641 (package (inherit qtsvg)
642 (name "qtimageformats")
646 (uri (string-append "https://download.qt.io/official_releases/qt/"
647 (version-major+minor version) "/" version
648 "/submodules/" name "-opensource-src-"
652 "1wwxxcl24mk1p4w6knyfai09axmwqsm6cgsbkjsmdz3zmjh6qqis"))
653 (modules '((guix build utils)))
655 '(delete-file-recursively "src/3rdparty"))))
665 (synopsis "Additional Image Format plugins for Qt")
666 (description "The QtImageFormats module contains plugins for adding
667 support for MNG, TGA, TIFF and WBMP image formats.")))
669 (define-public qtx11extras
670 (package (inherit qtsvg)
675 (uri (string-append "https://download.qt.io/official_releases/qt/"
676 (version-major+minor version) "/" version
677 "/submodules/" name "-opensource-src-"
681 "1ias745j5lfnrfkgyk0pr8n8zlkqs08gq7yyzaj1c645sh54b1fv"))))
683 (substitute-keyword-arguments (package-arguments qtsvg)
684 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
685 (native-inputs `(("perl" ,perl)))
689 (synopsis "Qt Extras for X11")
690 (description "The QtX11Extras module includes the library to access X11
691 from within Qt 5.")))
693 (define-public qtxmlpatterns
694 (package (inherit qtsvg)
695 (name "qtxmlpatterns")
699 (uri (string-append "https://download.qt.io/official_releases/qt/"
700 (version-major+minor version) "/" version
701 "/submodules/" name "-opensource-src-"
705 "0knk4bplqhvsxar1wv16bzfw57q0aja12gdaxz7m8mvx121sm9ha"))))
707 (substitute-keyword-arguments (package-arguments qtsvg)
709 `(modify-phases ,phases
710 (add-after 'unpack 'disable-network-tests
711 (lambda _ (substitute* "tests/auto/auto.pro"
712 (("qxmlquery") "# qxmlquery")
713 (("xmlpatterns ") "# xmlpatterns"))
715 (native-inputs `(("perl" ,perl)))
716 (inputs `(("qtbase" ,qtbase)))
717 (synopsis "Qt XML patterns module")
718 (description "The QtXmlPatterns module is a XQuery and XPath engine for
719 XML and custom data models. It contains programs such as xmlpatterns and
720 xmlpatternsvalidator.")))
722 (define-public qtdeclarative
723 (package (inherit qtsvg)
724 (name "qtdeclarative")
728 (uri (string-append "https://download.qt.io/official_releases/qt/"
729 (version-major+minor version) "/" version
730 "/submodules/" name "-opensource-src-"
734 "020bha6q8byxc8cj5zw7gms5rgsjg71hv31hv1rr2fy7x56zsh0d"))))
736 (substitute-keyword-arguments (package-arguments qtsvg)
737 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
740 ("pkg-config" ,pkg-config)
743 ("qtxmlpatterns" ,qtxmlpatterns)))
747 (synopsis "Qt QML module (Quick 2)")
748 (description "The Qt QML module provides a framework for developing
749 applications and libraries with the QML language. It defines and implements the
750 language and engine infrastructure, and provides an API to enable application
751 developers to extend the QML language with custom types and integrate QML code
752 with JavaScript and C++.")))
754 (define-public qtconnectivity
755 (package (inherit qtsvg)
756 (name "qtconnectivity")
760 (uri (string-append "https://download.qt.io/official_releases/qt/"
761 (version-major+minor version) "/" version
762 "/submodules/" name "-opensource-src-"
766 "1k7kjmlny0ykm40qx796wbsg3310v6b8hqizkbr597cmxjbrax9c"))))
768 (substitute-keyword-arguments (package-arguments qtsvg)
770 `(modify-phases ,phases
771 (add-after 'unpack 'disable-failing-tests
772 ;; this test fails on armhf and aarch64
774 (substitute* "tests/auto/qndefnfcsmartposterrecord/tst_qndefnfcsmartposterrecord.cpp"
775 (("QCOMPARE\\(record.action\\(\\), QNdefNfcSmartPosterRecord::UnspecifiedAction")
776 "//QCOMPARE(record.action(), QNdefNfcSmartPosterRecord::UnspecifiedAction"))
780 ("pkg-config" ,pkg-config)
781 ("qtdeclarative" ,qtdeclarative)))
785 (synopsis "Qt Connectivity module")
786 (description "The Qt Connectivity modules provides modules for interacting
787 with Bluetooth and NFC.")))
789 (define-public qtwebsockets
790 (package (inherit qtsvg)
791 (name "qtwebsockets")
795 (uri (string-append "https://download.qt.io/official_releases/qt/"
796 (version-major+minor version) "/" version
797 "/submodules/" name "-opensource-src-"
801 "0x0nx1ampqsgj9qlc3l32z3ham1a5vq7m2lnxk5pr92yj6yw3pdg"))))
803 (substitute-keyword-arguments (package-arguments qtsvg)
804 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
807 ("qtdeclarative" ,qtdeclarative)))
808 (inputs `(("qtbase" ,qtbase)))
809 (synopsis "Qt Web Sockets module")
810 (description "WebSocket is a web-based protocol designed to enable two-way
811 communication between a client application and a remote host. The Qt
812 WebSockets module provides C++ and QML interfaces that enable Qt applications
813 to act as a server that can process WebSocket requests, or a client that can
814 consume data received from the server, or both.")))
816 (define-public qtsensors
817 (package (inherit qtsvg)
822 (uri (string-append "https://download.qt.io/official_releases/qt/"
823 (version-major+minor version) "/" version
824 "/submodules/" name "-opensource-src-"
828 "1lxmhi19dbb8vjhpjph0l0ss6zh72hb4908lp4s1pgf8r641ai3r"))))
830 (substitute-keyword-arguments (package-arguments qtsvg)
832 `(modify-phases ,phases
833 (add-after 'unpack 'lengthen-test-timeout
835 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
840 ("qtdeclarative" ,qtdeclarative)))
841 (inputs `(("qtbase" ,qtbase)))
842 (synopsis "Qt Sensors module")
843 (description "The Qt Sensors API provides access to sensor hardware via QML
844 and C++ interfaces. The Qt Sensors API also provides a motion gesture
845 recognition API for devices.")))
847 (define-public qtmultimedia
848 (package (inherit qtsvg)
849 (name "qtmultimedia")
853 (uri (string-append "https://download.qt.io/official_releases/qt/"
854 (version-major+minor version) "/" version
855 "/submodules/" name "-opensource-src-"
859 "0815hi3cxy5zy6yc5fkdpx2xd6rk7968j1ziwl2g4wa80802g9n9"))
860 (modules '((guix build utils)))
863 (delete-file-recursively
864 "examples/multimedia/spectrum/3rdparty")
865 ;; We also prevent the spectrum example from being built.
866 (substitute* "examples/multimedia/multimedia.pro"
867 (("spectrum") "#"))))))
869 (substitute-keyword-arguments (package-arguments qtsvg)
871 `(modify-phases ,phases
873 (lambda* (#:key outputs #:allow-other-keys)
874 (let ((out (assoc-ref outputs "out")))
875 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
876 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
877 (string-append "PREFIX=" out))))))))
878 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
881 ("pkg-config" ,pkg-config)
883 ("qtdeclarative" ,qtdeclarative)))
885 `(("alsa-lib" ,alsa-lib)
887 ("pulseaudio" ,pulseaudio)
889 ;; Gstreamer is needed for the mediaplayer plugin
890 ("gstreamer" ,gstreamer)
891 ("gst-plugins-base" ,gst-plugins-base)))
892 (synopsis "Qt Multimedia module")
893 (description "The Qt Multimedia module provides set of APIs to play and
894 record media, and manage a collection of media content. It also contains a
895 set of plugins for interacting with pulseaudio and GStreamer.")))
897 (define-public qtwayland
898 (package (inherit qtsvg)
903 (uri (string-append "https://download.qt.io/official_releases/qt/"
904 (version-major+minor version) "/" version
905 "/submodules/" name "-opensource-src-"
909 "1ipn4xh0dj1kjg5i4vfl4gpx3hg2377w5gls47xpv1ikz41lshzn"))
910 (modules '((guix build utils)))
912 ;; The examples try to build and cause the build to fail
913 '(delete-file-recursively "examples"))))
915 (substitute-keyword-arguments (package-arguments qtsvg)
917 `(modify-phases ,phases
918 (add-before 'check 'set-ld-library-path
919 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
921 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
922 ;; wayland platform plugin.
924 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
929 ("pkg-config" ,pkg-config)
930 ("qtdeclarative" ,qtdeclarative)))
932 `(("fontconfig" ,fontconfig)
933 ("freetype" ,freetype)
935 ("libxcomposite" ,libxcomposite)
937 ("libxkbcommon" ,libxkbcommon)
938 ("libxrender" ,libxrender)
942 ("wayland" ,wayland)))
943 (synopsis "Qt Wayland module")
944 (description "The Qt Wayland module provides the QtWayland client and
945 compositor libraries.")))
947 (define-public qtserialport
948 (package (inherit qtsvg)
949 (name "qtserialport")
953 (uri (string-append "https://download.qt.io/official_releases/qt/"
954 (version-major+minor version) "/" version
955 "/submodules/" name "-opensource-src-"
959 "0hndc9z7qzxazzjvc6k5yd58afw13444plk70b05nqdi5p19rvah"))))
960 (native-inputs `(("perl" ,perl)))
964 (synopsis "Qt Serial Port module")
965 (description "The Qt Serial Port module provides the library for
966 interacting with serial ports from within Qt.")))
968 (define-public qtserialbus
969 (package (inherit qtsvg)
974 (uri (string-append "https://download.qt.io/official_releases/qt/"
975 (version-major+minor version) "/" version
976 "/submodules/" name "-opensource-src-"
980 "025yv7zajz5scrmkjkmgkyvxpgkliqvrzc88is0gr481zpd4phmv"))))
983 ("qtserialport" ,qtserialport)))
984 (synopsis "Qt Serial Bus module")
985 (description "The Qt Serial Bus API provides classes and functions to
986 access the various industrial serial buses and protocols, such as CAN, ModBus,
989 (define-public qtwebchannel
990 (package (inherit qtsvg)
991 (name "qtwebchannel")
995 (uri (string-append "https://download.qt.io/official_releases/qt/"
996 (version-major+minor version) "/" version
997 "/submodules/" name "-opensource-src-"
1001 "09iss70c1iqgf8qpik35qlgrdw5y9935v0fm2ppgkmxdxkpls6ww"))))
1004 ("qtdeclarative" ,qtdeclarative)
1005 ("qtwebsockets" ,qtwebsockets)))
1006 (inputs `(("qtbase" ,qtbase)))
1007 (synopsis "Web communication library for Qt")
1008 (description "The Qt WebChannel module enables peer-to-peer communication
1009 between the host (QML/C++ application) and the client (HTML/JavaScript
1010 application). The transport mechanism is supported out of the box by the two
1011 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1013 (define-public qtlocation
1014 (package (inherit qtsvg)
1019 (uri (string-append "https://download.qt.io/official_releases/qt/"
1020 (version-major+minor version) "/" version
1021 "/submodules/" name "-opensource-src-"
1025 "033b6l6jbvmc0k5qvbgh5vkzvfga7npqcphrywrrqkmx9vj446n8"))))
1027 (substitute-keyword-arguments (package-arguments qtsvg)
1028 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1031 ("qtdeclarative" ,qtdeclarative)
1032 ("qtquickcontrols" ,qtquickcontrols)
1033 ("qtserialport" ,qtserialport)))
1036 ("openssl" ,openssl)
1039 (synopsis "Qt Location and Positioning modules")
1040 (description "The Qt Location module provides an interface for location,
1041 positioning and geolocation plugins.")))
1043 (define-public qttools
1044 (package (inherit qtsvg)
1049 (uri (string-append "https://download.qt.io/official_releases/qt/"
1050 (version-major+minor version) "/" version
1051 "/submodules/" name "-opensource-src-"
1055 "06nqsa5mj0mc9w9xbm7mgdkb66x4wlvkhnas32f97sb8ic8rdf9b"))))
1057 (substitute-keyword-arguments (package-arguments qtsvg)
1058 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1061 ("qtdeclarative" ,qtdeclarative)))
1064 ("qtbase" ,qtbase)))
1065 (synopsis "Qt Tools and Designer modules")
1066 (description "The Qt Tools module provides a set of applications to browse
1067 the documentation, translate applications, generate help files and other stuff
1068 that helps in Qt development.")))
1070 (define-public qtscript
1071 (package (inherit qtsvg)
1076 (uri (string-append "https://download.qt.io/official_releases/qt/"
1077 (version-major+minor version) "/" version
1078 "/submodules/" name "-opensource-src-"
1082 "1wa0rnbphkhgydnwkf5bjwn0llskl6hgs0964nh0jik8qaspv027"))
1083 (patches (search-patches "qtscript-disable-tests.patch"))))
1086 ("qttools" ,qttools)))
1088 `(("qtbase" ,qtbase)))
1089 (synopsis "Qt Script module")
1090 (description "Qt provides support for application scripting with ECMAScript.
1091 The following guides and references cover aspects of programming with
1092 ECMAScript and Qt.")))
1094 (define-public qtquickcontrols
1095 (package (inherit qtsvg)
1096 (name "qtquickcontrols")
1100 (uri (string-append "https://download.qt.io/official_releases/qt/"
1101 (version-major+minor version) "/" version
1102 "/submodules/" name "-opensource-src-"
1106 "07xxhkfsljwdwlp9jfp88pwkrig02y2pnwhdsaz8mkcackwfq2az"))))
1108 (substitute-keyword-arguments (package-arguments qtsvg)
1109 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1111 `(("qtbase" ,qtbase)
1112 ("qtdeclarative" ,qtdeclarative)))
1113 (synopsis "Qt Quick Controls and other Quick modules")
1114 (description "The QtScript module provides classes for making Qt
1115 applications scriptable. This module provides a set of extra components that
1116 can be used to build complete interfaces in Qt Quick.")))
1118 (define-public qtquickcontrols2
1119 (package (inherit qtsvg)
1120 (name "qtquickcontrols2")
1124 (uri (string-append "https://download.qt.io/official_releases/qt/"
1125 (version-major+minor version) "/" version
1126 "/submodules/" name "-opensource-src-"
1130 "1ln83afxyp5dmvdnq6n7as82xrd5k3xvfx7b1jxnljivslyxsm9b"))))
1132 (substitute-keyword-arguments (package-arguments qtsvg)
1133 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1135 `(("qtbase" ,qtbase)
1136 ("qtdeclarative" ,qtdeclarative)))
1137 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1138 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1139 module that provides platform integration: native dialogs, menus and menu bars,
1140 and tray icons. It falls back to Qt Widgets when a native implementation is
1143 (define-public qtgraphicaleffects
1144 (package (inherit qtsvg)
1145 (name "qtgraphicaleffects")
1149 (uri (string-append "https://download.qt.io/official_releases/qt/"
1150 (version-major+minor version) "/" version
1151 "/submodules/" name "-opensource-src-"
1155 "0xpvigfiqfqvf05ywj8x69y57rp8dwq2hs1kpxlxs15pniz4wn8l"))))
1157 (substitute-keyword-arguments (package-arguments qtsvg)
1158 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1160 `(("qtbase" ,qtbase)
1161 ("qtdeclarative" ,qtdeclarative)))
1162 (synopsis "Qt Graphical Effects module")
1163 (description "The Qt Graphical Effects module provides a set of QML types
1164 for adding visually impressive and configurable effects to user interfaces.
1165 Effects are visual items that can be added to Qt Quick user interface as UI
1166 components. The API consists of over 20 effects provided as separate QML
1167 types. The effects cover functional areas such as blending, masking, blurring,
1168 coloring, and many more.")))
1170 (define-public qtdeclarative-render2d
1171 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
1172 (package (inherit qtsvg)
1173 (name "qtdeclarative-render2d")
1177 (uri (string-append "https://download.qt.io/official_releases/qt/"
1178 (version-major+minor version) "/" version
1179 "/submodules/" name "-opensource-src-"
1183 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1184 (modules '((guix build utils)))
1186 '(delete-file-recursively "tools/opengldummy/3rdparty"))))
1189 `(("qtbase" ,qtbase)
1190 ("qtdeclarative" ,qtdeclarative)))
1191 (synopsis "Qt Declarative Render module")
1192 (description "The Qt Declarative Render 2D module provides a Raster
1193 backend for QtQuick scene graph.")
1194 (properties `((superseded . ,qtdeclarative)))))
1196 (define-public qtgamepad
1197 (package (inherit qtsvg)
1202 (uri (string-append "https://download.qt.io/official_releases/qt/"
1203 (version-major+minor version) "/" version
1204 "/submodules/" name "-opensource-src-"
1208 "0lm5v43psf7r8zc79dcjdmmdnz4jm30ylgkvsyv8k88mj06yklbn"))))
1211 ("pkg-config" ,pkg-config)))
1213 `(("fontconfig" ,fontconfig)
1214 ("freetype" ,freetype)
1215 ("libxrender" ,libxrender)
1218 ("qtdeclarative" ,qtdeclarative)))
1219 (synopsis "Qt Gamepad module")
1220 (description "The Qt Gamepad module is an add-on library that enables Qt
1221 applications to support the use of gamepad hardware and in some cases remote
1222 control equipment. The module provides both QML and C++ interfaces. The
1223 primary target audience are embedded devices with fullscreen user interfaces,
1224 and mobile applications targeting TV-like form factors.")))
1226 (define-public qtscxml
1227 (package (inherit qtsvg)
1232 (uri (string-append "https://download.qt.io/official_releases/qt/"
1233 (version-major+minor version) "/" version
1234 "/submodules/" name "-opensource-src-"
1238 "0pdimqwdrj8hckm81lwy1z58ji4bdv0bzgv336m0a8v3pj914awx"))
1239 (modules '((guix build utils)))
1242 (delete-file-recursively "tests/3rdparty")
1243 ;; the scion test refers to the bundled 3rd party test code.
1244 (substitute* "tests/auto/auto.pro"
1245 (("scion") "#"))))))
1247 `(("qtbase" ,qtbase)
1248 ("qtdeclarative" ,qtdeclarative)))
1249 (synopsis "Qt SCXML module")
1250 (description "The Qt SCXML module provides functionality to create state
1251 machines from SCXML files. This includes both dynamically creating state
1252 machines (loading the SCXML file and instantiating states and transitions) and
1253 generating a C++ file that has a class implementing the state machine. It
1254 also contains functionality to support data models and executable content.")))
1256 (define-public qtpurchasing
1257 (package (inherit qtsvg)
1258 (name "qtpurchasing")
1262 (uri (string-append "https://download.qt.io/official_releases/qt/"
1263 (version-major+minor version) "/" version
1264 "/submodules/" name "-opensource-src-"
1268 "04f28y7qcr4kd0pw26mm515qj7haxr0i8lijn1q47wkikxyhawca"))))
1270 `(("qtbase" ,qtbase)
1271 ("qtdeclarative" ,qtdeclarative)))
1272 (synopsis "Qt Purchasing module")
1273 (description "The Qt Purchasing module provides and in-app API for
1274 purchasing goods and services.")))
1276 (define-public qtcanvas3d
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 "1siyzgm1mjx90rwyzzq9vw2s2xzyf6n7q0vn8gw7mdim5indda44"))
1289 (modules '((guix build utils)))
1291 '(delete-file-recursively "examples/canvas3d/3rdparty"))))
1293 (substitute-keyword-arguments (package-arguments qtsvg)
1294 ;; Building the tests depends on the bundled 3rd party javascript files,
1295 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1296 ;; fail, so we skip building them for now.
1298 `(modify-phases ,phases
1300 (lambda* (#:key outputs #:allow-other-keys)
1301 (let ((out (assoc-ref outputs "out")))
1302 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools"
1303 (string-append "PREFIX=" out))))))))
1304 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1307 `(("qtbase" ,qtbase)
1308 ("qtdeclarative" ,qtdeclarative)))
1309 (synopsis "Qt Canvas 3D module")
1310 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1311 drawing calls from Qt Quick JavaScript.")))
1313 (define-public qtcharts
1314 (package (inherit qtsvg)
1319 (uri (string-append "https://download.qt.io/official_releases/qt/"
1320 (version-major+minor version) "/" version
1321 "/submodules/" name "-opensource-src-"
1325 "193a3imkgryw42s0gbwaj9gpqd673h3jrg86jvmy33l2fc5gfyjf"))))
1327 (substitute-keyword-arguments (package-arguments qtsvg)
1328 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1330 `(("qtbase" ,qtbase)
1331 ("qtdeclarative" ,qtdeclarative)))
1332 (synopsis "Qt Charts module")
1333 (description "The Qt Charts module provides a set of easy to use chart
1334 components. It uses the Qt Graphics View Framework, therefore charts can be
1335 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1336 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1337 selecting one of the charts themes.")
1338 (license license:gpl3)))
1340 (define-public qtdatavis3d
1341 (package (inherit qtsvg)
1342 (name "qtdatavis3d")
1346 (uri (string-append "https://download.qt.io/official_releases/qt/"
1347 (version-major+minor version) "/" version
1348 "/submodules/" name "-opensource-src-"
1352 "1cmjjbbmdqdix1f8b7qyc2vwhj9pvchc8r4lp65qw11dhycmdbh6"))))
1354 (substitute-keyword-arguments (package-arguments qtsvg)
1355 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1357 `(("qtbase" ,qtbase)
1358 ("qtdeclarative" ,qtdeclarative)))
1359 (synopsis "Qt Data Visualization module")
1360 (description "The Qt Data Visualization module provides a way to visualize
1361 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1362 visualizing depth maps and large quantities of rapidly changing data, such as
1363 data received from multiple sensors. The look and feel of graphs can be
1364 customized by using themes or by adding custom items and labels to them.")
1365 (license license:gpl3)))
1367 (define-public qtnetworkauth
1368 (package (inherit qtsvg)
1369 (name "qtnetworkauth")
1373 (uri (string-append "https://download.qt.io/official_releases/qt/"
1374 (version-major+minor version) "/" version
1375 "/submodules/" name "-opensource-src-"
1379 "16i33m8x5yii22ciq97bpfmnw0lwhvgv84i2az30a1ikm9dg00x0"))))
1381 (substitute-keyword-arguments (package-arguments qtsvg)
1383 `(modify-phases ,phases
1384 (add-after 'unpack 'remove-failing-test
1386 ;; These tests can't find their test data.
1387 (substitute* "tests/auto/auto.pro"
1388 (("oauth1 ") "# oauth1 "))
1391 `(("qtbase" ,qtbase)))
1392 (synopsis "Qt Network Authorization module")
1393 (description "The Qt Network Authorization module provides an
1394 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1396 (define-public qtremoteobjects
1397 (package (inherit qtsvg)
1398 (name "qtremoteobjects")
1402 (uri (string-append "https://download.qt.io/official_releases/qt/"
1403 (version-major+minor version) "/" version
1404 "/submodules/" name "-opensource-src-"
1408 "1ylphdwis34y4pm9xiwh2xqfd0hh2gp8kkawlps2q5mh2bm11376"))))
1410 `(("qtbase" ,qtbase)
1411 ("qtdeclarative" ,qtdeclarative)))
1412 (synopsis "Qt Remote Objects module")
1413 (description "The Qt Remote Objects module is an @dfn{inter-process
1414 communication} (IPC) module developed for Qt. The idea is to extend existing
1415 Qt's functionalities to enable an easy exchange of information between
1416 processes or computers.")))
1418 (define-public qtspeech
1419 (package (inherit qtsvg)
1424 (uri (string-append "https://download.qt.io/official_releases/qt/"
1425 (version-major+minor version) "/" version
1426 "/submodules/" name "-opensource-src-"
1430 "0cq33dffi7q7dnvzhdivky5prakb8xnwap0b76fwgirhbbn88ypg"))))
1432 `(("qtbase" ,qtbase)))
1435 ("qtdeclarative" ,qtdeclarative)
1436 ("qtmultimedia" ,qtmultimedia)
1437 ("qtxmlpatterns" ,qtxmlpatterns)))
1438 (synopsis "Qt Speech module")
1439 (description "The Qt Speech module enables a Qt application to support
1440 accessibility features such as text-to-speech, which is useful for end-users
1441 who are visually challenged or cannot access the application for whatever
1442 reason. The most common use case where text-to-speech comes in handy is when
1443 the end-user is driving and cannot attend the incoming messages on the phone.
1444 In such a scenario, the messaging application can read out the incoming
1447 (define-public python-sip
1455 (string-append "mirror://sourceforge/pyqt/sip/"
1456 "sip-" version "/sip-" version ".tar.gz"))
1459 "0x2bghbprwl3az1ni3p87i0bq8r99694la93kg65vi0cz12gh3bl"))))
1460 (build-system gnu-build-system)
1462 `(("python" ,python-wrapper)))
1464 `(#:tests? #f ; no check target
1465 #:modules ((srfi srfi-1)
1466 ,@%gnu-build-system-modules)
1468 (modify-phases %standard-phases
1470 (lambda* (#:key inputs outputs #:allow-other-keys)
1471 (let* ((out (assoc-ref outputs "out"))
1472 (bin (string-append out "/bin"))
1473 (include (string-append out "/include"))
1474 (python (assoc-ref inputs "python"))
1476 (last (string-split python #\-)))
1479 (take (string-split python-version #\.) 2)
1481 (lib (string-append out "/lib/python"
1485 (system* "python" "configure.py"
1488 "--incdir" include))))))))
1489 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1490 (synopsis "Python binding creator for C and C++ libraries")
1492 "SIP is a tool to create Python bindings for C and C++ libraries. It
1493 was originally developed to create PyQt, the Python bindings for the Qt
1494 toolkit, but can be used to create bindings for any C or C++ library.
1496 SIP comprises a code generator and a Python module. The code generator
1497 processes a set of specification files and generates C or C++ code, which
1498 is then compiled to create the bindings extension module. The SIP Python
1499 module provides support functions to the automatically generated code.")
1500 ;; There is a choice between a python like license, gpl2 and gpl3.
1501 ;; For compatibility with pyqt, we need gpl3.
1502 (license license:gpl3)))
1504 (define-public python2-sip
1505 (package (inherit python-sip)
1506 (name "python2-sip")
1508 `(("python" ,python-2)))))
1510 (define-public python-pyqt
1512 (name "python-pyqt")
1518 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1519 "PyQt-" version "/PyQt5_gpl-"
1523 "15hh4z5vd45dcswjla58q6rrfr6ic7jfz2n7c8lwfb10rycpj3mb"))
1524 (patches (search-patches "pyqt-configure.patch"))))
1525 (build-system gnu-build-system)
1527 `(("qtbase" ,qtbase))) ; for qmake
1529 `(("python-sip" ,python-sip)))
1531 `(("python" ,python-wrapper)
1533 ("qtconnectivity" ,qtconnectivity)
1534 ("qtdeclarative" ,qtdeclarative)
1535 ("qtlocation" ,qtlocation)
1536 ("qtmultimedia" ,qtmultimedia)
1537 ("qtsensors" ,qtsensors)
1538 ("qtserialport" ,qtserialport)
1540 ("qttools" ,qttools)
1541 ("qtwebchannel" ,qtwebchannel)
1542 ("qtwebkit" ,qtwebkit)
1543 ("qtwebsockets" ,qtwebsockets)
1544 ("qtx11extras" ,qtx11extras)
1545 ("qtxmlpatterns" ,qtxmlpatterns)))
1547 `(#:modules ((srfi srfi-1)
1548 ,@%gnu-build-system-modules)
1550 (modify-phases %standard-phases
1552 (lambda* (#:key inputs outputs #:allow-other-keys)
1553 (let* ((out (assoc-ref outputs "out"))
1554 (bin (string-append out "/bin"))
1555 (sip (string-append out "/share/sip"))
1556 (plugins (string-append out "/plugins"))
1557 (designer (string-append plugins "/designer"))
1558 (qml (string-append plugins "/PyQt5"))
1559 (python (assoc-ref inputs "python"))
1561 (last (string-split python #\-)))
1564 (take (string-split python-version #\.) 2)
1566 (lib (string-append out "/lib/python"
1569 (stubs (string-append lib "/PyQt5")))
1570 (zero? (system* "python" "configure.py"
1574 "--designer-plugindir" designer
1575 "--qml-plugindir" qml
1576 ; Where to install the PEP 484 Type Hints stub
1577 ; files. Without this the stubs are tried to be
1578 ; installed into the python package's
1579 ; site-package directory, which is read-only.
1581 "--sipdir" sip))))))))
1582 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1583 (synopsis "Python bindings for Qt")
1585 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1586 framework. The bindings are implemented as a set of Python modules and
1587 contain over 620 classes.")
1588 (license license:gpl3)))
1590 (define-public python2-pyqt
1591 (package (inherit python-pyqt)
1592 (name "python2-pyqt")
1594 `(("python-sip" ,python2-sip)
1595 ("qtbase" ,qtbase)))
1597 `(("python" ,python-2)
1598 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1600 (define-public python-pyqt-4
1601 (package (inherit python-pyqt)
1602 (name "python-pyqt")
1608 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1609 "PyQt-" version "/PyQt4_gpl_x11-"
1613 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
1615 `(("python-sip" ,python-sip)
1617 (inputs `(("python" ,python-wrapper)))
1619 `(#:tests? #f ; no check target
1620 #:modules ((srfi srfi-1)
1621 ,@%gnu-build-system-modules)
1623 (modify-phases %standard-phases
1625 (lambda* (#:key inputs outputs #:allow-other-keys)
1626 (let* ((out (assoc-ref outputs "out"))
1627 (bin (string-append out "/bin"))
1628 (sip (string-append out "/share/sip"))
1629 (python (assoc-ref inputs "python"))
1631 (last (string-split python #\-)))
1634 (take (string-split python-version #\.) 2)
1636 (lib (string-append out "/lib/python"
1639 (zero? (system* "python" "configure.py"
1643 "--sipdir" sip))))))))
1644 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1646 (define-public python2-pyqt-4
1647 (package (inherit python-pyqt-4)
1648 (name "python2-pyqt")
1650 `(("python-sip" ,python2-sip)
1653 `(("python" ,python-2)))))
1655 (define-public qscintilla
1661 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1662 "QScintilla-" version "/QScintilla_gpl-"
1666 "0r7s7ndblv3jc0xig1y4l64b6mfr879cdv3zwdndn27rj6fqmycp"))))
1667 (build-system gnu-build-system)
1670 (modify-phases %standard-phases
1672 (lambda* (#:key outputs #:allow-other-keys)
1673 (let ((out (assoc-ref outputs "out")))
1675 (substitute* "qscintilla.pro"
1676 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1677 (string-append out "/lib"))
1678 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1679 (string-append out "/include"))
1680 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1681 (string-append out "/translations"))
1682 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1683 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1684 (("\\$\\$\\[QT_HOST_DATA\\]")
1685 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
1686 (zero? (system* "qmake"))))))))
1687 (native-inputs `(("qtbase" ,qtbase)))
1688 (home-page "http://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1689 (synopsis "Qt port of the Scintilla C++ editor control")
1690 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1691 editor control. QScintilla includes features especially useful when editing
1692 and debugging source code. These include support for syntax styling, error
1693 indicators, code completion and call tips.")
1694 (license license:gpl3+)))
1696 (define-public python-qscintilla
1697 (package (inherit qscintilla)
1698 (name "python-qscintilla")
1701 (list "--pyqt=PyQt5"
1702 (string-append "--pyqt-sipdir="
1703 (assoc-ref %build-inputs "python-pyqt")
1705 (string-append "--qsci-incdir="
1706 (assoc-ref %build-inputs "qscintilla")
1708 (string-append "--qsci-libdir="
1709 (assoc-ref %build-inputs "qscintilla")
1712 (modify-phases %standard-phases
1714 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1716 (and (zero? (apply system* "python3" "configure.py"
1718 ;; Install to the right directory
1720 (substitute* '("Makefile"
1722 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
1723 (assoc-ref outputs "out")))
1726 `(("qscintilla" ,qscintilla)
1728 ("python-pyqt" ,python-pyqt)))
1729 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1730 editor control. QScintilla includes features especially useful when editing
1731 and debugging source code. These include support for syntax styling, error
1732 indicators, code completion and call tips.
1734 This package provides the Python bindings.")))
1736 ;; PyQt only looks for modules in its own directory. It ignores environment
1737 ;; variables such as PYTHONPATH, so we need to build a union package to make
1739 (define-public python-pyqt+qscintilla
1740 (package (inherit python-pyqt)
1741 (name "python-pyqt+qscintilla")
1743 (build-system trivial-build-system)
1745 '(#:modules ((guix build union))
1747 (use-modules (ice-9 match)
1749 (match %build-inputs
1750 (((names . directories) ...)
1751 (union-build (assoc-ref %outputs "out")
1754 `(("python-pyqt" ,python-pyqt)
1755 ("python-qscintilla" ,python-qscintilla)))
1756 (synopsis "Union of PyQt and the Qscintilla extension")
1758 "This package contains the union of PyQt and the Qscintilla extension.")))
1760 (define-public qtkeychain
1767 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1768 "archive/v" version ".tar.gz"))
1769 (file-name (string-append name "-" version ".tar.gz"))
1771 (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
1772 (build-system cmake-build-system)
1774 `(("pkg-config" ,pkg-config)
1775 ("qttools" ,qttools)))
1777 `(("qtbase" ,qtbase)))
1779 `(#:tests? #f ; No tests included
1781 (modify-phases %standard-phases
1783 'configure 'set-qt-trans-dir
1785 (substitute* "CMakeLists.txt"
1786 (("\\$\\{qt_translations_dir\\}")
1787 "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
1789 (home-page "https://github.com/frankosterfeld/qtkeychain")
1790 (synopsis "Qt API to store passwords")
1792 "QtKeychain is a Qt library to store passwords and other secret data
1793 securely. It will not store any data unencrypted unless explicitly requested.")
1794 (license license:bsd-3)))
1804 (string-append "mirror://sourceforge/qwt/qwt/"
1805 version "/qwt-" version ".tar.bz2"))
1807 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1808 (build-system gnu-build-system)
1810 `(("qtbase" ,qtbase)
1812 ("qttools" ,qttools)))
1815 (modify-phases %standard-phases
1817 (lambda* (#:key outputs #:allow-other-keys)
1818 (let* ((out (assoc-ref outputs "out"))
1819 (docdir (string-append out "/share/doc/qwt"))
1820 (incdir (string-append out "/include/qwt"))
1821 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
1822 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
1823 (substitute* '("qwtconfig.pri")
1824 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
1825 (format #f "~a = ~a\n" x out))
1826 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
1827 (format #f "~a = ~a\n" x docdir))
1828 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
1829 (format #f "~a = ~a\n" x incdir))
1830 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
1831 (format #f "~a = ~a\n" x pluginsdir))
1832 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
1833 (format #f "~a = ~a\n" x featuresdir)))
1834 (substitute* '("doc/doc.pro")
1835 ;; We'll install them in the 'install-man-pages' phase.
1836 (("^unix:doc\\.files.*") ""))
1837 (zero? (system* "qmake")))))
1838 (add-after 'install 'install-man-pages
1839 (lambda* (#:key outputs #:allow-other-keys)
1840 (let* ((out (assoc-ref outputs "out"))
1841 (man (string-append out "/share/man")))
1842 ;; Remove some incomplete manual pages.
1843 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1845 (copy-recursively "doc/man" man)
1847 (home-page "http://qwt.sourceforge.net")
1848 (synopsis "Qt widgets for plots, scales, dials and other technical software
1851 "The Qwt library contains widgets and components which are primarily useful
1852 for technical and scientific purposes. It includes a 2-D plotting widget,
1853 different kinds of sliders, and much more.")
1856 ;; The Qwt license is LGPL2.1 with some exceptions.
1857 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1858 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1859 license:lgpl2.1 license:gpl3))))
1861 (define-public qtwebkit
1868 (uri (string-append "https://download.qt.io/official_releases/qt/"
1869 (version-major+minor version) "/" version
1870 "/submodules/" name "-opensource-src-"
1874 "1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998"))))
1875 (build-system gnu-build-system)
1878 ("python" ,python-2.7)
1883 ("pkg-config" ,pkg-config)))
1886 ("libjpeg" ,libjpeg)
1888 ("libwebp" ,libwebp)
1890 ("fontconfig" ,fontconfig)
1891 ("libxrender", libxrender)
1893 ("qtdeclarative" ,qtdeclarative)
1894 ("qtmultimedia" ,qtmultimedia)
1895 ("libxml2" ,libxml2)
1896 ("libxslt" ,libxslt)
1898 ("libxcomposite" ,libxcomposite)))
1901 (modify-phases %standard-phases
1902 (add-before 'configure 'fix-qmlwebkit-plugins-rpath
1904 (substitute* "Source/WebKit/qt/declarative/experimental/experimental.pri"
1905 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1906 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../../lib"))
1907 (substitute* "Source/WebKit/qt/declarative/public.pri"
1908 (("RPATHDIR_RELATIVE_TO_DESTDIR = \\.\\./\\.\\./lib")
1909 "RPATHDIR_RELATIVE_TO_DESTDIR = ../../../../lib"))
1912 (lambda* (#:key outputs #:allow-other-keys)
1913 (let ((out (assoc-ref outputs "out")))
1915 (string-append (getcwd) "/Tools/qmake:"
1916 (getenv "QMAKEPATH")))
1917 (system* "qmake"))))
1918 ;; prevent webkit from trying to install into the qtbase store directory,
1919 ;; and replace references to the build directory in linker options:
1920 (add-before 'build 'patch-installpaths
1921 (lambda* (#:key outputs inputs #:allow-other-keys)
1922 (let* ((out (assoc-ref outputs "out"))
1923 (qtbase (assoc-ref inputs "qtbase"))
1925 (linkbuild (string-append "-L" builddir))
1926 (linkout (string-append "-L" out))
1931 (mf (string-append (dirname in) "/"
1933 ;; by default, these Makefiles are
1934 ;; generated during install, but we need
1935 ;; to generate them now
1936 (system* "qmake" in "-o" mf)
1938 '(("Source/api.pri" . "Makefile.api")
1939 ("Source/widgetsapi.pri"
1940 . "Makefile.widgetsapi")
1941 ("Source/WebKit2/WebProcess.pro"
1942 . "Makefile.WebProcess")
1943 ("Source/WebKit2/PluginProcess.pro"
1944 . "Makefile.PluginProcess")
1945 ("Source/WebKit/qt/declarative/public.pri"
1946 . "Makefile.declarative.public")
1947 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1948 . "Makefile.declarative.experimental")
1949 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
1951 ;; Order of qmake calls and substitutions matters here.
1952 (system* "qmake" "-prl" "Source/widgetsapi.pri"
1953 "-o" "Source/Makefile")
1954 (substitute* (find-files "lib" "libQt5.*\\.prl")
1955 ((linkbuild) linkout))
1956 (substitute* (find-files "lib"
1957 "libQt5WebKit.*\\.la")
1959 (string-append "libdir='" out "/lib'"))
1960 ((linkbuild) linkout))
1961 (substitute* (find-files "lib/pkgconfig"
1963 (((string-append "prefix=" qtbase))
1964 (string-append "prefix=" out))
1965 ((linkbuild) linkout))
1966 ;; Makefiles must be modified after .prl/.la/.pc
1967 ;; files, lest they get rebuilt:
1968 (substitute* makefiles
1969 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
1971 (((string-append "-Wl,-rpath," builddir))
1972 (string-append "-Wl,-rpath," out)))))))))
1973 (home-page "https://www.webkit.org")
1974 (synopsis "Web browser engine and classes to render and interact with web
1976 (description "QtWebKit provides a Web browser engine that makes it easy to
1977 embed content from the World Wide Web into your Qt application. At the same
1978 time Web content can be enhanced with native controls.")
1980 (license license:lgpl2.1+)))
1982 (define-public dotherside
1989 (uri (string-append "https://github.com/filcuc/DOtherSide/"
1990 "archive/v" version ".tar.gz"))
1991 (file-name (string-append name "-" version ".tar.gz"))
1994 "0pqlrvy4ajjir80ra79ka3n0rjj0ir0f0m91cq86iz3nnw8w148z"))))
1995 (build-system cmake-build-system)
1997 `(("qttools" ,qttools)))
1999 `(("qtbase" ,qtbase)
2000 ("qtdeclarative" ,qtdeclarative)))
2001 (home-page "https://github.com/frankosterfeld/qtkeychain")
2002 (synopsis "C language library for creating bindings for the Qt QML language")
2004 "DOtherSide is a C language library for creating bindings for the
2005 QT QML language. The following features are implementable from
2008 @item Creating custom QObject
2009 @item Creating custom QAbstractListModels
2010 @item Creating custom properties, signals and slots
2011 @item Creating from QML QObject defined in the binded language
2012 @item Creating from Singleton QML QObject defined in the binded language
2014 (license license:lgpl3))) ;version 3 only (+ exception)