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, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 Nikita <nikita@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, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018, 2020 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, 2020 Marius Bakke <mbakke@fastmail.com>
15 ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
16 ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
17 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
18 ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
19 ;;; Copyright © 2020 TomZ <tomz@freedommail.ch>
20 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
21 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
22 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
24 ;;; This file is part of GNU Guix.
26 ;;; GNU Guix is free software; you can redistribute it and/or modify it
27 ;;; under the terms of the GNU General Public License as published by
28 ;;; the Free Software Foundation; either version 3 of the License, or (at
29 ;;; your option) any later version.
31 ;;; GNU Guix is distributed in the hope that it will be useful, but
32 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 ;;; GNU General Public License for more details.
36 ;;; You should have received a copy of the GNU General Public License
37 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39 (define-module (gnu packages qt)
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (guix packages)
42 #:use-module (guix download)
43 #:use-module (guix git-download)
44 #:use-module (guix build-system cmake)
45 #:use-module (guix build-system gnu)
46 #:use-module (guix build-system trivial)
47 #:use-module (guix build-system python)
48 #:use-module (guix build-system qt)
49 #:use-module (guix packages)
50 #:use-module (guix deprecation)
51 #:use-module (guix utils)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages base)
54 #:use-module (gnu packages bison)
55 #:use-module (gnu packages cmake)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages cups)
58 #:use-module (gnu packages curl)
59 #:use-module (gnu packages databases)
60 #:use-module (gnu packages documentation)
61 #:use-module (gnu packages enchant)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages flex)
64 #:use-module (gnu packages freedesktop)
65 #:use-module (gnu packages gcc)
66 #:use-module (gnu packages ghostscript)
67 #:use-module (gnu packages gl)
68 #:use-module (gnu packages glib)
69 #:use-module (gnu packages gnupg)
70 #:use-module (gnu packages gperf)
71 #:use-module (gnu packages graphics)
72 #:use-module (gnu packages gstreamer)
73 #:use-module (gnu packages gtk)
74 #:use-module (gnu packages icu4c)
75 #:use-module (gnu packages image)
76 #:use-module (gnu packages kde-frameworks)
77 #:use-module (gnu packages libevent)
78 #:use-module (gnu packages linux)
79 #:use-module (gnu packages llvm)
80 #:use-module (gnu packages maths)
81 #:use-module (gnu packages networking)
82 #:use-module (gnu packages ninja)
83 #:use-module (gnu packages nss)
84 #:use-module (gnu packages pciutils)
85 #:use-module (gnu packages pcre)
86 #:use-module (gnu packages perl)
87 #:use-module (gnu packages pkg-config)
88 #:use-module (gnu packages pulseaudio)
89 #:use-module (gnu packages protobuf)
90 #:use-module (gnu packages python)
91 #:use-module (gnu packages python-xyz)
92 #:use-module (gnu packages regex)
93 #:use-module (gnu packages ruby)
94 #:use-module (gnu packages sdl)
95 #:use-module (gnu packages serialization)
96 #:use-module (gnu packages sqlite)
97 #:use-module (gnu packages telephony)
98 #:use-module (gnu packages tls)
99 #:use-module (gnu packages valgrind)
100 #:use-module (gnu packages video)
101 #:use-module (gnu packages vulkan)
102 #:use-module (gnu packages xdisorg)
103 #:use-module (gnu packages xiph)
104 #:use-module (gnu packages xorg)
105 #:use-module (gnu packages xml)
106 #:use-module (srfi srfi-1))
116 (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
118 (base32 "1lnx4wqk87lbr6lqc64w5g5ppjjv75kq2r0q0bz9gfpryzdw8xxg"))))
119 (build-system gnu-build-system)
121 `(#:tests? #f ; No target
123 (,@%gnu-build-system-modules
124 (guix build cmake-build-system)
125 (guix build qt-build-system))
127 ((guix build gnu-build-system)
128 ((guix build qt-build-system)
132 (modify-phases %standard-phases
133 (add-after 'unpack 'patch
134 (lambda* (#:key inputs #:allow-other-keys)
135 (substitute* "qt5ct.pro"
136 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
137 (string-append (assoc-ref inputs "qttools")
141 (lambda* (#:key outputs #:allow-other-keys)
142 (let* ((out (assoc-ref outputs "out")))
144 (string-append "PREFIX=" out)
145 (string-append "BINDIR=" out "/bin")
146 (string-append "DATADIR=" out "/share")
147 (string-append "PLUGINDIR=" out "/lib/qt5/plugins")))
149 (add-after 'install 'qt-wrap
150 (assoc-ref qt:%standard-phases 'qt-wrap)))))
152 `(("qttools" ,qttools)))
156 (synopsis "Qt5 Configuration Tool")
157 (description "Qt5CT is a program that allows users to configure Qt5
158 settings (such as icons, themes, and fonts) in desktop environments or
159 window managers, that don't provide Qt integration by themselves.")
160 (home-page "https://qt5ct.sourceforge.io/")
161 (license license:bsd-2)))
163 (define-public materialdecoration
164 (let ((commit "6a5de23f2e5162fbee39d16f938473ff970a2ec0")
167 (name "materialdecoration")
169 (git-version "1.1.0" revision commit))
175 (url "https://github.com/lirios/materialdecoration.git")
178 (git-file-name name version))
180 (base32 "1zdrcb39fhhmn76w8anv1dnspz26pdl6izmj1mlm02aza4y8ffp4"))
181 (modules '((guix build utils)
186 (delete-file-recursively "cmake/3rdparty")))))
187 (build-system qt-build-system)
189 `(#:tests? #f ; No target
192 (string-append "-DCMAKE_CXX_FLAGS=-I"
193 (assoc-ref %build-inputs "qtbase")
194 "/include/qt5/QtXkbCommonSupport/"
195 ,(package-version qtbase)))))
197 `(("cmake-shared" ,cmake-shared)
198 ("extra-cmake-modules" ,extra-cmake-modules)
199 ("pkg-config" ,pkg-config)))
202 ("qtwayland" ,qtwayland)
204 ("xkbcommon" ,libxkbcommon)))
205 (synopsis "Material Decoration for Qt")
206 (description "MaterialDecoration is a client-side decoration for Qt
207 applications on Wayland.")
208 (home-page "https://github.com/lirios/materialdecoration")
209 (license license:lgpl3+))))
211 (define-public grantlee
219 (url "https://github.com/steveire/grantlee")
220 (commit (string-append "v" version))))
221 (file-name (git-file-name name version))
223 (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
225 ;; Optional: lcov and cccc, both are for code coverage
226 `(("doxygen" ,doxygen)))
229 ("qtdeclarative" ,qtdeclarative)
230 ("qtscript" ,qtscript)))
231 (build-system cmake-build-system)
234 (modify-phases %standard-phases
235 (add-before 'check 'check-setup
237 ;; make Qt render "offscreen", required for tests
238 (setenv "QT_QPA_PLATFORM" "offscreen")
240 (home-page "https://github.com/steveire/grantlee")
241 (synopsis "Libraries for text templating with Qt")
242 (description "Grantlee Templates can be used for theming and generation of
243 other text such as code. The syntax uses the syntax of the Django template
244 system, and the core design of Django is reused in Grantlee.")
245 (license license:lgpl2.1+)))
253 (uri (string-append "http://download.qt-project.org/archive/qt/"
254 (string-copy version 0 (string-rindex version #\.))
256 "/qt-everywhere-opensource-src-"
260 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
261 (patches (search-patches "qt4-ldflags.patch"))
262 (modules '((guix build utils)))
264 ;; Remove webkit module, which is not built.
265 '(begin (delete-file-recursively "src/3rdparty/webkit")
267 (build-system gnu-build-system)
271 `(("alsa-lib" ,alsa-lib)
275 ("double-conversion" ,double-conversion)
277 ("fontconfig" ,fontconfig)
278 ("freetype" ,freetype)
280 ("gstreamer" ,gstreamer)
281 ("gst-plugins-base" ,gst-plugins-base)
284 ("libinput" ,libinput-minimal)
291 ("libxcomposite" ,libxcomposite)
292 ("libxcursor" ,libxcursor)
294 ("libxfixes" ,libxfixes)
296 ("libxinerama" ,libxinerama)
297 ("libxkbcommon" ,libxkbcommon)
299 ("libxrandr" ,libxrandr)
300 ("libxrender" ,libxrender)
304 ("mariadb-dev" ,mariadb "dev")
306 ("postgresql" ,postgresql)
307 ("pulseaudio" ,pulseaudio)
311 ("unixodbc" ,unixodbc)
313 ("xcb-util" ,xcb-util)
314 ("xcb-util-image" ,xcb-util-image)
315 ("xcb-util-keysyms" ,xcb-util-keysyms)
316 ("xcb-util-renderutil" ,xcb-util-renderutil)
317 ("xcb-util-wm" ,xcb-util-wm)
319 ("libjpeg" ,libjpeg-turbo)
321 ("openssl" ,openssl-1.0)))
323 `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
324 ;; We could build it with -std=gnu++98, but then we'll get in trouble with
325 ;; ICU later. Just keep using GCC 5 for now.
331 ("pkg-config" ,pkg-config)
334 ("which" ,(@ (gnu packages base) which))))
335 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
336 ;; but we can't make them a separate output because "out" and "examples"
337 ;; would refer to each other.
338 (outputs '("out" ;112MiB core + 37MiB examples
339 "doc")) ;280MiB of HTML + code
342 (modify-phases %standard-phases
343 (add-after 'set-paths 'hide-default-gcc
344 (lambda* (#:key inputs #:allow-other-keys)
345 (let ((gcc (assoc-ref inputs "gcc")))
346 ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent
347 ;; conflicts with the GCC 5 input.
348 (setenv "CPLUS_INCLUDE_PATH"
350 (delete (string-append gcc "/include/c++")
351 (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
356 (lambda* (#:key outputs #:allow-other-keys)
357 (let ((out (assoc-ref outputs "out"))
358 (doc (assoc-ref outputs "doc")))
359 (substitute* '("configure")
360 (("/bin/pwd") (which "pwd")))
361 (substitute* "src/corelib/global/global.pri"
362 (("/bin/ls") (which "ls")))
368 "-nomake" "examples demos"
369 ;; Note: Don't pass '-docdir' since 'qmake' and
370 ;; libQtCore would record its value, thereby defeating
371 ;; the whole point of having a separate output.
372 "-datadir" (string-append out "/share/qt-" ,version
374 "-importdir" (string-append out "/lib/qt-4"
376 "-plugindir" (string-append out "/lib/qt-4"
378 "-translationdir" (string-append out "/share/qt-" ,version
380 "-demosdir" (string-append out "/share/qt-" ,version
382 "-examplesdir" (string-append out "/share/qt-" ,version
386 ;; explicitly link with dbus instead of dlopening it
388 ;; Skip the webkit module; it fails to build on armhf
389 ;; and, apart from that, may pose security risks.
391 ;; don't use the precompiled headers
393 ;; drop special machine instructions not supported
394 ;; on all instances of the target
395 ,@(if (string-prefix? "x86_64"
396 (or (%current-target-system)
410 (lambda* (#:key outputs #:allow-other-keys)
411 ;; Because of qt4-documentation-path.patch, documentation ends up
412 ;; being installed in OUT. Move it to the right place.
413 (let* ((out (assoc-ref outputs "out"))
414 (doc (assoc-ref outputs "doc"))
415 (olddoc (string-append out "/doc"))
416 (docdir (string-append doc "/share/doc/qt-" ,version)))
417 (mkdir-p (dirname docdir))
419 ;; Note: We can't use 'rename-file' here because OUT and DOC are
420 ;; different "devices" due to bind-mounts.
421 (copy-recursively olddoc docdir)
422 (delete-file-recursively olddoc)
425 (list (search-path-specification
426 (variable "QMAKEPATH")
427 (files '("lib/qt5")))
428 (search-path-specification
429 (variable "QML2_IMPORT_PATH")
430 (files '("lib/qt5/qml")))
431 (search-path-specification
432 (variable "QT_PLUGIN_PATH")
433 (files '("lib/qt5/plugins")))
434 (search-path-specification
435 (variable "XDG_DATA_DIRS")
437 (search-path-specification
438 (variable "XDG_CONFIG_DIRS")
439 (files '("etc/xdg")))))
440 (home-page "https://www.qt.io/")
441 (synopsis "Cross-platform GUI library")
442 (description "Qt is a cross-platform application and UI framework for
443 developers using C++ or QML, a CSS & JavaScript like language.")
444 (license (list license:lgpl2.1 license:lgpl3))
446 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
447 ;; see <http://hydra.gnu.org/build/112828>.
448 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
449 (supported-systems (delete "mips64el-linux" %supported-systems))))
451 (define (qt5-urls component version)
452 "Return a list of URLs for VERSION of the Qt5 COMPONENT."
453 ;; We can't use a mirror:// scheme because these URLs are not exact copies:
454 ;; the layout differs between them.
455 (list (string-append "https://download.qt.io/official_releases/qt/"
456 (version-major+minor version) "/" version
457 "/submodules/" component "-everywhere-src-"
459 (string-append "https://download.qt.io/archive/qt/"
460 (version-major+minor version) "/" version
461 "/submodules/" component "-everywhere-src-"
463 (let ((directory (string-append "qt5" (string-drop component 2))))
464 (string-append "http://sources.buildroot.net/" directory "/"
465 component "-everywhere-src-" version ".tar.xz"))
466 (string-append "https://distfiles.macports.org/qt5/"
467 component "-everywhere-src-" version ".tar.xz")))
469 (define-public qtbase
475 (uri (qt5-urls name version))
478 "1y70libf2x52lpbqvhz10lpk7nyl1ajjwzjxly9pjdpfj4jsv7wh"))
479 ;; Use TZDIR to avoid depending on package "tzdata".
480 (patches (search-patches "qtbase-use-TZDIR.patch"
481 "qtbase-moc-ignore-gcc-macro.patch"
482 "qtbase-absolute-runpath.patch"))
483 (modules '((guix build utils)))
485 ;; corelib uses bundled harfbuzz, md4, md5, sha3
487 (with-directory-excursion "src/3rdparty"
488 (for-each delete-file-recursively
489 (list "double-conversion" "freetype" "harfbuzz-ng"
490 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
493 (build-system gnu-build-system)
494 (outputs '("out" "debug"))
497 ;; Use which the package, not the function
498 ("which" ,(@ (gnu packages base) which))))
500 `(("alsa-lib" ,alsa-lib)
503 ("double-conversion" ,double-conversion)
506 ("fontconfig" ,fontconfig)
507 ("freetype" ,freetype)
509 ("harfbuzz" ,harfbuzz)
511 ("libinput" ,libinput-minimal)
512 ("libjpeg" ,libjpeg-turbo)
516 ("libxcomposite" ,libxcomposite)
517 ("libxcursor" ,libxcursor)
518 ("libxfixes" ,libxfixes)
520 ("libxinerama" ,libxinerama)
521 ("libxkbcommon" ,libxkbcommon)
523 ("libxrandr" ,libxrandr)
524 ("libxrender" ,libxrender)
528 ("mariadb-dev" ,mariadb "dev")
532 ("postgresql" ,postgresql)
533 ("pulseaudio" ,pulseaudio)
535 ("unixodbc" ,unixodbc)
536 ("xcb-util" ,xcb-util)
537 ("xcb-util-image" ,xcb-util-image)
538 ("xcb-util-keysyms" ,xcb-util-keysyms)
539 ("xcb-util-renderutil" ,xcb-util-renderutil)
540 ("xcb-util-wm" ,xcb-util-wm)
541 ("xdg-utils" ,xdg-utils)
548 ("pkg-config" ,pkg-config)
550 ("vulkan-headers" ,vulkan-headers)
554 (modify-phases %standard-phases
555 (add-after 'configure 'patch-bin-sh
557 (substitute* '("config.status"
559 "mkspecs/features/qt_functions.prf"
560 "qmake/library/qmakebuiltins.cpp")
561 (("/bin/sh") (which "sh")))
563 (add-after 'configure 'patch-xdg-open
565 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
566 (("^.*const char \\*browsers.*$" all)
567 (string-append "*browser = QStringLiteral(\""
569 "\"); return true; \n" all)))
572 (lambda* (#:key outputs #:allow-other-keys)
573 (let ((out (assoc-ref outputs "out")))
574 (substitute* "configure"
575 (("/bin/pwd") (which "pwd")))
576 (substitute* "src/corelib/global/global.pri"
577 (("/bin/ls") (which "ls")))
578 ;; The configuration files for other Qt5 packages are searched
579 ;; through a call to "find_package" in Qt5Config.cmake, which
580 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
581 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
582 ;; components can be installed in different places.
583 (substitute* (find-files "." ".*\\.cmake")
584 (("NO_DEFAULT_PATH") ""))
585 ;; do not pass "--enable-fast-install", which makes the
586 ;; configure process fail
591 "-docdir" (string-append out "/share/doc/qt5")
592 "-headerdir" (string-append out "/include/qt5")
593 "-archdatadir" (string-append out "/lib/qt5")
594 "-datadir" (string-append out "/share/qt5")
595 "-examplesdir" (string-append
596 out "/share/doc/qt5/examples")
600 ;; Later stripped into the :debug output.
603 ;; These features require higher versions of Linux than the
604 ;; minimum version of the glibc. See
605 ;; src/corelib/global/minimum-linux_p.h. By disabling these
606 ;; features Qt5 applications can be used on the oldest
607 ;; kernels that the glibc supports, including the RHEL6
608 ;; (2.6.32) and RHEL7 (3.10) kernels.
609 "-no-feature-getentropy" ; requires Linux 3.17
610 "-no-feature-renameat2" ; requires Linux 3.16
612 ;; Do not build examples; if desired, these could go
613 ;; into a separate output, but for the time being, we
614 ;; prefer to save the space and build time.
615 "-no-compile-examples"
616 ;; Most "-system-..." are automatic, but some use
617 ;; the bundled copy by default.
621 ;; explicitly link with openssl instead of dlopening it
623 ;; explicitly link with dbus instead of dlopening it
625 ;; don't use the precompiled headers
627 ;; drop special machine instructions that do not have
629 ,@(if (string-prefix? "x86_64"
630 (or (%current-target-system)
636 (add-after 'install 'patch-mkspecs
637 (lambda* (#:key outputs #:allow-other-keys)
638 (let* ((out (assoc-ref outputs "out"))
639 (archdata (string-append out "/lib/qt5"))
640 (mkspecs (string-append archdata "/mkspecs"))
641 (qt_config.prf (string-append
642 mkspecs "/features/qt_config.prf")))
643 ;; For each Qt module, let `qmake' uses search paths in the
644 ;; module directory instead of all in QT_INSTALL_PREFIX.
645 (substitute* qt_config.prf
646 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
647 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
648 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
649 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
650 (("\\$\\$\\[QT_HOST_LIBS\\]")
651 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
652 (("\\$\\$\\[QT_INSTALL_BINS\\]")
653 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
655 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
656 (substitute* (string-append mkspecs "/features/qt_functions.prf")
657 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
658 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
660 ;; Resolve qmake spec files within qtbase by absolute paths.
663 (string-append mkspecs "/features/" file))
664 '("device_config.prf" "moc.prf" "qt_build_config.prf"
665 "qt_config.prf" "winrt/package_manifest.prf"))
666 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
667 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
669 (add-after 'patch-mkspecs 'patch-prl-files
670 (lambda* (#:key outputs #:allow-other-keys)
671 (let ((out (assoc-ref outputs "out")))
672 ;; Insert absolute references to the qtbase libraries because
673 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
674 ;; on context. See <https://bugs.gnu.org/38405>
675 (substitute* (find-files (string-append out "/lib") "\\.prl$")
676 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
677 (string-append out "/lib")))
679 (add-after 'unpack 'patch-paths
680 ;; Use the absolute paths for dynamically loaded libs, otherwise
681 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
683 (lambda* (#:key inputs #:allow-other-keys)
685 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
686 "cross-libc" "libc"))))
687 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
688 "src/network/kernel/qhostinfo_unix.cpp")
689 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
690 (string-append a glibc "/lib/lib" b))))
692 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
693 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
694 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
696 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
697 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
698 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
699 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
700 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
703 (list (search-path-specification
704 (variable "QMAKEPATH")
705 (files '("lib/qt5")))
706 (search-path-specification
707 (variable "QML2_IMPORT_PATH")
708 (files '("lib/qt5/qml")))
709 (search-path-specification
710 (variable "QT_PLUGIN_PATH")
711 (files '("lib/qt5/plugins")))
712 (search-path-specification
713 (variable "XDG_DATA_DIRS")
715 (search-path-specification
716 (variable "XDG_CONFIG_DIRS")
717 (files '("etc/xdg")))))
718 (home-page "https://www.qt.io/")
719 (synopsis "Cross-platform GUI library")
720 (description "Qt is a cross-platform application and UI framework for
721 developers using C++ or QML, a CSS & JavaScript like language.")
722 (license (list license:lgpl2.1 license:lgpl3))))
724 ;; qt used to refer to the monolithic Qt 5.x package
725 (define-deprecated qt qtbase)
728 (package (inherit qtbase)
733 (uri (qt5-urls name version))
736 "0pjqrdmd1991x9h4rl8sf81pkd89hfd5h1a2gp3fjw96pk0w5hwb"))))
737 (propagated-inputs `())
738 (native-inputs `(("perl" ,perl)))
745 (modify-phases %standard-phases
746 (add-before 'configure 'configure-qmake
747 (lambda* (#:key inputs outputs #:allow-other-keys)
748 (let* ((out (assoc-ref outputs "out"))
749 (qtbase (assoc-ref inputs "qtbase"))
750 (tmpdir (string-append (getenv "TMPDIR")))
751 (qmake (string-append tmpdir "/qmake"))
752 (qt.conf (string-append tmpdir "/qt.conf")))
753 ;; Use qmake with a customized qt.conf to override install
755 (symlink (which "qmake") qmake)
756 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
757 (with-output-to-file qt.conf
763 Documentation=share/doc/qt5
766 LibraryExecutables=lib/qt5/libexec
769 Plugins=lib/qt5/plugins
770 Imports=lib/qt5/imports
771 Qml2Imports=lib/qt5/qml
772 Translations=share/qt5/translations
774 Examples=share/doc/qt5/examples
780 [EffectiveSourcePaths]
786 (lambda* (#:key inputs outputs #:allow-other-keys)
787 ;; Valid QT_BUILD_PARTS variables are:
788 ;; libs tools tests examples demos docs translations
789 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
790 (add-before 'check 'set-display
792 ;; make Qt render "offscreen", required for tests
793 (setenv "QT_QPA_PLATFORM" "offscreen")
795 (synopsis "Qt module for displaying SVGs")
796 (description "The QtSvg module provides classes for displaying the
797 contents of SVG files.")))
799 (define-public qtimageformats
800 (package (inherit qtsvg)
801 (name "qtimageformats")
805 (uri (qt5-urls name version))
808 "1msk8a0z8rr16hkp2fnv668vf6wayiydqgc2mcklaa04rv3qb0mz"))
809 (modules '((guix build utils)))
812 (delete-file-recursively "src/3rdparty")
815 (substitute-keyword-arguments (package-arguments qtsvg)
817 `(modify-phases ,phases
818 (add-after 'unpack 'fix-build
820 (substitute* "src/plugins/imageformats/jp2/qjp2handler.cpp"
821 (("^#include <jasper/jasper.h>")
822 "#include <jasper/jasper.h>\n#include <QtCore/qmath.h>"))
833 (synopsis "Additional Image Format plugins for Qt")
834 (description "The QtImageFormats module contains plugins for adding
835 support for MNG, TGA, TIFF and WBMP image formats.")))
837 (define-public qtx11extras
838 (package (inherit qtsvg)
843 (uri (qt5-urls name version))
846 "0gkfzj195v9flwljnqpdz3a532618yn4h2577nlsai56x4p7053h"))))
848 (substitute-keyword-arguments (package-arguments qtsvg)
849 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
850 (native-inputs `(("perl" ,perl)))
854 (synopsis "Qt Extras for X11")
855 (description "The QtX11Extras module includes the library to access X11
856 from within Qt 5.")))
858 (define-public qtxmlpatterns
859 (package (inherit qtsvg)
860 (name "qtxmlpatterns")
864 (uri (qt5-urls name version))
867 "1ypj5jpa31rlx8yfw3y9jia212lfnxvnqkvygs6ihjf3lxi23skn"))))
869 (substitute-keyword-arguments (package-arguments qtsvg)
870 ((#:tests? _ #f) #f) ; TODO: Enable the tests
872 `(modify-phases ,phases
873 (add-after 'unpack 'disable-network-tests
874 (lambda _ (substitute* "tests/auto/auto.pro"
875 (("qxmlquery") "# qxmlquery")
876 (("xmlpatterns ") "# xmlpatterns"))
878 (native-inputs `(("perl" ,perl)
879 ("qtdeclarative" ,qtdeclarative)))
880 (inputs `(("qtbase" ,qtbase)))
881 (synopsis "Qt XML patterns module")
882 (description "The QtXmlPatterns module is a XQuery and XPath engine for
883 XML and custom data models. It contains programs such as xmlpatterns and
884 xmlpatternsvalidator.")))
886 (define-public qtdeclarative
887 (package (inherit qtsvg)
888 (name "qtdeclarative")
892 (uri (qt5-urls name version))
895 "0lancdn7y0lrlmyn5cbdm0izd5yprvd5n77nhkb7a3wl2sbx0066"))))
897 (substitute-keyword-arguments (package-arguments qtsvg)
898 ((#:tests? _ #f) #f) ;TODO: Enable the tests
900 `(modify-phases ,phases
901 (add-after 'build 'fix-qt5core-install-prefix
902 (lambda* (#:key outputs #:allow-other-keys)
903 (let ((out (assoc-ref outputs "out")))
904 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
905 ;; is provided by qtdeclarative.
907 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
908 (("\\$\\{_qt5Core_install_prefix\\}") out)))
912 ("pkg-config" ,pkg-config)
914 ("python-wrapper" ,python-wrapper)
916 ("vulkan-headers" ,vulkan-headers)))
920 (synopsis "Qt QML module (Quick 2)")
921 (description "The Qt QML module provides a framework for developing
922 applications and libraries with the QML language. It defines and implements the
923 language and engine infrastructure, and provides an API to enable application
924 developers to extend the QML language with custom types and integrate QML code
925 with JavaScript and C++.")))
927 (define-public qtconnectivity
928 (package (inherit qtsvg)
929 (name "qtconnectivity")
933 (uri (qt5-urls name version))
936 "185zci61ip1wpjrygcw2m6v55lvninc0b8y2p3jh6qgpf5w35003"))))
939 ("pkg-config" ,pkg-config)
940 ("qtdeclarative" ,qtdeclarative)))
944 (synopsis "Qt Connectivity module")
945 (description "The Qt Connectivity modules provides modules for interacting
946 with Bluetooth and NFC.")))
948 (define-public qtwebsockets
949 (package (inherit qtsvg)
950 (name "qtwebsockets")
954 (uri (qt5-urls name version))
957 "0gr399fn5n8j3m9d3vv01vcbr1cb7pw043j04cnnxzrlvn2jvd50"))))
959 (substitute-keyword-arguments (package-arguments qtsvg)
960 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
963 ("qtdeclarative" ,qtdeclarative)))
964 (inputs `(("qtbase" ,qtbase)))
965 (synopsis "Qt Web Sockets module")
966 (description "WebSocket is a web-based protocol designed to enable two-way
967 communication between a client application and a remote host. The Qt
968 WebSockets module provides C++ and QML interfaces that enable Qt applications
969 to act as a server that can process WebSocket requests, or a client that can
970 consume data received from the server, or both.")))
972 (define-public qtsensors
973 (package (inherit qtsvg)
978 (uri (qt5-urls name version))
981 "0fa81r7bn1mf9ynwsx524a55dx1q0jb4vda6j48ssb4lx7wi201z"))))
983 (substitute-keyword-arguments (package-arguments qtsvg)
984 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
986 `(modify-phases ,phases
987 (add-after 'unpack 'fix-tests
989 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
990 (("2000") "5000") ;lengthen test timeout
991 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
995 ("qtdeclarative" ,qtdeclarative)))
996 (inputs `(("qtbase" ,qtbase)))
997 (synopsis "Qt Sensors module")
998 (description "The Qt Sensors API provides access to sensor hardware via QML
999 and C++ interfaces. The Qt Sensors API also provides a motion gesture
1000 recognition API for devices.")))
1002 (define-public qtmultimedia
1003 (package (inherit qtsvg)
1004 (name "qtmultimedia")
1008 (uri (qt5-urls name version))
1011 "1xbd6kc7i0iablqdkvfrajpi32cbq7j6ajbfyyyalcai1s0mhdqc"))
1012 (modules '((guix build utils)))
1015 (delete-file-recursively
1016 "examples/multimedia/spectrum/3rdparty")
1017 ;; We also prevent the spectrum example from being built.
1018 (substitute* "examples/multimedia/multimedia.pro"
1022 (substitute-keyword-arguments (package-arguments qtsvg)
1024 `(modify-phases ,phases
1026 (lambda* (#:key outputs #:allow-other-keys)
1027 (let ((out (assoc-ref outputs "out")))
1028 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
1029 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
1030 (string-append "PREFIX=" out)))))))
1031 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1034 ("pkg-config" ,pkg-config)
1036 ("qtdeclarative" ,qtdeclarative)))
1038 `(("alsa-lib" ,alsa-lib)
1040 ("pulseaudio" ,pulseaudio)
1042 ;; Gstreamer is needed for the mediaplayer plugin
1043 ("gstreamer" ,gstreamer)
1044 ("gst-plugins-base" ,gst-plugins-base)))
1045 (synopsis "Qt Multimedia module")
1046 (description "The Qt Multimedia module provides set of APIs to play and
1047 record media, and manage a collection of media content. It also contains a
1048 set of plugins for interacting with pulseaudio and GStreamer.")))
1050 (define-public qtwayland
1051 (package (inherit qtsvg)
1056 (uri (qt5-urls name version))
1059 "1ddfx4nak16xx0zh1kl836zxvpbixmmjyplsmfmg65pqkwi34dqr"))))
1061 (substitute-keyword-arguments (package-arguments qtsvg)
1063 `(modify-phases ,phases
1064 (add-after 'unpack 'disable-failing-tests
1066 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
1067 ;; reason and breaks these two tests.
1068 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
1069 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
1070 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
1072 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
1075 (add-before 'check 'set-test-environment
1077 ;; Do not fail just because /etc/machine-id is missing.
1078 (setenv "DBUS_FATAL_WARNINGS" "0")
1083 ("pkg-config" ,pkg-config)
1084 ("qtdeclarative" ,qtdeclarative)))
1086 `(("fontconfig" ,fontconfig)
1087 ("freetype" ,freetype)
1089 ("libxcomposite" ,libxcomposite)
1090 ("libxext" ,libxext)
1091 ("libxkbcommon" ,libxkbcommon)
1092 ("libxrender" ,libxrender)
1096 ("vulkan-headers" ,vulkan-headers)
1097 ("wayland" ,wayland)))
1098 (synopsis "Qt Wayland module")
1099 (description "The Qt Wayland module provides the QtWayland client and
1100 compositor libraries.")))
1102 (define-public qtserialport
1103 (package (inherit qtsvg)
1104 (name "qtserialport")
1108 (uri (qt5-urls name version))
1111 "17gp5qzg4wdg8qlxk2p3mh8x1vk33rf33wic3fy0cws193bmkiar"))))
1112 (native-inputs `(("perl" ,perl)))
1114 `(("qtbase" ,qtbase)
1117 (substitute-keyword-arguments (package-arguments qtsvg)
1119 `(modify-phases ,phases
1120 (add-after 'unpack 'patch-dlopen-paths
1121 (lambda* (#:key inputs #:allow-other-keys)
1122 (substitute* "src/serialport/qtudev_p.h"
1123 ;; Use the absolute paths for dynamically loaded libs,
1124 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1125 ;; typically is not set in guix.
1126 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1127 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1129 (synopsis "Qt Serial Port module")
1130 (description "The Qt Serial Port module provides the library for
1131 interacting with serial ports from within Qt.")))
1133 (define-public qtserialbus
1134 (package (inherit qtsvg)
1135 (name "qtserialbus")
1139 (uri (qt5-urls name version))
1142 "125x6756fjpldqy6wbw6cg7ngjh2016aiq92bchh719z1mf7xsxf"))))
1144 (substitute-keyword-arguments (package-arguments qtsvg)
1145 ((#:phases phases '%standard-phases)
1146 `(modify-phases ,phases
1147 (add-after 'unpack 'patch-libsocketcan-reference
1148 (lambda* (#:key inputs #:allow-other-keys)
1149 (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
1150 (libcansocket.so (string-append libcansocket
1151 "/lib/libsocketcan.so")))
1152 (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
1153 (("QStringLiteral\\(\"socketcan\"\\)")
1154 (format #f "QStringLiteral(~s)" libcansocket.so)))
1157 `(("libsocketcan" ,libsocketcan)
1159 ("qtserialport" ,qtserialport)))
1160 (synopsis "Qt Serial Bus module")
1161 (description "The Qt Serial Bus API provides classes and functions to
1162 access the various industrial serial buses and protocols, such as CAN, ModBus,
1165 (define-public qtwebchannel
1166 (package (inherit qtsvg)
1167 (name "qtwebchannel")
1171 (uri (qt5-urls name version))
1174 "1h9y634phvvk557mhmf9z4lmxr41rl8x9mqy2lzp31mk8ffffzqj"))))
1177 ("qtdeclarative" ,qtdeclarative)
1178 ("qtwebsockets" ,qtwebsockets)))
1179 (inputs `(("qtbase" ,qtbase)))
1180 (synopsis "Web communication library for Qt")
1181 (description "The Qt WebChannel module enables peer-to-peer communication
1182 between the host (QML/C++ application) and the client (HTML/JavaScript
1183 application). The transport mechanism is supported out of the box by the two
1184 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1186 (define-public qtwebglplugin
1187 (package (inherit qtsvg)
1188 (name "qtwebglplugin")
1192 (uri (qt5-urls name version))
1195 "0ihlnhv8ldkqz82v3j7j22lrhk17b6ghra8sx85y2agd2ysq5rw1"))))
1197 (substitute-keyword-arguments (package-arguments qtsvg)
1199 `(modify-phases ,phases
1200 (add-after 'unpack 'disable-network-tests
1201 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1202 (("webgl") "# webgl"))
1208 ("qtdeclarative" ,qtdeclarative)
1209 ("qtwebsockets" ,qtwebsockets)
1211 (synopsis "QPA plugin for running an application via a browser using
1212 streamed WebGL commands")
1213 (description "Qt back end that uses WebGL for rendering. It allows Qt
1214 applications (with some limitations) to run in a web browser that supports
1215 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1216 compatible web browser without the use of plug-ins. The API is similar to
1217 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1219 (define-public qtwebview
1220 (package (inherit qtsvg)
1225 (uri (qt5-urls name version))
1228 "1rw1wibmbxlj6xc86qs3y8h42al1vczqiksyxzaylxs9gqb4d7xy"))))
1232 `(("qtbase" ,qtbase)
1233 ("qtdeclarative" ,qtdeclarative)))
1234 (synopsis "Display web content in a QML application")
1235 (description "Qt WebView provides a way to display web content in a QML
1236 application without necessarily including a full web browser stack by using
1237 native APIs where it makes sense.")))
1239 (define-public qtlocation
1240 (package (inherit qtsvg)
1245 (uri (string-append "https://download.qt.io/official_releases/qt/"
1246 (version-major+minor version) "/" version
1247 "/submodules/" name "-everywhere-src-"
1251 "184jychnlfhplpwc5cdcsapwljgwvzk5qpf3val4kpq8w44wnkwq"))))
1253 (substitute-keyword-arguments (package-arguments qtsvg)
1254 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1257 ("qtdeclarative" ,qtdeclarative)
1258 ("qtquickcontrols" ,qtquickcontrols)
1259 ("qtserialport" ,qtserialport)))
1262 ("openssl" ,openssl)
1265 (synopsis "Qt Location and Positioning modules")
1266 (description "The Qt Location module provides an interface for location,
1267 positioning and geolocation plugins.")))
1269 (define-public qttools
1270 (package (inherit qtsvg)
1275 (uri (qt5-urls name version))
1278 "1k618f7v6jaj0ygy8d7jvgb8zjr47sn55kiskbdkkizp3z7d12f1"))))
1280 (substitute-keyword-arguments (package-arguments qtsvg)
1281 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1284 ("qtdeclarative" ,qtdeclarative)
1285 ("vulkan-headers" ,vulkan-headers)))
1288 ("qtbase" ,qtbase)))
1289 (synopsis "Qt Tools and Designer modules")
1290 (description "The Qt Tools module provides a set of applications to browse
1291 the documentation, translate applications, generate help files and other stuff
1292 that helps in Qt development.")))
1294 (define-public qtscript
1295 (package (inherit qtsvg)
1300 (uri (qt5-urls name version))
1303 "0gk74hk488k9ldacxbxcranr3arf8ifqg8kz9nm1rgdgd59p36d2"))
1304 (patches (search-patches "qtscript-disable-tests.patch"))))
1307 ("qttools" ,qttools)))
1309 `(("qtbase" ,qtbase)))
1310 (synopsis "Qt Script module")
1311 (description "Qt provides support for application scripting with ECMAScript.
1312 The following guides and references cover aspects of programming with
1313 ECMAScript and Qt.")))
1315 (define-public qtquickcontrols
1316 (package (inherit qtsvg)
1317 (name "qtquickcontrols")
1321 (uri (qt5-urls name version))
1324 "1dczakl868mg0lnwpf082jjc5976ycn879li1vqlgw5ihirzp4y3"))))
1326 (substitute-keyword-arguments (package-arguments qtsvg)
1327 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1329 `(("qtbase" ,qtbase)
1330 ("qtdeclarative" ,qtdeclarative)))
1331 (synopsis "Qt Quick Controls and other Quick modules")
1332 (description "The QtScript module provides classes for making Qt
1333 applications scriptable. This module provides a set of extra components that
1334 can be used to build complete interfaces in Qt Quick.")))
1336 (define-public qtquickcontrols2
1337 (package (inherit qtsvg)
1338 (name "qtquickcontrols2")
1342 (uri (qt5-urls name version))
1345 "06c9vrwvbjmzapmfa25y34lgjkzg57xxbm92nr6wkv5qykjnq6v7"))))
1347 (substitute-keyword-arguments (package-arguments qtsvg)
1348 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1350 `(("qtbase" ,qtbase)
1351 ("qtdeclarative" ,qtdeclarative)))
1352 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1353 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1354 module that provides platform integration: native dialogs, menus and menu bars,
1355 and tray icons. It falls back to Qt Widgets when a native implementation is
1358 (define-public qtgraphicaleffects
1359 (package (inherit qtsvg)
1360 (name "qtgraphicaleffects")
1364 (uri (qt5-urls name version))
1367 "1r6zfc0qga2ax155js7c8y5rx6vgayf582s921j09mb797v6g3gc"))))
1369 (substitute-keyword-arguments (package-arguments qtsvg)
1370 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1372 `(("qtbase" ,qtbase)
1373 ("qtdeclarative" ,qtdeclarative)))
1374 (synopsis "Qt Graphical Effects module")
1375 (description "The Qt Graphical Effects module provides a set of QML types
1376 for adding visually impressive and configurable effects to user interfaces.
1377 Effects are visual items that can be added to Qt Quick user interface as UI
1378 components. The API consists of over 20 effects provided as separate QML
1379 types. The effects cover functional areas such as blending, masking, blurring,
1380 coloring, and many more.")))
1382 (define-public qtgamepad
1383 (package (inherit qtsvg)
1388 (uri (qt5-urls name version))
1391 "0p07bg93fdfn4gr2kv38qgnws5znhswajrxdfs8xc9l3i7vi2xn7"))))
1394 ("pkg-config" ,pkg-config)))
1396 `(("fontconfig" ,fontconfig)
1397 ("freetype" ,freetype)
1398 ("libxrender" ,libxrender)
1401 ("qtdeclarative" ,qtdeclarative)))
1402 (synopsis "Qt Gamepad module")
1403 (description "The Qt Gamepad module is an add-on library that enables Qt
1404 applications to support the use of gamepad hardware and in some cases remote
1405 control equipment. The module provides both QML and C++ interfaces. The
1406 primary target audience are embedded devices with fullscreen user interfaces,
1407 and mobile applications targeting TV-like form factors.")))
1409 (define-public qtscxml
1410 (package (inherit qtsvg)
1415 (uri (qt5-urls name version))
1418 "1p5771b9hnpchfcdgy0zkhwg09a6xq88934aggp0rij1k85mkfb0"))
1419 (modules '((guix build utils)))
1422 (delete-file-recursively "tests/3rdparty")
1423 ;; the scion test refers to the bundled 3rd party test code.
1424 (substitute* "tests/auto/auto.pro"
1428 `(("qtbase" ,qtbase)
1429 ("qtdeclarative" ,qtdeclarative)))
1430 (synopsis "Qt SCXML module")
1431 (description "The Qt SCXML module provides functionality to create state
1432 machines from SCXML files. This includes both dynamically creating state
1433 machines (loading the SCXML file and instantiating states and transitions) and
1434 generating a C++ file that has a class implementing the state machine. It
1435 also contains functionality to support data models and executable content.")))
1437 (define-public qtpurchasing
1438 (package (inherit qtsvg)
1439 (name "qtpurchasing")
1443 (uri (qt5-urls name version))
1446 "09rjx53519dfk4qj2gbn3vlxyriasyb747wpg1p11y7jkwqhs4l7"))))
1448 `(("qtbase" ,qtbase)
1449 ("qtdeclarative" ,qtdeclarative)))
1450 (synopsis "Qt Purchasing module")
1451 (description "The Qt Purchasing module provides and in-app API for
1452 purchasing goods and services.")))
1454 (define-public qtcharts
1455 (package (inherit qtsvg)
1460 (uri (qt5-urls name version))
1463 "049x7z8zcp9jixmdv2fjscy2ggpd6za9hkdbb2bqp2mxjm0hwxg0"))))
1465 (substitute-keyword-arguments (package-arguments qtsvg)
1466 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1468 `(("qtbase" ,qtbase)
1469 ("qtdeclarative" ,qtdeclarative)))
1470 (synopsis "Qt Charts module")
1471 (description "The Qt Charts module provides a set of easy to use chart
1472 components. It uses the Qt Graphics View Framework, therefore charts can be
1473 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1474 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1475 selecting one of the charts themes.")
1476 (license license:gpl3)))
1478 (define-public qtdatavis3d
1479 (package (inherit qtsvg)
1480 (name "qtdatavis3d")
1484 (uri (qt5-urls name version))
1487 "1zdn3vm0nfy9ny7c783aabp3mhlnqhi9fw2rljn7ibbksmsnasi2"))))
1489 (substitute-keyword-arguments (package-arguments qtsvg)
1490 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1492 `(("qtbase" ,qtbase)
1493 ("qtdeclarative" ,qtdeclarative)))
1494 (synopsis "Qt Data Visualization module")
1495 (description "The Qt Data Visualization module provides a way to visualize
1496 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1497 visualizing depth maps and large quantities of rapidly changing data, such as
1498 data received from multiple sensors. The look and feel of graphs can be
1499 customized by using themes or by adding custom items and labels to them.")
1500 (license license:gpl3)))
1502 (define-public qtnetworkauth
1503 (package (inherit qtsvg)
1504 (name "qtnetworkauth")
1508 (uri (qt5-urls name version))
1511 "11fdgacv4syr8bff2vdw7rb0dg1gcqpdf37hm3pn31d6z91frhpw"))))
1513 (substitute-keyword-arguments (package-arguments qtsvg)
1515 `(modify-phases ,phases
1516 (add-after 'unpack 'remove-failing-test
1518 ;; These tests can't find their test data.
1519 (substitute* "tests/auto/auto.pro"
1520 (("oauth1 ") "# oauth1 "))
1523 `(("qtbase" ,qtbase)))
1524 (synopsis "Qt Network Authorization module")
1525 (description "The Qt Network Authorization module provides an
1526 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1528 (define-public qtremoteobjects
1529 (package (inherit qtsvg)
1530 (name "qtremoteobjects")
1534 (uri (qt5-urls name version))
1537 "1hngbp0vkr35rpsrac7b9vx6f360v8v2g0fffzm590l8j2ybd0b7"))))
1539 (substitute-keyword-arguments (package-arguments qtsvg)
1541 `(modify-phases ,phases
1542 (add-after 'unpack 'remove-failing-test
1544 ;; This test can't find its imports.
1545 (substitute* "tests/auto/qml/qml.pro"
1546 (("integration") "# integration")
1547 (("usertypes") "# usertypes"))
1548 ;; disable failing tests: they need network
1549 (substitute* "tests/auto/auto.pro"
1550 (("integration_multiprocess proxy_multiprocess integration_external restart")
1551 "integration_multiprocess"))
1554 `(("qtbase" ,qtbase)
1555 ("qtdeclarative" ,qtdeclarative)))
1556 (synopsis "Qt Remote Objects module")
1557 (description "The Qt Remote Objects module is an @dfn{inter-process
1558 communication} (IPC) module developed for Qt. The idea is to extend existing
1559 Qt's functionalities to enable an easy exchange of information between
1560 processes or computers.")))
1562 (define-public qtspeech
1563 (package (inherit qtsvg)
1568 (uri (qt5-urls name version))
1571 "1xc3x3ghnhgchsg1kgj156yg69wn4rwjx8r28i1jd05hxjggn468"))))
1574 (substitute-keyword-arguments (package-arguments qtsvg)
1575 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1577 `(("qtbase" ,qtbase)))
1580 ("qtdeclarative" ,qtdeclarative)
1581 ("qtmultimedia" ,qtmultimedia)
1582 ("qtxmlpatterns" ,qtxmlpatterns)))
1583 (synopsis "Qt Speech module")
1584 (description "The Qt Speech module enables a Qt application to support
1585 accessibility features such as text-to-speech, which is useful for end-users
1586 who are visually challenged or cannot access the application for whatever
1587 reason. The most common use case where text-to-speech comes in handy is when
1588 the end-user is driving and cannot attend the incoming messages on the phone.
1589 In such a scenario, the messaging application can read out the incoming
1592 (define-public qtspell
1600 (url "https://github.com/manisandro/qtspell")
1602 (file-name (git-file-name name version))
1604 (base32 "1081makirjxixz44ghwz362vgnk5wcks6ni6w01pl667x8wggsd2"))))
1605 (build-system cmake-build-system)
1607 `(#:tests? #f)) ;no test
1609 `(("pkg-config" ,pkg-config)
1610 ("qttools" ,qttools)))
1612 `(("enchant" ,enchant)
1613 ("qtbase" ,qtbase)))
1614 (home-page "https://github.com/manisandro/qtspell")
1615 (synopsis "Spell checking for Qt text widgets")
1617 "QtSpell adds spell-checking functionality to Qt's text widgets,
1618 using the Enchant spell-checking library.")
1619 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
1620 (license license:gpl2+)))
1622 (define-public qtwebengine
1625 (name "qtwebengine")
1626 (version (package-version qtbase))
1630 (uri (qt5-urls name version))
1633 "1q4idxdm81sx102xc12ixj0xpfx52d6vwvs3jpapnkyq8c7cmby8"))
1634 (modules '((ice-9 ftw)
1638 (guix build utils)))
1641 (let ((preserved-third-party-files
1642 '("base/third_party/double_conversion"
1643 "base/third_party/cityhash"
1644 "base/third_party/cityhash_v103"
1645 "base/third_party/dynamic_annotations"
1646 "base/third_party/icu"
1647 "base/third_party/libevent"
1648 "base/third_party/nspr"
1649 "base/third_party/superfasthash"
1650 "base/third_party/symbolize"
1651 "base/third_party/xdg_mime"
1652 "base/third_party/xdg_user_dirs"
1653 "net/third_party/mozilla_security_manager"
1654 "net/third_party/nss"
1655 "net/third_party/quiche"
1656 "net/third_party/uri_template"
1657 "third_party/abseil-cpp"
1659 "third_party/angle/src/common/third_party/base"
1660 "third_party/angle/src/common/third_party/smhasher"
1661 "third_party/angle/src/common/third_party/xxhash"
1662 "third_party/angle/src/third_party/compiler"
1663 "third_party/axe-core"
1665 "third_party/boringssl"
1666 "third_party/boringssl/src/third_party/fiat"
1667 "third_party/breakpad"
1668 "third_party/brotli"
1671 "third_party/closure_compiler"
1672 "third_party/crashpad"
1673 "third_party/crashpad/crashpad/third_party/lss"
1674 "third_party/crashpad/crashpad/third_party/zlib"
1675 "third_party/crc32c"
1678 "third_party/devtools-frontend"
1679 "third_party/devtools-frontend/src/front_end/third_party/fabricjs"
1680 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
1681 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
1682 "third_party/devtools-frontend/src/third_party/axe-core"
1683 "third_party/emoji-segmenter"
1684 "third_party/ffmpeg"
1685 "third_party/googletest"
1686 "third_party/harfbuzz-ng/utils"
1687 "third_party/hunspell"
1688 "third_party/iccjpeg"
1690 "third_party/inspector_protocol"
1691 "third_party/jinja2"
1692 "third_party/jsoncpp"
1693 "third_party/jstemplate"
1694 "third_party/khronos"
1695 "third_party/leveldatabase"
1696 "third_party/libaddressinput"
1697 "third_party/libgifcodec"
1698 "third_party/libjingle_xmpp"
1699 "third_party/libjpeg_turbo"
1700 "third_party/libpng"
1701 "third_party/libsrtp"
1702 "third_party/libsync"
1703 "third_party/libudev"
1704 "third_party/libvpx"
1705 "third_party/libwebm"
1706 "third_party/libwebp"
1707 "third_party/libxml"
1708 "third_party/libxslt"
1709 "third_party/libyuv"
1712 "third_party/markupsafe"
1713 "third_party/mesa_headers"
1714 "third_party/metrics_proto"
1715 "third_party/modp_b64"
1717 "third_party/one_euro_filter"
1720 "third_party/pdfium"
1721 "third_party/pdfium/third_party/agg23"
1722 "third_party/pdfium/third_party/base"
1723 "third_party/pdfium/third_party/freetype"
1724 "third_party/pdfium/third_party/lcms"
1725 "third_party/pdfium/third_party/libopenjpeg20"
1726 "third_party/pdfium/third_party/skia_shared"
1727 "third_party/perfetto"
1730 "third_party/polymer"
1731 "third_party/protobuf"
1732 "third_party/protobuf/third_party/six"
1733 "third_party/pyjson5"
1735 "third_party/rnnoise"
1737 "third_party/skia/include/third_party/skcms/skcms.h"
1738 "third_party/skia/include/third_party/vulkan"
1739 "third_party/skia/third_party/skcms"
1740 "third_party/skia/third_party/vulkanmemoryallocator"
1741 "third_party/smhasher"
1742 "third_party/snappy"
1743 "third_party/sqlite"
1744 "third_party/usb_ids"
1745 "third_party/usrsctp"
1746 "third_party/web-animations-js"
1747 "third_party/webrtc"
1748 "third_party/webrtc/common_audio/third_party/fft4g"
1749 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
1750 "third_party/webrtc/modules/third_party/fft"
1751 "third_party/webrtc/modules/third_party/g711"
1752 "third_party/webrtc/modules/third_party/g722"
1753 "third_party/webrtc/rtc_base/third_party/base64"
1754 "third_party/webrtc/rtc_base/third_party/sigslot"
1755 "third_party/webrtc_overrides"
1756 "third_party/widevine/cdm/widevine_cdm_common.h"
1757 "third_party/widevine/cdm/widevine_cdm_version.h"
1761 "url/third_party/mozilla"
1762 "v8/src/third_party/utf8-decoder"
1763 "v8/src/third_party/valgrind"
1764 "v8/src/third_party/siphash"
1765 "v8/third_party/v8/builtins"
1766 "v8/third_party/inspector_protocol"))
1767 (protected (make-regexp "\\.(gn|gyp)i?$")))
1768 (define preserved-club
1769 (map (lambda (member)
1770 (string-append "./" member))
1771 preserved-third-party-files))
1772 (define (empty? dir)
1773 (equal? (scandir dir) '("." "..")))
1774 (define (third-party? file)
1775 (string-contains file "third_party/"))
1776 (define (useless? file)
1777 (any (cute string-suffix? <> file)
1778 '(".zip" ".so" ".dll" ".exe" ".jar")))
1779 (define (parents child)
1780 ;; Return all parent directories of CHILD up to and including
1781 ;; the closest "third_party".
1782 (let* ((dirs (match (string-split child #\/)
1783 ((dirs ... last) dirs)))
1784 (closest (list-index (lambda (dir)
1785 (string=? "third_party" dir))
1787 (delim (- (length dirs) closest)))
1788 (fold (lambda (dir prev)
1789 (cons (string-append (car prev) "/" dir)
1791 (list (string-join (list-head dirs delim) "/"))
1792 (list-tail dirs delim))))
1793 (define (remove-loudly file)
1794 (format #t "deleting ~a...~%" file)
1797 (define (delete-unwanted-files child stat flag base level)
1799 ((or 'regular 'symlink 'stale-symlink)
1800 (when (third-party? child)
1801 (unless (or (member child preserved-club)
1802 (any (cute member <> preserved-club)
1804 (regexp-exec protected child))
1805 (remove-loudly child)))
1806 (when (and (useless? child) (file-exists? child))
1807 (remove-loudly child))
1809 ('directory-processed
1810 (when (empty? child)
1815 (with-directory-excursion "src/3rdparty"
1816 ;; TODO: Try removing "gn" too for future versions of qtwebengine.
1817 (delete-file-recursively "ninja")
1819 (with-directory-excursion "chromium"
1820 ;; Delete bundled software and binaries that were not explicitly
1822 (nftw "." delete-unwanted-files 'depth 'physical)
1824 ;; Assert that each preserved item is present to catch removals.
1825 (for-each (lambda (third-party)
1826 (unless (file-exists? third-party)
1827 (error (format #f "~s does not exist!~%" third-party))))
1830 ;; Use relative header locations instead of hard coded ones.
1832 "base/third_party/dynamic_annotations/dynamic_annotations.c"
1833 (("base/third_party/valgrind") "valgrind"))
1835 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
1836 (("third_party/curl") "curl"))
1838 '("components/viz/common/gpu/vulkan_context_provider.h"
1839 "components/viz/common/resources/resource_format_utils_vulkan.h"
1840 "gpu/config/gpu_util.cc")
1841 (("third_party/vulkan/include/")
1844 ;; Replace Google Analytics bundle with an empty file and hope
1846 (mkdir-p "third_party/analytics")
1847 (call-with-output-file
1848 "third_party/analytics/google-analytics-bundle.js"
1851 ;; Do not enable support for loading the Widevine DRM plugin.
1852 (substitute* "src/buildtools/config/common.pri"
1853 (("enable_widevine=true")
1854 "enable_widevine=false"))
1856 (build-system gnu-build-system)
1863 ("pkg-config" ,pkg-config)
1864 ("python-2" ,python-2)
1865 ("python-six" ,python2-six)
1868 `(("alsa-lib" ,alsa-lib)
1870 ("cups-minimal" ,cups-minimal)
1874 ("fontconfig" ,fontconfig)
1875 ("harbuzz" ,harfbuzz)
1877 ("jsoncpp" ,jsoncpp)
1880 ("libevent" ,libevent)
1881 ("libgcrypt" ,libgcrypt)
1882 ("libjpeg" ,libjpeg-turbo)
1884 ("libwebp" ,libwebp)
1887 ("libxcomposite" ,libxcomposite)
1888 ("libxcursor" ,libxcursor)
1890 ("libxkbcommon" ,libxkbcommon)
1891 ;; FIXME: libxml2 needs to built with icu support though it links to
1892 ;; libxml2 configure summary still states "Checking for compatible
1893 ;; system libxml2... no"
1894 ("libxml2" ,libxml2)
1895 ("libxrandr" ,libxrandr)
1896 ("libxrender" ,libxrender)
1897 ("libxslt" ,libxslt)
1898 ("libxtst" ,libxtst)
1900 ("minizip" ,minizip)
1903 ("pciutils" ,pciutils)
1904 ("protobuf" ,protobuf)
1905 ("pulseaudio" ,pulseaudio)
1907 ("qtdeclarative" ,qtdeclarative)
1908 ("qtmultimedia" ,qtmultimedia)
1909 ("qtwebchannel" ,qtwebchannel)
1913 ("valgrind" ,valgrind)
1914 ("vulkan-headers" ,vulkan-headers)
1915 ("xcb-util" ,xcb-util)))
1917 (substitute-keyword-arguments (package-arguments qtsvg)
1919 `(modify-phases ,phases
1920 (add-before 'configure 'substitute-source
1921 (lambda* (#:key inputs outputs #:allow-other-keys)
1922 (let ((out (assoc-ref outputs "out"))
1923 (nss (assoc-ref inputs "nss"))
1924 (udev (assoc-ref inputs "udev")))
1925 ;; Qtwebengine is not installed into the same prefix as
1926 ;; qtbase. Some qtbase QTLibraryInfo constants will not
1927 ;; work. Replace with the full path to the qtwebengine
1928 ;; translations and locales in the store.
1929 (substitute* "src/core/web_engine_library_info.cpp"
1930 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
1931 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
1932 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
1933 (string-append "QLatin1String(\"" out "/share/qt5\")")))
1934 ;; Substitute full dynamic library path for nss.
1935 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
1937 (string-append nss "/lib/nss/libnssckbi.so")))
1938 ;; Substitute full dynamic library path for udev.
1939 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
1941 (string-append udev "/lib/libudev.so.1")))
1943 (add-before 'configure 'set-env
1945 ;; Avoids potential race conditions.
1946 (setenv "PYTHONDONTWRITEBYTECODE" "1")
1947 (setenv "NINJAFLAGS"
1948 (string-append "-k1" ;less verbose build output
1949 ;; Respect the '--cores' option of 'guix build'.
1950 " -j" (number->string (parallel-job-count))))
1954 ;; Valid QT_BUILD_PARTS variables are:
1955 ;; libs tools tests examples demos docs translations
1956 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
1957 "--webengine-printing-and-pdf=no"
1958 "--webengine-ffmpeg=system"
1959 "--webengine-icu=system"
1960 "--webengine-pepper-plugins=no")))))
1961 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
1962 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
1963 ;; before running tests.
1964 ((#:tests? _ #f) #f)))
1965 (native-search-paths
1966 (list (search-path-specification
1967 (file-type 'regular)
1969 (variable "QTWEBENGINEPROCESS_PATH")
1970 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
1971 (home-page "https://wiki.qt.io/QtWebEngine")
1972 (synopsis "Qt WebEngine module")
1973 (description "The Qt5WebEngine module provides support for web applications
1974 using the Chromium browser project. The Chromium source code has Google services
1975 and binaries removed, and adds modular support for using system libraries.")
1976 (license license:lgpl2.1+)))
1978 (define-public python-sip
1985 (uri (list (pypi-uri "sip" version)
1986 (string-append "https://www.riverbankcomputing.com/static/"
1987 "Downloads/sip/" version
1988 "/sip-" version ".tar.gz")))
1991 "1ra15vb5i9gkg2vdvh16cq9x2mmzw1yi3xphxs8q34q1pf83gkgd"))))
1992 (build-system gnu-build-system)
1994 `(("python" ,python-wrapper)))
1996 `(#:tests? #f ; no check target
1997 #:imported-modules ((guix build python-build-system)
1998 ,@%gnu-build-system-modules)
1999 #:modules ((srfi srfi-1)
2000 ((guix build python-build-system) #:select (python-version))
2001 ,@%gnu-build-system-modules)
2003 (modify-phases %standard-phases
2005 (lambda* (#:key inputs outputs #:allow-other-keys)
2006 (let* ((out (assoc-ref outputs "out"))
2007 (bin (string-append out "/bin"))
2008 (include (string-append out "/include"))
2009 (python (assoc-ref inputs "python"))
2010 (lib (string-append out "/lib/python"
2011 (python-version python)
2013 (invoke "python" "configure.py"
2016 "--incdir" include)))))))
2017 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
2018 (synopsis "Python binding creator for C and C++ libraries")
2020 "SIP is a tool to create Python bindings for C and C++ libraries. It
2021 was originally developed to create PyQt, the Python bindings for the Qt
2022 toolkit, but can be used to create bindings for any C or C++ library.
2024 SIP comprises a code generator and a Python module. The code generator
2025 processes a set of specification files and generates C or C++ code, which
2026 is then compiled to create the bindings extension module. The SIP Python
2027 module provides support functions to the automatically generated code.")
2028 ;; There is a choice between a python like license, gpl2 and gpl3.
2029 ;; For compatibility with pyqt, we need gpl3.
2030 (license license:gpl3)))
2032 (define-public python2-sip
2033 (package (inherit python-sip)
2034 (name "python2-sip")
2036 `(("python" ,python-2)))))
2038 (define-public python-pyqt
2040 (name "python-pyqt")
2045 ;; PyPI is the canonical distribution point of PyQt. Older
2046 ;; releases are available from the web site.
2047 (uri (list (pypi-uri "PyQt5" version)
2048 (string-append "https://www.riverbankcomputing.com/static/"
2049 "Downloads/PyQt5/" version "/PyQt5-"
2050 version ".tar.gz")))
2051 (file-name (string-append "PyQt5-"version ".tar.gz"))
2054 "1z74295i69cha52llsqffzhb5zz7qnbjc64h8qg21l91jgf0harp"))
2055 (patches (search-patches "pyqt-configure.patch"
2056 "pyqt-public-sip.patch"))))
2057 (build-system gnu-build-system)
2059 `(("qtbase" ,qtbase))) ; for qmake
2061 `(("python-sip" ,python-sip)))
2063 `(("python" ,python-wrapper)
2065 ("qtconnectivity" ,qtconnectivity)
2066 ("qtdeclarative" ,qtdeclarative)
2067 ("qtlocation" ,qtlocation)
2068 ("qtmultimedia" ,qtmultimedia)
2069 ("qtsensors" ,qtsensors)
2070 ("qtserialport" ,qtserialport)
2072 ("qttools" ,qttools)
2073 ("qtwebchannel" ,qtwebchannel)
2074 ("qtwebkit" ,qtwebkit)
2075 ("qtwebsockets" ,qtwebsockets)
2076 ("qtx11extras" ,qtx11extras)
2077 ("qtxmlpatterns" ,qtxmlpatterns)))
2079 `(#:modules ((srfi srfi-1)
2080 ((guix build python-build-system) #:select (python-version))
2081 ,@%gnu-build-system-modules)
2082 #:imported-modules ((guix build python-build-system)
2083 ,@%gnu-build-system-modules)
2085 (modify-phases %standard-phases
2086 ;; When building python-pyqtwebengine, <qprinter.h> can not be
2087 ;; included. Here we substitute the full path to the header in the
2089 (add-before 'configure 'substitute-source
2090 (lambda* (#:key inputs #:allow-other-keys)
2091 (let* ((qtbase (assoc-ref inputs "qtbase"))
2092 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
2093 (substitute* "sip/QtPrintSupport/qprinter.sip"
2098 (lambda* (#:key inputs outputs #:allow-other-keys)
2099 (let* ((out (assoc-ref outputs "out"))
2100 (bin (string-append out "/bin"))
2101 (sip (string-append out "/share/sip"))
2102 (plugins (string-append out "/lib/qt5/plugins"))
2103 (designer (string-append plugins "/designer"))
2104 (qml (string-append plugins "/PyQt5"))
2105 (python (assoc-ref inputs "python"))
2106 (lib (string-append out "/lib/python"
2107 (python-version python)
2109 (stubs (string-append lib "/PyQt5")))
2110 (invoke "python" "configure.py"
2114 "--designer-plugindir" designer
2115 "--qml-plugindir" qml
2116 ; Where to install the PEP 484 Type Hints stub
2117 ; files. Without this the stubs are tried to be
2118 ; installed into the python package's
2119 ; site-package directory, which is read-only.
2121 "--sipdir" sip)))))))
2122 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
2123 (synopsis "Python bindings for Qt")
2125 "PyQt is a set of Python v2 and v3 bindings for the Qt application
2126 framework. The bindings are implemented as a set of Python modules and
2127 contain over 620 classes.")
2128 (license license:gpl3)))
2130 (define-public python-pyqtwebengine
2132 (name "python-pyqtwebengine")
2137 ;; The newest releases are only available on PyPI. Older ones
2138 ;; are mirrored at the upstream home page.
2139 (uri (list (pypi-uri "PyQtWebEngine" version)
2140 (string-append "https://www.riverbankcomputing.com/static"
2141 "/Downloads/PyQtWebEngine/" version
2142 "/PyQtWebEngine-" version ".tar.gz")))
2145 "0d56ak71r14w4f9r96vaj34qcn2rbln3s6ildvvyc707fjkzwwjd"))))
2146 (build-system gnu-build-system)
2148 `(("python" ,python)
2149 ("python-sip" ,python-sip)
2150 ;; qtbase is required for qmake
2151 ("qtbase" ,qtbase)))
2153 `(("python" ,python-wrapper)
2154 ("python-sip" ,python-sip)
2155 ("python-pyqt" ,python-pyqt)
2158 ("qtdeclarative" ,qtdeclarative)
2159 ("qtwebchannel" ,qtwebchannel)
2160 ("qtwebengine" ,qtwebengine)))
2162 `(#:modules ((srfi srfi-1)
2163 ((guix build python-build-system) #:select (python-version))
2164 ,@%gnu-build-system-modules)
2165 #:imported-modules ((guix build python-build-system)
2166 ,@%gnu-build-system-modules)
2168 (modify-phases %standard-phases
2170 (lambda* (#:key inputs outputs #:allow-other-keys)
2171 (let* ((out (assoc-ref outputs "out"))
2172 (sipdir (string-append out "/share/sip"))
2173 (pyqt-sipdir (string-append
2174 (assoc-ref inputs "python-pyqt") "/share/sip"))
2175 (python (assoc-ref inputs "python"))
2176 (lib (string-append out "/lib/python"
2177 (python-version python)
2178 "/site-packages/PyQt5"))
2179 (stubs (string-append lib "/PyQt5")))
2182 (invoke "python" "configure.py"
2189 "--pyqt-sipdir" pyqt-sipdir))))
2190 ;; Because this has a different prefix than python-pyqt then we need
2191 ;; to make this a namespace of it's own
2192 (add-after 'install 'make-namespace
2193 (lambda* (#:key inputs outputs #:allow-other-keys)
2194 (let* ((__init__.py (string-append
2195 (assoc-ref outputs "out")
2197 (python-version (assoc-ref inputs "python"))
2198 "/site-packages/PyQt5/__init__.py")))
2199 (with-output-to-file __init__.py
2200 (lambda _ (display "
2201 from pkgutil import extend_path
2202 __path__ = extend_path(__path__, __name__)
2205 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
2206 (synopsis "Python bindings for QtWebEngine")
2208 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
2209 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
2210 set of three modules. Prior to v5.12 these bindings were part of PyQt
2212 (license license:gpl3)))
2214 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
2215 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
2216 ;; packages that could be used together.
2217 (define-public python-pyqt-without-qtwebkit
2218 (package (inherit python-pyqt)
2219 (name "python-pyqt-without-qtwebkit")
2221 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
2223 (define-public python2-pyqt
2224 (package (inherit python-pyqt)
2225 (name "python2-pyqt")
2227 `(("python-enum34" ,python2-enum34)
2228 ("python-sip" ,python2-sip)))
2230 `(("python-sip" ,python2-sip)
2231 ("qtbase" ,qtbase)))
2233 `(("python" ,python-2)
2234 ("python2-enum34" ,python2-enum34)
2235 ,@(alist-delete "python" (package-inputs python-pyqt))))))
2237 (define-public python2-pyqtwebengine
2239 python-pyqtwebengine
2240 (name "python2-pyqtwebengine")
2242 `(("python" ,python-2)
2243 ("python-sip" ,python2-sip)
2244 ;; qtbase is required for qmake
2245 ("qtbase" ,qtbase)))
2247 `(("python" ,python-2)
2248 ("python-sip" ,python2-sip)
2249 ("python-pyqt" ,python2-pyqt)
2252 ("qtdeclarative" ,qtdeclarative)
2253 ("qtwebchannel" ,qtwebchannel)
2254 ("qtwebengine" ,qtwebengine)))))
2256 (define-public python2-pyqt-4
2257 (package (inherit python-pyqt)
2258 (name "python2-pyqt")
2264 (string-append "mirror://sourceforge/pyqt/PyQt4/"
2265 "PyQt-" version "/PyQt4_gpl_x11-"
2269 "0wnlasg62rm5d39nq1yw4namcx2ivxgzl93r5f2vb9s0yaz5l3x0"))))
2272 (inputs `(("python" ,python-2)))
2274 `(("python-sip" ,python2-sip)))
2276 `(#:tests? #f ; no check target
2277 #:modules ((srfi srfi-1)
2278 ,@%gnu-build-system-modules)
2280 (modify-phases %standard-phases
2282 (lambda* (#:key inputs outputs #:allow-other-keys)
2283 (let* ((out (assoc-ref outputs "out"))
2284 (bin (string-append out "/bin"))
2285 (sip (string-append out "/share/sip"))
2286 (python (assoc-ref inputs "python"))
2288 (last (string-split python #\-)))
2291 (take (string-split python-version #\.) 2)
2293 (lib (string-append out "/lib/python"
2296 (invoke "python" "configure.py"
2300 "--sipdir" sip)))))))
2301 (license (list license:gpl2 license:gpl3)))) ; choice of either license
2303 (define-public python-qtpy
2305 (name "python-qtpy")
2310 (uri (pypi-uri "QtPy" version))
2313 "13cw8l7zrhbdi03k1wl1pg9xdl4ahdfa7yz8gd0f23sxnm22rdrd"))))
2314 (build-system python-build-system)
2316 `(("python-pyside2" ,python-pyside-2)))
2318 `(;; Not all supported bindings are packaged. Especially PyQt4.
2320 (home-page "https://github.com/spyder-ide/qtpy")
2322 "Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets")
2324 "Provides an abstraction layer on top of the various Qt bindings
2325 (PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
2326 (license license:expat)))
2328 (define-public qscintilla
2334 (uri (string-append "https://www.riverbankcomputing.com/static"
2335 "/Downloads/QScintilla/" version
2336 "/QScintilla-" version ".tar.gz"))
2339 "19r0vpqb4m9bqwxmjp9w6x0hgahkrg7zryk78hwgplj7vdbn0d77"))))
2340 (build-system gnu-build-system)
2343 (modify-phases %standard-phases
2345 (lambda* (#:key outputs #:allow-other-keys)
2346 (let ((out (assoc-ref outputs "out")))
2348 (substitute* "qscintilla.pro"
2349 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
2350 (string-append out "/lib"))
2351 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
2352 (string-append out "/include"))
2353 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
2354 (string-append out "/translations"))
2355 (("\\$\\$\\[QT_INSTALL_DATA\\]")
2356 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
2357 (("\\$\\$\\[QT_HOST_DATA\\]")
2358 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
2359 (invoke "qmake")))))))
2360 (native-inputs `(("qtbase" ,qtbase)))
2361 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
2362 (synopsis "Qt port of the Scintilla C++ editor control")
2363 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2364 editor control. QScintilla includes features especially useful when editing
2365 and debugging source code. These include support for syntax styling, error
2366 indicators, code completion and call tips.")
2367 (license license:gpl3+)))
2369 (define-public python-qscintilla
2370 (package (inherit qscintilla)
2371 (name "python-qscintilla")
2374 (list "--pyqt=PyQt5"
2375 (string-append "--pyqt-sipdir="
2376 (assoc-ref %build-inputs "python-pyqt")
2378 (string-append "--qsci-incdir="
2379 (assoc-ref %build-inputs "qscintilla")
2381 (string-append "--qsci-libdir="
2382 (assoc-ref %build-inputs "qscintilla")
2385 (modify-phases %standard-phases
2387 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
2388 (let ((out (assoc-ref outputs "out"))
2389 (python (assoc-ref inputs "python")))
2391 (apply invoke "python3" "configure.py"
2393 ;; Install to the right directory
2394 (substitute* '("Makefile"
2396 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2397 (((string-append python "/lib"))
2398 (string-append out "/lib")))
2399 ;; And fix the installed.txt file
2400 (substitute* "installed.txt"
2401 (("/gnu/store/[^/]+") out)))
2404 `(("qscintilla" ,qscintilla)
2406 ("python-pyqt" ,python-pyqt)))
2407 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2408 editor control. QScintilla includes features especially useful when editing
2409 and debugging source code. These include support for syntax styling, error
2410 indicators, code completion and call tips.
2412 This package provides the Python bindings.")))
2414 ;; PyQt only looks for modules in its own directory. It ignores environment
2415 ;; variables such as PYTHONPATH, so we need to build a union package to make
2417 (define-public python-pyqt+qscintilla
2418 (package (inherit python-pyqt)
2419 (name "python-pyqt+qscintilla")
2421 (build-system trivial-build-system)
2423 '(#:modules ((guix build union))
2425 (use-modules (ice-9 match)
2427 (match %build-inputs
2428 (((names . directories) ...)
2429 (union-build (assoc-ref %outputs "out")
2433 `(("python-pyqt" ,python-pyqt)
2434 ("python-qscintilla" ,python-qscintilla)))
2435 (synopsis "Union of PyQt and the Qscintilla extension")
2437 "This package contains the union of PyQt and the Qscintilla extension.")))
2439 (define-public qtkeychain
2447 (url "https://github.com/frankosterfeld/qtkeychain/")
2448 (commit (string-append "v" version))))
2449 (file-name (git-file-name name version))
2452 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
2453 (build-system cmake-build-system)
2455 `(("pkg-config" ,pkg-config)
2456 ("qttools" ,qttools)))
2458 `(("qtbase" ,qtbase)))
2460 `(#:tests? #f ; No tests included
2462 (modify-phases %standard-phases
2463 (add-before 'configure 'set-qt-trans-dir
2465 (substitute* "CMakeLists.txt"
2466 (("\\$\\{qt_translations_dir\\}")
2467 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
2469 (home-page "https://github.com/frankosterfeld/qtkeychain")
2470 (synopsis "Qt API to store passwords")
2472 "QtKeychain is a Qt library to store passwords and other secret data
2473 securely. It will not store any data unencrypted unless explicitly requested.")
2474 (license license:bsd-3)))
2476 (define-public qtsolutions
2477 (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
2480 (name "qtsolutions")
2481 (version (git-version "0" revision commit))
2486 (url "https://github.com/qtproject/qt-solutions")
2488 (file-name (git-file-name name version))
2490 (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
2491 (modules '((guix build utils)
2495 ;; Unvendor QtLockFile from QtSingleApplication.
2497 (with-directory-excursion "qtsingleapplication/src"
2498 (for-each delete-file
2499 (find-files "." "qtlockedfile.*\\.(h|cpp)"))
2500 (substitute* "qtsingleapplication.pri"
2501 ;; Add include path of LockedFile.
2502 (("INCLUDEPATH \\+=")
2503 "INCLUDEPATH += ../../qtlockedfile/src")
2504 ;; Link library of LockedFile.
2506 "LIBS += -lQtSolutions_LockedFile"))
2507 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
2508 (("#include \"qtlockedfile.*\\.cpp\"") "")
2509 ;; Unwrap namespace added in the vendoring process.
2510 (("QtLP_Private::QtLockedFile")
2513 (build-system gnu-build-system)
2515 `(#:tests? #f ; No target
2517 ((guix build copy-build-system)
2518 ,@%gnu-build-system-modules)
2520 (((guix build copy-build-system) #:prefix copy:)
2521 (guix build gnu-build-system)
2524 (modify-phases %standard-phases
2525 (add-after 'unpack 'patch-source
2526 (lambda* (#:key outputs #:allow-other-keys)
2527 (substitute* (find-files "." "common.pri")
2528 ;; Remove unnecessary prefixes/suffixes in library names.
2531 ;; Disable building of examples.
2532 (substitute* (find-files "." "\\.pro$")
2533 (("SUBDIRS\\+=examples") ""))
2534 ;; Fix deprecated functions.
2535 (substitute* "qtsoap/src/qtsoap.cpp"
2536 (("toAscii") "toUtf8"))
2540 (for-each (lambda (solution)
2541 (with-directory-excursion solution
2542 (invoke "./configure" "-library")
2544 '("qtlockedfile" "qtpropertybrowser" "qtservice"
2545 "qtsingleapplication" "qtsoap"))
2549 (for-each (lambda (solution)
2550 (with-directory-excursion solution
2552 '("qtlockedfile" "qtpropertybrowser" "qtservice"
2553 "qtsingleapplication" "qtsoap"))
2557 (for-each (lambda (solution)
2558 (with-directory-excursion solution
2560 (assoc-ref copy:%standard-phases 'install)
2562 '(("src" "include" #:include-regexp ("\\.h$"))
2565 '("qtlockedfile" "qtpropertybrowser" "qtservice"
2566 "qtsingleapplication" "qtsoap")))))))
2568 `(("qtbase" ,qtbase)))
2569 (synopsis "Collection of Qt extensions")
2570 (description "QtSolutions is a set of components extending Qt.
2572 @item QtLockedFile: A class that extends QFile with advisory locking functions.
2573 @item QtPropertyBrowser: A framework that enables the user to edit a set of
2575 @item QtService: A helper for writing services such as Unix daemons.
2576 @item QtSingleApplication: A component that provides support for applications
2577 that can be only started once per user.
2578 @item QtSoap: A component that provides basic web service support with version
2579 1.1 of the SOAP protocol.
2581 (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
2582 (license (list license:bsd-3
2583 ;; QScriptParser and QScriptGrammar specifically allow
2584 ;; redistribution under GPL3 or LGPL2.1
2585 license:gpl3 license:lgpl2.1)))))
2595 (string-append "mirror://sourceforge/qwt/qwt/"
2596 version "/qwt-" version ".tar.bz2"))
2598 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
2599 (build-system gnu-build-system)
2601 `(("qtbase" ,qtbase)
2603 ("qttools" ,qttools)))
2606 (modify-phases %standard-phases
2608 (lambda* (#:key outputs #:allow-other-keys)
2609 (let* ((out (assoc-ref outputs "out"))
2610 (docdir (string-append out "/share/doc/qwt"))
2611 (incdir (string-append out "/include/qwt"))
2612 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2613 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2614 (substitute* '("qwtconfig.pri")
2615 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2616 (format #f "~a = ~a\n" x out))
2617 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2618 (format #f "~a = ~a\n" x docdir))
2619 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2620 (format #f "~a = ~a\n" x incdir))
2621 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2622 (format #f "~a = ~a\n" x pluginsdir))
2623 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2624 (format #f "~a = ~a\n" x featuresdir)))
2625 (substitute* '("doc/doc.pro")
2626 ;; We'll install them in the 'install-man-pages' phase.
2627 (("^unix:doc\\.files.*") ""))
2629 (add-after 'install 'install-man-pages
2630 (lambda* (#:key outputs #:allow-other-keys)
2631 (let* ((out (assoc-ref outputs "out"))
2632 (man (string-append out "/share/man")))
2633 ;; Remove some incomplete manual pages.
2634 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2636 (copy-recursively "doc/man" man)
2638 (home-page "http://qwt.sourceforge.net")
2639 (synopsis "Qt widgets for plots, scales, dials and other technical software
2642 "The Qwt library contains widgets and components which are primarily useful
2643 for technical and scientific purposes. It includes a 2-D plotting widget,
2644 different kinds of sliders, and much more.")
2647 ;; The Qwt license is LGPL2.1 with some exceptions.
2648 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2649 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2650 license:lgpl2.1 license:gpl3))))
2652 (define-public qtwebkit
2655 (version "5.212.0-alpha4")
2659 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2660 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
2663 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
2664 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2665 (build-system cmake-build-system)
2673 ("pkg-config" ,pkg-config)))
2677 ("gst-plugins-base" ,gst-plugins-base)
2678 ("libjpeg" ,libjpeg-turbo)
2680 ("libwebp" ,libwebp)
2682 ("fontconfig" ,fontconfig)
2683 ("libxrender" ,libxrender)
2685 ("qtdeclarative" ,qtdeclarative)
2686 ("qtlocation" ,qtlocation)
2687 ("qtmultimedia" ,qtmultimedia)
2688 ("qtsensors" ,qtsensors)
2689 ("qtwebchannel" ,qtwebchannel)
2690 ("libxml2" ,libxml2)
2691 ("libxslt" ,libxslt)
2693 ("libxcomposite" ,libxcomposite)))
2695 `(#:tests? #f ; no apparent tests; it might be necessary to set
2696 ; ENABLE_API_TESTS, see CMakeLists.txt
2698 ;; Parallel builds fail due to a race condition:
2699 ;; <https://bugs.gnu.org/34062>.
2700 #:parallel-build? #f
2702 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2704 "-DUSE_LIBHYPHEN=OFF"
2705 "-DUSE_SYSTEM_MALLOC=ON"
2706 ;; XXX: relative dir installs to build dir?
2707 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2708 %output "/lib/qt5/mkspecs/modules")
2709 ;; Sacrifice a little speed in order to link
2710 ;; libraries and test executables in a
2711 ;; reasonable amount of memory.
2712 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2713 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2714 (home-page "https://www.webkit.org")
2715 (synopsis "Web browser engine and classes to render and interact with web
2717 (description "QtWebKit provides a Web browser engine that makes it easy to
2718 embed content from the World Wide Web into your Qt application. At the same
2719 time Web content can be enhanced with native controls.")
2720 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2721 ;; room for slower or busy hardware.
2722 (properties '((timeout . 64800))) ;18 hours
2724 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2725 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2726 ;; disable it on non-Intel platforms.
2727 (supported-systems '("x86_64-linux" "i686-linux"))
2729 (license license:lgpl2.1+)))
2731 (define-public dotherside
2739 (url "https://github.com/filcuc/DOtherSide")
2740 (commit (string-append "v" version))))
2741 (file-name (git-file-name name version))
2744 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
2745 (build-system cmake-build-system)
2747 `(("qttools" ,qttools)))
2749 `(("qtbase" ,qtbase)
2750 ("qtdeclarative" ,qtdeclarative)))
2751 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2752 (synopsis "C language library for creating bindings for the Qt QML language")
2754 "DOtherSide is a C language library for creating bindings for the
2755 QT QML language. The following features are implementable from
2758 @item Creating custom QObject
2759 @item Creating custom QAbstractListModels
2760 @item Creating custom properties, signals and slots
2761 @item Creating from QML QObject defined in the binded language
2762 @item Creating from Singleton QML QObject defined in the binded language
2764 (license license:lgpl3))) ;version 3 only (+ exception)
2766 ;; There have been no public releases yet.
2767 (define-public qtcolorwidgets
2768 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2771 (name "qtcolorwidgets")
2772 (version (git-version "0" revision commit))
2776 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2778 (file-name (git-file-name name version))
2781 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2782 (build-system cmake-build-system)
2783 (arguments `(#:tests? #f)) ; There are no tests
2785 `(("qttools" ,qttools)))
2787 `(("qtbase" ,qtbase)))
2788 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2789 (synopsis "Color management widgets")
2790 (description "QtColorWidgets provides a Qt color dialog that is more
2791 user-friendly than the default @code{QColorDialog} and several other
2792 color-related widgets.")
2793 ;; Includes a license exception for combining with GPL2 code.
2794 (license license:lgpl3+))))
2796 (define-public python-shiboken-2
2798 (name "python-shiboken-2")
2799 (version "5.14.2.3")
2802 (uri (string-append "https://download.qt.io/official_releases"
2803 "/QtForPython/pyside2/PySide2-" version
2804 "-src/pyside-setup-opensource-src-"
2808 "08lhqm0n3fjqpblcx9rshsp8g3bvf7yzbai5q99bly2wa04y6b83"))))
2809 (build-system cmake-build-system)
2811 `(("clang-toolchain" ,clang-toolchain)
2812 ("libxml2" ,libxml2)
2813 ("libxslt" ,libxslt)
2814 ("python-wrapper" ,python-wrapper)
2816 ("qtxmlpatterns" ,qtxmlpatterns)))
2819 ;; FIXME: Building tests fails
2820 #:configure-flags '("-DBUILD_TESTS=off")
2822 (modify-phases %standard-phases
2823 (add-after 'unpack 'use-shiboken-dir-only
2824 (lambda _ (chdir "sources/shiboken2") #t))
2825 (add-before 'configure 'make-files-writable-and-update-timestamps
2827 ;; The build scripts need to modify some files in
2828 ;; the read-only source directory, and also attempts
2829 ;; to create Zip files which fails because the Zip
2830 ;; format does not support timestamps before 1980.
2831 (let ((circa-1980 (* 10 366 24 60 60)))
2832 (for-each (lambda (file)
2833 (make-file-writable file)
2834 (utime file circa-1980 circa-1980))
2837 (add-before 'configure 'set-build-env
2838 (lambda* (#:key inputs #:allow-other-keys)
2839 (let ((llvm (assoc-ref inputs "clang-toolchain")))
2840 (setenv "CLANG_INSTALL_DIR" llvm)
2842 (home-page "https://wiki.qt.io/Qt_for_Python")
2844 "Shiboken generates bindings for C++ libraries using CPython source code")
2846 "Shiboken generates bindings for C++ libraries using CPython source code")
2849 ;; The main code is GPL3 or LGPL3.
2850 ;; Examples are BSD-3.
2855 (define-public python-pyside-2
2857 (name "python-pyside-2")
2858 (version (package-version python-shiboken-2))
2859 (source (package-source python-shiboken-2))
2860 (build-system cmake-build-system)
2862 `(("libxml2" ,libxml2)
2863 ("libxslt" ,libxslt)
2864 ("clang-toolchain" ,clang-toolchain)
2866 ("qtdatavis3d" ,qtdatavis3d)
2867 ("qtlocation" ,qtlocation)
2868 ("qtmultimedia" ,qtmultimedia)
2869 ("qtquickcontrols" ,qtquickcontrols)
2870 ("qtscript" ,qtscript)
2871 ("qtscxml" ,qtscxml)
2872 ("qtsensors" ,qtsensors)
2873 ("qtspeech" ,qtspeech)
2875 ("qtwebchannel" ,qtwebchannel)
2876 ("qtwebsockets" ,qtwebsockets)
2877 ("qtx11extras" ,qtx11extras)
2878 ("qtxmlpatterns" ,qtxmlpatterns)))
2880 `(("cmake" ,cmake-minimal)
2881 ("python-shiboken-2" ,python-shiboken-2)
2882 ("python" ,python-wrapper)
2883 ("qttools" ,qttools)
2887 ;; FIXME: Building tests fail.
2889 (list "-DBUILD_TESTS=FALSE"
2890 (string-append "-DPYTHON_EXECUTABLE="
2891 (assoc-ref %build-inputs "python")
2894 (modify-phases %standard-phases
2895 (add-after 'unpack 'go-to-source-dir
2896 (lambda _ (chdir "sources/pyside2") #t))
2897 (add-before 'configure 'set-clang-dir
2898 (lambda* (#:key inputs #:allow-other-keys)
2899 (let ((clang (assoc-ref inputs "clang-toolchain")))
2900 (setenv "CLANG_INSTALL_DIR" clang)
2902 (home-page "https://wiki.qt.io/Qt_for_Python")
2904 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2906 "The Qt for Python product enables the use of Qt5 APIs in Python
2907 applications. It lets Python developers utilize the full potential of Qt,
2908 using the PySide2 module. The PySide2 module provides access to the
2909 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2910 comes with the Shiboken2 CPython binding code generator, which can be used to
2911 generate Python bindings for your C or C++ code.")
2915 ;; this file may be used under the terms of the GNU General
2916 ;; Public License version 2.0 or (at your option) the GNU
2917 ;; General Public license version 3 or any later version
2918 ;; approved by the KDE Free Qt Foundation.
2919 ;; Thus, it is currently v2 or v3, but no "+".
2923 (define-public python-pyside-2-tools
2925 (name "python-pyside-2-tools")
2926 (version (package-version python-shiboken-2))
2927 (source (package-source python-shiboken-2))
2928 (build-system cmake-build-system)
2930 `(("python-pyside-2" ,python-pyside-2)
2931 ("python-shiboken-2" ,python-shiboken-2)
2932 ("qtbase" ,qtbase)))
2934 `(("python" ,python-wrapper)))
2938 (list "-DBUILD_TESTS=off"
2939 (string-append "-DPYTHON_EXECUTABLE="
2940 (assoc-ref %build-inputs "python")
2942 #:phases (modify-phases %standard-phases
2943 (add-after 'unpack 'go-to-source-dir
2944 (lambda _ (chdir "sources/pyside2-tools") #t)))))
2945 (home-page "https://wiki.qt.io/Qt_for_Python")
2947 "Contains command line tools for PySide2")
2949 "Contains lupdate, rcc and uic tools for PySide2")
2950 (license license:gpl2)))
2952 (define-public libqglviewer
2954 (name "libqglviewer")
2959 (string-append "http://libqglviewer.com/src/libQGLViewer-"
2963 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
2964 (build-system gnu-build-system)
2966 '(#:tests? #f ; no check target
2968 (list (string-append "PREFIX="
2969 (assoc-ref %outputs "out")))
2971 (modify-phases %standard-phases
2973 (lambda* (#:key make-flags #:allow-other-keys)
2974 (apply invoke (cons "qmake" make-flags)))))))
2976 `(("qtbase" ,qtbase)
2977 ("qttools" ,qttools)))
2980 (home-page "http://libqglviewer.com")
2981 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
2983 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
2984 of OpenGL 3D viewers.
2986 It provides some of the typical 3D viewer functionalities, such as the
2987 possibility to move the camera using the mouse, which lacks in most of the
2988 other APIs. Other features include mouse manipulated frames, interpolated
2989 keyFrames, object selection, stereo display, screenshot saving and much more.
2990 It can be used by OpenGL beginners as well as to create complex applications,
2991 being fully customizable and easy to extend.")
2992 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
2994 (license (list license:gpl2 license:gpl3))))
2998 (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
3002 (version (git-version "1.6.0" revision commit-ref))
3007 (url "https://github.com/coin3d/soqt")
3010 (file-name (git-file-name name version))
3012 (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
3013 (build-system cmake-build-system)
3014 (arguments '(#:tests? #f)) ; There are no tests
3016 `(("pkg-config" ,pkg-config)
3019 `(("qtbase" ,qtbase)
3020 ("coin3D" ,coin3D-4)))
3021 (home-page "https://github.com/coin3d/soqt")
3022 (synopsis "Qt GUI component toolkit library for Coin")
3023 (description "SoQt is a Qt GUI component toolkit library for Coin. It is
3024 also compatible with SGI and TGS Open Inventor, and the API is based on the API
3025 of the InventorXt GUI component toolkit.")
3026 (license license:bsd-3))))