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, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
10 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
12 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
13 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
15 ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages qt)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix packages)
35 #:use-module (guix download)
36 #:use-module (guix git-download)
37 #:use-module (guix build-system cmake)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system trivial)
40 #:use-module (guix packages)
41 #:use-module (guix deprecation)
42 #:use-module (guix utils)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bison)
46 #:use-module (gnu packages cmake)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages cups)
49 #:use-module (gnu packages databases)
50 #:use-module (gnu packages documentation)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages flex)
53 #:use-module (gnu packages freedesktop)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gperf)
58 #:use-module (gnu packages gstreamer)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages icu4c)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages linux)
63 #:use-module (gnu packages llvm)
64 #:use-module (gnu packages maths)
65 #:use-module (gnu packages nss)
66 #:use-module (gnu packages pciutils)
67 #:use-module (gnu packages pcre)
68 #:use-module (gnu packages perl)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages pulseaudio)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages python-xyz)
73 #:use-module (gnu packages ruby)
74 #:use-module (gnu packages sdl)
75 #:use-module (gnu packages sqlite)
76 #:use-module (gnu packages tls)
77 #:use-module (gnu packages vulkan)
78 #:use-module (gnu packages xdisorg)
79 #:use-module (gnu packages xorg)
80 #:use-module (gnu packages xml)
81 #:use-module (srfi srfi-1))
83 (define-public grantlee
91 (url "https://github.com/steveire/grantlee.git")
92 (commit (string-append "v" version))))
93 (file-name (git-file-name name version))
95 (base32 "1dmah2gd6zd4fgz2f4ir11dazqg067hjz8xshhywhfsmavchi626"))))
97 ;; Optional: lcov and cccc, both are for code coverage
98 `(("doxygen" ,doxygen)))
101 ("qtscript" ,qtscript)))
102 (build-system cmake-build-system)
104 `(#:configure-flags '("-DCMAKE_CXX_STANDARD=11")
106 (modify-phases %standard-phases
107 (add-after 'unpack 'delete-broken-tests
109 ;; TODO: Two date tests (for date01 and date02) fail for unknown
111 ;; Actual (result): ""
112 ;; Expected (output): "01"
113 ;; Actual (result): ""
114 ;; Expected (output): "Jan. 1, 2008"
115 (delete-file "templates/tests/testfilters.cpp")
116 (substitute* "templates/tests/CMakeLists.txt"
117 (("testfilters") ""))
119 (add-before 'check 'check-setup
121 ;; make Qt render "offscreen", required for tests
122 (setenv "QT_QPA_PLATFORM" "offscreen")
124 (home-page "https://github.com/steveire/grantlee")
125 (synopsis "Libraries for text templating with Qt")
126 (description "Grantlee Templates can be used for theming and generation of
127 other text such as code. The syntax uses the syntax of the Django template
128 system, and the core design of Django is reused in Grantlee.")
129 (license license:lgpl2.0+)))
137 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
138 (string-copy version 0 (string-rindex version #\.))
140 "/qt-everywhere-opensource-src-"
144 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
145 (patches (search-patches "qt4-ldflags.patch"))
146 (modules '((guix build utils)))
148 ;; Remove webkit module, which is not built.
149 '(begin (delete-file-recursively "src/3rdparty/webkit")
151 (build-system gnu-build-system)
155 `(("alsa-lib" ,alsa-lib)
159 ("double-conversion" ,double-conversion)
161 ("fontconfig" ,fontconfig)
162 ("freetype" ,freetype)
164 ("gstreamer" ,gstreamer)
165 ("gst-plugins-base" ,gst-plugins-base)
168 ("libinput" ,libinput-minimal)
175 ("libxcomposite" ,libxcomposite)
176 ("libxcursor" ,libxcursor)
178 ("libxfixes" ,libxfixes)
180 ("libxinerama" ,libxinerama)
181 ("libxkbcommon" ,libxkbcommon)
183 ("libxrandr" ,libxrandr)
184 ("libxrender" ,libxrender)
188 ("mariadb" ,mariadb "lib")
189 ("mariadb-dev" ,mariadb "dev")
191 ("postgresql" ,postgresql)
192 ("pulseaudio" ,pulseaudio)
194 ("sqlite" ,sqlite-with-column-metadata)
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)
204 ("libjpeg" ,libjpeg-8)
206 ("openssl" ,openssl-1.0)))
208 `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
209 ;; We could build it with -std=gnu++98, but then we'll get in trouble with
210 ;; ICU later. Just keep using GCC 5 for now.
216 ("pkg-config" ,pkg-config)
219 ("which" ,(@ (gnu packages base) which))))
220 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
221 ;; but we can't make them a separate output because "out" and "examples"
222 ;; would refer to each other.
223 (outputs '("out" ;112MiB core + 37MiB examples
224 "doc")) ;280MiB of HTML + code
227 (modify-phases %standard-phases
230 (lambda* (#:key outputs #:allow-other-keys)
231 (let ((out (assoc-ref outputs "out"))
232 (doc (assoc-ref outputs "doc")))
233 (substitute* '("configure")
234 (("/bin/pwd") (which "pwd")))
235 (substitute* "src/corelib/global/global.pri"
236 (("/bin/ls") (which "ls")))
242 "-nomake" "examples demos"
243 ;; Note: Don't pass '-docdir' since 'qmake' and
244 ;; libQtCore would record its value, thereby defeating
245 ;; the whole point of having a separate output.
246 "-datadir" (string-append out "/share/qt-" ,version
248 "-importdir" (string-append out "/lib/qt-4"
250 "-plugindir" (string-append out "/lib/qt-4"
252 "-translationdir" (string-append out "/share/qt-" ,version
254 "-demosdir" (string-append out "/share/qt-" ,version
256 "-examplesdir" (string-append out "/share/qt-" ,version
260 ;; explicitly link with dbus instead of dlopening it
262 ;; Skip the webkit module; it fails to build on armhf
263 ;; and, apart from that, may pose security risks.
265 ;; don't use the precompiled headers
267 ;; drop special machine instructions not supported
268 ;; on all instances of the target
269 ,@(if (string-prefix? "x86_64"
270 (or (%current-target-system)
284 (lambda* (#:key outputs #:allow-other-keys)
285 ;; Because of qt4-documentation-path.patch, documentation ends up
286 ;; being installed in OUT. Move it to the right place.
287 (let* ((out (assoc-ref outputs "out"))
288 (doc (assoc-ref outputs "doc"))
289 (olddoc (string-append out "/doc"))
290 (docdir (string-append doc "/share/doc/qt-" ,version)))
291 (mkdir-p (dirname docdir))
293 ;; Note: We can't use 'rename-file' here because OUT and DOC are
294 ;; different "devices" due to bind-mounts.
295 (copy-recursively olddoc docdir)
296 (delete-file-recursively olddoc)
299 (list (search-path-specification
300 (variable "QMAKEPATH")
301 (files '("lib/qt5")))
302 (search-path-specification
303 (variable "QML2_IMPORT_PATH")
304 (files '("lib/qt5/qml")))
305 (search-path-specification
306 (variable "QT_PLUGIN_PATH")
307 (files '("lib/qt5/plugins")))
308 (search-path-specification
309 (variable "XDG_DATA_DIRS")
311 (search-path-specification
312 (variable "XDG_CONFIG_DIRS")
313 (files '("etc/xdg")))))
314 (home-page "https://www.qt.io/")
315 (synopsis "Cross-platform GUI library")
316 (description "Qt is a cross-platform application and UI framework for
317 developers using C++ or QML, a CSS & JavaScript like language.")
318 (license (list license:lgpl2.1 license:lgpl3))
320 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
321 ;; see <http://hydra.gnu.org/build/112828>.
322 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
323 (supported-systems (delete "mips64el-linux" %supported-systems))))
325 (define-public qtbase
331 (uri (string-append "https://download.qt.io/official_releases/qt/"
332 (version-major+minor version) "/" version
333 "/submodules/" name "-everywhere-src-"
337 "09wz7zs1x5mpgs2y4xnl2zv3naqls4sz6v2arwl1fz2dsx4jddba"))
338 ;; Use TZDIR to avoid depending on package "tzdata".
339 (patches (search-patches "qtbase-use-TZDIR.patch"))
340 (modules '((guix build utils)))
342 ;; corelib uses bundled harfbuzz, md4, md5, sha3
344 (with-directory-excursion "src/3rdparty"
345 (for-each delete-file-recursively
346 (list "double-conversion" "freetype" "harfbuzz-ng"
347 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
350 (build-system gnu-build-system)
353 ("which" ,(@ (gnu packages base) which))))
355 `(("alsa-lib" ,alsa-lib)
358 ("double-conversion" ,double-conversion)
361 ("fontconfig" ,fontconfig)
362 ("freetype" ,freetype)
364 ("harfbuzz" ,harfbuzz)
366 ("libinput" ,libinput-minimal)
371 ("libxcomposite" ,libxcomposite)
372 ("libxcursor" ,libxcursor)
373 ("libxfixes" ,libxfixes)
375 ("libxinerama" ,libxinerama)
376 ("libxkbcommon" ,libxkbcommon)
378 ("libxrandr" ,libxrandr)
379 ("libxrender" ,libxrender)
383 ("mariadb" ,mariadb "lib")
384 ("mariadb-dev" ,mariadb "dev")
388 ("postgresql" ,postgresql)
389 ("pulseaudio" ,pulseaudio)
390 ("sqlite" ,sqlite-with-column-metadata)
391 ("unixodbc" ,unixodbc)
392 ("xcb-util" ,xcb-util)
393 ("xcb-util-image" ,xcb-util-image)
394 ("xcb-util-keysyms" ,xcb-util-keysyms)
395 ("xcb-util-renderutil" ,xcb-util-renderutil)
396 ("xcb-util-wm" ,xcb-util-wm)
403 ("pkg-config" ,pkg-config)
405 ("vulkan-headers" ,vulkan-headers)
409 (modify-phases %standard-phases
410 (add-after 'configure 'patch-bin-sh
412 (substitute* '("config.status"
414 "mkspecs/features/qt_functions.prf"
415 "qmake/library/qmakebuiltins.cpp")
416 (("/bin/sh") (which "sh")))
419 (lambda* (#:key outputs #:allow-other-keys)
420 (let ((out (assoc-ref outputs "out")))
421 (substitute* "configure"
422 (("/bin/pwd") (which "pwd")))
423 (substitute* "src/corelib/global/global.pri"
424 (("/bin/ls") (which "ls")))
425 ;; The configuration files for other Qt5 packages are searched
426 ;; through a call to "find_package" in Qt5Config.cmake, which
427 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
428 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
429 ;; components can be installed in different places.
430 (substitute* (find-files "." ".*\\.cmake")
431 (("NO_DEFAULT_PATH") ""))
432 ;; do not pass "--enable-fast-install", which makes the
433 ;; configure process fail
438 "-docdir" (string-append out "/share/doc/qt5")
439 "-headerdir" (string-append out "/include/qt5")
440 "-archdatadir" (string-append out "/lib/qt5")
441 "-datadir" (string-append out "/share/qt5")
442 "-examplesdir" (string-append
443 out "/share/doc/qt5/examples")
447 ;; These features require higher versions of Linux than the
448 ;; minimum version of the glibc. See
449 ;; src/corelib/global/minimum-linux_p.h. By disabling these
450 ;; features Qt5 applications can be used on the oldest
451 ;; kernels that the glibc supports, including the RHEL6
452 ;; (2.6.32) and RHEL7 (3.10) kernels.
453 "-no-feature-getentropy" ; requires Linux 3.17
454 "-no-feature-renameat2" ; requires Linux 3.16
456 ;; Do not build examples; if desired, these could go
457 ;; into a separate output, but for the time being, we
458 ;; prefer to save the space and build time.
459 "-no-compile-examples"
460 ;; Most "-system-..." are automatic, but some use
461 ;; the bundled copy by default.
465 ;; explicitly link with openssl instead of dlopening it
467 ;; explicitly link with dbus instead of dlopening it
469 ;; don't use the precompiled headers
471 ;; drop special machine instructions that do not have
473 ,@(if (string-prefix? "x86_64"
474 (or (%current-target-system)
480 (add-after 'install 'patch-mkspecs
481 (lambda* (#:key outputs #:allow-other-keys)
482 (let* ((out (assoc-ref outputs "out"))
483 (archdata (string-append out "/lib/qt5"))
484 (mkspecs (string-append archdata "/mkspecs"))
485 (qt_config.prf (string-append
486 mkspecs "/features/qt_config.prf")))
487 ;; For each Qt module, let `qmake' uses search paths in the
488 ;; module directory instead of all in QT_INSTALL_PREFIX.
489 (substitute* qt_config.prf
490 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
491 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
492 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
493 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
494 (("\\$\\$\\[QT_HOST_LIBS\\]")
495 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
496 (("\\$\\$\\[QT_INSTALL_BINS\\]")
497 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
499 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
500 (substitute* (string-append mkspecs "/features/qt_functions.prf")
501 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
502 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
504 ;; Resolve qmake spec files within qtbase by absolute paths.
507 (string-append mkspecs "/features/" file))
508 '("device_config.prf" "moc.prf" "qt_build_config.prf"
509 "qt_config.prf" "winrt/package_manifest.prf"))
510 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
511 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
513 (add-after 'patch-mkspecs 'patch-prl-files
514 (lambda* (#:key outputs #:allow-other-keys)
515 (let ((out (assoc-ref outputs "out")))
516 ;; Insert absolute references to the qtbase libraries because
517 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
518 ;; on context. See <https://bugs.gnu.org/38405>
519 (substitute* (find-files (string-append out "/lib") "\\.prl$")
520 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
521 (string-append out "/lib")))
523 (add-after 'unpack 'patch-paths
524 ;; Use the absolute paths for dynamically loaded libs, otherwise
525 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
527 (lambda* (#:key inputs #:allow-other-keys)
529 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
530 "cross-libc" "libc"))))
531 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
532 "src/network/kernel/qhostinfo_unix.cpp")
533 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
534 (string-append a glibc "/lib/lib" b))))
535 ;; X11/locale (compose path)
536 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
537 ;; Don't search in /usr/…/X11/locale, …
538 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
539 (string-append "// " line))
540 ;; … but use libx11's path
541 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
542 (string-append a "\"" (assoc-ref inputs "libx11") b)))
544 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
545 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
546 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
548 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
549 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
550 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
551 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
552 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
555 (list (search-path-specification
556 (variable "QMAKEPATH")
557 (files '("lib/qt5")))
558 (search-path-specification
559 (variable "QML2_IMPORT_PATH")
560 (files '("lib/qt5/qml")))
561 (search-path-specification
562 (variable "QT_PLUGIN_PATH")
563 (files '("lib/qt5/plugins")))
564 (search-path-specification
565 (variable "XDG_DATA_DIRS")
567 (search-path-specification
568 (variable "XDG_CONFIG_DIRS")
569 (files '("etc/xdg")))))
570 (home-page "https://www.qt.io/")
571 (synopsis "Cross-platform GUI library")
572 (description "Qt is a cross-platform application and UI framework for
573 developers using C++ or QML, a CSS & JavaScript like language.")
574 (license (list license:lgpl2.1 license:lgpl3))))
577 ;; qt used to refer to the monolithic Qt 5.x package
578 (define-deprecated qt qtbase qtbase)
582 (package (inherit qtbase)
587 (uri (string-append "https://download.qt.io/official_releases/qt/"
588 (version-major+minor version) "/" version
589 "/submodules/" name "-everywhere-src-"
593 "13zg5095ffm88dsrybyi075i9zw3yrkibqzvj57an9sq89n3w926"))))
594 (propagated-inputs `())
595 (native-inputs `(("perl" ,perl)))
602 (modify-phases %standard-phases
603 (add-before 'configure 'configure-qmake
604 (lambda* (#:key inputs outputs #:allow-other-keys)
605 (let* ((out (assoc-ref outputs "out"))
606 (qtbase (assoc-ref inputs "qtbase"))
607 (tmpdir (string-append (getenv "TMPDIR")))
608 (qmake (string-append tmpdir "/qmake"))
609 (qt.conf (string-append tmpdir "/qt.conf")))
610 ;; Use qmake with a customized qt.conf to override install
612 (symlink (which "qmake") qmake)
613 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
614 (with-output-to-file qt.conf
620 Documentation=share/doc/qt5
623 LibraryExecutables=lib/qt5/libexec
626 Plugins=lib/qt5/plugins
627 Imports=lib/qt5/imports
628 Qml2Imports=lib/qt5/qml
629 Translations=share/qt5/translations
631 Examples=share/doc/qt5/examples
637 [EffectiveSourcePaths]
643 (lambda* (#:key inputs outputs #:allow-other-keys)
644 ;; Valid QT_BUILD_PARTS variables are:
645 ;; libs tools tests examples demos docs translations
646 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
647 (add-before 'check 'set-display
649 ;; make Qt render "offscreen", required for tests
650 (setenv "QT_QPA_PLATFORM" "offscreen")
652 (synopsis "Qt module for displaying SVGs")
653 (description "The QtSvg module provides classes for displaying the
654 contents of SVG files.")))
656 (define-public qtimageformats
657 (package (inherit qtsvg)
658 (name "qtimageformats")
662 (uri (string-append "https://download.qt.io/official_releases/qt/"
663 (version-major+minor version) "/" version
664 "/submodules/" name "-everywhere-src-"
668 "0n3qc5rx7kzb4csmcxaxdm2bqpciz2j2pz2zdfrlpi1ml4liq39k"))
669 (modules '((guix build utils)))
672 (delete-file-recursively "src/3rdparty")
683 (synopsis "Additional Image Format plugins for Qt")
684 (description "The QtImageFormats module contains plugins for adding
685 support for MNG, TGA, TIFF and WBMP image formats.")))
687 (define-public qtx11extras
688 (package (inherit qtsvg)
693 (uri (string-append "https://download.qt.io/official_releases/qt/"
694 (version-major+minor version) "/" version
695 "/submodules/" name "-everywhere-src-"
699 "0sqx785kb4kfxfl3cmg848dlxlxmfdg8jnfh3rrk8q0iazsr2faz"))))
701 (substitute-keyword-arguments (package-arguments qtsvg)
702 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
703 (native-inputs `(("perl" ,perl)))
707 (synopsis "Qt Extras for X11")
708 (description "The QtX11Extras module includes the library to access X11
709 from within Qt 5.")))
711 (define-public qtxmlpatterns
712 (package (inherit qtsvg)
713 (name "qtxmlpatterns")
717 (uri (string-append "https://download.qt.io/official_releases/qt/"
718 (version-major+minor version) "/" version
719 "/submodules/" name "-everywhere-src-"
723 "1l44476ibb8rv4rf80vbjdc3712lmrl1xcxswa513ip66k47p5vn"))))
725 (substitute-keyword-arguments (package-arguments qtsvg)
727 `(modify-phases ,phases
728 (add-after 'unpack 'disable-network-tests
729 (lambda _ (substitute* "tests/auto/auto.pro"
730 (("qxmlquery") "# qxmlquery")
731 (("xmlpatterns ") "# xmlpatterns"))
733 (native-inputs `(("perl" ,perl)))
734 (inputs `(("qtbase" ,qtbase)))
735 (synopsis "Qt XML patterns module")
736 (description "The QtXmlPatterns module is a XQuery and XPath engine for
737 XML and custom data models. It contains programs such as xmlpatterns and
738 xmlpatternsvalidator.")))
740 (define-public qtdeclarative
741 (package (inherit qtsvg)
742 (name "qtdeclarative")
746 (uri (string-append "https://download.qt.io/official_releases/qt/"
747 (version-major+minor version) "/" version
748 "/submodules/" name "-everywhere-src-"
752 "1lw6nr26cjdrshin3gq5xwqb0bvslg0ml99cw8rx9wb2anpd3c9l"))))
754 (substitute-keyword-arguments (package-arguments qtsvg)
755 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
758 ("pkg-config" ,pkg-config)
760 ("python-wrapper" ,python-wrapper)
762 ("qtxmlpatterns" ,qtxmlpatterns)))
766 (synopsis "Qt QML module (Quick 2)")
767 (description "The Qt QML module provides a framework for developing
768 applications and libraries with the QML language. It defines and implements the
769 language and engine infrastructure, and provides an API to enable application
770 developers to extend the QML language with custom types and integrate QML code
771 with JavaScript and C++.")))
773 (define-public qtconnectivity
774 (package (inherit qtsvg)
775 (name "qtconnectivity")
779 (uri (string-append "https://download.qt.io/official_releases/qt/"
780 (version-major+minor version) "/" version
781 "/submodules/" name "-everywhere-src-"
785 "1ni2x848dxf0c7ilk461vz0z46qis8zv6jxbpyhpbhzdg9rcdw8h"))))
788 ("pkg-config" ,pkg-config)
789 ("qtdeclarative" ,qtdeclarative)))
793 (synopsis "Qt Connectivity module")
794 (description "The Qt Connectivity modules provides modules for interacting
795 with Bluetooth and NFC.")))
797 (define-public qtwebsockets
798 (package (inherit qtsvg)
799 (name "qtwebsockets")
803 (uri (string-append "https://download.qt.io/official_releases/qt/"
804 (version-major+minor version) "/" version
805 "/submodules/" name "-everywhere-src-"
809 "07nnzqhsnb4q8pbka9dk5nxmqinbg9yicag7f4rlq2p6ffmgn2zh"))))
811 (substitute-keyword-arguments (package-arguments qtsvg)
812 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
815 ("qtdeclarative" ,qtdeclarative)))
816 (inputs `(("qtbase" ,qtbase)))
817 (synopsis "Qt Web Sockets module")
818 (description "WebSocket is a web-based protocol designed to enable two-way
819 communication between a client application and a remote host. The Qt
820 WebSockets module provides C++ and QML interfaces that enable Qt applications
821 to act as a server that can process WebSocket requests, or a client that can
822 consume data received from the server, or both.")))
824 (define-public qtsensors
825 (package (inherit qtsvg)
830 (uri (string-append "https://download.qt.io/official_releases/qt/"
831 (version-major+minor version) "/" version
832 "/submodules/" name "-everywhere-src-"
836 "1x8f55qyix5bsd0hl9rzi56ndyv4h16z2qh8is9nv13jpk0a9nsr"))))
838 (substitute-keyword-arguments (package-arguments qtsvg)
839 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
841 `(modify-phases ,phases
842 (add-after 'unpack 'fix-tests
844 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
845 (("2000") "5000") ;lengthen test timeout
846 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
850 ("qtdeclarative" ,qtdeclarative)))
851 (inputs `(("qtbase" ,qtbase)))
852 (synopsis "Qt Sensors module")
853 (description "The Qt Sensors API provides access to sensor hardware via QML
854 and C++ interfaces. The Qt Sensors API also provides a motion gesture
855 recognition API for devices.")))
857 (define-public qtmultimedia
858 (package (inherit qtsvg)
859 (name "qtmultimedia")
863 (uri (string-append "https://download.qt.io/official_releases/qt/"
864 (version-major+minor version) "/" version
865 "/submodules/" name "-everywhere-src-"
869 "0w4mcxmj41b9phwirppn9ws1vxy3sww7prvhhmh0jsnaca4hwn4z"))
870 (modules '((guix build utils)))
873 (delete-file-recursively
874 "examples/multimedia/spectrum/3rdparty")
875 ;; We also prevent the spectrum example from being built.
876 (substitute* "examples/multimedia/multimedia.pro"
880 (substitute-keyword-arguments (package-arguments qtsvg)
882 `(modify-phases ,phases
884 (lambda* (#:key outputs #:allow-other-keys)
885 (let ((out (assoc-ref outputs "out")))
886 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
887 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
888 (string-append "PREFIX=" out)))))))
889 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
892 ("pkg-config" ,pkg-config)
894 ("qtdeclarative" ,qtdeclarative)))
896 `(("alsa-lib" ,alsa-lib)
898 ("pulseaudio" ,pulseaudio)
900 ;; Gstreamer is needed for the mediaplayer plugin
901 ("gstreamer" ,gstreamer)
902 ("gst-plugins-base" ,gst-plugins-base)))
903 (synopsis "Qt Multimedia module")
904 (description "The Qt Multimedia module provides set of APIs to play and
905 record media, and manage a collection of media content. It also contains a
906 set of plugins for interacting with pulseaudio and GStreamer.")))
908 (define-public qtwayland
909 (package (inherit qtsvg)
914 (uri (string-append "https://download.qt.io/official_releases/qt/"
915 (version-major+minor version) "/" version
916 "/submodules/" name "-everywhere-src-"
920 "1i2i4d6qa512njm6gvd1ygcyb5p4d6axciqg9ys380yw9nl6m77s"))
921 (modules '((guix build utils)))
923 ;; The examples try to build and cause the build to fail
925 (delete-file-recursively "examples")
928 (substitute-keyword-arguments (package-arguments qtsvg)
930 `(modify-phases ,phases
931 (add-before 'check 'set-ld-library-path
932 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
934 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
935 ;; wayland platform plugin.
937 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
942 ("pkg-config" ,pkg-config)
943 ("qtdeclarative" ,qtdeclarative)))
945 `(("fontconfig" ,fontconfig)
946 ("freetype" ,freetype)
948 ("libxcomposite" ,libxcomposite)
950 ("libxkbcommon" ,libxkbcommon)
951 ("libxrender" ,libxrender)
955 ("wayland" ,wayland)))
956 (synopsis "Qt Wayland module")
957 (description "The Qt Wayland module provides the QtWayland client and
958 compositor libraries.")))
960 (define-public qtserialport
961 (package (inherit qtsvg)
962 (name "qtserialport")
966 (uri (string-append "https://download.qt.io/official_releases/qt/"
967 (version-major+minor version) "/" version
968 "/submodules/" name "-everywhere-src-"
972 "0qmq3yppc54vf7xrwyrwk91h6x04w0hf4bnw5b3y5kwyllhh7vzq"))))
973 (native-inputs `(("perl" ,perl)))
978 (substitute-keyword-arguments (package-arguments qtsvg)
980 `(modify-phases ,phases
981 (add-after 'unpack 'patch-dlopen-paths
982 (lambda* (#:key inputs #:allow-other-keys)
983 (substitute* "src/serialport/qtudev_p.h"
984 ;; Use the absolute paths for dynamically loaded libs,
985 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
986 ;; typically is not set in guix.
987 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
988 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
990 (synopsis "Qt Serial Port module")
991 (description "The Qt Serial Port module provides the library for
992 interacting with serial ports from within Qt.")))
994 (define-public qtserialbus
995 (package (inherit qtsvg)
1000 (uri (string-append "https://download.qt.io/official_releases/qt/"
1001 (version-major+minor version) "/" version
1002 "/submodules/" name "-everywhere-src-"
1006 "1ppmrwshj42lpx21m2gxblrlbigjf10fwg3fk5x5130ih89446q7"))))
1008 `(("qtbase" ,qtbase)
1009 ("qtserialport" ,qtserialport)))
1010 (synopsis "Qt Serial Bus module")
1011 (description "The Qt Serial Bus API provides classes and functions to
1012 access the various industrial serial buses and protocols, such as CAN, ModBus,
1015 (define-public qtwebchannel
1016 (package (inherit qtsvg)
1017 (name "qtwebchannel")
1021 (uri (string-append "https://download.qt.io/official_releases/qt/"
1022 (version-major+minor version) "/" version
1023 "/submodules/" name "-everywhere-src-"
1027 "1my8vcsidx9r5wpd1iax8skhp5ac3234g9r7ax04k9z17mqd2i97"))))
1030 ("qtdeclarative" ,qtdeclarative)
1031 ("qtwebsockets" ,qtwebsockets)))
1032 (inputs `(("qtbase" ,qtbase)))
1033 (synopsis "Web communication library for Qt")
1034 (description "The Qt WebChannel module enables peer-to-peer communication
1035 between the host (QML/C++ application) and the client (HTML/JavaScript
1036 application). The transport mechanism is supported out of the box by the two
1037 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1039 (define-public qtwebglplugin
1040 (package (inherit qtsvg)
1041 (name "qtwebglplugin")
1045 (uri (string-append "https://download.qt.io/official_releases/qt/"
1046 (version-major+minor version) "/" version
1047 "/submodules/" name "-everywhere-src-"
1051 "1pahdyhinhq1xhsc7lsfprjjpz6fn9vgwqcyi72hc3wzyr98in11"))))
1053 (substitute-keyword-arguments (package-arguments qtsvg)
1055 `(modify-phases ,phases
1056 (add-after 'unpack 'disable-network-tests
1057 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1058 (("webgl") "# webgl"))
1064 ("qtdeclarative" ,qtdeclarative)
1065 ("qtwebsockets" ,qtwebsockets)))
1066 (synopsis "QPA plugin for running an application via a browser using
1067 streamed WebGL commands")
1068 (description "Qt back end that uses WebGL for rendering. It allows Qt
1069 applications (with some limitations) to run in a web browser that supports
1070 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1071 compatible web browser without the use of plug-ins. The API is similar to
1072 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1074 (define-public qtwebview
1075 (package (inherit qtsvg)
1080 (uri (string-append "https://download.qt.io/official_releases/qt/"
1081 (version-major+minor version) "/" version
1082 "/submodules/" name "-everywhere-src-"
1086 "0ykjwz3cwv718gvgvnlhq7wia8gllnj3cdzw3amj0rh63hy65h22"))))
1090 `(("qtbase" ,qtbase)
1091 ("qtdeclarative" ,qtdeclarative)))
1092 (synopsis "Display web content in a QML application")
1093 (description "Qt WebView provides a way to display web content in a QML
1094 application without necessarily including a full web browser stack by using
1095 native APIs where it makes sense.")))
1097 (define-public qtlocation
1098 (package (inherit qtsvg)
1103 (uri (string-append "https://download.qt.io/official_releases/qt/"
1104 (version-major+minor version) "/" version
1105 "/submodules/" name "-everywhere-src-"
1109 "0y12vs6jwiwljdn57jqs1dwi6wfw1l5l95dvj9g93h739p533qks"))))
1111 (substitute-keyword-arguments (package-arguments qtsvg)
1112 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1115 ("qtdeclarative" ,qtdeclarative)
1116 ("qtquickcontrols" ,qtquickcontrols)
1117 ("qtserialport" ,qtserialport)))
1120 ("openssl" ,openssl)
1123 (synopsis "Qt Location and Positioning modules")
1124 (description "The Qt Location module provides an interface for location,
1125 positioning and geolocation plugins.")))
1127 (define-public qttools
1128 (package (inherit qtsvg)
1133 (uri (string-append "https://download.qt.io/official_releases/qt/"
1134 (version-major+minor version) "/" version
1135 "/submodules/" name "-everywhere-src-"
1139 "0xy7sf8w2lln1l59lhrf0kb687avwirrh63izp7509jwi33r2jg9"))))
1141 (substitute-keyword-arguments (package-arguments qtsvg)
1142 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1145 ("qtdeclarative" ,qtdeclarative)
1146 ("vulkan-headers" ,vulkan-headers)))
1149 ("qtbase" ,qtbase)))
1150 (synopsis "Qt Tools and Designer modules")
1151 (description "The Qt Tools module provides a set of applications to browse
1152 the documentation, translate applications, generate help files and other stuff
1153 that helps in Qt development.")))
1155 (define-public qtscript
1156 (package (inherit qtsvg)
1161 (uri (string-append "https://download.qt.io/official_releases/qt/"
1162 (version-major+minor version) "/" version
1163 "/submodules/" name "-everywhere-src-"
1167 "0z3p4bb2ddylb7y2xvagjbn7fc5d0ic08cmrrb67h8wf6fnq5051"))
1168 (patches (search-patches "qtscript-disable-tests.patch"))))
1171 ("qttools" ,qttools)))
1173 `(("qtbase" ,qtbase)))
1174 (synopsis "Qt Script module")
1175 (description "Qt provides support for application scripting with ECMAScript.
1176 The following guides and references cover aspects of programming with
1177 ECMAScript and Qt.")))
1179 (define-public qtquickcontrols
1180 (package (inherit qtsvg)
1181 (name "qtquickcontrols")
1185 (uri (string-append "https://download.qt.io/official_releases/qt/"
1186 (version-major+minor version) "/" version
1187 "/submodules/" name "-everywhere-src-"
1191 "169cvwiav5d538cw81rbdimb1pis0z6fkaxlwhd4z4pzhyhrd3f4"))))
1193 (substitute-keyword-arguments (package-arguments qtsvg)
1194 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1196 `(("qtbase" ,qtbase)
1197 ("qtdeclarative" ,qtdeclarative)))
1198 (synopsis "Qt Quick Controls and other Quick modules")
1199 (description "The QtScript module provides classes for making Qt
1200 applications scriptable. This module provides a set of extra components that
1201 can be used to build complete interfaces in Qt Quick.")))
1203 (define-public qtquickcontrols2
1204 (package (inherit qtsvg)
1205 (name "qtquickcontrols2")
1209 (uri (string-append "https://download.qt.io/official_releases/qt/"
1210 (version-major+minor version) "/" version
1211 "/submodules/" name "-everywhere-src-"
1215 "0w5910wblzc7q2llyb7fyfcbmy1fl369c6w5d6r5sh26z490gasw"))))
1217 (substitute-keyword-arguments (package-arguments qtsvg)
1218 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1220 `(("qtbase" ,qtbase)
1221 ("qtdeclarative" ,qtdeclarative)))
1222 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1223 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1224 module that provides platform integration: native dialogs, menus and menu bars,
1225 and tray icons. It falls back to Qt Widgets when a native implementation is
1228 (define-public qtgraphicaleffects
1229 (package (inherit qtsvg)
1230 (name "qtgraphicaleffects")
1234 (uri (string-append "https://download.qt.io/official_releases/qt/"
1235 (version-major+minor version) "/" version
1236 "/submodules/" name "-everywhere-src-"
1240 "1vvpq34433j94n9yyhh4if4yv51i8xiffpvyn3xgffx14iv35l6y"))))
1242 (substitute-keyword-arguments (package-arguments qtsvg)
1243 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1245 `(("qtbase" ,qtbase)
1246 ("qtdeclarative" ,qtdeclarative)))
1247 (synopsis "Qt Graphical Effects module")
1248 (description "The Qt Graphical Effects module provides a set of QML types
1249 for adding visually impressive and configurable effects to user interfaces.
1250 Effects are visual items that can be added to Qt Quick user interface as UI
1251 components. The API consists of over 20 effects provided as separate QML
1252 types. The effects cover functional areas such as blending, masking, blurring,
1253 coloring, and many more.")))
1255 (define-public qtgamepad
1256 (package (inherit qtsvg)
1261 (uri (string-append "https://download.qt.io/official_releases/qt/"
1262 (version-major+minor version) "/" version
1263 "/submodules/" name "-everywhere-src-"
1267 "1cxkqnhx0baxh3csjl7ar151v0zizf86f4338rr38liwb7rwbsz1"))))
1270 ("pkg-config" ,pkg-config)))
1272 `(("fontconfig" ,fontconfig)
1273 ("freetype" ,freetype)
1274 ("libxrender" ,libxrender)
1277 ("qtdeclarative" ,qtdeclarative)))
1278 (synopsis "Qt Gamepad module")
1279 (description "The Qt Gamepad module is an add-on library that enables Qt
1280 applications to support the use of gamepad hardware and in some cases remote
1281 control equipment. The module provides both QML and C++ interfaces. The
1282 primary target audience are embedded devices with fullscreen user interfaces,
1283 and mobile applications targeting TV-like form factors.")))
1285 (define-public qtscxml
1286 (package (inherit qtsvg)
1291 (uri (string-append "https://download.qt.io/official_releases/qt/"
1292 (version-major+minor version) "/" version
1293 "/submodules/" name "-everywhere-src-"
1297 "12y6ga7j6xby9rz1c9h17r9ih4i16i1ylr6b4vmrn7svidy87msk"))
1298 (modules '((guix build utils)))
1301 (delete-file-recursively "tests/3rdparty")
1302 ;; the scion test refers to the bundled 3rd party test code.
1303 (substitute* "tests/auto/auto.pro"
1307 `(("qtbase" ,qtbase)
1308 ("qtdeclarative" ,qtdeclarative)))
1309 (synopsis "Qt SCXML module")
1310 (description "The Qt SCXML module provides functionality to create state
1311 machines from SCXML files. This includes both dynamically creating state
1312 machines (loading the SCXML file and instantiating states and transitions) and
1313 generating a C++ file that has a class implementing the state machine. It
1314 also contains functionality to support data models and executable content.")))
1316 (define-public qtpurchasing
1317 (package (inherit qtsvg)
1318 (name "qtpurchasing")
1322 (uri (string-append "https://download.qt.io/official_releases/qt/"
1323 (version-major+minor version) "/" version
1324 "/submodules/" name "-everywhere-src-"
1328 "1kbhmzrw612yb4brxi3fwslil31j31vm0zqpb52vcma7vbivg80z"))))
1330 `(("qtbase" ,qtbase)
1331 ("qtdeclarative" ,qtdeclarative)))
1332 (synopsis "Qt Purchasing module")
1333 (description "The Qt Purchasing module provides and in-app API for
1334 purchasing goods and services.")))
1336 (define-public qtcanvas3d
1337 (package (inherit qtsvg)
1342 (uri (string-append "https://download.qt.io/official_releases/qt/"
1343 (version-major+minor version) "/" version
1344 "/submodules/" name "-everywhere-src-"
1348 "024xglrb321rp3wb3fhprw7pl6zvmpgfkpwgabbyx8p58k4yccrd"))
1349 (modules '((guix build utils)))
1352 (delete-file-recursively "examples/canvas3d/3rdparty")
1355 (substitute-keyword-arguments (package-arguments qtsvg)
1356 ;; Building the tests depends on the bundled 3rd party javascript files,
1357 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1358 ;; fail, so we skip building them for now.
1360 `(modify-phases ,phases
1362 (lambda* (#:key outputs #:allow-other-keys)
1363 (let ((out (assoc-ref outputs "out")))
1364 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1365 (string-append "PREFIX=" out)))))))
1366 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1369 `(("qtbase" ,qtbase)
1370 ("qtdeclarative" ,qtdeclarative)))
1371 (synopsis "Qt Canvas 3D module")
1372 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1373 drawing calls from Qt Quick JavaScript.")))
1375 (define-public qtcharts
1376 (package (inherit qtsvg)
1381 (uri (string-append "https://download.qt.io/official_releases/qt/"
1382 (version-major+minor version) "/" version
1383 "/submodules/" name "-everywhere-src-"
1387 "0gdark4z2g8j0kzjg1aqq91ap04h6hzjl163g8xlwxwdn5dxpnql"))))
1389 (substitute-keyword-arguments (package-arguments qtsvg)
1390 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1392 `(("qtbase" ,qtbase)
1393 ("qtdeclarative" ,qtdeclarative)))
1394 (synopsis "Qt Charts module")
1395 (description "The Qt Charts module provides a set of easy to use chart
1396 components. It uses the Qt Graphics View Framework, therefore charts can be
1397 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1398 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1399 selecting one of the charts themes.")
1400 (license license:gpl3)))
1402 (define-public qtdatavis3d
1403 (package (inherit qtsvg)
1404 (name "qtdatavis3d")
1408 (uri (string-append "https://download.qt.io/official_releases/qt/"
1409 (version-major+minor version) "/" version
1410 "/submodules/" name "-everywhere-src-"
1414 "1zm4xfi2ijqr3n3g0lfs3yzil6w7c54r8vsj1d541lz7wnm92ka1"))))
1416 (substitute-keyword-arguments (package-arguments qtsvg)
1417 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1419 `(("qtbase" ,qtbase)
1420 ("qtdeclarative" ,qtdeclarative)))
1421 (synopsis "Qt Data Visualization module")
1422 (description "The Qt Data Visualization module provides a way to visualize
1423 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1424 visualizing depth maps and large quantities of rapidly changing data, such as
1425 data received from multiple sensors. The look and feel of graphs can be
1426 customized by using themes or by adding custom items and labels to them.")
1427 (license license:gpl3)))
1429 (define-public qtnetworkauth
1430 (package (inherit qtsvg)
1431 (name "qtnetworkauth")
1435 (uri (string-append "https://download.qt.io/official_releases/qt/"
1436 (version-major+minor version) "/" version
1437 "/submodules/" name "-everywhere-src-"
1441 "1gba6rdhcvljc4dnzhnkxrdlaxm3y095ljqg1sz3p1k0m632s4pa"))))
1443 (substitute-keyword-arguments (package-arguments qtsvg)
1445 `(modify-phases ,phases
1446 (add-after 'unpack 'remove-failing-test
1448 ;; These tests can't find their test data.
1449 (substitute* "tests/auto/auto.pro"
1450 (("oauth1 ") "# oauth1 "))
1453 `(("qtbase" ,qtbase)))
1454 (synopsis "Qt Network Authorization module")
1455 (description "The Qt Network Authorization module provides an
1456 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1458 (define-public qtremoteobjects
1459 (package (inherit qtsvg)
1460 (name "qtremoteobjects")
1464 (uri (string-append "https://download.qt.io/official_releases/qt/"
1465 (version-major+minor version) "/" version
1466 "/submodules/" name "-everywhere-src-"
1470 "16fna70pljn45yj6hv3g4qvb1imcnfj43jchvydspdhg08ykbda9"))))
1472 (substitute-keyword-arguments (package-arguments qtsvg)
1474 `(modify-phases ,phases
1475 (add-after 'unpack 'remove-failing-test
1477 ;; This test can't find its imports.
1478 (substitute* "tests/auto/qml/qml.pro"
1479 (("integration") "# integration")
1480 (("usertypes") "# usertypes"))
1483 `(("qtbase" ,qtbase)
1484 ("qtdeclarative" ,qtdeclarative)))
1485 (synopsis "Qt Remote Objects module")
1486 (description "The Qt Remote Objects module is an @dfn{inter-process
1487 communication} (IPC) module developed for Qt. The idea is to extend existing
1488 Qt's functionalities to enable an easy exchange of information between
1489 processes or computers.")))
1491 (define-public qtspeech
1492 (package (inherit qtsvg)
1497 (uri (string-append "https://download.qt.io/official_releases/qt/"
1498 (version-major+minor version) "/" version
1499 "/submodules/" name "-everywhere-src-"
1503 "12l7rycjfa6d9gnnjd6i097pf1qqzjnz9c1jgxhpldvkf0n7pbi7"))))
1505 (substitute-keyword-arguments (package-arguments qtsvg)
1506 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1508 `(("qtbase" ,qtbase)))
1511 ("qtdeclarative" ,qtdeclarative)
1512 ("qtmultimedia" ,qtmultimedia)
1513 ("qtxmlpatterns" ,qtxmlpatterns)))
1514 (synopsis "Qt Speech module")
1515 (description "The Qt Speech module enables a Qt application to support
1516 accessibility features such as text-to-speech, which is useful for end-users
1517 who are visually challenged or cannot access the application for whatever
1518 reason. The most common use case where text-to-speech comes in handy is when
1519 the end-user is driving and cannot attend the incoming messages on the phone.
1520 In such a scenario, the messaging application can read out the incoming
1523 (define-public python-sip
1530 (uri (string-append "https://www.riverbankcomputing.com/static/"
1531 "Downloads/sip/" version "/sip-" version ".tar.gz"))
1534 "07kyd56xgbb40ljb022rq82shgxprlbl0z27mpf1b6zd00w8dgf0"))))
1535 (build-system gnu-build-system)
1537 `(("python" ,python-wrapper)))
1539 `(#:tests? #f ; no check target
1540 #:modules ((srfi srfi-1)
1541 ,@%gnu-build-system-modules)
1543 (modify-phases %standard-phases
1545 (lambda* (#:key inputs outputs #:allow-other-keys)
1546 (let* ((out (assoc-ref outputs "out"))
1547 (bin (string-append out "/bin"))
1548 (include (string-append out "/include"))
1549 (python (assoc-ref inputs "python"))
1551 (last (string-split python #\-)))
1554 (take (string-split python-version #\.) 2)
1556 (lib (string-append out "/lib/python"
1559 (invoke "python" "configure.py"
1562 "--incdir" include)))))))
1563 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1564 (synopsis "Python binding creator for C and C++ libraries")
1566 "SIP is a tool to create Python bindings for C and C++ libraries. It
1567 was originally developed to create PyQt, the Python bindings for the Qt
1568 toolkit, but can be used to create bindings for any C or C++ library.
1570 SIP comprises a code generator and a Python module. The code generator
1571 processes a set of specification files and generates C or C++ code, which
1572 is then compiled to create the bindings extension module. The SIP Python
1573 module provides support functions to the automatically generated code.")
1574 ;; There is a choice between a python like license, gpl2 and gpl3.
1575 ;; For compatibility with pyqt, we need gpl3.
1576 (license license:gpl3)))
1578 (define-public python2-sip
1579 (package (inherit python-sip)
1580 (name "python2-sip")
1582 `(("python" ,python-2)))))
1584 (define-public python-pyqt
1586 (name "python-pyqt")
1591 (uri (string-append "https://www.riverbankcomputing.com/static/"
1592 "Downloads/PyQt5/" version "/PyQt5_gpl-"
1596 "041155bdzp57jy747p5d59740c55yy3241cy1x2lgcdsvqvzmc0d"))
1597 (patches (search-patches "pyqt-configure.patch"
1598 "pyqt-unbundled-qt.patch"
1599 "pyqt-public-sip.patch"))))
1600 (build-system gnu-build-system)
1602 `(("qtbase" ,qtbase))) ; for qmake
1604 `(("python-sip" ,python-sip)))
1606 `(("python" ,python-wrapper)
1608 ("qtconnectivity" ,qtconnectivity)
1609 ("qtdeclarative" ,qtdeclarative)
1610 ("qtlocation" ,qtlocation)
1611 ("qtmultimedia" ,qtmultimedia)
1612 ("qtsensors" ,qtsensors)
1613 ("qtserialport" ,qtserialport)
1615 ("qttools" ,qttools)
1616 ("qtwebchannel" ,qtwebchannel)
1617 ("qtwebkit" ,qtwebkit)
1618 ("qtwebsockets" ,qtwebsockets)
1619 ("qtx11extras" ,qtx11extras)
1620 ("qtxmlpatterns" ,qtxmlpatterns)))
1622 `(#:modules ((srfi srfi-1)
1623 ,@%gnu-build-system-modules)
1625 (modify-phases %standard-phases
1627 (lambda* (#:key inputs outputs #:allow-other-keys)
1628 (let* ((out (assoc-ref outputs "out"))
1629 (bin (string-append out "/bin"))
1630 (sip (string-append out "/share/sip"))
1631 (plugins (string-append out "/lib/qt5/plugins"))
1632 (designer (string-append plugins "/designer"))
1633 (qml (string-append plugins "/PyQt5"))
1634 (python (assoc-ref inputs "python"))
1636 (last (string-split python #\-)))
1639 (take (string-split python-version #\.) 2)
1641 (lib (string-append out "/lib/python"
1644 (stubs (string-append lib "/PyQt5")))
1645 (invoke "python" "configure.py"
1649 "--designer-plugindir" designer
1650 "--qml-plugindir" qml
1651 ; Where to install the PEP 484 Type Hints stub
1652 ; files. Without this the stubs are tried to be
1653 ; installed into the python package's
1654 ; site-package directory, which is read-only.
1656 "--sipdir" sip)))))))
1657 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1658 (synopsis "Python bindings for Qt")
1660 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1661 framework. The bindings are implemented as a set of Python modules and
1662 contain over 620 classes.")
1663 (license license:gpl3)))
1665 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
1666 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
1667 ;; packages that could be used together.
1668 (define-public python-pyqt-without-qtwebkit
1669 (package (inherit python-pyqt)
1670 (name "python-pyqt-without-qtwebkit")
1672 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
1674 (define-public python2-pyqt
1675 (package (inherit python-pyqt)
1676 (name "python2-pyqt")
1678 `(("python-sip" ,python2-sip)
1679 ("qtbase" ,qtbase)))
1681 `(("python" ,python-2)
1682 ("python2-enum34" ,python2-enum34)
1683 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1685 (define-public python2-pyqt-4
1686 (package (inherit python-pyqt)
1687 (name "python2-pyqt")
1693 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1694 "PyQt-" version "/PyQt4_gpl_x11-"
1698 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
1700 `(("python-sip" ,python2-sip)
1702 (inputs `(("python" ,python-2)))
1704 `(#:tests? #f ; no check target
1705 #:modules ((srfi srfi-1)
1706 ,@%gnu-build-system-modules)
1708 (modify-phases %standard-phases
1710 (lambda* (#:key inputs outputs #:allow-other-keys)
1711 (let* ((out (assoc-ref outputs "out"))
1712 (bin (string-append out "/bin"))
1713 (sip (string-append out "/share/sip"))
1714 (python (assoc-ref inputs "python"))
1716 (last (string-split python #\-)))
1719 (take (string-split python-version #\.) 2)
1721 (lib (string-append out "/lib/python"
1724 (invoke "python" "configure.py"
1728 "--sipdir" sip)))))))
1729 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1731 (define-public qscintilla
1737 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1738 "QScintilla-" version "/QScintilla_gpl-"
1742 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
1743 (build-system gnu-build-system)
1746 (modify-phases %standard-phases
1748 (lambda* (#:key outputs #:allow-other-keys)
1749 (let ((out (assoc-ref outputs "out")))
1751 (substitute* "qscintilla.pro"
1752 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1753 (string-append out "/lib"))
1754 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1755 (string-append out "/include"))
1756 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1757 (string-append out "/translations"))
1758 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1759 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1760 (("\\$\\$\\[QT_HOST_DATA\\]")
1761 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
1762 (invoke "qmake")))))))
1763 (native-inputs `(("qtbase" ,qtbase)))
1764 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1765 (synopsis "Qt port of the Scintilla C++ editor control")
1766 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1767 editor control. QScintilla includes features especially useful when editing
1768 and debugging source code. These include support for syntax styling, error
1769 indicators, code completion and call tips.")
1770 (license license:gpl3+)))
1772 (define-public python-qscintilla
1773 (package (inherit qscintilla)
1774 (name "python-qscintilla")
1777 (list "--pyqt=PyQt5"
1778 (string-append "--pyqt-sipdir="
1779 (assoc-ref %build-inputs "python-pyqt")
1781 (string-append "--qsci-incdir="
1782 (assoc-ref %build-inputs "qscintilla")
1784 (string-append "--qsci-libdir="
1785 (assoc-ref %build-inputs "qscintilla")
1788 (modify-phases %standard-phases
1790 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
1791 (let ((out (assoc-ref outputs "out"))
1792 (python (assoc-ref inputs "python")))
1794 (apply invoke "python3" "configure.py"
1796 ;; Install to the right directory
1797 (substitute* '("Makefile"
1799 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
1800 (((string-append python "/lib"))
1801 (string-append out "/lib")))
1802 ;; And fix the installed.txt file
1803 (substitute* "installed.txt"
1804 (("/gnu/store/[^/]+") out)))
1807 `(("qscintilla" ,qscintilla)
1809 ("python-pyqt" ,python-pyqt)))
1810 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1811 editor control. QScintilla includes features especially useful when editing
1812 and debugging source code. These include support for syntax styling, error
1813 indicators, code completion and call tips.
1815 This package provides the Python bindings.")))
1817 ;; PyQt only looks for modules in its own directory. It ignores environment
1818 ;; variables such as PYTHONPATH, so we need to build a union package to make
1820 (define-public python-pyqt+qscintilla
1821 (package (inherit python-pyqt)
1822 (name "python-pyqt+qscintilla")
1824 (build-system trivial-build-system)
1826 '(#:modules ((guix build union))
1828 (use-modules (ice-9 match)
1830 (match %build-inputs
1831 (((names . directories) ...)
1832 (union-build (assoc-ref %outputs "out")
1836 `(("python-pyqt" ,python-pyqt)
1837 ("python-qscintilla" ,python-qscintilla)))
1838 (synopsis "Union of PyQt and the Qscintilla extension")
1840 "This package contains the union of PyQt and the Qscintilla extension.")))
1842 (define-public qtkeychain
1850 (url "https://github.com/frankosterfeld/qtkeychain/")
1851 (commit (string-append "v" version))))
1852 (file-name (git-file-name name version))
1855 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
1856 (build-system cmake-build-system)
1858 `(("pkg-config" ,pkg-config)
1859 ("qttools" ,qttools)))
1861 `(("qtbase" ,qtbase)))
1863 `(#:tests? #f ; No tests included
1865 (modify-phases %standard-phases
1866 (add-before 'configure 'set-qt-trans-dir
1868 (substitute* "CMakeLists.txt"
1869 (("\\$\\{qt_translations_dir\\}")
1870 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
1872 (home-page "https://github.com/frankosterfeld/qtkeychain")
1873 (synopsis "Qt API to store passwords")
1875 "QtKeychain is a Qt library to store passwords and other secret data
1876 securely. It will not store any data unencrypted unless explicitly requested.")
1877 (license license:bsd-3)))
1887 (string-append "mirror://sourceforge/qwt/qwt/"
1888 version "/qwt-" version ".tar.bz2"))
1890 (base32 "1navkcnmn0qz8kzsyqmk32d929zl72l0b580w1ica7z5559j2a8m"))))
1891 (build-system gnu-build-system)
1893 `(("qtbase" ,qtbase)
1895 ("qttools" ,qttools)))
1898 (modify-phases %standard-phases
1900 (lambda* (#:key outputs #:allow-other-keys)
1901 (let* ((out (assoc-ref outputs "out"))
1902 (docdir (string-append out "/share/doc/qwt"))
1903 (incdir (string-append out "/include/qwt"))
1904 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
1905 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
1906 (substitute* '("qwtconfig.pri")
1907 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
1908 (format #f "~a = ~a\n" x out))
1909 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
1910 (format #f "~a = ~a\n" x docdir))
1911 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
1912 (format #f "~a = ~a\n" x incdir))
1913 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
1914 (format #f "~a = ~a\n" x pluginsdir))
1915 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
1916 (format #f "~a = ~a\n" x featuresdir)))
1917 (substitute* '("doc/doc.pro")
1918 ;; We'll install them in the 'install-man-pages' phase.
1919 (("^unix:doc\\.files.*") ""))
1921 (add-after 'install 'install-man-pages
1922 (lambda* (#:key outputs #:allow-other-keys)
1923 (let* ((out (assoc-ref outputs "out"))
1924 (man (string-append out "/share/man")))
1925 ;; Remove some incomplete manual pages.
1926 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1928 (copy-recursively "doc/man" man)
1930 (home-page "http://qwt.sourceforge.net")
1931 (synopsis "Qt widgets for plots, scales, dials and other technical software
1934 "The Qwt library contains widgets and components which are primarily useful
1935 for technical and scientific purposes. It includes a 2-D plotting widget,
1936 different kinds of sliders, and much more.")
1939 ;; The Qwt license is LGPL2.1 with some exceptions.
1940 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1941 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1942 license:lgpl2.1 license:gpl3))))
1944 (define-public qtwebkit
1947 (version "5.212.0-alpha3")
1951 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
1952 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
1955 "05syvwi3jw9abwsc93rmjkna0vyh6bkfrsqhwir48ms54icfwzim"))
1956 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
1957 (build-system cmake-build-system)
1960 ("python" ,python-2.7)
1965 ("pkg-config" ,pkg-config)))
1969 ("gst-plugins-base" ,gst-plugins-base)
1970 ("libjpeg" ,libjpeg)
1972 ("libwebp" ,libwebp)
1973 ("sqlite" ,sqlite-with-column-metadata)
1974 ("fontconfig" ,fontconfig)
1975 ("libxrender" ,libxrender)
1977 ("qtdeclarative" ,qtdeclarative)
1978 ("qtlocation" ,qtlocation)
1979 ("qtmultimedia" ,qtmultimedia)
1980 ("qtsensors" ,qtsensors)
1981 ("qtwebchannel" ,qtwebchannel)
1982 ("libxml2" ,libxml2)
1983 ("libxslt" ,libxslt)
1985 ("libxcomposite" ,libxcomposite)))
1987 `(#:tests? #f ; no apparent tests; it might be necessary to set
1988 ; ENABLE_API_TESTS, see CMakeLists.txt
1990 ;; Parallel builds fail due to a race condition:
1991 ;; <https://bugs.gnu.org/34062>.
1992 #:parallel-build? #f
1994 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
1996 "-DUSE_LIBHYPHEN=OFF"
1997 "-DUSE_SYSTEM_MALLOC=ON"
1998 ;; XXX: relative dir installs to build dir?
1999 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2000 %output "/lib/qt5/mkspecs/modules")
2001 ;; Sacrifice a little speed in order to link
2002 ;; libraries and test executables in a
2003 ;; reasonable amount of memory.
2004 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2005 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2006 (home-page "https://www.webkit.org")
2007 (synopsis "Web browser engine and classes to render and interact with web
2009 (description "QtWebKit provides a Web browser engine that makes it easy to
2010 embed content from the World Wide Web into your Qt application. At the same
2011 time Web content can be enhanced with native controls.")
2012 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2013 ;; room for slower or busy hardware.
2014 (properties '((timeout . 64800))) ;18 hours
2016 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2017 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2018 ;; disable it on non-Intel platforms.
2019 (supported-systems '("x86_64-linux" "i686-linux"))
2021 (license license:lgpl2.1+)))
2023 (define-public dotherside
2031 (url "https://github.com/filcuc/DOtherSide")
2032 (commit (string-append "v" version))))
2033 (file-name (git-file-name name version))
2036 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
2037 (build-system cmake-build-system)
2039 `(("qttools" ,qttools)))
2041 `(("qtbase" ,qtbase)
2042 ("qtdeclarative" ,qtdeclarative)))
2043 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2044 (synopsis "C language library for creating bindings for the Qt QML language")
2046 "DOtherSide is a C language library for creating bindings for the
2047 QT QML language. The following features are implementable from
2050 @item Creating custom QObject
2051 @item Creating custom QAbstractListModels
2052 @item Creating custom properties, signals and slots
2053 @item Creating from QML QObject defined in the binded language
2054 @item Creating from Singleton QML QObject defined in the binded language
2056 (license license:lgpl3))) ;version 3 only (+ exception)
2058 ;; There have been no public releases yet.
2059 (define-public qtcolorwidgets
2060 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2063 (name "qtcolorwidgets")
2064 (version (git-version "0" revision commit))
2068 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2070 (file-name (git-file-name name version))
2073 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2074 (build-system cmake-build-system)
2075 (arguments `(#:tests? #f)) ; There are no tests
2077 `(("qttools" ,qttools)))
2079 `(("qtbase" ,qtbase)))
2080 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2081 (synopsis "Color management widgets")
2082 (description "QtColorWidgets provides a Qt color dialog that is more
2083 user-friendly than the default @code{QColorDialog} and several other
2084 color-related widgets.")
2085 ;; Includes a license exception for combining with GPL2 code.
2086 (license license:lgpl3+))))
2088 (define-public python-shiboken-2
2089 (let ((revision "1")
2090 ;; Pinned to branches with support for qt 5.11.3
2091 (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
2093 (name "python-shiboken-2")
2094 (version (git-version "v5.11.3" revision commit))
2099 ;; The latest versions of Shiboken live in the pyside repo.
2100 ;; There is another standalone repo only for Shiboken
2101 ;; but it is outdated
2102 (url "https://code.qt.io/pyside/pyside-setup")
2104 (file-name (git-file-name name version))
2107 "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
2108 (build-system cmake-build-system)
2110 `(("clang-toolchain" ,clang-toolchain-6)
2111 ("libxml2" ,libxml2)
2112 ("libxslt" ,libxslt)
2113 ("python-wrapper" ,python-wrapper)
2115 ("qtxmlpatterns" ,qtxmlpatterns)))
2118 ;; FIXME: Building tests fails
2119 #:configure-flags '("-DBUILD_TESTS=off")
2121 (modify-phases %standard-phases
2122 (add-after 'unpack 'use-shiboken-dir-only
2123 (lambda _ (chdir "sources/shiboken2") #t))
2124 (add-before 'configure 'set-build-env
2125 (lambda* (#:key inputs #:allow-other-keys)
2126 (let ((llvm (assoc-ref inputs "clang-toolchain")))
2127 (setenv "CLANG_INSTALL_DIR" llvm)
2129 (home-page "https://wiki.qt.io/Qt_for_Python")
2131 "Shiboken generates bindings for C++ libraries using CPython source code")
2133 "Shiboken generates bindings for C++ libraries using CPython source code")
2136 ;; The main code is GPL3 or LGPL3.
2137 ;; Examples are BSD-3.
2142 (define-public python-pyside-2
2143 (let ((revision "1")
2144 ;; Pinned to branches with support for qt 5.11.3
2145 (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
2147 (name "python-pyside-2")
2148 (version (git-version "v5.11.3" revision commit))
2153 (url "https://code.qt.io/pyside/pyside-setup")
2155 (file-name (git-file-name name version))
2158 "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
2159 (build-system cmake-build-system)
2161 `(("libcxx" ,libcxx-6)
2162 ("libxml2" ,libxml2)
2163 ("libxslt" ,libxslt)
2164 ("clang-toolchain" ,clang-toolchain-6)
2166 ("qtdatavis3d" ,qtdatavis3d)
2167 ("qtlocation" ,qtlocation)
2168 ("qtmultimedia" ,qtmultimedia)
2169 ("qtquickcontrols" ,qtquickcontrols)
2170 ("qtscript" ,qtscript)
2171 ("qtscxml" ,qtscxml)
2172 ("qtsensors" ,qtsensors)
2173 ("qtspeech" ,qtspeech)
2175 ("qtwebchannel" ,qtwebchannel)
2176 ("qtwebsockets" ,qtwebsockets)
2177 ("qtx11extras" ,qtx11extras)
2178 ("qtxmlpatterns" ,qtxmlpatterns)))
2181 ("python-shiboken-2" ,python-shiboken-2)
2182 ("python-wrapper" ,python-wrapper)
2183 ("qttools" ,qttools)
2187 ;; FIXME: Building tests fail.
2188 #:configure-flags '("-DBUILD_TESTS=FALSE")
2190 (modify-phases %standard-phases
2191 (add-after 'unpack 'go-to-source-dir
2192 (lambda _ (chdir "sources/pyside2") #t))
2193 (add-before 'configure 'set-clang-dir
2194 (lambda* (#:key inputs #:allow-other-keys)
2195 (let ((clang (assoc-ref inputs "clang-toolchain"))
2196 (libcxx (assoc-ref inputs "libcxx")))
2197 (setenv "CLANG_INSTALL_DIR" clang)
2198 (substitute* "cmake/Macros/PySideModules.cmake"
2199 (("--include-paths=")
2200 (string-append "--include-paths=" libcxx "/include/c++/v1:")))
2202 (home-page "https://wiki.qt.io/Qt_for_Python")
2204 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2206 "The Qt for Python product enables the use of Qt5 APIs in Python
2207 applications. It lets Python developers utilize the full potential of Qt,
2208 using the PySide2 module. The PySide2 module provides access to the
2209 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2210 comes with the Shiboken2 CPython binding code generator, which can be used to
2211 generate Python bindings for your C or C++ code.")
2215 ;; this file may be used under the terms of the GNU General
2216 ;; Public License version 2.0 or (at your option) the GNU
2217 ;; General Public license version 3 or any later version
2218 ;; approved by the KDE Free Qt Foundation.
2219 ;; Thus, it is currently v2 or v3, but no "+".
2223 (define-public python-pyside-2-tools
2224 (let ((revision "1")
2225 ;; Pinned to branches with support for qt 5.11.3
2226 (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
2228 (name "python-pyside-2-tools")
2229 (version (git-version "v5.11.2" revision commit))
2234 (url "https://code.qt.io/pyside/pyside-tools")
2236 (file-name (git-file-name name version))
2239 "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
2240 (build-system cmake-build-system)
2242 `(("python-pyside-2" ,python-pyside-2)
2243 ("python-shiboken-2" ,python-shiboken-2)
2244 ("qtbase" ,qtbase)))
2247 #:configure-flags '("-DBUILD_TESTS=off")))
2248 (home-page "https://wiki.qt.io/Qt_for_Python")
2250 "Contains command line tools for PySide2")
2252 "Contains lupdate, rcc and uic tools for PySide2")
2253 (license license:gpl2))))