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 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, 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>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages qt)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system trivial)
42 #:use-module (guix build-system python)
43 #:use-module (guix packages)
44 #:use-module (guix deprecation)
45 #:use-module (guix utils)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bison)
49 #:use-module (gnu packages cmake)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages cups)
52 #:use-module (gnu packages curl)
53 #:use-module (gnu packages databases)
54 #:use-module (gnu packages documentation)
55 #:use-module (gnu packages fontutils)
56 #:use-module (gnu packages flex)
57 #:use-module (gnu packages freedesktop)
58 #:use-module (gnu packages gcc)
59 #:use-module (gnu packages ghostscript)
60 #:use-module (gnu packages gl)
61 #:use-module (gnu packages glib)
62 #:use-module (gnu packages gnupg)
63 #:use-module (gnu packages gperf)
64 #:use-module (gnu packages gstreamer)
65 #:use-module (gnu packages gtk)
66 #:use-module (gnu packages icu4c)
67 #:use-module (gnu packages image)
68 #:use-module (gnu packages libevent)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages llvm)
71 #:use-module (gnu packages maths)
72 #:use-module (gnu packages ninja)
73 #:use-module (gnu packages nss)
74 #:use-module (gnu packages pciutils)
75 #:use-module (gnu packages pcre)
76 #:use-module (gnu packages perl)
77 #:use-module (gnu packages pkg-config)
78 #:use-module (gnu packages pulseaudio)
79 #:use-module (gnu packages protobuf)
80 #:use-module (gnu packages python)
81 #:use-module (gnu packages python-xyz)
82 #:use-module (gnu packages regex)
83 #:use-module (gnu packages ruby)
84 #:use-module (gnu packages sdl)
85 #:use-module (gnu packages serialization)
86 #:use-module (gnu packages sqlite)
87 #:use-module (gnu packages telephony)
88 #:use-module (gnu packages tls)
89 #:use-module (gnu packages valgrind)
90 #:use-module (gnu packages video)
91 #:use-module (gnu packages vulkan)
92 #:use-module (gnu packages xdisorg)
93 #:use-module (gnu packages xiph)
94 #:use-module (gnu packages xorg)
95 #:use-module (gnu packages xml)
96 #:use-module (srfi srfi-1))
98 (define-public grantlee
106 (url "https://github.com/steveire/grantlee.git")
107 (commit (string-append "v" version))))
108 (file-name (git-file-name name version))
110 (base32 "1dmah2gd6zd4fgz2f4ir11dazqg067hjz8xshhywhfsmavchi626"))))
112 ;; Optional: lcov and cccc, both are for code coverage
113 `(("doxygen" ,doxygen)))
116 ("qtscript" ,qtscript)))
117 (build-system cmake-build-system)
119 `(#:configure-flags '("-DCMAKE_CXX_STANDARD=11")
121 (modify-phases %standard-phases
122 (add-after 'unpack 'delete-broken-tests
124 ;; TODO: Two date tests (for date01 and date02) fail for unknown
126 ;; Actual (result): ""
127 ;; Expected (output): "01"
128 ;; Actual (result): ""
129 ;; Expected (output): "Jan. 1, 2008"
130 (delete-file "templates/tests/testfilters.cpp")
131 (substitute* "templates/tests/CMakeLists.txt"
132 (("testfilters") ""))
134 (add-before 'check 'check-setup
136 ;; make Qt render "offscreen", required for tests
137 (setenv "QT_QPA_PLATFORM" "offscreen")
139 (home-page "https://github.com/steveire/grantlee")
140 (synopsis "Libraries for text templating with Qt")
141 (description "Grantlee Templates can be used for theming and generation of
142 other text such as code. The syntax uses the syntax of the Django template
143 system, and the core design of Django is reused in Grantlee.")
144 (license license:lgpl2.0+)))
152 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
153 (string-copy version 0 (string-rindex version #\.))
155 "/qt-everywhere-opensource-src-"
159 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
160 (patches (search-patches "qt4-ldflags.patch"))
161 (modules '((guix build utils)))
163 ;; Remove webkit module, which is not built.
164 '(begin (delete-file-recursively "src/3rdparty/webkit")
166 (build-system gnu-build-system)
170 `(("alsa-lib" ,alsa-lib)
174 ("double-conversion" ,double-conversion)
176 ("fontconfig" ,fontconfig)
177 ("freetype" ,freetype)
179 ("gstreamer" ,gstreamer)
180 ("gst-plugins-base" ,gst-plugins-base)
183 ("libinput" ,libinput-minimal)
190 ("libxcomposite" ,libxcomposite)
191 ("libxcursor" ,libxcursor)
193 ("libxfixes" ,libxfixes)
195 ("libxinerama" ,libxinerama)
196 ("libxkbcommon" ,libxkbcommon)
198 ("libxrandr" ,libxrandr)
199 ("libxrender" ,libxrender)
203 ("mariadb" ,mariadb "lib")
204 ("mariadb-dev" ,mariadb "dev")
206 ("postgresql" ,postgresql)
207 ("pulseaudio" ,pulseaudio)
211 ("unixodbc" ,unixodbc)
213 ("xcb-util" ,xcb-util)
214 ("xcb-util-image" ,xcb-util-image)
215 ("xcb-util-keysyms" ,xcb-util-keysyms)
216 ("xcb-util-renderutil" ,xcb-util-renderutil)
217 ("xcb-util-wm" ,xcb-util-wm)
219 ("libjpeg" ,libjpeg-turbo)
221 ("openssl" ,openssl-1.0)))
223 `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
224 ;; We could build it with -std=gnu++98, but then we'll get in trouble with
225 ;; ICU later. Just keep using GCC 5 for now.
231 ("pkg-config" ,pkg-config)
234 ("which" ,(@ (gnu packages base) which))))
235 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
236 ;; but we can't make them a separate output because "out" and "examples"
237 ;; would refer to each other.
238 (outputs '("out" ;112MiB core + 37MiB examples
239 "doc")) ;280MiB of HTML + code
242 (modify-phases %standard-phases
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let ((out (assoc-ref outputs "out"))
247 (doc (assoc-ref outputs "doc")))
248 (substitute* '("configure")
249 (("/bin/pwd") (which "pwd")))
250 (substitute* "src/corelib/global/global.pri"
251 (("/bin/ls") (which "ls")))
257 "-nomake" "examples demos"
258 ;; Note: Don't pass '-docdir' since 'qmake' and
259 ;; libQtCore would record its value, thereby defeating
260 ;; the whole point of having a separate output.
261 "-datadir" (string-append out "/share/qt-" ,version
263 "-importdir" (string-append out "/lib/qt-4"
265 "-plugindir" (string-append out "/lib/qt-4"
267 "-translationdir" (string-append out "/share/qt-" ,version
269 "-demosdir" (string-append out "/share/qt-" ,version
271 "-examplesdir" (string-append out "/share/qt-" ,version
275 ;; explicitly link with dbus instead of dlopening it
277 ;; Skip the webkit module; it fails to build on armhf
278 ;; and, apart from that, may pose security risks.
280 ;; don't use the precompiled headers
282 ;; drop special machine instructions not supported
283 ;; on all instances of the target
284 ,@(if (string-prefix? "x86_64"
285 (or (%current-target-system)
299 (lambda* (#:key outputs #:allow-other-keys)
300 ;; Because of qt4-documentation-path.patch, documentation ends up
301 ;; being installed in OUT. Move it to the right place.
302 (let* ((out (assoc-ref outputs "out"))
303 (doc (assoc-ref outputs "doc"))
304 (olddoc (string-append out "/doc"))
305 (docdir (string-append doc "/share/doc/qt-" ,version)))
306 (mkdir-p (dirname docdir))
308 ;; Note: We can't use 'rename-file' here because OUT and DOC are
309 ;; different "devices" due to bind-mounts.
310 (copy-recursively olddoc docdir)
311 (delete-file-recursively olddoc)
314 (list (search-path-specification
315 (variable "QMAKEPATH")
316 (files '("lib/qt5")))
317 (search-path-specification
318 (variable "QML2_IMPORT_PATH")
319 (files '("lib/qt5/qml")))
320 (search-path-specification
321 (variable "QT_PLUGIN_PATH")
322 (files '("lib/qt5/plugins")))
323 (search-path-specification
324 (variable "XDG_DATA_DIRS")
326 (search-path-specification
327 (variable "XDG_CONFIG_DIRS")
328 (files '("etc/xdg")))))
329 (home-page "https://www.qt.io/")
330 (synopsis "Cross-platform GUI library")
331 (description "Qt is a cross-platform application and UI framework for
332 developers using C++ or QML, a CSS & JavaScript like language.")
333 (license (list license:lgpl2.1 license:lgpl3))
335 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
336 ;; see <http://hydra.gnu.org/build/112828>.
337 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
338 (supported-systems (delete "mips64el-linux" %supported-systems))))
340 (define-public qtbase
346 (uri (string-append "https://download.qt.io/official_releases/qt/"
347 (version-major+minor version) "/" version
348 "/submodules/" name "-everywhere-src-"
352 "0pb68d30clksdhgy8n6rrs838bb3qcsfq4pv463yy2nr4p5kk2di"))
353 ;; Use TZDIR to avoid depending on package "tzdata".
354 (patches (search-patches "qtbase-use-TZDIR.patch"
355 "qtbase-QTBUG-81715.patch"))
356 (modules '((guix build utils)))
358 ;; corelib uses bundled harfbuzz, md4, md5, sha3
360 (with-directory-excursion "src/3rdparty"
361 (for-each delete-file-recursively
362 (list "double-conversion" "freetype" "harfbuzz-ng"
363 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
366 (build-system gnu-build-system)
369 ;; Use which the package, not the function
370 ("which" ,(@ (gnu packages base) which))))
372 `(("alsa-lib" ,alsa-lib)
375 ("double-conversion" ,double-conversion)
378 ("fontconfig" ,fontconfig)
379 ("freetype" ,freetype)
381 ("harfbuzz" ,harfbuzz)
383 ("libinput" ,libinput-minimal)
384 ("libjpeg" ,libjpeg-turbo)
388 ("libxcomposite" ,libxcomposite)
389 ("libxcursor" ,libxcursor)
390 ("libxfixes" ,libxfixes)
392 ("libxinerama" ,libxinerama)
393 ("libxkbcommon" ,libxkbcommon)
395 ("libxrandr" ,libxrandr)
396 ("libxrender" ,libxrender)
400 ("mariadb" ,mariadb "lib")
401 ("mariadb-dev" ,mariadb "dev")
405 ("postgresql" ,postgresql)
406 ("pulseaudio" ,pulseaudio)
408 ("unixodbc" ,unixodbc)
409 ("xcb-util" ,xcb-util)
410 ("xcb-util-image" ,xcb-util-image)
411 ("xcb-util-keysyms" ,xcb-util-keysyms)
412 ("xcb-util-renderutil" ,xcb-util-renderutil)
413 ("xcb-util-wm" ,xcb-util-wm)
414 ("xdg-utils" ,xdg-utils)
421 ("pkg-config" ,pkg-config)
423 ("vulkan-headers" ,vulkan-headers)
427 (modify-phases %standard-phases
428 (add-after 'configure 'patch-bin-sh
430 (substitute* '("config.status"
432 "mkspecs/features/qt_functions.prf"
433 "qmake/library/qmakebuiltins.cpp")
434 (("/bin/sh") (which "sh")))
436 (add-after 'configure 'patch-xdg-open
438 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
439 (("^.*const char \\*browsers.*$" all)
440 (string-append "*browser = QStringLiteral(\""
442 "\"); return true; \n" all)))
445 (lambda* (#:key outputs #:allow-other-keys)
446 (let ((out (assoc-ref outputs "out")))
447 (substitute* "configure"
448 (("/bin/pwd") (which "pwd")))
449 (substitute* "src/corelib/global/global.pri"
450 (("/bin/ls") (which "ls")))
451 ;; The configuration files for other Qt5 packages are searched
452 ;; through a call to "find_package" in Qt5Config.cmake, which
453 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
454 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
455 ;; components can be installed in different places.
456 (substitute* (find-files "." ".*\\.cmake")
457 (("NO_DEFAULT_PATH") ""))
458 ;; do not pass "--enable-fast-install", which makes the
459 ;; configure process fail
464 "-docdir" (string-append out "/share/doc/qt5")
465 "-headerdir" (string-append out "/include/qt5")
466 "-archdatadir" (string-append out "/lib/qt5")
467 "-datadir" (string-append out "/share/qt5")
468 "-examplesdir" (string-append
469 out "/share/doc/qt5/examples")
473 ;; These features require higher versions of Linux than the
474 ;; minimum version of the glibc. See
475 ;; src/corelib/global/minimum-linux_p.h. By disabling these
476 ;; features Qt5 applications can be used on the oldest
477 ;; kernels that the glibc supports, including the RHEL6
478 ;; (2.6.32) and RHEL7 (3.10) kernels.
479 "-no-feature-getentropy" ; requires Linux 3.17
480 "-no-feature-renameat2" ; requires Linux 3.16
482 ;; Do not build examples; if desired, these could go
483 ;; into a separate output, but for the time being, we
484 ;; prefer to save the space and build time.
485 "-no-compile-examples"
486 ;; Most "-system-..." are automatic, but some use
487 ;; the bundled copy by default.
491 ;; explicitly link with openssl instead of dlopening it
493 ;; explicitly link with dbus instead of dlopening it
495 ;; don't use the precompiled headers
497 ;; drop special machine instructions that do not have
499 ,@(if (string-prefix? "x86_64"
500 (or (%current-target-system)
506 (add-after 'install 'patch-mkspecs
507 (lambda* (#:key outputs #:allow-other-keys)
508 (let* ((out (assoc-ref outputs "out"))
509 (archdata (string-append out "/lib/qt5"))
510 (mkspecs (string-append archdata "/mkspecs"))
511 (qt_config.prf (string-append
512 mkspecs "/features/qt_config.prf")))
513 ;; For each Qt module, let `qmake' uses search paths in the
514 ;; module directory instead of all in QT_INSTALL_PREFIX.
515 (substitute* qt_config.prf
516 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
517 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
518 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
519 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
520 (("\\$\\$\\[QT_HOST_LIBS\\]")
521 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
522 (("\\$\\$\\[QT_INSTALL_BINS\\]")
523 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
525 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
526 (substitute* (string-append mkspecs "/features/qt_functions.prf")
527 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
528 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
530 ;; Resolve qmake spec files within qtbase by absolute paths.
533 (string-append mkspecs "/features/" file))
534 '("device_config.prf" "moc.prf" "qt_build_config.prf"
535 "qt_config.prf" "winrt/package_manifest.prf"))
536 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
537 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
539 (add-after 'patch-mkspecs 'patch-prl-files
540 (lambda* (#:key outputs #:allow-other-keys)
541 (let ((out (assoc-ref outputs "out")))
542 ;; Insert absolute references to the qtbase libraries because
543 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
544 ;; on context. See <https://bugs.gnu.org/38405>
545 (substitute* (find-files (string-append out "/lib") "\\.prl$")
546 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
547 (string-append out "/lib")))
549 (add-after 'unpack 'patch-paths
550 ;; Use the absolute paths for dynamically loaded libs, otherwise
551 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
553 (lambda* (#:key inputs #:allow-other-keys)
555 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
556 "cross-libc" "libc"))))
557 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
558 "src/network/kernel/qhostinfo_unix.cpp")
559 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
560 (string-append a glibc "/lib/lib" b))))
561 ;; X11/locale (compose path)
562 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
563 ;; Don't search in /usr/…/X11/locale, …
564 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
565 (string-append "// " line))
566 ;; … but use libx11's path
567 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
568 (string-append a "\"" (assoc-ref inputs "libx11") b)))
570 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
571 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
572 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
574 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
575 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
576 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
577 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
578 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
581 (list (search-path-specification
582 (variable "QMAKEPATH")
583 (files '("lib/qt5")))
584 (search-path-specification
585 (variable "QML2_IMPORT_PATH")
586 (files '("lib/qt5/qml")))
587 (search-path-specification
588 (variable "QT_PLUGIN_PATH")
589 (files '("lib/qt5/plugins")))
590 (search-path-specification
591 (variable "XDG_DATA_DIRS")
593 (search-path-specification
594 (variable "XDG_CONFIG_DIRS")
595 (files '("etc/xdg")))))
596 (home-page "https://www.qt.io/")
597 (synopsis "Cross-platform GUI library")
598 (description "Qt is a cross-platform application and UI framework for
599 developers using C++ or QML, a CSS & JavaScript like language.")
600 (license (list license:lgpl2.1 license:lgpl3))))
602 ;; qt used to refer to the monolithic Qt 5.x package
603 (define-deprecated qt qtbase)
606 (package (inherit qtbase)
611 (uri (string-append "https://download.qt.io/official_releases/qt/"
612 (version-major+minor version) "/" version
613 "/submodules/" name "-everywhere-src-"
617 "1f3vqv3s83gjillhgi0wghyf3825fgy1ffhvkxhdk673shb0kxjb"))))
618 (propagated-inputs `())
619 (native-inputs `(("perl" ,perl)))
626 (modify-phases %standard-phases
627 (add-before 'configure 'configure-qmake
628 (lambda* (#:key inputs outputs #:allow-other-keys)
629 (let* ((out (assoc-ref outputs "out"))
630 (qtbase (assoc-ref inputs "qtbase"))
631 (tmpdir (string-append (getenv "TMPDIR")))
632 (qmake (string-append tmpdir "/qmake"))
633 (qt.conf (string-append tmpdir "/qt.conf")))
634 ;; Use qmake with a customized qt.conf to override install
636 (symlink (which "qmake") qmake)
637 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
638 (with-output-to-file qt.conf
644 Documentation=share/doc/qt5
647 LibraryExecutables=lib/qt5/libexec
650 Plugins=lib/qt5/plugins
651 Imports=lib/qt5/imports
652 Qml2Imports=lib/qt5/qml
653 Translations=share/qt5/translations
655 Examples=share/doc/qt5/examples
661 [EffectiveSourcePaths]
667 (lambda* (#:key inputs outputs #:allow-other-keys)
668 ;; Valid QT_BUILD_PARTS variables are:
669 ;; libs tools tests examples demos docs translations
670 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
671 (add-before 'check 'set-display
673 ;; make Qt render "offscreen", required for tests
674 (setenv "QT_QPA_PLATFORM" "offscreen")
676 (synopsis "Qt module for displaying SVGs")
677 (description "The QtSvg module provides classes for displaying the
678 contents of SVG files.")))
680 (define-public qtimageformats
681 (package (inherit qtsvg)
682 (name "qtimageformats")
686 (uri (string-append "https://download.qt.io/official_releases/qt/"
687 (version-major+minor version) "/" version
688 "/submodules/" name "-everywhere-src-"
692 "02zpcbx71dz6xvga07dnzqwdfz9pjmy673n706fj8pxq9zi9xlcv"))
693 (modules '((guix build utils)))
696 (delete-file-recursively "src/3rdparty")
707 (synopsis "Additional Image Format plugins for Qt")
708 (description "The QtImageFormats module contains plugins for adding
709 support for MNG, TGA, TIFF and WBMP image formats.")))
711 (define-public qtx11extras
712 (package (inherit qtsvg)
717 (uri (string-append "https://download.qt.io/official_releases/qt/"
718 (version-major+minor version) "/" version
719 "/submodules/" name "-everywhere-src-"
723 "15hb90n47khsp3qnzyjd3mh8gi9qvy07dqdr4qspiww43r5mz293"))))
725 (substitute-keyword-arguments (package-arguments qtsvg)
726 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
727 (native-inputs `(("perl" ,perl)))
731 (synopsis "Qt Extras for X11")
732 (description "The QtX11Extras module includes the library to access X11
733 from within Qt 5.")))
735 (define-public qtxmlpatterns
736 (package (inherit qtsvg)
737 (name "qtxmlpatterns")
741 (uri (string-append "https://download.qt.io/official_releases/qt/"
742 (version-major+minor version) "/" version
743 "/submodules/" name "-everywhere-src-"
747 "0ys1kf0zdn8gak1ik9p7i7bdyfz2frvklcyz013s9wm1550h20lh"))))
749 (substitute-keyword-arguments (package-arguments qtsvg)
750 ((#:tests? _ #f) #f) ; TODO: Enable the tests
752 `(modify-phases ,phases
753 (add-after 'unpack 'disable-network-tests
754 (lambda _ (substitute* "tests/auto/auto.pro"
755 (("qxmlquery") "# qxmlquery")
756 (("xmlpatterns ") "# xmlpatterns"))
758 (native-inputs `(("perl" ,perl)
759 ("qtdeclarative" ,qtdeclarative)))
760 (inputs `(("qtbase" ,qtbase)))
761 (synopsis "Qt XML patterns module")
762 (description "The QtXmlPatterns module is a XQuery and XPath engine for
763 XML and custom data models. It contains programs such as xmlpatterns and
764 xmlpatternsvalidator.")))
766 (define-public qtdeclarative
767 (package (inherit qtsvg)
768 (name "qtdeclarative")
772 (uri (string-append "https://download.qt.io/official_releases/qt/"
773 (version-major+minor version) "/" version
774 "/submodules/" name "-everywhere-src-"
778 "1gg9xbv8ah4p55ws97brwn0csl0k3j1x6zdknrrsnh7j6nh0bp2w"))))
780 (substitute-keyword-arguments (package-arguments qtsvg)
781 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
784 ("pkg-config" ,pkg-config)
786 ("python-wrapper" ,python-wrapper)
791 (synopsis "Qt QML module (Quick 2)")
792 (description "The Qt QML module provides a framework for developing
793 applications and libraries with the QML language. It defines and implements the
794 language and engine infrastructure, and provides an API to enable application
795 developers to extend the QML language with custom types and integrate QML code
796 with JavaScript and C++.")))
798 (define-public qtconnectivity
799 (package (inherit qtsvg)
800 (name "qtconnectivity")
804 (uri (string-append "https://download.qt.io/official_releases/qt/"
805 (version-major+minor version) "/" version
806 "/submodules/" name "-everywhere-src-"
810 "06h71pd5w5prh722mcbgmx7l71xvh5xpjrlbg17yblx0n6wlhwb4"))))
813 ("pkg-config" ,pkg-config)
814 ("qtdeclarative" ,qtdeclarative)))
818 (synopsis "Qt Connectivity module")
819 (description "The Qt Connectivity modules provides modules for interacting
820 with Bluetooth and NFC.")))
822 (define-public qtwebsockets
823 (package (inherit qtsvg)
824 (name "qtwebsockets")
828 (uri (string-append "https://download.qt.io/official_releases/qt/"
829 (version-major+minor version) "/" version
830 "/submodules/" name "-everywhere-src-"
834 "05rv52pp5zg4g14zh7c6jc77l426056b8xyr40ps6cpmb0jkrlbg"))))
836 (substitute-keyword-arguments (package-arguments qtsvg)
837 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
840 ("qtdeclarative" ,qtdeclarative)))
841 (inputs `(("qtbase" ,qtbase)))
842 (synopsis "Qt Web Sockets module")
843 (description "WebSocket is a web-based protocol designed to enable two-way
844 communication between a client application and a remote host. The Qt
845 WebSockets module provides C++ and QML interfaces that enable Qt applications
846 to act as a server that can process WebSocket requests, or a client that can
847 consume data received from the server, or both.")))
849 (define-public qtsensors
850 (package (inherit qtsvg)
855 (uri (string-append "https://download.qt.io/official_releases/qt/"
856 (version-major+minor version) "/" version
857 "/submodules/" name "-everywhere-src-"
861 "0h77h34rn6cgy5qiqq163pj3bhbka1ydkfgjcx01ns1g9sgym6ib"))))
863 (substitute-keyword-arguments (package-arguments qtsvg)
864 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
866 `(modify-phases ,phases
867 (add-after 'unpack 'fix-tests
869 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
870 (("2000") "5000") ;lengthen test timeout
871 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
875 ("qtdeclarative" ,qtdeclarative)))
876 (inputs `(("qtbase" ,qtbase)))
877 (synopsis "Qt Sensors module")
878 (description "The Qt Sensors API provides access to sensor hardware via QML
879 and C++ interfaces. The Qt Sensors API also provides a motion gesture
880 recognition API for devices.")))
882 (define-public qtmultimedia
883 (package (inherit qtsvg)
884 (name "qtmultimedia")
888 (uri (string-append "https://download.qt.io/official_releases/qt/"
889 (version-major+minor version) "/" version
890 "/submodules/" name "-everywhere-src-"
894 "07fvnjywn3hkrxfbxasmy83jr6jq9lf1grasfwij54hz6y0smg98"))
895 (modules '((guix build utils)))
898 (delete-file-recursively
899 "examples/multimedia/spectrum/3rdparty")
900 ;; We also prevent the spectrum example from being built.
901 (substitute* "examples/multimedia/multimedia.pro"
905 (substitute-keyword-arguments (package-arguments qtsvg)
907 `(modify-phases ,phases
909 (lambda* (#:key outputs #:allow-other-keys)
910 (let ((out (assoc-ref outputs "out")))
911 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
912 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
913 (string-append "PREFIX=" out)))))))
914 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
917 ("pkg-config" ,pkg-config)
919 ("qtdeclarative" ,qtdeclarative)))
921 `(("alsa-lib" ,alsa-lib)
923 ("pulseaudio" ,pulseaudio)
925 ;; Gstreamer is needed for the mediaplayer plugin
926 ("gstreamer" ,gstreamer)
927 ("gst-plugins-base" ,gst-plugins-base)))
928 (synopsis "Qt Multimedia module")
929 (description "The Qt Multimedia module provides set of APIs to play and
930 record media, and manage a collection of media content. It also contains a
931 set of plugins for interacting with pulseaudio and GStreamer.")))
933 (define-public qtwayland
934 (package (inherit qtsvg)
939 (uri (string-append "https://download.qt.io/official_releases/qt/"
940 (version-major+minor version) "/" version
941 "/submodules/" name "-everywhere-src-"
945 "1ib61zh6jrab3yz592p47ldfgphi4i184kqf14vhwn31akibh6pw"))
946 (modules '((guix build utils)))
948 ;; The examples try to build and cause the build to fail
950 (delete-file-recursively "examples")
953 (substitute-keyword-arguments (package-arguments qtsvg)
955 `(modify-phases ,phases
956 (add-before 'check 'set-ld-library-path
957 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
959 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
960 ;; wayland platform plugin.
962 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
967 ("pkg-config" ,pkg-config)
968 ("qtdeclarative" ,qtdeclarative)))
970 `(("fontconfig" ,fontconfig)
971 ("freetype" ,freetype)
973 ("libxcomposite" ,libxcomposite)
975 ("libxkbcommon" ,libxkbcommon)
976 ("libxrender" ,libxrender)
980 ("wayland" ,wayland)))
981 (synopsis "Qt Wayland module")
982 (description "The Qt Wayland module provides the QtWayland client and
983 compositor libraries.")))
985 (define-public qtserialport
986 (package (inherit qtsvg)
987 (name "qtserialport")
991 (uri (string-append "https://download.qt.io/official_releases/qt/"
992 (version-major+minor version) "/" version
993 "/submodules/" name "-everywhere-src-"
997 "07vjv3p7n7n5v15wdpi8x5sbnvyjqdh85qfzf9mz8l6ppqp2hk12"))))
998 (native-inputs `(("perl" ,perl)))
1000 `(("qtbase" ,qtbase)
1003 (substitute-keyword-arguments (package-arguments qtsvg)
1005 `(modify-phases ,phases
1006 (add-after 'unpack 'patch-dlopen-paths
1007 (lambda* (#:key inputs #:allow-other-keys)
1008 (substitute* "src/serialport/qtudev_p.h"
1009 ;; Use the absolute paths for dynamically loaded libs,
1010 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1011 ;; typically is not set in guix.
1012 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1013 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1015 (synopsis "Qt Serial Port module")
1016 (description "The Qt Serial Port module provides the library for
1017 interacting with serial ports from within Qt.")))
1019 (define-public qtserialbus
1020 (package (inherit qtsvg)
1021 (name "qtserialbus")
1025 (uri (string-append "https://download.qt.io/official_releases/qt/"
1026 (version-major+minor version) "/" version
1027 "/submodules/" name "-everywhere-src-"
1031 "1bkyk1v7bcq657n88a6675lj55vl9y8v46h4kf27v58yjzgiw842"))))
1033 `(("qtbase" ,qtbase)
1034 ("qtserialport" ,qtserialport)))
1035 (synopsis "Qt Serial Bus module")
1036 (description "The Qt Serial Bus API provides classes and functions to
1037 access the various industrial serial buses and protocols, such as CAN, ModBus,
1040 (define-public qtwebchannel
1041 (package (inherit qtsvg)
1042 (name "qtwebchannel")
1046 (uri (string-append "https://download.qt.io/official_releases/qt/"
1047 (version-major+minor version) "/" version
1048 "/submodules/" name "-everywhere-src-"
1052 "0xff3fbbpcl0kkq0rg9npj127ycirygicbkxlf0v593sjpjp5bmh"))))
1055 ("qtdeclarative" ,qtdeclarative)
1056 ("qtwebsockets" ,qtwebsockets)))
1057 (inputs `(("qtbase" ,qtbase)))
1058 (synopsis "Web communication library for Qt")
1059 (description "The Qt WebChannel module enables peer-to-peer communication
1060 between the host (QML/C++ application) and the client (HTML/JavaScript
1061 application). The transport mechanism is supported out of the box by the two
1062 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1064 (define-public qtwebglplugin
1065 (package (inherit qtsvg)
1066 (name "qtwebglplugin")
1070 (uri (string-append "https://download.qt.io/official_releases/qt/"
1071 (version-major+minor version) "/" version
1072 "/submodules/" name "-everywhere-src-"
1076 "0fswnmhb8fm7wqgzv8cjy1j2sgb5mhx80jl411laawn7bf2ysjg0"))))
1078 (substitute-keyword-arguments (package-arguments qtsvg)
1080 `(modify-phases ,phases
1081 (add-after 'unpack 'disable-network-tests
1082 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1083 (("webgl") "# webgl"))
1089 ("qtdeclarative" ,qtdeclarative)
1090 ("qtwebsockets" ,qtwebsockets)))
1091 (synopsis "QPA plugin for running an application via a browser using
1092 streamed WebGL commands")
1093 (description "Qt back end that uses WebGL for rendering. It allows Qt
1094 applications (with some limitations) to run in a web browser that supports
1095 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1096 compatible web browser without the use of plug-ins. The API is similar to
1097 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1099 (define-public qtwebview
1100 (package (inherit qtsvg)
1105 (uri (string-append "https://download.qt.io/official_releases/qt/"
1106 (version-major+minor version) "/" version
1107 "/submodules/" name "-everywhere-src-"
1111 "1rvvkg6dl34hklllnlzlcffik746f15lzxdnwggc97dmx8n2vy6k"))))
1115 `(("qtbase" ,qtbase)
1116 ("qtdeclarative" ,qtdeclarative)))
1117 (synopsis "Display web content in a QML application")
1118 (description "Qt WebView provides a way to display web content in a QML
1119 application without necessarily including a full web browser stack by using
1120 native APIs where it makes sense.")))
1122 (define-public qtlocation
1123 (package (inherit qtsvg)
1128 (uri (string-append "https://download.qt.io/official_releases/qt/"
1129 (version-major+minor version) "/" version
1130 "/submodules/" name "-everywhere-src-"
1134 "07vq4aycayq2bg8yi4awidb25xyvws2ajbnrmad3rnpg1fw0bsfi"))))
1136 (substitute-keyword-arguments (package-arguments qtsvg)
1137 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1140 ("qtdeclarative" ,qtdeclarative)
1141 ("qtquickcontrols" ,qtquickcontrols)
1142 ("qtserialport" ,qtserialport)))
1145 ("openssl" ,openssl)
1148 (synopsis "Qt Location and Positioning modules")
1149 (description "The Qt Location module provides an interface for location,
1150 positioning and geolocation plugins.")))
1152 (define-public qttools
1153 (package (inherit qtsvg)
1158 (uri (string-append "https://download.qt.io/official_releases/qt/"
1159 (version-major+minor version) "/" version
1160 "/submodules/" name "-everywhere-src-"
1164 "0j1rl368sjknsmwp2f7bwqcb0sx13l3l4dxbm70873si9l8rf2l6"))))
1166 (substitute-keyword-arguments (package-arguments qtsvg)
1167 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1170 ("qtdeclarative" ,qtdeclarative)
1171 ("vulkan-headers" ,vulkan-headers)))
1174 ("qtbase" ,qtbase)))
1175 (synopsis "Qt Tools and Designer modules")
1176 (description "The Qt Tools module provides a set of applications to browse
1177 the documentation, translate applications, generate help files and other stuff
1178 that helps in Qt development.")))
1180 (define-public qtscript
1181 (package (inherit qtsvg)
1186 (uri (string-append "https://download.qt.io/official_releases/qt/"
1187 (version-major+minor version) "/" version
1188 "/submodules/" name "-everywhere-src-"
1192 "06a02230mj4bd8qvjaf2q97grzbj1c1rq36x7236fnhjsikbq7fa"))
1193 (patches (search-patches "qtscript-disable-tests.patch"))))
1196 ("qttools" ,qttools)))
1198 `(("qtbase" ,qtbase)))
1199 (synopsis "Qt Script module")
1200 (description "Qt provides support for application scripting with ECMAScript.
1201 The following guides and references cover aspects of programming with
1202 ECMAScript and Qt.")))
1204 (define-public qtquickcontrols
1205 (package (inherit qtsvg)
1206 (name "qtquickcontrols")
1210 (uri (string-append "https://download.qt.io/official_releases/qt/"
1211 (version-major+minor version) "/" version
1212 "/submodules/" name "-everywhere-src-"
1216 "1rar337vv0dx52r2gxwiwy1axn0fpy79rka09xizjlxsdg3vnf0h"))))
1218 (substitute-keyword-arguments (package-arguments qtsvg)
1219 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1221 `(("qtbase" ,qtbase)
1222 ("qtdeclarative" ,qtdeclarative)))
1223 (synopsis "Qt Quick Controls and other Quick modules")
1224 (description "The QtScript module provides classes for making Qt
1225 applications scriptable. This module provides a set of extra components that
1226 can be used to build complete interfaces in Qt Quick.")))
1228 (define-public qtquickcontrols2
1229 (package (inherit qtsvg)
1230 (name "qtquickcontrols2")
1234 (uri (string-append "https://download.qt.io/official_releases/qt/"
1235 (version-major+minor version) "/" version
1236 "/submodules/" name "-everywhere-src-"
1240 "0dx2jag6l5a80220fvmf49z1psliqf1ijqx6jsvvzv81mpjjd59s"))))
1242 (substitute-keyword-arguments (package-arguments qtsvg)
1243 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1245 `(("qtbase" ,qtbase)
1246 ("qtdeclarative" ,qtdeclarative)))
1247 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1248 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1249 module that provides platform integration: native dialogs, menus and menu bars,
1250 and tray icons. It falls back to Qt Widgets when a native implementation is
1253 (define-public qtgraphicaleffects
1254 (package (inherit qtsvg)
1255 (name "qtgraphicaleffects")
1259 (uri (string-append "https://download.qt.io/official_releases/qt/"
1260 (version-major+minor version) "/" version
1261 "/submodules/" name "-everywhere-src-"
1265 "1knapc14a80cn2f5bbfj7lhq9flr3v0gwjg9ka7xl8y642235w02"))))
1267 (substitute-keyword-arguments (package-arguments qtsvg)
1268 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1270 `(("qtbase" ,qtbase)
1271 ("qtdeclarative" ,qtdeclarative)))
1272 (synopsis "Qt Graphical Effects module")
1273 (description "The Qt Graphical Effects module provides a set of QML types
1274 for adding visually impressive and configurable effects to user interfaces.
1275 Effects are visual items that can be added to Qt Quick user interface as UI
1276 components. The API consists of over 20 effects provided as separate QML
1277 types. The effects cover functional areas such as blending, masking, blurring,
1278 coloring, and many more.")))
1280 (define-public qtgamepad
1281 (package (inherit qtsvg)
1286 (uri (string-append "https://download.qt.io/official_releases/qt/"
1287 (version-major+minor version) "/" version
1288 "/submodules/" name "-everywhere-src-"
1292 "150y7bc755l9y8w7nkg3gfw5n6rlj9hhq0ibc9g1xgllpr18qqq7"))))
1295 ("pkg-config" ,pkg-config)))
1297 `(("fontconfig" ,fontconfig)
1298 ("freetype" ,freetype)
1299 ("libxrender" ,libxrender)
1302 ("qtdeclarative" ,qtdeclarative)))
1303 (synopsis "Qt Gamepad module")
1304 (description "The Qt Gamepad module is an add-on library that enables Qt
1305 applications to support the use of gamepad hardware and in some cases remote
1306 control equipment. The module provides both QML and C++ interfaces. The
1307 primary target audience are embedded devices with fullscreen user interfaces,
1308 and mobile applications targeting TV-like form factors.")))
1310 (define-public qtscxml
1311 (package (inherit qtsvg)
1316 (uri (string-append "https://download.qt.io/official_releases/qt/"
1317 (version-major+minor version) "/" version
1318 "/submodules/" name "-everywhere-src-"
1322 "1dpvjkvwc3fj86vay8q8vzym73cix7ri2ianx87ck0gqjny51adg"))
1323 (modules '((guix build utils)))
1326 (delete-file-recursively "tests/3rdparty")
1327 ;; the scion test refers to the bundled 3rd party test code.
1328 (substitute* "tests/auto/auto.pro"
1332 `(("qtbase" ,qtbase)
1333 ("qtdeclarative" ,qtdeclarative)))
1334 (synopsis "Qt SCXML module")
1335 (description "The Qt SCXML module provides functionality to create state
1336 machines from SCXML files. This includes both dynamically creating state
1337 machines (loading the SCXML file and instantiating states and transitions) and
1338 generating a C++ file that has a class implementing the state machine. It
1339 also contains functionality to support data models and executable content.")))
1341 (define-public qtpurchasing
1342 (package (inherit qtsvg)
1343 (name "qtpurchasing")
1347 (uri (string-append "https://download.qt.io/official_releases/qt/"
1348 (version-major+minor version) "/" version
1349 "/submodules/" name "-everywhere-src-"
1353 "0xjsn7p629ni68vk4xlw2cvcs53ipcqv1pa4hck0nabddcgcnzkg"))))
1355 `(("qtbase" ,qtbase)
1356 ("qtdeclarative" ,qtdeclarative)))
1357 (synopsis "Qt Purchasing module")
1358 (description "The Qt Purchasing module provides and in-app API for
1359 purchasing goods and services.")))
1361 (define-public qtcanvas3d
1362 (package (inherit qtsvg)
1367 (uri (string-append "https://download.qt.io/official_releases/qt/"
1368 (version-major+minor version) "/" version
1369 "/submodules/" name "-everywhere-src-"
1373 "0l0c1p6jwz5rygyxslfw7jw3wbd23w5n9zg04aqlh5g15qx52fmn"))
1374 (modules '((guix build utils)))
1377 (delete-file-recursively "examples/canvas3d/3rdparty")
1380 (substitute-keyword-arguments (package-arguments qtsvg)
1381 ;; Building the tests depends on the bundled 3rd party javascript files,
1382 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1383 ;; fail, so we skip building them for now.
1385 `(modify-phases ,phases
1387 (lambda* (#:key outputs #:allow-other-keys)
1388 (let ((out (assoc-ref outputs "out")))
1389 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1390 (string-append "PREFIX=" out)))))))
1391 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1394 `(("qtbase" ,qtbase)
1395 ("qtdeclarative" ,qtdeclarative)))
1396 (synopsis "Qt Canvas 3D module")
1397 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1398 drawing calls from Qt Quick JavaScript.")))
1400 (define-public qtcharts
1401 (package (inherit qtsvg)
1406 (uri (string-append "https://download.qt.io/official_releases/qt/"
1407 (version-major+minor version) "/" version
1408 "/submodules/" name "-everywhere-src-"
1412 "0pyg2lpxmhf4amj57zihp5ry0y9m39xq5hbcx4hqj78bdm96ah23"))))
1414 (substitute-keyword-arguments (package-arguments qtsvg)
1415 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1417 `(("qtbase" ,qtbase)
1418 ("qtdeclarative" ,qtdeclarative)))
1419 (synopsis "Qt Charts module")
1420 (description "The Qt Charts module provides a set of easy to use chart
1421 components. It uses the Qt Graphics View Framework, therefore charts can be
1422 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1423 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1424 selecting one of the charts themes.")
1425 (license license:gpl3)))
1427 (define-public qtdatavis3d
1428 (package (inherit qtsvg)
1429 (name "qtdatavis3d")
1433 (uri (string-append "https://download.qt.io/official_releases/qt/"
1434 (version-major+minor version) "/" version
1435 "/submodules/" name "-everywhere-src-"
1439 "09wbv4g29sq5z2fphk2910albr3iv3l14nch3ml77w6drw9mgzq7"))))
1441 (substitute-keyword-arguments (package-arguments qtsvg)
1442 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1444 `(("qtbase" ,qtbase)
1445 ("qtdeclarative" ,qtdeclarative)))
1446 (synopsis "Qt Data Visualization module")
1447 (description "The Qt Data Visualization module provides a way to visualize
1448 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1449 visualizing depth maps and large quantities of rapidly changing data, such as
1450 data received from multiple sensors. The look and feel of graphs can be
1451 customized by using themes or by adding custom items and labels to them.")
1452 (license license:gpl3)))
1454 (define-public qtnetworkauth
1455 (package (inherit qtsvg)
1456 (name "qtnetworkauth")
1460 (uri (string-append "https://download.qt.io/official_releases/qt/"
1461 (version-major+minor version) "/" version
1462 "/submodules/" name "-everywhere-src-"
1466 "0sspni7zllhspk70yjj2d0li9r4rs3iflnksj8mvjx2yl9qpryyb"))))
1468 (substitute-keyword-arguments (package-arguments qtsvg)
1470 `(modify-phases ,phases
1471 (add-after 'unpack 'remove-failing-test
1473 ;; These tests can't find their test data.
1474 (substitute* "tests/auto/auto.pro"
1475 (("oauth1 ") "# oauth1 "))
1478 `(("qtbase" ,qtbase)))
1479 (synopsis "Qt Network Authorization module")
1480 (description "The Qt Network Authorization module provides an
1481 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1483 (define-public qtremoteobjects
1484 (package (inherit qtsvg)
1485 (name "qtremoteobjects")
1489 (uri (string-append "https://download.qt.io/official_releases/qt/"
1490 (version-major+minor version) "/" version
1491 "/submodules/" name "-everywhere-src-"
1495 "03qjj7l63wn1zqkmlja9yrnc38rf6b3apnmsn0kw0h61x72awskd"))))
1497 (substitute-keyword-arguments (package-arguments qtsvg)
1499 `(modify-phases ,phases
1500 (add-after 'unpack 'remove-failing-test
1502 ;; This test can't find its imports.
1503 (substitute* "tests/auto/qml/qml.pro"
1504 (("integration") "# integration")
1505 (("usertypes") "# usertypes"))
1508 `(("qtbase" ,qtbase)
1509 ("qtdeclarative" ,qtdeclarative)))
1510 (synopsis "Qt Remote Objects module")
1511 (description "The Qt Remote Objects module is an @dfn{inter-process
1512 communication} (IPC) module developed for Qt. The idea is to extend existing
1513 Qt's functionalities to enable an easy exchange of information between
1514 processes or computers.")))
1516 (define-public qtspeech
1517 (package (inherit qtsvg)
1522 (uri (string-append "https://download.qt.io/official_releases/qt/"
1523 (version-major+minor version) "/" version
1524 "/submodules/" name "-everywhere-src-"
1528 "0q30m9l28zsdzdmny7wjskd2fjfrgh1l595wir6bhwhil95g3i0c"))))
1531 (substitute-keyword-arguments (package-arguments qtsvg)
1532 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1534 `(("qtbase" ,qtbase)))
1537 ("qtdeclarative" ,qtdeclarative)
1538 ("qtmultimedia" ,qtmultimedia)
1539 ("qtxmlpatterns" ,qtxmlpatterns)))
1540 (synopsis "Qt Speech module")
1541 (description "The Qt Speech module enables a Qt application to support
1542 accessibility features such as text-to-speech, which is useful for end-users
1543 who are visually challenged or cannot access the application for whatever
1544 reason. The most common use case where text-to-speech comes in handy is when
1545 the end-user is driving and cannot attend the incoming messages on the phone.
1546 In such a scenario, the messaging application can read out the incoming
1549 (define-public qtwebengine
1552 (name "qtwebengine")
1553 (version (package-version qtbase))
1557 (uri (string-append "https://download.qt.io/official_releases/qt/"
1558 (version-major+minor version) "/" version
1559 "/submodules/" name "-everywhere-src-"
1563 "1yj6pcj945fpbc7nihav0plxpx8ikylmxjy7wqdv5znslgf59dw3"))
1564 (modules '((ice-9 ftw)
1568 (guix build utils)))
1571 (let ((preserved-third-party-files
1572 '("base/third_party/dmg_fp"
1573 "base/third_party/dynamic_annotations"
1574 "base/third_party/icu"
1575 "base/third_party/libevent"
1576 "base/third_party/nspr"
1577 "base/third_party/superfasthash"
1578 "base/third_party/symbolize"
1579 "base/third_party/xdg_mime"
1580 "base/third_party/xdg_user_dirs"
1581 "net/third_party/http2"
1582 "net/third_party/mozilla_security_manager"
1583 "net/third_party/nss"
1584 "net/third_party/spdy"
1585 "net/third_party/quic"
1586 "third_party/abseil-cpp"
1588 "third_party/angle/src/common/third_party/base"
1589 "third_party/angle/src/common/third_party/smhasher"
1590 "third_party/angle/src/third_party/compiler"
1592 "third_party/boringssl"
1593 "third_party/boringssl/src/third_party/fiat"
1594 "third_party/breakpad"
1595 "third_party/brotli"
1597 "third_party/crc32c"
1598 "third_party/ffmpeg"
1599 "third_party/googletest"
1600 "third_party/hunspell"
1601 "third_party/iccjpeg"
1603 "third_party/inspector_protocol"
1604 "third_party/jinja2"
1605 "third_party/jstemplate"
1606 "third_party/khronos"
1607 "third_party/leveldatabase"
1608 "third_party/libaddressinput"
1609 "third_party/libjingle_xmpp"
1610 "third_party/libpng"
1611 "third_party/libsrtp"
1612 "third_party/libsync"
1613 "third_party/libudev"
1614 "third_party/libvpx"
1615 "third_party/libwebm"
1616 "third_party/libwebp"
1617 "third_party/libxml"
1618 "third_party/libxslt"
1619 "third_party/libyuv"
1621 "third_party/markupsafe"
1623 "third_party/metrics_proto"
1624 "third_party/modp_b64"
1628 "third_party/polymer"
1629 "third_party/protobuf"
1630 "third_party/pyjson5"
1632 "third_party/rnnoise"
1634 "third_party/skia/third_party/gif"
1635 "third_party/skia/third_party/skcms"
1636 "third_party/smhasher"
1637 "third_party/snappy"
1638 "third_party/sqlite"
1639 "third_party/usrsctp"
1640 "third_party/web-animations-js"
1641 "third_party/webrtc"
1642 "third_party/webrtc_overrides"
1643 "third_party/widevine/cdm/widevine_cdm_common.h"
1644 "third_party/widevine/cdm/widevine_cdm_version.h"
1648 "url/third_party/mozilla"
1649 "v8/src/third_party/utf8-decoder"
1650 "v8/src/third_party/valgrind"
1651 "v8/third_party/antlr4"
1652 "v8/third_party/inspector_protocol"))
1653 (protected (make-regexp "\\.(gn|gyp)i?$")))
1654 (define preserved-club
1655 (map (lambda (member)
1656 (string-append "./" member))
1657 preserved-third-party-files))
1658 (define (empty? dir)
1659 (equal? (scandir dir) '("." "..")))
1660 (define (third-party? file)
1661 (string-contains file "third_party/"))
1662 (define (useless? file)
1663 (any (cute string-suffix? <> file)
1664 '(".zip" ".so" ".dll" ".exe" ".jar")))
1665 (define (parents child)
1666 ;; Return all parent directories of CHILD up to and including
1667 ;; the closest "third_party".
1668 (let* ((dirs (match (string-split child #\/)
1669 ((dirs ... last) dirs)))
1670 (closest (list-index (lambda (dir)
1671 (string=? "third_party" dir))
1673 (delim (- (length dirs) closest)))
1674 (fold (lambda (dir prev)
1675 (cons (string-append (car prev) "/" dir)
1677 (list (string-join (list-head dirs delim) "/"))
1678 (list-tail dirs delim))))
1679 (define (remove-loudly file)
1680 (format #t "deleting ~a...~%" file)
1683 (define (delete-unwanted-files child stat flag base level)
1685 ((or 'regular 'symlink 'stale-symlink)
1686 (when (third-party? child)
1687 (unless (or (member child preserved-club)
1688 (any (cute member <> preserved-club)
1690 (regexp-exec protected child))
1691 (remove-loudly child)))
1692 (when (and (useless? child) (file-exists? child))
1693 (remove-loudly child))
1695 ('directory-processed
1696 (when (empty? child)
1701 (with-directory-excursion "src/3rdparty"
1702 ;; TODO: Try removing "gn" too for future versions of qtwebengine.
1703 (delete-file-recursively "ninja")
1705 (with-directory-excursion "chromium"
1706 ;; Delete bundled software and binaries that were not explicitly
1708 (nftw "." delete-unwanted-files 'depth 'physical)
1710 ;; Assert that each preserved item is present to catch removals.
1711 (for-each (lambda (third-party)
1712 (unless (file-exists? third-party)
1713 (error (format #f "~s does not exist!~%" third-party))))
1716 ;; Use relative header locations instead of hard coded ones.
1718 "base/third_party/dynamic_annotations/dynamic_annotations.c"
1719 (("base/third_party/valgrind") "valgrind"))
1721 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
1722 (("third_party/curl") "curl"))
1724 ;; Replace Google Analytics bundle with an empty file and hope
1726 (mkdir-p "third_party/analytics")
1727 (call-with-output-file
1728 "third_party/analytics/google-analytics-bundle.js"
1732 ;; Do not enable support for loading the Widevine DRM plugin.
1733 (substitute* "src/core/config/common.pri"
1734 (("enable_widevine=true")
1735 "enable_widevine=false"))
1737 (build-system gnu-build-system)
1744 ("pkg-config" ,pkg-config)
1745 ("python-2" ,python-2)
1748 `(("alsa-lib" ,alsa-lib)
1750 ("cups-minimal" ,cups-minimal)
1754 ("fontconfig" ,fontconfig)
1755 ("harbuzz" ,harfbuzz)
1757 ("jsoncpp" ,jsoncpp)
1760 ("libevent" ,libevent)
1761 ("libgcrypt" ,libgcrypt)
1762 ("libjpeg" ,libjpeg-turbo)
1764 ;; FIXME: configure does not find system lcms
1766 ("libwebp" ,libwebp)
1769 ("libxcomposite" ,libxcomposite)
1770 ("libxcursor" ,libxcursor)
1772 ("libxkbcommon" ,libxkbcommon)
1773 ;; FIXME: libxml2 needs to built with icu support though it links to
1774 ;; libxml2 configure summary still states "Checking for compatible
1775 ;; system libxml2... no"
1776 ("libxml2" ,libxml2)
1777 ("libxrandr" ,libxrandr)
1778 ("libxrender" ,libxrender)
1779 ("libxslt" ,libxslt)
1780 ("libxtst" ,libxtst)
1782 ("minizip" ,minizip)
1785 ("pciutils" ,pciutils)
1786 ("protobuf" ,protobuf)
1787 ("pulseaudio" ,pulseaudio)
1789 ("qtdeclarative" ,qtdeclarative)
1790 ("qtmultimedia" ,qtmultimedia)
1791 ("qtwebchannel" ,qtwebchannel)
1795 ("valgrind" ,valgrind)
1796 ("xcb-util" ,xcb-util)))
1798 (substitute-keyword-arguments (package-arguments qtsvg)
1800 `(modify-phases ,phases
1801 (add-before 'configure 'substitute-source
1802 (lambda* (#:key inputs outputs #:allow-other-keys)
1803 (let ((out (assoc-ref outputs "out"))
1804 (nss (assoc-ref inputs "nss"))
1805 (udev (assoc-ref inputs "udev")))
1806 ;; Qtwebengine is not installed into the same prefix as
1807 ;; qtbase. Some qtbase QTLibraryInfo constants will not
1808 ;; work. Replace with the full path to the qtwebengine
1809 ;; translations and locales in the store.
1810 (substitute* "src/core/web_engine_library_info.cpp"
1811 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
1812 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
1813 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
1814 (string-append "QLatin1String(\"" out "/share/qt5\")")))
1815 ;; Substitute full dynamic library path for nss.
1816 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
1818 (string-append nss "/lib/nss/libnssckbi.so")))
1819 ;; Substitute full dynamic library path for udev.
1820 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
1822 (string-append udev "/lib/libudev.so.1")))
1824 (add-before 'configure 'set-env
1826 ;; Avoids potential race conditions.
1827 (setenv "PYTHONDONTWRITEBYTECODE" "1")
1828 (setenv "NINJAFLAGS"
1829 (string-append "-k1" ;less verbose build output
1830 ;; Respect the '--cores' option of 'guix build'.
1831 " -j" (number->string (parallel-job-count))))
1835 ;; Valid QT_BUILD_PARTS variables are:
1836 ;; libs tools tests examples demos docs translations
1837 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
1838 "--webengine-printing-and-pdf=no"
1839 "--webengine-ffmpeg=system"
1840 "--webengine-icu=system"
1841 "--webengine-pepper-plugins=no")))))
1842 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
1843 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
1844 ;; before running tests.
1845 ((#:tests? _ #f) #f)))
1846 (native-search-paths
1847 (list (search-path-specification
1848 (file-type 'regular)
1850 (variable "QTWEBENGINEPROCESS_PATH")
1851 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
1852 (home-page "https://wiki.qt.io/QtWebEngine")
1853 (synopsis "Qt WebEngine module")
1854 (description "The Qt5WebEngine module provides support for web applications
1855 using the Chromium browser project. The Chromium source code has Google services
1856 and binaries removed, and adds modular support for using system libraries.")
1857 (license license:lgpl2.1+)))
1859 (define-public python-sip
1866 (uri (string-append "https://www.riverbankcomputing.com/static/"
1867 "Downloads/sip/" version "/sip-" version ".tar.gz"))
1870 "07kyd56xgbb40ljb022rq82shgxprlbl0z27mpf1b6zd00w8dgf0"))))
1871 (build-system gnu-build-system)
1873 `(("python" ,python-wrapper)))
1875 `(#:tests? #f ; no check target
1876 #:modules ((srfi srfi-1)
1877 ,@%gnu-build-system-modules)
1879 (modify-phases %standard-phases
1881 (lambda* (#:key inputs outputs #:allow-other-keys)
1882 (let* ((out (assoc-ref outputs "out"))
1883 (bin (string-append out "/bin"))
1884 (include (string-append out "/include"))
1885 (python (assoc-ref inputs "python"))
1887 (last (string-split python #\-)))
1890 (take (string-split python-version #\.) 2)
1892 (lib (string-append out "/lib/python"
1895 (invoke "python" "configure.py"
1898 "--incdir" include)))))))
1899 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1900 (synopsis "Python binding creator for C and C++ libraries")
1902 "SIP is a tool to create Python bindings for C and C++ libraries. It
1903 was originally developed to create PyQt, the Python bindings for the Qt
1904 toolkit, but can be used to create bindings for any C or C++ library.
1906 SIP comprises a code generator and a Python module. The code generator
1907 processes a set of specification files and generates C or C++ code, which
1908 is then compiled to create the bindings extension module. The SIP Python
1909 module provides support functions to the automatically generated code.")
1910 ;; There is a choice between a python like license, gpl2 and gpl3.
1911 ;; For compatibility with pyqt, we need gpl3.
1912 (license license:gpl3)))
1914 (define-public python2-sip
1915 (package (inherit python-sip)
1916 (name "python2-sip")
1918 `(("python" ,python-2)))))
1920 (define-public python-pyqt
1922 (name "python-pyqt")
1927 (uri (string-append "https://www.riverbankcomputing.com/static/"
1928 "Downloads/PyQt5/" version "/PyQt5_gpl-"
1932 "041155bdzp57jy747p5d59740c55yy3241cy1x2lgcdsvqvzmc0d"))
1933 (patches (search-patches "pyqt-configure.patch"
1934 "pyqt-unbundled-qt.patch"
1935 "pyqt-public-sip.patch"))))
1936 (build-system gnu-build-system)
1938 `(("qtbase" ,qtbase))) ; for qmake
1940 `(("python-sip" ,python-sip)))
1942 `(("python" ,python-wrapper)
1944 ("qtconnectivity" ,qtconnectivity)
1945 ("qtdeclarative" ,qtdeclarative)
1946 ("qtlocation" ,qtlocation)
1947 ("qtmultimedia" ,qtmultimedia)
1948 ("qtsensors" ,qtsensors)
1949 ("qtserialport" ,qtserialport)
1951 ("qttools" ,qttools)
1952 ("qtwebchannel" ,qtwebchannel)
1953 ("qtwebkit" ,qtwebkit)
1954 ("qtwebsockets" ,qtwebsockets)
1955 ("qtx11extras" ,qtx11extras)
1956 ("qtxmlpatterns" ,qtxmlpatterns)))
1958 `(#:modules ((srfi srfi-1)
1959 ,@%gnu-build-system-modules)
1961 (modify-phases %standard-phases
1962 ;; When building python-pyqtwebengine, <qprinter.h> can not be
1963 ;; included. Here we substitute the full path to the header in the
1965 (add-before 'configure 'substitute-source
1966 (lambda* (#:key inputs #:allow-other-keys)
1967 (let* ((qtbase (assoc-ref inputs "qtbase"))
1968 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
1969 (substitute* "sip/QtPrintSupport/qprinter.sip"
1974 (lambda* (#:key inputs outputs #:allow-other-keys)
1975 (let* ((out (assoc-ref outputs "out"))
1976 (bin (string-append out "/bin"))
1977 (sip (string-append out "/share/sip"))
1978 (plugins (string-append out "/lib/qt5/plugins"))
1979 (designer (string-append plugins "/designer"))
1980 (qml (string-append plugins "/PyQt5"))
1981 (python (assoc-ref inputs "python"))
1983 (last (string-split python #\-)))
1986 (take (string-split python-version #\.) 2)
1988 (lib (string-append out "/lib/python"
1991 (stubs (string-append lib "/PyQt5")))
1992 (invoke "python" "configure.py"
1996 "--designer-plugindir" designer
1997 "--qml-plugindir" qml
1998 ; Where to install the PEP 484 Type Hints stub
1999 ; files. Without this the stubs are tried to be
2000 ; installed into the python package's
2001 ; site-package directory, which is read-only.
2003 "--sipdir" sip)))))))
2004 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
2005 (synopsis "Python bindings for Qt")
2007 "PyQt is a set of Python v2 and v3 bindings for the Qt application
2008 framework. The bindings are implemented as a set of Python modules and
2009 contain over 620 classes.")
2010 (license license:gpl3)))
2012 (define-public python-pyqtwebengine
2014 (name "python-pyqtwebengine")
2020 "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/"
2021 version "/PyQtWebEngine_gpl-" version ".tar.gz"))
2024 "0wylkd7fh2g27y3710rpxmj9wx0wpi3z7qbv6khiddm15rkh81w6"))))
2025 (build-system gnu-build-system)
2027 `(("python" ,python)
2028 ("python-sip" ,python-sip)
2029 ;; qtbase is required for qmake
2030 ("qtbase" ,qtbase)))
2032 `(("python" ,python-wrapper)
2033 ("python-sip" ,python-sip)
2034 ("python-pyqt" ,python-pyqt)
2037 ("qtdeclarative" ,qtdeclarative)
2038 ("qtwebchannel" ,qtwebchannel)
2039 ("python-pyqt" ,python-pyqt)
2040 ("qtwebengine" ,qtwebengine)))
2042 `(#:modules ((srfi srfi-1)
2043 ,@%gnu-build-system-modules)
2045 (modify-phases %standard-phases
2047 (lambda* (#:key inputs outputs #:allow-other-keys)
2048 (let* ((out (assoc-ref outputs "out"))
2049 (sipdir (string-append out "/share/sip"))
2050 (pyqt-sipdir (string-append
2051 (assoc-ref inputs "python-pyqt") "/share/sip"))
2052 (python (assoc-ref inputs "python"))
2054 (last (string-split python #\-)))
2057 (take (string-split python-version #\.) 2) "."))
2058 (lib (string-append out "/lib/python"
2060 "/site-packages/PyQt5"))
2061 (stubs (string-append lib "/PyQt5")))
2064 (invoke "python" "configure.py"
2071 "--pyqt-sipdir" pyqt-sipdir))))
2072 ;; Because this has a different prefix than python-pyqt then we need
2073 ;; to make this a namespace of it's own
2074 (add-after 'install 'make-namespace
2075 (lambda* (#:key inputs outputs #:allow-other-keys)
2076 (let* ((__init__.py (string-append
2077 (assoc-ref outputs "out")
2078 "/lib/python3.7/site-packages/PyQt5/__init__.py")))
2079 (with-output-to-file __init__.py
2080 (lambda _ (display "
2081 from pkgutil import extend_path
2082 __path__ = extend_path(__path__, __name__)
2085 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
2086 (synopsis "Python bindings for QtWebEngine")
2088 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
2089 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
2090 set of three modules. Prior to v5.12 these bindings were part of PyQt
2092 (license license:gpl3)))
2094 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
2095 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
2096 ;; packages that could be used together.
2097 (define-public python-pyqt-without-qtwebkit
2098 (package (inherit python-pyqt)
2099 (name "python-pyqt-without-qtwebkit")
2101 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
2103 (define-public python2-pyqt
2104 (package (inherit python-pyqt)
2105 (name "python2-pyqt")
2107 `(("python-sip" ,python2-sip)
2108 ("qtbase" ,qtbase)))
2110 `(("python" ,python-2)
2111 ("python2-enum34" ,python2-enum34)
2112 ,@(alist-delete "python" (package-inputs python-pyqt))))))
2114 (define-public python2-pyqt-4
2115 (package (inherit python-pyqt)
2116 (name "python2-pyqt")
2122 (string-append "mirror://sourceforge/pyqt/PyQt4/"
2123 "PyQt-" version "/PyQt4_gpl_x11-"
2127 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
2129 `(("python-sip" ,python2-sip)
2131 (inputs `(("python" ,python-2)))
2133 `(#:tests? #f ; no check target
2134 #:modules ((srfi srfi-1)
2135 ,@%gnu-build-system-modules)
2137 (modify-phases %standard-phases
2139 (lambda* (#:key inputs outputs #:allow-other-keys)
2140 (let* ((out (assoc-ref outputs "out"))
2141 (bin (string-append out "/bin"))
2142 (sip (string-append out "/share/sip"))
2143 (python (assoc-ref inputs "python"))
2145 (last (string-split python #\-)))
2148 (take (string-split python-version #\.) 2)
2150 (lib (string-append out "/lib/python"
2153 (invoke "python" "configure.py"
2157 "--sipdir" sip)))))))
2158 (license (list license:gpl2 license:gpl3)))) ; choice of either license
2160 (define-public qscintilla
2166 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
2167 "QScintilla-" version "/QScintilla_gpl-"
2171 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
2172 (build-system gnu-build-system)
2175 (modify-phases %standard-phases
2177 (lambda* (#:key outputs #:allow-other-keys)
2178 (let ((out (assoc-ref outputs "out")))
2180 (substitute* "qscintilla.pro"
2181 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
2182 (string-append out "/lib"))
2183 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
2184 (string-append out "/include"))
2185 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
2186 (string-append out "/translations"))
2187 (("\\$\\$\\[QT_INSTALL_DATA\\]")
2188 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
2189 (("\\$\\$\\[QT_HOST_DATA\\]")
2190 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
2191 (invoke "qmake")))))))
2192 (native-inputs `(("qtbase" ,qtbase)))
2193 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
2194 (synopsis "Qt port of the Scintilla C++ editor control")
2195 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2196 editor control. QScintilla includes features especially useful when editing
2197 and debugging source code. These include support for syntax styling, error
2198 indicators, code completion and call tips.")
2199 (license license:gpl3+)))
2201 (define-public python-qscintilla
2202 (package (inherit qscintilla)
2203 (name "python-qscintilla")
2206 (list "--pyqt=PyQt5"
2207 (string-append "--pyqt-sipdir="
2208 (assoc-ref %build-inputs "python-pyqt")
2210 (string-append "--qsci-incdir="
2211 (assoc-ref %build-inputs "qscintilla")
2213 (string-append "--qsci-libdir="
2214 (assoc-ref %build-inputs "qscintilla")
2217 (modify-phases %standard-phases
2219 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
2220 (let ((out (assoc-ref outputs "out"))
2221 (python (assoc-ref inputs "python")))
2223 (apply invoke "python3" "configure.py"
2225 ;; Install to the right directory
2226 (substitute* '("Makefile"
2228 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2229 (((string-append python "/lib"))
2230 (string-append out "/lib")))
2231 ;; And fix the installed.txt file
2232 (substitute* "installed.txt"
2233 (("/gnu/store/[^/]+") out)))
2236 `(("qscintilla" ,qscintilla)
2238 ("python-pyqt" ,python-pyqt)))
2239 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2240 editor control. QScintilla includes features especially useful when editing
2241 and debugging source code. These include support for syntax styling, error
2242 indicators, code completion and call tips.
2244 This package provides the Python bindings.")))
2246 ;; PyQt only looks for modules in its own directory. It ignores environment
2247 ;; variables such as PYTHONPATH, so we need to build a union package to make
2249 (define-public python-pyqt+qscintilla
2250 (package (inherit python-pyqt)
2251 (name "python-pyqt+qscintilla")
2253 (build-system trivial-build-system)
2255 '(#:modules ((guix build union))
2257 (use-modules (ice-9 match)
2259 (match %build-inputs
2260 (((names . directories) ...)
2261 (union-build (assoc-ref %outputs "out")
2265 `(("python-pyqt" ,python-pyqt)
2266 ("python-qscintilla" ,python-qscintilla)))
2267 (synopsis "Union of PyQt and the Qscintilla extension")
2269 "This package contains the union of PyQt and the Qscintilla extension.")))
2271 (define-public qtkeychain
2279 (url "https://github.com/frankosterfeld/qtkeychain/")
2280 (commit (string-append "v" version))))
2281 (file-name (git-file-name name version))
2284 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
2285 (build-system cmake-build-system)
2287 `(("pkg-config" ,pkg-config)
2288 ("qttools" ,qttools)))
2290 `(("qtbase" ,qtbase)))
2292 `(#:tests? #f ; No tests included
2294 (modify-phases %standard-phases
2295 (add-before 'configure 'set-qt-trans-dir
2297 (substitute* "CMakeLists.txt"
2298 (("\\$\\{qt_translations_dir\\}")
2299 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
2301 (home-page "https://github.com/frankosterfeld/qtkeychain")
2302 (synopsis "Qt API to store passwords")
2304 "QtKeychain is a Qt library to store passwords and other secret data
2305 securely. It will not store any data unencrypted unless explicitly requested.")
2306 (license license:bsd-3)))
2316 (string-append "mirror://sourceforge/qwt/qwt/"
2317 version "/qwt-" version ".tar.bz2"))
2319 (base32 "1navkcnmn0qz8kzsyqmk32d929zl72l0b580w1ica7z5559j2a8m"))))
2320 (build-system gnu-build-system)
2322 `(("qtbase" ,qtbase)
2324 ("qttools" ,qttools)))
2327 (modify-phases %standard-phases
2329 (lambda* (#:key outputs #:allow-other-keys)
2330 (let* ((out (assoc-ref outputs "out"))
2331 (docdir (string-append out "/share/doc/qwt"))
2332 (incdir (string-append out "/include/qwt"))
2333 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2334 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2335 (substitute* '("qwtconfig.pri")
2336 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2337 (format #f "~a = ~a\n" x out))
2338 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2339 (format #f "~a = ~a\n" x docdir))
2340 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2341 (format #f "~a = ~a\n" x incdir))
2342 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2343 (format #f "~a = ~a\n" x pluginsdir))
2344 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2345 (format #f "~a = ~a\n" x featuresdir)))
2346 (substitute* '("doc/doc.pro")
2347 ;; We'll install them in the 'install-man-pages' phase.
2348 (("^unix:doc\\.files.*") ""))
2350 (add-after 'install 'install-man-pages
2351 (lambda* (#:key outputs #:allow-other-keys)
2352 (let* ((out (assoc-ref outputs "out"))
2353 (man (string-append out "/share/man")))
2354 ;; Remove some incomplete manual pages.
2355 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2357 (copy-recursively "doc/man" man)
2359 (home-page "http://qwt.sourceforge.net")
2360 (synopsis "Qt widgets for plots, scales, dials and other technical software
2363 "The Qwt library contains widgets and components which are primarily useful
2364 for technical and scientific purposes. It includes a 2-D plotting widget,
2365 different kinds of sliders, and much more.")
2368 ;; The Qwt license is LGPL2.1 with some exceptions.
2369 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2370 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2371 license:lgpl2.1 license:gpl3))))
2373 (define-public qtwebkit
2376 (version "5.212.0-alpha3")
2380 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2381 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
2384 "05syvwi3jw9abwsc93rmjkna0vyh6bkfrsqhwir48ms54icfwzim"))
2385 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2386 (build-system cmake-build-system)
2389 ("python" ,python-2.7)
2394 ("pkg-config" ,pkg-config)))
2398 ("gst-plugins-base" ,gst-plugins-base)
2399 ("libjpeg" ,libjpeg-turbo)
2401 ("libwebp" ,libwebp)
2403 ("fontconfig" ,fontconfig)
2404 ("libxrender" ,libxrender)
2406 ("qtdeclarative" ,qtdeclarative)
2407 ("qtlocation" ,qtlocation)
2408 ("qtmultimedia" ,qtmultimedia)
2409 ("qtsensors" ,qtsensors)
2410 ("qtwebchannel" ,qtwebchannel)
2411 ("libxml2" ,libxml2)
2412 ("libxslt" ,libxslt)
2414 ("libxcomposite" ,libxcomposite)))
2416 `(#:tests? #f ; no apparent tests; it might be necessary to set
2417 ; ENABLE_API_TESTS, see CMakeLists.txt
2419 ;; Parallel builds fail due to a race condition:
2420 ;; <https://bugs.gnu.org/34062>.
2421 #:parallel-build? #f
2423 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2425 "-DUSE_LIBHYPHEN=OFF"
2426 "-DUSE_SYSTEM_MALLOC=ON"
2427 ;; XXX: relative dir installs to build dir?
2428 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2429 %output "/lib/qt5/mkspecs/modules")
2430 ;; Sacrifice a little speed in order to link
2431 ;; libraries and test executables in a
2432 ;; reasonable amount of memory.
2433 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2434 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2435 (home-page "https://www.webkit.org")
2436 (synopsis "Web browser engine and classes to render and interact with web
2438 (description "QtWebKit provides a Web browser engine that makes it easy to
2439 embed content from the World Wide Web into your Qt application. At the same
2440 time Web content can be enhanced with native controls.")
2441 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2442 ;; room for slower or busy hardware.
2443 (properties '((timeout . 64800))) ;18 hours
2445 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2446 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2447 ;; disable it on non-Intel platforms.
2448 (supported-systems '("x86_64-linux" "i686-linux"))
2450 (license license:lgpl2.1+)))
2452 (define-public dotherside
2460 (url "https://github.com/filcuc/DOtherSide")
2461 (commit (string-append "v" version))))
2462 (file-name (git-file-name name version))
2465 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
2466 (build-system cmake-build-system)
2468 `(("qttools" ,qttools)))
2470 `(("qtbase" ,qtbase)
2471 ("qtdeclarative" ,qtdeclarative)))
2472 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2473 (synopsis "C language library for creating bindings for the Qt QML language")
2475 "DOtherSide is a C language library for creating bindings for the
2476 QT QML language. The following features are implementable from
2479 @item Creating custom QObject
2480 @item Creating custom QAbstractListModels
2481 @item Creating custom properties, signals and slots
2482 @item Creating from QML QObject defined in the binded language
2483 @item Creating from Singleton QML QObject defined in the binded language
2485 (license license:lgpl3))) ;version 3 only (+ exception)
2487 ;; There have been no public releases yet.
2488 (define-public qtcolorwidgets
2489 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2492 (name "qtcolorwidgets")
2493 (version (git-version "0" revision commit))
2497 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2499 (file-name (git-file-name name version))
2502 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2503 (build-system cmake-build-system)
2504 (arguments `(#:tests? #f)) ; There are no tests
2506 `(("qttools" ,qttools)))
2508 `(("qtbase" ,qtbase)))
2509 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2510 (synopsis "Color management widgets")
2511 (description "QtColorWidgets provides a Qt color dialog that is more
2512 user-friendly than the default @code{QColorDialog} and several other
2513 color-related widgets.")
2514 ;; Includes a license exception for combining with GPL2 code.
2515 (license license:lgpl3+))))
2517 (define-public python-shiboken-2
2519 (name "python-shiboken-2")
2523 (uri (string-append "https://download.qt.io/official_releases"
2524 "/QtForPython/pyside2/PySide2-" version
2525 "-src/pyside-setup-everywhere-src-"
2529 "1n45l6xxyxs6cfp2l4rp8qs1c2fyfwyrdxa4qcpwfsqsi51rydsk"))))
2530 (build-system cmake-build-system)
2532 `(("clang-toolchain" ,clang-toolchain-6)
2533 ("libxml2" ,libxml2)
2534 ("libxslt" ,libxslt)
2535 ("python-wrapper" ,python-wrapper)
2537 ("qtxmlpatterns" ,qtxmlpatterns)))
2540 ;; FIXME: Building tests fails
2541 #:configure-flags '("-DBUILD_TESTS=off")
2543 (modify-phases %standard-phases
2544 (add-after 'unpack 'use-shiboken-dir-only
2545 (lambda _ (chdir "sources/shiboken2") #t))
2546 (add-before 'configure 'make-files-writable-and-update-timestamps
2548 ;; The build scripts need to modify some files in
2549 ;; the read-only source directory, and also attempts
2550 ;; to create Zip files which fails because the Zip
2551 ;; format does not support timestamps before 1980.
2552 (let ((circa-1980 (* 10 366 24 60 60)))
2553 (for-each (lambda (file)
2554 (make-file-writable file)
2555 (utime file circa-1980 circa-1980))
2558 (add-before 'configure 'set-build-env
2559 (lambda* (#:key inputs #:allow-other-keys)
2560 (let ((llvm (assoc-ref inputs "clang-toolchain")))
2561 (setenv "CLANG_INSTALL_DIR" llvm)
2563 (home-page "https://wiki.qt.io/Qt_for_Python")
2565 "Shiboken generates bindings for C++ libraries using CPython source code")
2567 "Shiboken generates bindings for C++ libraries using CPython source code")
2570 ;; The main code is GPL3 or LGPL3.
2571 ;; Examples are BSD-3.
2576 (define-public python-pyside-2
2578 (name "python-pyside-2")
2579 (version (package-version python-shiboken-2))
2580 (source (package-source python-shiboken-2))
2581 (build-system cmake-build-system)
2583 `(("libxml2" ,libxml2)
2584 ("libxslt" ,libxslt)
2585 ("clang-toolchain" ,clang-toolchain-6)
2587 ("qtdatavis3d" ,qtdatavis3d)
2588 ("qtlocation" ,qtlocation)
2589 ("qtmultimedia" ,qtmultimedia)
2590 ("qtquickcontrols" ,qtquickcontrols)
2591 ("qtscript" ,qtscript)
2592 ("qtscxml" ,qtscxml)
2593 ("qtsensors" ,qtsensors)
2594 ("qtspeech" ,qtspeech)
2596 ("qtwebchannel" ,qtwebchannel)
2597 ("qtwebsockets" ,qtwebsockets)
2598 ("qtx11extras" ,qtx11extras)
2599 ("qtxmlpatterns" ,qtxmlpatterns)))
2601 `(("cmake" ,cmake-minimal)
2602 ("python-shiboken-2" ,python-shiboken-2)
2603 ("python" ,python-wrapper)
2604 ("qttools" ,qttools)
2608 ;; FIXME: Building tests fail.
2610 (list "-DBUILD_TESTS=FALSE"
2611 (string-append "-DPYTHON_EXECUTABLE="
2612 (assoc-ref %build-inputs "python")
2615 (modify-phases %standard-phases
2616 (add-after 'unpack 'go-to-source-dir
2617 (lambda _ (chdir "sources/pyside2") #t))
2618 (add-before 'configure 'set-clang-dir
2619 (lambda* (#:key inputs #:allow-other-keys)
2620 (let ((clang (assoc-ref inputs "clang-toolchain")))
2621 (setenv "CLANG_INSTALL_DIR" clang)
2623 (home-page "https://wiki.qt.io/Qt_for_Python")
2625 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2627 "The Qt for Python product enables the use of Qt5 APIs in Python
2628 applications. It lets Python developers utilize the full potential of Qt,
2629 using the PySide2 module. The PySide2 module provides access to the
2630 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2631 comes with the Shiboken2 CPython binding code generator, which can be used to
2632 generate Python bindings for your C or C++ code.")
2636 ;; this file may be used under the terms of the GNU General
2637 ;; Public License version 2.0 or (at your option) the GNU
2638 ;; General Public license version 3 or any later version
2639 ;; approved by the KDE Free Qt Foundation.
2640 ;; Thus, it is currently v2 or v3, but no "+".
2644 (define-public python-pyside-2-tools
2646 (name "python-pyside-2-tools")
2647 (version (package-version python-shiboken-2))
2648 (source (package-source python-shiboken-2))
2649 (build-system cmake-build-system)
2651 `(("python-pyside-2" ,python-pyside-2)
2652 ("python-shiboken-2" ,python-shiboken-2)
2653 ("qtbase" ,qtbase)))
2655 `(("python" ,python-wrapper)))
2659 (list "-DBUILD_TESTS=off"
2660 (string-append "-DPYTHON_EXECUTABLE="
2661 (assoc-ref %build-inputs "python")
2663 #:phases (modify-phases %standard-phases
2664 (add-after 'unpack 'go-to-source-dir
2665 (lambda _ (chdir "sources/pyside2-tools") #t)))))
2666 (home-page "https://wiki.qt.io/Qt_for_Python")
2668 "Contains command line tools for PySide2")
2670 "Contains lupdate, rcc and uic tools for PySide2")
2671 (license license:gpl2)))