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)
209 ("sqlite" ,sqlite-with-column-metadata)
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 (modules '((guix build utils)))
357 ;; corelib uses bundled harfbuzz, md4, md5, sha3
359 (with-directory-excursion "src/3rdparty"
360 (for-each delete-file-recursively
361 (list "double-conversion" "freetype" "harfbuzz-ng"
362 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
365 (build-system gnu-build-system)
368 ;; Use which the package, not the function
369 ("which" ,(@ (gnu packages base) which))))
371 `(("alsa-lib" ,alsa-lib)
374 ("double-conversion" ,double-conversion)
377 ("fontconfig" ,fontconfig)
378 ("freetype" ,freetype)
380 ("harfbuzz" ,harfbuzz)
382 ("libinput" ,libinput-minimal)
387 ("libxcomposite" ,libxcomposite)
388 ("libxcursor" ,libxcursor)
389 ("libxfixes" ,libxfixes)
391 ("libxinerama" ,libxinerama)
392 ("libxkbcommon" ,libxkbcommon)
394 ("libxrandr" ,libxrandr)
395 ("libxrender" ,libxrender)
399 ("mariadb" ,mariadb "lib")
400 ("mariadb-dev" ,mariadb "dev")
404 ("postgresql" ,postgresql)
405 ("pulseaudio" ,pulseaudio)
406 ("sqlite" ,sqlite-with-column-metadata)
407 ("unixodbc" ,unixodbc)
408 ("xcb-util" ,xcb-util)
409 ("xcb-util-image" ,xcb-util-image)
410 ("xcb-util-keysyms" ,xcb-util-keysyms)
411 ("xcb-util-renderutil" ,xcb-util-renderutil)
412 ("xcb-util-wm" ,xcb-util-wm)
413 ("xdg-utils" ,xdg-utils)
420 ("pkg-config" ,pkg-config)
422 ("vulkan-headers" ,vulkan-headers)
426 (modify-phases %standard-phases
427 (add-after 'configure 'patch-bin-sh
429 (substitute* '("config.status"
431 "mkspecs/features/qt_functions.prf"
432 "qmake/library/qmakebuiltins.cpp")
433 (("/bin/sh") (which "sh")))
435 (add-after 'configure 'patch-xdg-open
437 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
438 (("^.*const char \\*browsers.*$" all)
439 (string-append "*browser = QStringLiteral(\""
441 "\"); return true; \n" all)))
444 (lambda* (#:key outputs #:allow-other-keys)
445 (let ((out (assoc-ref outputs "out")))
446 (substitute* "configure"
447 (("/bin/pwd") (which "pwd")))
448 (substitute* "src/corelib/global/global.pri"
449 (("/bin/ls") (which "ls")))
450 ;; The configuration files for other Qt5 packages are searched
451 ;; through a call to "find_package" in Qt5Config.cmake, which
452 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
453 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
454 ;; components can be installed in different places.
455 (substitute* (find-files "." ".*\\.cmake")
456 (("NO_DEFAULT_PATH") ""))
457 ;; do not pass "--enable-fast-install", which makes the
458 ;; configure process fail
463 "-docdir" (string-append out "/share/doc/qt5")
464 "-headerdir" (string-append out "/include/qt5")
465 "-archdatadir" (string-append out "/lib/qt5")
466 "-datadir" (string-append out "/share/qt5")
467 "-examplesdir" (string-append
468 out "/share/doc/qt5/examples")
472 ;; These features require higher versions of Linux than the
473 ;; minimum version of the glibc. See
474 ;; src/corelib/global/minimum-linux_p.h. By disabling these
475 ;; features Qt5 applications can be used on the oldest
476 ;; kernels that the glibc supports, including the RHEL6
477 ;; (2.6.32) and RHEL7 (3.10) kernels.
478 "-no-feature-getentropy" ; requires Linux 3.17
479 "-no-feature-renameat2" ; requires Linux 3.16
481 ;; Do not build examples; if desired, these could go
482 ;; into a separate output, but for the time being, we
483 ;; prefer to save the space and build time.
484 "-no-compile-examples"
485 ;; Most "-system-..." are automatic, but some use
486 ;; the bundled copy by default.
490 ;; explicitly link with openssl instead of dlopening it
492 ;; explicitly link with dbus instead of dlopening it
494 ;; don't use the precompiled headers
496 ;; drop special machine instructions that do not have
498 ,@(if (string-prefix? "x86_64"
499 (or (%current-target-system)
505 (add-after 'install 'patch-mkspecs
506 (lambda* (#:key outputs #:allow-other-keys)
507 (let* ((out (assoc-ref outputs "out"))
508 (archdata (string-append out "/lib/qt5"))
509 (mkspecs (string-append archdata "/mkspecs"))
510 (qt_config.prf (string-append
511 mkspecs "/features/qt_config.prf")))
512 ;; For each Qt module, let `qmake' uses search paths in the
513 ;; module directory instead of all in QT_INSTALL_PREFIX.
514 (substitute* qt_config.prf
515 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
516 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
517 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
518 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
519 (("\\$\\$\\[QT_HOST_LIBS\\]")
520 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
521 (("\\$\\$\\[QT_INSTALL_BINS\\]")
522 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
524 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
525 (substitute* (string-append mkspecs "/features/qt_functions.prf")
526 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
527 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
529 ;; Resolve qmake spec files within qtbase by absolute paths.
532 (string-append mkspecs "/features/" file))
533 '("device_config.prf" "moc.prf" "qt_build_config.prf"
534 "qt_config.prf" "winrt/package_manifest.prf"))
535 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
536 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
538 (add-after 'patch-mkspecs 'patch-prl-files
539 (lambda* (#:key outputs #:allow-other-keys)
540 (let ((out (assoc-ref outputs "out")))
541 ;; Insert absolute references to the qtbase libraries because
542 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
543 ;; on context. See <https://bugs.gnu.org/38405>
544 (substitute* (find-files (string-append out "/lib") "\\.prl$")
545 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
546 (string-append out "/lib")))
548 (add-after 'unpack 'patch-paths
549 ;; Use the absolute paths for dynamically loaded libs, otherwise
550 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
552 (lambda* (#:key inputs #:allow-other-keys)
554 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
555 "cross-libc" "libc"))))
556 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
557 "src/network/kernel/qhostinfo_unix.cpp")
558 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
559 (string-append a glibc "/lib/lib" b))))
560 ;; X11/locale (compose path)
561 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
562 ;; Don't search in /usr/…/X11/locale, …
563 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
564 (string-append "// " line))
565 ;; … but use libx11's path
566 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
567 (string-append a "\"" (assoc-ref inputs "libx11") b)))
569 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
570 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
571 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
573 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
574 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
575 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
576 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
577 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
580 (list (search-path-specification
581 (variable "QMAKEPATH")
582 (files '("lib/qt5")))
583 (search-path-specification
584 (variable "QML2_IMPORT_PATH")
585 (files '("lib/qt5/qml")))
586 (search-path-specification
587 (variable "QT_PLUGIN_PATH")
588 (files '("lib/qt5/plugins")))
589 (search-path-specification
590 (variable "XDG_DATA_DIRS")
592 (search-path-specification
593 (variable "XDG_CONFIG_DIRS")
594 (files '("etc/xdg")))))
595 (home-page "https://www.qt.io/")
596 (synopsis "Cross-platform GUI library")
597 (description "Qt is a cross-platform application and UI framework for
598 developers using C++ or QML, a CSS & JavaScript like language.")
599 (license (list license:lgpl2.1 license:lgpl3))))
602 ;; qt used to refer to the monolithic Qt 5.x package
603 (define-deprecated qt qtbase)
607 (package (inherit qtbase)
612 (uri (string-append "https://download.qt.io/official_releases/qt/"
613 (version-major+minor version) "/" version
614 "/submodules/" name "-everywhere-src-"
618 "1f3vqv3s83gjillhgi0wghyf3825fgy1ffhvkxhdk673shb0kxjb"))))
619 (propagated-inputs `())
620 (native-inputs `(("perl" ,perl)))
627 (modify-phases %standard-phases
628 (add-before 'configure 'configure-qmake
629 (lambda* (#:key inputs outputs #:allow-other-keys)
630 (let* ((out (assoc-ref outputs "out"))
631 (qtbase (assoc-ref inputs "qtbase"))
632 (tmpdir (string-append (getenv "TMPDIR")))
633 (qmake (string-append tmpdir "/qmake"))
634 (qt.conf (string-append tmpdir "/qt.conf")))
635 ;; Use qmake with a customized qt.conf to override install
637 (symlink (which "qmake") qmake)
638 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
639 (with-output-to-file qt.conf
645 Documentation=share/doc/qt5
648 LibraryExecutables=lib/qt5/libexec
651 Plugins=lib/qt5/plugins
652 Imports=lib/qt5/imports
653 Qml2Imports=lib/qt5/qml
654 Translations=share/qt5/translations
656 Examples=share/doc/qt5/examples
662 [EffectiveSourcePaths]
668 (lambda* (#:key inputs outputs #:allow-other-keys)
669 ;; Valid QT_BUILD_PARTS variables are:
670 ;; libs tools tests examples demos docs translations
671 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
672 (add-before 'check 'set-display
674 ;; make Qt render "offscreen", required for tests
675 (setenv "QT_QPA_PLATFORM" "offscreen")
677 (synopsis "Qt module for displaying SVGs")
678 (description "The QtSvg module provides classes for displaying the
679 contents of SVG files.")))
681 (define-public qtimageformats
682 (package (inherit qtsvg)
683 (name "qtimageformats")
687 (uri (string-append "https://download.qt.io/official_releases/qt/"
688 (version-major+minor version) "/" version
689 "/submodules/" name "-everywhere-src-"
693 "02zpcbx71dz6xvga07dnzqwdfz9pjmy673n706fj8pxq9zi9xlcv"))
694 (modules '((guix build utils)))
697 (delete-file-recursively "src/3rdparty")
708 (synopsis "Additional Image Format plugins for Qt")
709 (description "The QtImageFormats module contains plugins for adding
710 support for MNG, TGA, TIFF and WBMP image formats.")))
712 (define-public qtx11extras
713 (package (inherit qtsvg)
718 (uri (string-append "https://download.qt.io/official_releases/qt/"
719 (version-major+minor version) "/" version
720 "/submodules/" name "-everywhere-src-"
724 "15hb90n47khsp3qnzyjd3mh8gi9qvy07dqdr4qspiww43r5mz293"))))
726 (substitute-keyword-arguments (package-arguments qtsvg)
727 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
728 (native-inputs `(("perl" ,perl)))
732 (synopsis "Qt Extras for X11")
733 (description "The QtX11Extras module includes the library to access X11
734 from within Qt 5.")))
736 (define-public qtxmlpatterns
737 (package (inherit qtsvg)
738 (name "qtxmlpatterns")
742 (uri (string-append "https://download.qt.io/official_releases/qt/"
743 (version-major+minor version) "/" version
744 "/submodules/" name "-everywhere-src-"
748 "0ys1kf0zdn8gak1ik9p7i7bdyfz2frvklcyz013s9wm1550h20lh"))))
750 (substitute-keyword-arguments (package-arguments qtsvg)
751 ((#:tests? _ #f) #f) ; TODO: Enable the tests
753 `(modify-phases ,phases
754 (add-after 'unpack 'disable-network-tests
755 (lambda _ (substitute* "tests/auto/auto.pro"
756 (("qxmlquery") "# qxmlquery")
757 (("xmlpatterns ") "# xmlpatterns"))
759 (native-inputs `(("perl" ,perl)
760 ("qtdeclarative" ,qtdeclarative)))
761 (inputs `(("qtbase" ,qtbase)))
762 (synopsis "Qt XML patterns module")
763 (description "The QtXmlPatterns module is a XQuery and XPath engine for
764 XML and custom data models. It contains programs such as xmlpatterns and
765 xmlpatternsvalidator.")))
767 (define-public qtdeclarative
768 (package (inherit qtsvg)
769 (name "qtdeclarative")
773 (uri (string-append "https://download.qt.io/official_releases/qt/"
774 (version-major+minor version) "/" version
775 "/submodules/" name "-everywhere-src-"
779 "1gg9xbv8ah4p55ws97brwn0csl0k3j1x6zdknrrsnh7j6nh0bp2w"))))
781 (substitute-keyword-arguments (package-arguments qtsvg)
782 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
785 ("pkg-config" ,pkg-config)
787 ("python-wrapper" ,python-wrapper)
792 (synopsis "Qt QML module (Quick 2)")
793 (description "The Qt QML module provides a framework for developing
794 applications and libraries with the QML language. It defines and implements the
795 language and engine infrastructure, and provides an API to enable application
796 developers to extend the QML language with custom types and integrate QML code
797 with JavaScript and C++.")))
799 (define-public qtconnectivity
800 (package (inherit qtsvg)
801 (name "qtconnectivity")
805 (uri (string-append "https://download.qt.io/official_releases/qt/"
806 (version-major+minor version) "/" version
807 "/submodules/" name "-everywhere-src-"
811 "06h71pd5w5prh722mcbgmx7l71xvh5xpjrlbg17yblx0n6wlhwb4"))))
814 ("pkg-config" ,pkg-config)
815 ("qtdeclarative" ,qtdeclarative)))
819 (synopsis "Qt Connectivity module")
820 (description "The Qt Connectivity modules provides modules for interacting
821 with Bluetooth and NFC.")))
823 (define-public qtwebsockets
824 (package (inherit qtsvg)
825 (name "qtwebsockets")
829 (uri (string-append "https://download.qt.io/official_releases/qt/"
830 (version-major+minor version) "/" version
831 "/submodules/" name "-everywhere-src-"
835 "05rv52pp5zg4g14zh7c6jc77l426056b8xyr40ps6cpmb0jkrlbg"))))
837 (substitute-keyword-arguments (package-arguments qtsvg)
838 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
841 ("qtdeclarative" ,qtdeclarative)))
842 (inputs `(("qtbase" ,qtbase)))
843 (synopsis "Qt Web Sockets module")
844 (description "WebSocket is a web-based protocol designed to enable two-way
845 communication between a client application and a remote host. The Qt
846 WebSockets module provides C++ and QML interfaces that enable Qt applications
847 to act as a server that can process WebSocket requests, or a client that can
848 consume data received from the server, or both.")))
850 (define-public qtsensors
851 (package (inherit qtsvg)
856 (uri (string-append "https://download.qt.io/official_releases/qt/"
857 (version-major+minor version) "/" version
858 "/submodules/" name "-everywhere-src-"
862 "0h77h34rn6cgy5qiqq163pj3bhbka1ydkfgjcx01ns1g9sgym6ib"))))
864 (substitute-keyword-arguments (package-arguments qtsvg)
865 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
867 `(modify-phases ,phases
868 (add-after 'unpack 'fix-tests
870 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
871 (("2000") "5000") ;lengthen test timeout
872 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
876 ("qtdeclarative" ,qtdeclarative)))
877 (inputs `(("qtbase" ,qtbase)))
878 (synopsis "Qt Sensors module")
879 (description "The Qt Sensors API provides access to sensor hardware via QML
880 and C++ interfaces. The Qt Sensors API also provides a motion gesture
881 recognition API for devices.")))
883 (define-public qtmultimedia
884 (package (inherit qtsvg)
885 (name "qtmultimedia")
889 (uri (string-append "https://download.qt.io/official_releases/qt/"
890 (version-major+minor version) "/" version
891 "/submodules/" name "-everywhere-src-"
895 "07fvnjywn3hkrxfbxasmy83jr6jq9lf1grasfwij54hz6y0smg98"))
896 (modules '((guix build utils)))
899 (delete-file-recursively
900 "examples/multimedia/spectrum/3rdparty")
901 ;; We also prevent the spectrum example from being built.
902 (substitute* "examples/multimedia/multimedia.pro"
906 (substitute-keyword-arguments (package-arguments qtsvg)
908 `(modify-phases ,phases
910 (lambda* (#:key outputs #:allow-other-keys)
911 (let ((out (assoc-ref outputs "out")))
912 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
913 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
914 (string-append "PREFIX=" out)))))))
915 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
918 ("pkg-config" ,pkg-config)
920 ("qtdeclarative" ,qtdeclarative)))
922 `(("alsa-lib" ,alsa-lib)
924 ("pulseaudio" ,pulseaudio)
926 ;; Gstreamer is needed for the mediaplayer plugin
927 ("gstreamer" ,gstreamer)
928 ("gst-plugins-base" ,gst-plugins-base)))
929 (synopsis "Qt Multimedia module")
930 (description "The Qt Multimedia module provides set of APIs to play and
931 record media, and manage a collection of media content. It also contains a
932 set of plugins for interacting with pulseaudio and GStreamer.")))
934 (define-public qtwayland
935 (package (inherit qtsvg)
940 (uri (string-append "https://download.qt.io/official_releases/qt/"
941 (version-major+minor version) "/" version
942 "/submodules/" name "-everywhere-src-"
946 "1ib61zh6jrab3yz592p47ldfgphi4i184kqf14vhwn31akibh6pw"))
947 (modules '((guix build utils)))
949 ;; The examples try to build and cause the build to fail
951 (delete-file-recursively "examples")
954 (substitute-keyword-arguments (package-arguments qtsvg)
956 `(modify-phases ,phases
957 (add-before 'check 'set-ld-library-path
958 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
960 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
961 ;; wayland platform plugin.
963 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
968 ("pkg-config" ,pkg-config)
969 ("qtdeclarative" ,qtdeclarative)))
971 `(("fontconfig" ,fontconfig)
972 ("freetype" ,freetype)
974 ("libxcomposite" ,libxcomposite)
976 ("libxkbcommon" ,libxkbcommon)
977 ("libxrender" ,libxrender)
981 ("wayland" ,wayland)))
982 (synopsis "Qt Wayland module")
983 (description "The Qt Wayland module provides the QtWayland client and
984 compositor libraries.")))
986 (define-public qtserialport
987 (package (inherit qtsvg)
988 (name "qtserialport")
992 (uri (string-append "https://download.qt.io/official_releases/qt/"
993 (version-major+minor version) "/" version
994 "/submodules/" name "-everywhere-src-"
998 "07vjv3p7n7n5v15wdpi8x5sbnvyjqdh85qfzf9mz8l6ppqp2hk12"))))
999 (native-inputs `(("perl" ,perl)))
1001 `(("qtbase" ,qtbase)
1004 (substitute-keyword-arguments (package-arguments qtsvg)
1006 `(modify-phases ,phases
1007 (add-after 'unpack 'patch-dlopen-paths
1008 (lambda* (#:key inputs #:allow-other-keys)
1009 (substitute* "src/serialport/qtudev_p.h"
1010 ;; Use the absolute paths for dynamically loaded libs,
1011 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1012 ;; typically is not set in guix.
1013 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1014 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1016 (synopsis "Qt Serial Port module")
1017 (description "The Qt Serial Port module provides the library for
1018 interacting with serial ports from within Qt.")))
1020 (define-public qtserialbus
1021 (package (inherit qtsvg)
1022 (name "qtserialbus")
1026 (uri (string-append "https://download.qt.io/official_releases/qt/"
1027 (version-major+minor version) "/" version
1028 "/submodules/" name "-everywhere-src-"
1032 "1bkyk1v7bcq657n88a6675lj55vl9y8v46h4kf27v58yjzgiw842"))))
1034 `(("qtbase" ,qtbase)
1035 ("qtserialport" ,qtserialport)))
1036 (synopsis "Qt Serial Bus module")
1037 (description "The Qt Serial Bus API provides classes and functions to
1038 access the various industrial serial buses and protocols, such as CAN, ModBus,
1041 (define-public qtwebchannel
1042 (package (inherit qtsvg)
1043 (name "qtwebchannel")
1047 (uri (string-append "https://download.qt.io/official_releases/qt/"
1048 (version-major+minor version) "/" version
1049 "/submodules/" name "-everywhere-src-"
1053 "0xff3fbbpcl0kkq0rg9npj127ycirygicbkxlf0v593sjpjp5bmh"))))
1056 ("qtdeclarative" ,qtdeclarative)
1057 ("qtwebsockets" ,qtwebsockets)))
1058 (inputs `(("qtbase" ,qtbase)))
1059 (synopsis "Web communication library for Qt")
1060 (description "The Qt WebChannel module enables peer-to-peer communication
1061 between the host (QML/C++ application) and the client (HTML/JavaScript
1062 application). The transport mechanism is supported out of the box by the two
1063 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1065 (define-public qtwebglplugin
1066 (package (inherit qtsvg)
1067 (name "qtwebglplugin")
1071 (uri (string-append "https://download.qt.io/official_releases/qt/"
1072 (version-major+minor version) "/" version
1073 "/submodules/" name "-everywhere-src-"
1077 "0fswnmhb8fm7wqgzv8cjy1j2sgb5mhx80jl411laawn7bf2ysjg0"))))
1079 (substitute-keyword-arguments (package-arguments qtsvg)
1081 `(modify-phases ,phases
1082 (add-after 'unpack 'disable-network-tests
1083 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1084 (("webgl") "# webgl"))
1090 ("qtdeclarative" ,qtdeclarative)
1091 ("qtwebsockets" ,qtwebsockets)))
1092 (synopsis "QPA plugin for running an application via a browser using
1093 streamed WebGL commands")
1094 (description "Qt back end that uses WebGL for rendering. It allows Qt
1095 applications (with some limitations) to run in a web browser that supports
1096 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1097 compatible web browser without the use of plug-ins. The API is similar to
1098 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1100 (define-public qtwebview
1101 (package (inherit qtsvg)
1106 (uri (string-append "https://download.qt.io/official_releases/qt/"
1107 (version-major+minor version) "/" version
1108 "/submodules/" name "-everywhere-src-"
1112 "1rvvkg6dl34hklllnlzlcffik746f15lzxdnwggc97dmx8n2vy6k"))))
1116 `(("qtbase" ,qtbase)
1117 ("qtdeclarative" ,qtdeclarative)))
1118 (synopsis "Display web content in a QML application")
1119 (description "Qt WebView provides a way to display web content in a QML
1120 application without necessarily including a full web browser stack by using
1121 native APIs where it makes sense.")))
1123 (define-public qtlocation
1124 (package (inherit qtsvg)
1129 (uri (string-append "https://download.qt.io/official_releases/qt/"
1130 (version-major+minor version) "/" version
1131 "/submodules/" name "-everywhere-src-"
1135 "07vq4aycayq2bg8yi4awidb25xyvws2ajbnrmad3rnpg1fw0bsfi"))))
1137 (substitute-keyword-arguments (package-arguments qtsvg)
1138 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1141 ("qtdeclarative" ,qtdeclarative)
1142 ("qtquickcontrols" ,qtquickcontrols)
1143 ("qtserialport" ,qtserialport)))
1146 ("openssl" ,openssl)
1149 (synopsis "Qt Location and Positioning modules")
1150 (description "The Qt Location module provides an interface for location,
1151 positioning and geolocation plugins.")))
1153 (define-public qttools
1154 (package (inherit qtsvg)
1159 (uri (string-append "https://download.qt.io/official_releases/qt/"
1160 (version-major+minor version) "/" version
1161 "/submodules/" name "-everywhere-src-"
1165 "0j1rl368sjknsmwp2f7bwqcb0sx13l3l4dxbm70873si9l8rf2l6"))))
1167 (substitute-keyword-arguments (package-arguments qtsvg)
1168 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1171 ("qtdeclarative" ,qtdeclarative)
1172 ("vulkan-headers" ,vulkan-headers)))
1175 ("qtbase" ,qtbase)))
1176 (synopsis "Qt Tools and Designer modules")
1177 (description "The Qt Tools module provides a set of applications to browse
1178 the documentation, translate applications, generate help files and other stuff
1179 that helps in Qt development.")))
1181 (define-public qtscript
1182 (package (inherit qtsvg)
1187 (uri (string-append "https://download.qt.io/official_releases/qt/"
1188 (version-major+minor version) "/" version
1189 "/submodules/" name "-everywhere-src-"
1193 "06a02230mj4bd8qvjaf2q97grzbj1c1rq36x7236fnhjsikbq7fa"))
1194 (patches (search-patches "qtscript-disable-tests.patch"))))
1197 ("qttools" ,qttools)))
1199 `(("qtbase" ,qtbase)))
1200 (synopsis "Qt Script module")
1201 (description "Qt provides support for application scripting with ECMAScript.
1202 The following guides and references cover aspects of programming with
1203 ECMAScript and Qt.")))
1205 (define-public qtquickcontrols
1206 (package (inherit qtsvg)
1207 (name "qtquickcontrols")
1211 (uri (string-append "https://download.qt.io/official_releases/qt/"
1212 (version-major+minor version) "/" version
1213 "/submodules/" name "-everywhere-src-"
1217 "1rar337vv0dx52r2gxwiwy1axn0fpy79rka09xizjlxsdg3vnf0h"))))
1219 (substitute-keyword-arguments (package-arguments qtsvg)
1220 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1222 `(("qtbase" ,qtbase)
1223 ("qtdeclarative" ,qtdeclarative)))
1224 (synopsis "Qt Quick Controls and other Quick modules")
1225 (description "The QtScript module provides classes for making Qt
1226 applications scriptable. This module provides a set of extra components that
1227 can be used to build complete interfaces in Qt Quick.")))
1229 (define-public qtquickcontrols2
1230 (package (inherit qtsvg)
1231 (name "qtquickcontrols2")
1235 (uri (string-append "https://download.qt.io/official_releases/qt/"
1236 (version-major+minor version) "/" version
1237 "/submodules/" name "-everywhere-src-"
1241 "0dx2jag6l5a80220fvmf49z1psliqf1ijqx6jsvvzv81mpjjd59s"))))
1243 (substitute-keyword-arguments (package-arguments qtsvg)
1244 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1246 `(("qtbase" ,qtbase)
1247 ("qtdeclarative" ,qtdeclarative)))
1248 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1249 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1250 module that provides platform integration: native dialogs, menus and menu bars,
1251 and tray icons. It falls back to Qt Widgets when a native implementation is
1254 (define-public qtgraphicaleffects
1255 (package (inherit qtsvg)
1256 (name "qtgraphicaleffects")
1260 (uri (string-append "https://download.qt.io/official_releases/qt/"
1261 (version-major+minor version) "/" version
1262 "/submodules/" name "-everywhere-src-"
1266 "1knapc14a80cn2f5bbfj7lhq9flr3v0gwjg9ka7xl8y642235w02"))))
1268 (substitute-keyword-arguments (package-arguments qtsvg)
1269 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1271 `(("qtbase" ,qtbase)
1272 ("qtdeclarative" ,qtdeclarative)))
1273 (synopsis "Qt Graphical Effects module")
1274 (description "The Qt Graphical Effects module provides a set of QML types
1275 for adding visually impressive and configurable effects to user interfaces.
1276 Effects are visual items that can be added to Qt Quick user interface as UI
1277 components. The API consists of over 20 effects provided as separate QML
1278 types. The effects cover functional areas such as blending, masking, blurring,
1279 coloring, and many more.")))
1281 (define-public qtgamepad
1282 (package (inherit qtsvg)
1287 (uri (string-append "https://download.qt.io/official_releases/qt/"
1288 (version-major+minor version) "/" version
1289 "/submodules/" name "-everywhere-src-"
1293 "150y7bc755l9y8w7nkg3gfw5n6rlj9hhq0ibc9g1xgllpr18qqq7"))))
1296 ("pkg-config" ,pkg-config)))
1298 `(("fontconfig" ,fontconfig)
1299 ("freetype" ,freetype)
1300 ("libxrender" ,libxrender)
1303 ("qtdeclarative" ,qtdeclarative)))
1304 (synopsis "Qt Gamepad module")
1305 (description "The Qt Gamepad module is an add-on library that enables Qt
1306 applications to support the use of gamepad hardware and in some cases remote
1307 control equipment. The module provides both QML and C++ interfaces. The
1308 primary target audience are embedded devices with fullscreen user interfaces,
1309 and mobile applications targeting TV-like form factors.")))
1311 (define-public qtscxml
1312 (package (inherit qtsvg)
1317 (uri (string-append "https://download.qt.io/official_releases/qt/"
1318 (version-major+minor version) "/" version
1319 "/submodules/" name "-everywhere-src-"
1323 "1dpvjkvwc3fj86vay8q8vzym73cix7ri2ianx87ck0gqjny51adg"))
1324 (modules '((guix build utils)))
1327 (delete-file-recursively "tests/3rdparty")
1328 ;; the scion test refers to the bundled 3rd party test code.
1329 (substitute* "tests/auto/auto.pro"
1333 `(("qtbase" ,qtbase)
1334 ("qtdeclarative" ,qtdeclarative)))
1335 (synopsis "Qt SCXML module")
1336 (description "The Qt SCXML module provides functionality to create state
1337 machines from SCXML files. This includes both dynamically creating state
1338 machines (loading the SCXML file and instantiating states and transitions) and
1339 generating a C++ file that has a class implementing the state machine. It
1340 also contains functionality to support data models and executable content.")))
1342 (define-public qtpurchasing
1343 (package (inherit qtsvg)
1344 (name "qtpurchasing")
1348 (uri (string-append "https://download.qt.io/official_releases/qt/"
1349 (version-major+minor version) "/" version
1350 "/submodules/" name "-everywhere-src-"
1354 "0xjsn7p629ni68vk4xlw2cvcs53ipcqv1pa4hck0nabddcgcnzkg"))))
1356 `(("qtbase" ,qtbase)
1357 ("qtdeclarative" ,qtdeclarative)))
1358 (synopsis "Qt Purchasing module")
1359 (description "The Qt Purchasing module provides and in-app API for
1360 purchasing goods and services.")))
1362 (define-public qtcanvas3d
1363 (package (inherit qtsvg)
1368 (uri (string-append "https://download.qt.io/official_releases/qt/"
1369 (version-major+minor version) "/" version
1370 "/submodules/" name "-everywhere-src-"
1374 "0l0c1p6jwz5rygyxslfw7jw3wbd23w5n9zg04aqlh5g15qx52fmn"))
1375 (modules '((guix build utils)))
1378 (delete-file-recursively "examples/canvas3d/3rdparty")
1381 (substitute-keyword-arguments (package-arguments qtsvg)
1382 ;; Building the tests depends on the bundled 3rd party javascript files,
1383 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1384 ;; fail, so we skip building them for now.
1386 `(modify-phases ,phases
1388 (lambda* (#:key outputs #:allow-other-keys)
1389 (let ((out (assoc-ref outputs "out")))
1390 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1391 (string-append "PREFIX=" out)))))))
1392 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1395 `(("qtbase" ,qtbase)
1396 ("qtdeclarative" ,qtdeclarative)))
1397 (synopsis "Qt Canvas 3D module")
1398 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1399 drawing calls from Qt Quick JavaScript.")))
1401 (define-public qtcharts
1402 (package (inherit qtsvg)
1407 (uri (string-append "https://download.qt.io/official_releases/qt/"
1408 (version-major+minor version) "/" version
1409 "/submodules/" name "-everywhere-src-"
1413 "0pyg2lpxmhf4amj57zihp5ry0y9m39xq5hbcx4hqj78bdm96ah23"))))
1415 (substitute-keyword-arguments (package-arguments qtsvg)
1416 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1418 `(("qtbase" ,qtbase)
1419 ("qtdeclarative" ,qtdeclarative)))
1420 (synopsis "Qt Charts module")
1421 (description "The Qt Charts module provides a set of easy to use chart
1422 components. It uses the Qt Graphics View Framework, therefore charts can be
1423 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1424 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1425 selecting one of the charts themes.")
1426 (license license:gpl3)))
1428 (define-public qtdatavis3d
1429 (package (inherit qtsvg)
1430 (name "qtdatavis3d")
1434 (uri (string-append "https://download.qt.io/official_releases/qt/"
1435 (version-major+minor version) "/" version
1436 "/submodules/" name "-everywhere-src-"
1440 "09wbv4g29sq5z2fphk2910albr3iv3l14nch3ml77w6drw9mgzq7"))))
1442 (substitute-keyword-arguments (package-arguments qtsvg)
1443 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1445 `(("qtbase" ,qtbase)
1446 ("qtdeclarative" ,qtdeclarative)))
1447 (synopsis "Qt Data Visualization module")
1448 (description "The Qt Data Visualization module provides a way to visualize
1449 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1450 visualizing depth maps and large quantities of rapidly changing data, such as
1451 data received from multiple sensors. The look and feel of graphs can be
1452 customized by using themes or by adding custom items and labels to them.")
1453 (license license:gpl3)))
1455 (define-public qtnetworkauth
1456 (package (inherit qtsvg)
1457 (name "qtnetworkauth")
1461 (uri (string-append "https://download.qt.io/official_releases/qt/"
1462 (version-major+minor version) "/" version
1463 "/submodules/" name "-everywhere-src-"
1467 "0sspni7zllhspk70yjj2d0li9r4rs3iflnksj8mvjx2yl9qpryyb"))))
1469 (substitute-keyword-arguments (package-arguments qtsvg)
1471 `(modify-phases ,phases
1472 (add-after 'unpack 'remove-failing-test
1474 ;; These tests can't find their test data.
1475 (substitute* "tests/auto/auto.pro"
1476 (("oauth1 ") "# oauth1 "))
1479 `(("qtbase" ,qtbase)))
1480 (synopsis "Qt Network Authorization module")
1481 (description "The Qt Network Authorization module provides an
1482 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1484 (define-public qtremoteobjects
1485 (package (inherit qtsvg)
1486 (name "qtremoteobjects")
1490 (uri (string-append "https://download.qt.io/official_releases/qt/"
1491 (version-major+minor version) "/" version
1492 "/submodules/" name "-everywhere-src-"
1496 "03qjj7l63wn1zqkmlja9yrnc38rf6b3apnmsn0kw0h61x72awskd"))))
1498 (substitute-keyword-arguments (package-arguments qtsvg)
1500 `(modify-phases ,phases
1501 (add-after 'unpack 'remove-failing-test
1503 ;; This test can't find its imports.
1504 (substitute* "tests/auto/qml/qml.pro"
1505 (("integration") "# integration")
1506 (("usertypes") "# usertypes"))
1509 `(("qtbase" ,qtbase)
1510 ("qtdeclarative" ,qtdeclarative)))
1511 (synopsis "Qt Remote Objects module")
1512 (description "The Qt Remote Objects module is an @dfn{inter-process
1513 communication} (IPC) module developed for Qt. The idea is to extend existing
1514 Qt's functionalities to enable an easy exchange of information between
1515 processes or computers.")))
1517 (define-public qtspeech
1518 (package (inherit qtsvg)
1523 (uri (string-append "https://download.qt.io/official_releases/qt/"
1524 (version-major+minor version) "/" version
1525 "/submodules/" name "-everywhere-src-"
1529 "0q30m9l28zsdzdmny7wjskd2fjfrgh1l595wir6bhwhil95g3i0c"))))
1532 (substitute-keyword-arguments (package-arguments qtsvg)
1533 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1535 `(("qtbase" ,qtbase)))
1538 ("qtdeclarative" ,qtdeclarative)
1539 ("qtmultimedia" ,qtmultimedia)
1540 ("qtxmlpatterns" ,qtxmlpatterns)))
1541 (synopsis "Qt Speech module")
1542 (description "The Qt Speech module enables a Qt application to support
1543 accessibility features such as text-to-speech, which is useful for end-users
1544 who are visually challenged or cannot access the application for whatever
1545 reason. The most common use case where text-to-speech comes in handy is when
1546 the end-user is driving and cannot attend the incoming messages on the phone.
1547 In such a scenario, the messaging application can read out the incoming
1550 (define-public qtwebengine
1553 (name "qtwebengine")
1554 (version (package-version qtbase))
1558 (uri (string-append "https://download.qt.io/official_releases/qt/"
1559 (version-major+minor version) "/" version
1560 "/submodules/" name "-everywhere-src-"
1564 "1yj6pcj945fpbc7nihav0plxpx8ikylmxjy7wqdv5znslgf59dw3"))
1565 (modules '((ice-9 ftw)
1569 (guix build utils)))
1572 (let ((preserved-third-party-files
1573 '("base/third_party/dmg_fp"
1574 "base/third_party/dynamic_annotations"
1575 "base/third_party/icu"
1576 "base/third_party/libevent"
1577 "base/third_party/nspr"
1578 "base/third_party/superfasthash"
1579 "base/third_party/symbolize"
1580 "base/third_party/xdg_mime"
1581 "base/third_party/xdg_user_dirs"
1582 "net/third_party/http2"
1583 "net/third_party/mozilla_security_manager"
1584 "net/third_party/nss"
1585 "net/third_party/spdy"
1586 "net/third_party/quic"
1587 "third_party/abseil-cpp"
1589 "third_party/angle/src/common/third_party/base"
1590 "third_party/angle/src/common/third_party/smhasher"
1591 "third_party/angle/src/third_party/compiler"
1593 "third_party/boringssl"
1594 "third_party/boringssl/src/third_party/fiat"
1595 "third_party/breakpad"
1596 "third_party/brotli"
1598 "third_party/crc32c"
1599 "third_party/ffmpeg"
1600 "third_party/googletest"
1601 "third_party/hunspell"
1602 "third_party/iccjpeg"
1604 "third_party/inspector_protocol"
1605 "third_party/jinja2"
1606 "third_party/jstemplate"
1607 "third_party/khronos"
1608 "third_party/leveldatabase"
1609 "third_party/libaddressinput"
1610 "third_party/libjingle_xmpp"
1611 "third_party/libpng"
1612 "third_party/libsrtp"
1613 "third_party/libsync"
1614 "third_party/libudev"
1615 "third_party/libvpx"
1616 "third_party/libwebm"
1617 "third_party/libwebp"
1618 "third_party/libxml"
1619 "third_party/libxslt"
1620 "third_party/libyuv"
1622 "third_party/markupsafe"
1624 "third_party/metrics_proto"
1625 "third_party/modp_b64"
1629 "third_party/polymer"
1630 "third_party/protobuf"
1631 "third_party/pyjson5"
1633 "third_party/rnnoise"
1635 "third_party/skia/third_party/gif"
1636 "third_party/skia/third_party/skcms"
1637 "third_party/smhasher"
1638 "third_party/snappy"
1639 "third_party/sqlite"
1640 "third_party/usrsctp"
1641 "third_party/web-animations-js"
1642 "third_party/webrtc"
1643 "third_party/webrtc_overrides"
1644 "third_party/widevine/cdm/widevine_cdm_common.h"
1645 "third_party/widevine/cdm/widevine_cdm_version.h"
1649 "url/third_party/mozilla"
1650 "v8/src/third_party/utf8-decoder"
1651 "v8/src/third_party/valgrind"
1652 "v8/third_party/antlr4"
1653 "v8/third_party/inspector_protocol"))
1654 (protected (make-regexp "\\.(gn|gyp)i?$")))
1655 (define preserved-club
1656 (map (lambda (member)
1657 (string-append "./" member))
1658 preserved-third-party-files))
1659 (define (empty? dir)
1660 (equal? (scandir dir) '("." "..")))
1661 (define (third-party? file)
1662 (string-contains file "third_party/"))
1663 (define (useless? file)
1664 (any (cute string-suffix? <> file)
1665 '(".zip" ".so" ".dll" ".exe" ".jar")))
1666 (define (parents child)
1667 ;; Return all parent directories of CHILD up to and including
1668 ;; the closest "third_party".
1669 (let* ((dirs (match (string-split child #\/)
1670 ((dirs ... last) dirs)))
1671 (closest (list-index (lambda (dir)
1672 (string=? "third_party" dir))
1674 (delim (- (length dirs) closest)))
1675 (fold (lambda (dir prev)
1676 (cons (string-append (car prev) "/" dir)
1678 (list (string-join (list-head dirs delim) "/"))
1679 (list-tail dirs delim))))
1680 (define (remove-loudly file)
1681 (format #t "deleting ~a...~%" file)
1684 (define (delete-unwanted-files child stat flag base level)
1686 ((or 'regular 'symlink 'stale-symlink)
1687 (when (third-party? child)
1688 (unless (or (member child preserved-club)
1689 (any (cute member <> preserved-club)
1691 (regexp-exec protected child))
1692 (remove-loudly child)))
1693 (when (and (useless? child) (file-exists? child))
1694 (remove-loudly child))
1696 ('directory-processed
1697 (when (empty? child)
1702 (with-directory-excursion "src/3rdparty"
1703 ;; TODO: Try removing "gn" too for future versions of qtwebengine.
1704 (delete-file-recursively "ninja")
1706 (with-directory-excursion "chromium"
1707 ;; Delete bundled software and binaries that were not explicitly
1709 (nftw "." delete-unwanted-files 'depth 'physical)
1711 ;; Assert that each preserved item is present to catch removals.
1712 (for-each (lambda (third-party)
1713 (unless (file-exists? third-party)
1714 (error (format #f "~s does not exist!~%" third-party))))
1717 ;; Use relative header locations instead of hard coded ones.
1719 "base/third_party/dynamic_annotations/dynamic_annotations.c"
1720 (("base/third_party/valgrind") "valgrind"))
1722 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
1723 (("third_party/curl") "curl"))
1725 ;; Replace Google Analytics bundle with an empty file and hope
1727 (mkdir-p "third_party/analytics")
1728 (call-with-output-file
1729 "third_party/analytics/google-analytics-bundle.js"
1733 ;; Do not enable support for loading the Widevine DRM plugin.
1734 (substitute* "src/core/config/common.pri"
1735 (("enable_widevine=true")
1736 "enable_widevine=false"))
1738 (build-system gnu-build-system)
1745 ("pkg-config" ,pkg-config)
1746 ("python-2" ,python-2)
1749 `(("alsa-lib" ,alsa-lib)
1751 ("cups-minimal" ,cups-minimal)
1755 ("fontconfig" ,fontconfig)
1756 ("harbuzz" ,harfbuzz)
1758 ("jsoncpp" ,jsoncpp)
1761 ("libevent" ,libevent)
1762 ("libgcrypt" ,libgcrypt)
1763 ("libjpeg" ,libjpeg-turbo)
1765 ;; FIXME: configure does not find system lcms
1767 ("libwebp" ,libwebp)
1770 ("libxcomposite" ,libxcomposite)
1771 ("libxcursor" ,libxcursor)
1773 ("libxkbcommon" ,libxkbcommon)
1774 ;; FIXME: libxml2 needs to built with icu support though it links to
1775 ;; libxml2 configure summary still states "Checking for compatible
1776 ;; system libxml2... no"
1777 ("libxml2" ,libxml2)
1778 ("libxrandr" ,libxrandr)
1779 ("libxrender" ,libxrender)
1780 ("libxslt" ,libxslt)
1781 ("libxtst" ,libxtst)
1783 ("minizip" ,minizip)
1786 ("pciutils" ,pciutils)
1787 ("protobuf" ,protobuf)
1788 ("pulseaudio" ,pulseaudio)
1790 ("qtdeclarative" ,qtdeclarative)
1791 ("qtmultimedia" ,qtmultimedia)
1792 ("qtwebchannel" ,qtwebchannel)
1796 ("valgrind" ,valgrind)
1797 ("xcb-util" ,xcb-util)))
1799 (substitute-keyword-arguments (package-arguments qtsvg)
1801 `(modify-phases ,phases
1802 (add-before 'configure 'substitute-source
1803 (lambda* (#:key inputs outputs #:allow-other-keys)
1804 (let ((out (assoc-ref outputs "out"))
1805 (nss (assoc-ref inputs "nss"))
1806 (udev (assoc-ref inputs "udev")))
1807 ;; Qtwebengine is not installed into the same prefix as
1808 ;; qtbase. Some qtbase QTLibraryInfo constants will not
1809 ;; work. Replace with the full path to the qtwebengine
1810 ;; translations and locales in the store.
1811 (substitute* "src/core/web_engine_library_info.cpp"
1812 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
1813 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
1814 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
1815 (string-append "QLatin1String(\"" out "/share/qt5\")")))
1816 ;; Substitute full dynamic library path for nss.
1817 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
1819 (string-append nss "/lib/nss/libnssckbi.so")))
1820 ;; Substitute full dynamic library path for udev.
1821 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
1823 (string-append udev "/lib/libudev.so.1")))
1825 (add-before 'configure 'set-env
1827 ;; Avoids potential race conditions.
1828 (setenv "PYTHONDONTWRITEBYTECODE" "1")
1829 (setenv "NINJAFLAGS"
1830 (string-append "-k1" ;less verbose build output
1831 ;; Respect the '--cores' option of 'guix build'.
1832 " -j" (number->string (parallel-job-count))))
1836 ;; Valid QT_BUILD_PARTS variables are:
1837 ;; libs tools tests examples demos docs translations
1838 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
1839 "--webengine-printing-and-pdf=no"
1840 "--webengine-ffmpeg=system"
1841 "--webengine-icu=system"
1842 "--webengine-pepper-plugins=no")))))
1843 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
1844 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
1845 ;; before running tests.
1846 ((#:tests? _ #f) #f)))
1847 (native-search-paths
1848 (list (search-path-specification
1849 (file-type 'regular)
1851 (variable "QTWEBENGINEPROCESS_PATH")
1852 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
1853 (home-page "https://wiki.qt.io/QtWebEngine")
1854 (synopsis "Qt WebEngine module")
1855 (description "The Qt5WebEngine module provides support for web applications
1856 using the Chromium browser project. The Chromium source code has Google services
1857 and binaries removed, and adds modular support for using system libraries.")
1858 (license license:lgpl2.1+)))
1860 (define-public python-sip
1867 (uri (string-append "https://www.riverbankcomputing.com/static/"
1868 "Downloads/sip/" version "/sip-" version ".tar.gz"))
1871 "07kyd56xgbb40ljb022rq82shgxprlbl0z27mpf1b6zd00w8dgf0"))))
1872 (build-system gnu-build-system)
1874 `(("python" ,python-wrapper)))
1876 `(#:tests? #f ; no check target
1877 #:modules ((srfi srfi-1)
1878 ,@%gnu-build-system-modules)
1880 (modify-phases %standard-phases
1882 (lambda* (#:key inputs outputs #:allow-other-keys)
1883 (let* ((out (assoc-ref outputs "out"))
1884 (bin (string-append out "/bin"))
1885 (include (string-append out "/include"))
1886 (python (assoc-ref inputs "python"))
1888 (last (string-split python #\-)))
1891 (take (string-split python-version #\.) 2)
1893 (lib (string-append out "/lib/python"
1896 (invoke "python" "configure.py"
1899 "--incdir" include)))))))
1900 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1901 (synopsis "Python binding creator for C and C++ libraries")
1903 "SIP is a tool to create Python bindings for C and C++ libraries. It
1904 was originally developed to create PyQt, the Python bindings for the Qt
1905 toolkit, but can be used to create bindings for any C or C++ library.
1907 SIP comprises a code generator and a Python module. The code generator
1908 processes a set of specification files and generates C or C++ code, which
1909 is then compiled to create the bindings extension module. The SIP Python
1910 module provides support functions to the automatically generated code.")
1911 ;; There is a choice between a python like license, gpl2 and gpl3.
1912 ;; For compatibility with pyqt, we need gpl3.
1913 (license license:gpl3)))
1915 (define-public python2-sip
1916 (package (inherit python-sip)
1917 (name "python2-sip")
1919 `(("python" ,python-2)))))
1921 (define-public python-pyqt
1923 (name "python-pyqt")
1928 (uri (string-append "https://www.riverbankcomputing.com/static/"
1929 "Downloads/PyQt5/" version "/PyQt5_gpl-"
1933 "041155bdzp57jy747p5d59740c55yy3241cy1x2lgcdsvqvzmc0d"))
1934 (patches (search-patches "pyqt-configure.patch"
1935 "pyqt-unbundled-qt.patch"
1936 "pyqt-public-sip.patch"))))
1937 (build-system gnu-build-system)
1939 `(("qtbase" ,qtbase))) ; for qmake
1941 `(("python-sip" ,python-sip)))
1943 `(("python" ,python-wrapper)
1945 ("qtconnectivity" ,qtconnectivity)
1946 ("qtdeclarative" ,qtdeclarative)
1947 ("qtlocation" ,qtlocation)
1948 ("qtmultimedia" ,qtmultimedia)
1949 ("qtsensors" ,qtsensors)
1950 ("qtserialport" ,qtserialport)
1952 ("qttools" ,qttools)
1953 ("qtwebchannel" ,qtwebchannel)
1954 ("qtwebkit" ,qtwebkit)
1955 ("qtwebsockets" ,qtwebsockets)
1956 ("qtx11extras" ,qtx11extras)
1957 ("qtxmlpatterns" ,qtxmlpatterns)))
1959 `(#:modules ((srfi srfi-1)
1960 ,@%gnu-build-system-modules)
1962 (modify-phases %standard-phases
1963 ;; When building python-pyqtwebengine, <qprinter.h> can not be
1964 ;; included. Here we substitute the full path to the header in the
1966 (add-before 'configure 'substitute-source
1967 (lambda* (#:key inputs #:allow-other-keys)
1968 (let* ((qtbase (assoc-ref inputs "qtbase"))
1969 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
1970 (substitute* "sip/QtPrintSupport/qprinter.sip"
1975 (lambda* (#:key inputs outputs #:allow-other-keys)
1976 (let* ((out (assoc-ref outputs "out"))
1977 (bin (string-append out "/bin"))
1978 (sip (string-append out "/share/sip"))
1979 (plugins (string-append out "/lib/qt5/plugins"))
1980 (designer (string-append plugins "/designer"))
1981 (qml (string-append plugins "/PyQt5"))
1982 (python (assoc-ref inputs "python"))
1984 (last (string-split python #\-)))
1987 (take (string-split python-version #\.) 2)
1989 (lib (string-append out "/lib/python"
1992 (stubs (string-append lib "/PyQt5")))
1993 (invoke "python" "configure.py"
1997 "--designer-plugindir" designer
1998 "--qml-plugindir" qml
1999 ; Where to install the PEP 484 Type Hints stub
2000 ; files. Without this the stubs are tried to be
2001 ; installed into the python package's
2002 ; site-package directory, which is read-only.
2004 "--sipdir" sip)))))))
2005 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
2006 (synopsis "Python bindings for Qt")
2008 "PyQt is a set of Python v2 and v3 bindings for the Qt application
2009 framework. The bindings are implemented as a set of Python modules and
2010 contain over 620 classes.")
2011 (license license:gpl3)))
2013 (define-public python-pyqtwebengine
2015 (name "python-pyqtwebengine")
2021 "https://www.riverbankcomputing.com/static/Downloads/PyQtWebEngine/"
2022 version "/PyQtWebEngine_gpl-" version ".tar.gz"))
2025 "0wylkd7fh2g27y3710rpxmj9wx0wpi3z7qbv6khiddm15rkh81w6"))))
2026 (build-system gnu-build-system)
2028 `(("python" ,python)
2029 ("python-sip" ,python-sip)
2030 ;; qtbase is required for qmake
2031 ("qtbase" ,qtbase)))
2033 `(("python" ,python-wrapper)
2034 ("python-sip" ,python-sip)
2035 ("python-pyqt" ,python-pyqt)
2038 ("qtdeclarative" ,qtdeclarative)
2039 ("qtwebchannel" ,qtwebchannel)
2040 ("python-pyqt" ,python-pyqt)
2041 ("qtwebengine" ,qtwebengine)))
2043 `(#:modules ((srfi srfi-1)
2044 ,@%gnu-build-system-modules)
2046 (modify-phases %standard-phases
2048 (lambda* (#:key inputs outputs #:allow-other-keys)
2049 (let* ((out (assoc-ref outputs "out"))
2050 (sipdir (string-append out "/share/sip"))
2051 (pyqt-sipdir (string-append
2052 (assoc-ref inputs "python-pyqt") "/share/sip"))
2053 (python (assoc-ref inputs "python"))
2055 (last (string-split python #\-)))
2058 (take (string-split python-version #\.) 2) "."))
2059 (lib (string-append out "/lib/python"
2061 "/site-packages/PyQt5"))
2062 (stubs (string-append lib "/PyQt5")))
2065 (invoke "python" "configure.py"
2072 "--pyqt-sipdir" pyqt-sipdir))))
2073 ;; Because this has a different prefix than python-pyqt then we need
2074 ;; to make this a namespace of it's own
2075 (add-after 'install 'make-namespace
2076 (lambda* (#:key inputs outputs #:allow-other-keys)
2077 (let* ((__init__.py (string-append
2078 (assoc-ref outputs "out")
2079 "/lib/python3.7/site-packages/PyQt5/__init__.py")))
2080 (with-output-to-file __init__.py
2081 (lambda _ (display "
2082 from pkgutil import extend_path
2083 __path__ = extend_path(__path__, __name__)
2086 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
2087 (synopsis "Python bindings for QtWebEngine")
2089 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
2090 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
2091 set of three modules. Prior to v5.12 these bindings were part of PyQt
2093 (license license:gpl3)))
2095 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
2096 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
2097 ;; packages that could be used together.
2098 (define-public python-pyqt-without-qtwebkit
2099 (package (inherit python-pyqt)
2100 (name "python-pyqt-without-qtwebkit")
2102 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
2104 (define-public python2-pyqt
2105 (package (inherit python-pyqt)
2106 (name "python2-pyqt")
2108 `(("python-sip" ,python2-sip)
2109 ("qtbase" ,qtbase)))
2111 `(("python" ,python-2)
2112 ("python2-enum34" ,python2-enum34)
2113 ,@(alist-delete "python" (package-inputs python-pyqt))))))
2115 (define-public python2-pyqt-4
2116 (package (inherit python-pyqt)
2117 (name "python2-pyqt")
2123 (string-append "mirror://sourceforge/pyqt/PyQt4/"
2124 "PyQt-" version "/PyQt4_gpl_x11-"
2128 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
2130 `(("python-sip" ,python2-sip)
2132 (inputs `(("python" ,python-2)))
2134 `(#:tests? #f ; no check target
2135 #:modules ((srfi srfi-1)
2136 ,@%gnu-build-system-modules)
2138 (modify-phases %standard-phases
2140 (lambda* (#:key inputs outputs #:allow-other-keys)
2141 (let* ((out (assoc-ref outputs "out"))
2142 (bin (string-append out "/bin"))
2143 (sip (string-append out "/share/sip"))
2144 (python (assoc-ref inputs "python"))
2146 (last (string-split python #\-)))
2149 (take (string-split python-version #\.) 2)
2151 (lib (string-append out "/lib/python"
2154 (invoke "python" "configure.py"
2158 "--sipdir" sip)))))))
2159 (license (list license:gpl2 license:gpl3)))) ; choice of either license
2161 (define-public qscintilla
2167 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
2168 "QScintilla-" version "/QScintilla_gpl-"
2172 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
2173 (build-system gnu-build-system)
2176 (modify-phases %standard-phases
2178 (lambda* (#:key outputs #:allow-other-keys)
2179 (let ((out (assoc-ref outputs "out")))
2181 (substitute* "qscintilla.pro"
2182 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
2183 (string-append out "/lib"))
2184 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
2185 (string-append out "/include"))
2186 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
2187 (string-append out "/translations"))
2188 (("\\$\\$\\[QT_INSTALL_DATA\\]")
2189 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
2190 (("\\$\\$\\[QT_HOST_DATA\\]")
2191 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
2192 (invoke "qmake")))))))
2193 (native-inputs `(("qtbase" ,qtbase)))
2194 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
2195 (synopsis "Qt port of the Scintilla C++ editor control")
2196 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2197 editor control. QScintilla includes features especially useful when editing
2198 and debugging source code. These include support for syntax styling, error
2199 indicators, code completion and call tips.")
2200 (license license:gpl3+)))
2202 (define-public python-qscintilla
2203 (package (inherit qscintilla)
2204 (name "python-qscintilla")
2207 (list "--pyqt=PyQt5"
2208 (string-append "--pyqt-sipdir="
2209 (assoc-ref %build-inputs "python-pyqt")
2211 (string-append "--qsci-incdir="
2212 (assoc-ref %build-inputs "qscintilla")
2214 (string-append "--qsci-libdir="
2215 (assoc-ref %build-inputs "qscintilla")
2218 (modify-phases %standard-phases
2220 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
2221 (let ((out (assoc-ref outputs "out"))
2222 (python (assoc-ref inputs "python")))
2224 (apply invoke "python3" "configure.py"
2226 ;; Install to the right directory
2227 (substitute* '("Makefile"
2229 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2230 (((string-append python "/lib"))
2231 (string-append out "/lib")))
2232 ;; And fix the installed.txt file
2233 (substitute* "installed.txt"
2234 (("/gnu/store/[^/]+") out)))
2237 `(("qscintilla" ,qscintilla)
2239 ("python-pyqt" ,python-pyqt)))
2240 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2241 editor control. QScintilla includes features especially useful when editing
2242 and debugging source code. These include support for syntax styling, error
2243 indicators, code completion and call tips.
2245 This package provides the Python bindings.")))
2247 ;; PyQt only looks for modules in its own directory. It ignores environment
2248 ;; variables such as PYTHONPATH, so we need to build a union package to make
2250 (define-public python-pyqt+qscintilla
2251 (package (inherit python-pyqt)
2252 (name "python-pyqt+qscintilla")
2254 (build-system trivial-build-system)
2256 '(#:modules ((guix build union))
2258 (use-modules (ice-9 match)
2260 (match %build-inputs
2261 (((names . directories) ...)
2262 (union-build (assoc-ref %outputs "out")
2266 `(("python-pyqt" ,python-pyqt)
2267 ("python-qscintilla" ,python-qscintilla)))
2268 (synopsis "Union of PyQt and the Qscintilla extension")
2270 "This package contains the union of PyQt and the Qscintilla extension.")))
2272 (define-public qtkeychain
2280 (url "https://github.com/frankosterfeld/qtkeychain/")
2281 (commit (string-append "v" version))))
2282 (file-name (git-file-name name version))
2285 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
2286 (build-system cmake-build-system)
2288 `(("pkg-config" ,pkg-config)
2289 ("qttools" ,qttools)))
2291 `(("qtbase" ,qtbase)))
2293 `(#:tests? #f ; No tests included
2295 (modify-phases %standard-phases
2296 (add-before 'configure 'set-qt-trans-dir
2298 (substitute* "CMakeLists.txt"
2299 (("\\$\\{qt_translations_dir\\}")
2300 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
2302 (home-page "https://github.com/frankosterfeld/qtkeychain")
2303 (synopsis "Qt API to store passwords")
2305 "QtKeychain is a Qt library to store passwords and other secret data
2306 securely. It will not store any data unencrypted unless explicitly requested.")
2307 (license license:bsd-3)))
2317 (string-append "mirror://sourceforge/qwt/qwt/"
2318 version "/qwt-" version ".tar.bz2"))
2320 (base32 "1navkcnmn0qz8kzsyqmk32d929zl72l0b580w1ica7z5559j2a8m"))))
2321 (build-system gnu-build-system)
2323 `(("qtbase" ,qtbase)
2325 ("qttools" ,qttools)))
2328 (modify-phases %standard-phases
2330 (lambda* (#:key outputs #:allow-other-keys)
2331 (let* ((out (assoc-ref outputs "out"))
2332 (docdir (string-append out "/share/doc/qwt"))
2333 (incdir (string-append out "/include/qwt"))
2334 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2335 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2336 (substitute* '("qwtconfig.pri")
2337 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2338 (format #f "~a = ~a\n" x out))
2339 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2340 (format #f "~a = ~a\n" x docdir))
2341 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2342 (format #f "~a = ~a\n" x incdir))
2343 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2344 (format #f "~a = ~a\n" x pluginsdir))
2345 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2346 (format #f "~a = ~a\n" x featuresdir)))
2347 (substitute* '("doc/doc.pro")
2348 ;; We'll install them in the 'install-man-pages' phase.
2349 (("^unix:doc\\.files.*") ""))
2351 (add-after 'install 'install-man-pages
2352 (lambda* (#:key outputs #:allow-other-keys)
2353 (let* ((out (assoc-ref outputs "out"))
2354 (man (string-append out "/share/man")))
2355 ;; Remove some incomplete manual pages.
2356 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2358 (copy-recursively "doc/man" man)
2360 (home-page "http://qwt.sourceforge.net")
2361 (synopsis "Qt widgets for plots, scales, dials and other technical software
2364 "The Qwt library contains widgets and components which are primarily useful
2365 for technical and scientific purposes. It includes a 2-D plotting widget,
2366 different kinds of sliders, and much more.")
2369 ;; The Qwt license is LGPL2.1 with some exceptions.
2370 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2371 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2372 license:lgpl2.1 license:gpl3))))
2374 (define-public qtwebkit
2377 (version "5.212.0-alpha3")
2381 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2382 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
2385 "05syvwi3jw9abwsc93rmjkna0vyh6bkfrsqhwir48ms54icfwzim"))
2386 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2387 (build-system cmake-build-system)
2390 ("python" ,python-2.7)
2395 ("pkg-config" ,pkg-config)))
2399 ("gst-plugins-base" ,gst-plugins-base)
2400 ("libjpeg" ,libjpeg)
2402 ("libwebp" ,libwebp)
2403 ("sqlite" ,sqlite-with-column-metadata)
2404 ("fontconfig" ,fontconfig)
2405 ("libxrender" ,libxrender)
2407 ("qtdeclarative" ,qtdeclarative)
2408 ("qtlocation" ,qtlocation)
2409 ("qtmultimedia" ,qtmultimedia)
2410 ("qtsensors" ,qtsensors)
2411 ("qtwebchannel" ,qtwebchannel)
2412 ("libxml2" ,libxml2)
2413 ("libxslt" ,libxslt)
2415 ("libxcomposite" ,libxcomposite)))
2417 `(#:tests? #f ; no apparent tests; it might be necessary to set
2418 ; ENABLE_API_TESTS, see CMakeLists.txt
2420 ;; Parallel builds fail due to a race condition:
2421 ;; <https://bugs.gnu.org/34062>.
2422 #:parallel-build? #f
2424 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2426 "-DUSE_LIBHYPHEN=OFF"
2427 "-DUSE_SYSTEM_MALLOC=ON"
2428 ;; XXX: relative dir installs to build dir?
2429 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2430 %output "/lib/qt5/mkspecs/modules")
2431 ;; Sacrifice a little speed in order to link
2432 ;; libraries and test executables in a
2433 ;; reasonable amount of memory.
2434 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2435 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2436 (home-page "https://www.webkit.org")
2437 (synopsis "Web browser engine and classes to render and interact with web
2439 (description "QtWebKit provides a Web browser engine that makes it easy to
2440 embed content from the World Wide Web into your Qt application. At the same
2441 time Web content can be enhanced with native controls.")
2442 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2443 ;; room for slower or busy hardware.
2444 (properties '((timeout . 64800))) ;18 hours
2446 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2447 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2448 ;; disable it on non-Intel platforms.
2449 (supported-systems '("x86_64-linux" "i686-linux"))
2451 (license license:lgpl2.1+)))
2453 (define-public dotherside
2461 (url "https://github.com/filcuc/DOtherSide")
2462 (commit (string-append "v" version))))
2463 (file-name (git-file-name name version))
2466 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
2467 (build-system cmake-build-system)
2469 `(("qttools" ,qttools)))
2471 `(("qtbase" ,qtbase)
2472 ("qtdeclarative" ,qtdeclarative)))
2473 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2474 (synopsis "C language library for creating bindings for the Qt QML language")
2476 "DOtherSide is a C language library for creating bindings for the
2477 QT QML language. The following features are implementable from
2480 @item Creating custom QObject
2481 @item Creating custom QAbstractListModels
2482 @item Creating custom properties, signals and slots
2483 @item Creating from QML QObject defined in the binded language
2484 @item Creating from Singleton QML QObject defined in the binded language
2486 (license license:lgpl3))) ;version 3 only (+ exception)
2488 ;; There have been no public releases yet.
2489 (define-public qtcolorwidgets
2490 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2493 (name "qtcolorwidgets")
2494 (version (git-version "0" revision commit))
2498 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2500 (file-name (git-file-name name version))
2503 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2504 (build-system cmake-build-system)
2505 (arguments `(#:tests? #f)) ; There are no tests
2507 `(("qttools" ,qttools)))
2509 `(("qtbase" ,qtbase)))
2510 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2511 (synopsis "Color management widgets")
2512 (description "QtColorWidgets provides a Qt color dialog that is more
2513 user-friendly than the default @code{QColorDialog} and several other
2514 color-related widgets.")
2515 ;; Includes a license exception for combining with GPL2 code.
2516 (license license:lgpl3+))))
2518 (define-public python-shiboken-2
2519 (let ((revision "1")
2520 ;; Pinned to branches with support for qt 5.11.3
2521 (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
2523 (name "python-shiboken-2")
2524 (version (git-version "v5.11.3" revision commit))
2529 ;; The latest versions of Shiboken live in the pyside repo.
2530 ;; There is another standalone repo only for Shiboken
2531 ;; but it is outdated
2532 (url "https://code.qt.io/pyside/pyside-setup")
2534 (file-name (git-file-name name version))
2537 "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
2538 (build-system cmake-build-system)
2540 `(("clang-toolchain" ,clang-toolchain-6)
2541 ("libxml2" ,libxml2)
2542 ("libxslt" ,libxslt)
2543 ("python-wrapper" ,python-wrapper)
2545 ("qtxmlpatterns" ,qtxmlpatterns)))
2548 ;; FIXME: Building tests fails
2549 #:configure-flags '("-DBUILD_TESTS=off")
2551 (modify-phases %standard-phases
2552 (add-after 'unpack 'use-shiboken-dir-only
2553 (lambda _ (chdir "sources/shiboken2") #t))
2554 (add-before 'configure 'set-build-env
2555 (lambda* (#:key inputs #:allow-other-keys)
2556 (let ((llvm (assoc-ref inputs "clang-toolchain")))
2557 (setenv "CLANG_INSTALL_DIR" llvm)
2559 (home-page "https://wiki.qt.io/Qt_for_Python")
2561 "Shiboken generates bindings for C++ libraries using CPython source code")
2563 "Shiboken generates bindings for C++ libraries using CPython source code")
2566 ;; The main code is GPL3 or LGPL3.
2567 ;; Examples are BSD-3.
2572 (define-public python-pyside-2
2573 (let ((revision "1")
2574 ;; Pinned to branches with support for qt 5.11.3
2575 (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
2577 (name "python-pyside-2")
2578 (version (git-version "v5.11.3" revision commit))
2583 (url "https://code.qt.io/pyside/pyside-setup")
2585 (file-name (git-file-name name version))
2588 "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
2589 (build-system cmake-build-system)
2591 `(("libcxx" ,libcxx-6)
2592 ("libxml2" ,libxml2)
2593 ("libxslt" ,libxslt)
2594 ("clang-toolchain" ,clang-toolchain-6)
2596 ("qtdatavis3d" ,qtdatavis3d)
2597 ("qtlocation" ,qtlocation)
2598 ("qtmultimedia" ,qtmultimedia)
2599 ("qtquickcontrols" ,qtquickcontrols)
2600 ("qtscript" ,qtscript)
2601 ("qtscxml" ,qtscxml)
2602 ("qtsensors" ,qtsensors)
2603 ("qtspeech" ,qtspeech)
2605 ("qtwebchannel" ,qtwebchannel)
2606 ("qtwebsockets" ,qtwebsockets)
2607 ("qtx11extras" ,qtx11extras)
2608 ("qtxmlpatterns" ,qtxmlpatterns)))
2611 ("python-shiboken-2" ,python-shiboken-2)
2612 ("python-wrapper" ,python-wrapper)
2613 ("qttools" ,qttools)
2617 ;; FIXME: Building tests fail.
2618 #:configure-flags '("-DBUILD_TESTS=FALSE")
2620 (modify-phases %standard-phases
2621 (add-after 'unpack 'go-to-source-dir
2622 (lambda _ (chdir "sources/pyside2") #t))
2623 (add-before 'configure 'set-clang-dir
2624 (lambda* (#:key inputs #:allow-other-keys)
2625 (let ((clang (assoc-ref inputs "clang-toolchain"))
2626 (libcxx (assoc-ref inputs "libcxx")))
2627 (setenv "CLANG_INSTALL_DIR" clang)
2628 (substitute* "cmake/Macros/PySideModules.cmake"
2629 (("--include-paths=")
2630 (string-append "--include-paths=" libcxx "/include/c++/v1:")))
2632 (home-page "https://wiki.qt.io/Qt_for_Python")
2634 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2636 "The Qt for Python product enables the use of Qt5 APIs in Python
2637 applications. It lets Python developers utilize the full potential of Qt,
2638 using the PySide2 module. The PySide2 module provides access to the
2639 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2640 comes with the Shiboken2 CPython binding code generator, which can be used to
2641 generate Python bindings for your C or C++ code.")
2645 ;; this file may be used under the terms of the GNU General
2646 ;; Public License version 2.0 or (at your option) the GNU
2647 ;; General Public license version 3 or any later version
2648 ;; approved by the KDE Free Qt Foundation.
2649 ;; Thus, it is currently v2 or v3, but no "+".
2653 (define-public python-pyside-2-tools
2654 (let ((revision "1")
2655 ;; Pinned to branches with support for qt 5.11.3
2656 (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
2658 (name "python-pyside-2-tools")
2659 (version (git-version "v5.11.2" revision commit))
2664 (url "https://code.qt.io/pyside/pyside-tools")
2666 (file-name (git-file-name name version))
2669 "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
2670 (build-system cmake-build-system)
2672 `(("python-pyside-2" ,python-pyside-2)
2673 ("python-shiboken-2" ,python-shiboken-2)
2674 ("qtbase" ,qtbase)))
2677 #:configure-flags '("-DBUILD_TESTS=off")))
2678 (home-page "https://wiki.qt.io/Qt_for_Python")
2680 "Contains command line tools for PySide2")
2682 "Contains lupdate, rcc and uic tools for PySide2")
2683 (license license:gpl2))))