1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
10 ;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018, 2020, 2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
12 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
13 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
15 ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
16 ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
17 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
18 ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
19 ;;; Copyright © 2020 TomZ <tomz@freedommail.ch>
20 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
21 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
22 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
23 ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
24 ;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
25 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
26 ;;; Copyright © 2022 Foo Chuan Wei <chuanwei.foo@hotmail.com>
28 ;;; This file is part of GNU Guix.
30 ;;; GNU Guix is free software; you can redistribute it and/or modify it
31 ;;; under the terms of the GNU General Public License as published by
32 ;;; the Free Software Foundation; either version 3 of the License, or (at
33 ;;; your option) any later version.
35 ;;; GNU Guix is distributed in the hope that it will be useful, but
36 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;;; GNU General Public License for more details.
40 ;;; You should have received a copy of the GNU General Public License
41 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43 (define-module (gnu packages qt)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix packages)
46 #:use-module (guix download)
47 #:use-module (guix git-download)
48 #:use-module (guix build-system cmake)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system trivial)
51 #:use-module (guix build-system python)
52 #:use-module (guix build-system qt)
53 #:use-module (guix gexp)
54 #:use-module (guix packages)
55 #:use-module (guix deprecation)
56 #:use-module (guix utils)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages base)
59 #:use-module (gnu packages bison)
60 #:use-module (gnu packages cmake)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages cups)
63 #:use-module (gnu packages curl)
64 #:use-module (gnu packages databases)
65 #:use-module (gnu packages documentation)
66 #:use-module (gnu packages enchant)
67 #:use-module (gnu packages fontutils)
68 #:use-module (gnu packages flex)
69 #:use-module (gnu packages freedesktop)
70 #:use-module (gnu packages gcc)
71 #:use-module (gnu packages ghostscript)
72 #:use-module (gnu packages gl)
73 #:use-module (gnu packages glib)
74 #:use-module (gnu packages gnome)
75 #:use-module (gnu packages gnupg)
76 #:use-module (gnu packages gperf)
77 #:use-module (gnu packages graphics)
78 #:use-module (gnu packages gstreamer)
79 #:use-module (gnu packages gtk)
80 #:use-module (gnu packages icu4c)
81 #:use-module (gnu packages image)
82 #:use-module (gnu packages kde-frameworks)
83 #:use-module (gnu packages libevent)
84 #:use-module (gnu packages linux)
85 #:use-module (gnu packages llvm)
86 #:use-module (gnu packages maths)
87 #:use-module (gnu packages networking)
88 #:use-module (gnu packages ninja)
89 #:use-module (gnu packages node)
90 #:use-module (gnu packages nss)
91 #:use-module (gnu packages pciutils)
92 #:use-module (gnu packages pcre)
93 #:use-module (gnu packages perl)
94 #:use-module (gnu packages pkg-config)
95 #:use-module (gnu packages pulseaudio)
96 #:use-module (gnu packages protobuf)
97 #:use-module (gnu packages python)
98 #:use-module (gnu packages python-build)
99 #:use-module (gnu packages python-xyz)
100 #:use-module (gnu packages regex)
101 #:use-module (gnu packages ruby)
102 #:use-module (gnu packages sdl)
103 #:use-module (gnu packages serialization)
104 #:use-module (gnu packages sqlite)
105 #:use-module (gnu packages telephony)
106 #:use-module (gnu packages tls)
107 #:use-module (gnu packages valgrind)
108 #:use-module (gnu packages video)
109 #:use-module (gnu packages vulkan)
110 #:use-module (gnu packages xdisorg)
111 #:use-module (gnu packages xiph)
112 #:use-module (gnu packages xorg)
113 #:use-module (gnu packages xml)
114 #:use-module (srfi srfi-1))
117 (let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
121 (version (git-version "0" revision commit))
127 (url "https://github.com/Ri0n/qite")
129 (file-name (git-file-name name version))
131 (base32 "0jmmgy9pvk9hwwph1nwy7hxhczy8drhl4ymhnjjn6yx7bckssvsq"))))
132 (build-system qt-build-system)
134 `(#:tests? #f ; no target
136 (modify-phases %standard-phases
137 (add-after 'unpack 'chdir
142 (list qtbase-5 qtmultimedia))
143 (home-page "https://github.com/Ri0n/qite/")
144 (synopsis "Qt Interactive Text Elements")
145 (description "Qite manages interactive elements on QTextEdit.")
146 (license license:asl2.0))))
156 (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
158 (base32 "14742vs32m98nbfb5mad0i8ciff5f45gfcb5v03p4hh2dvhhqgfn"))))
159 (build-system gnu-build-system)
161 `(#:tests? #f ; No target
163 (,@%qt-build-system-modules)
165 ((guix build gnu-build-system)
166 ((guix build qt-build-system)
170 (modify-phases %standard-phases
171 (add-after 'unpack 'patch
172 (lambda* (#:key inputs #:allow-other-keys)
173 (substitute* "qt5ct.pro"
174 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
175 (search-input-file inputs "/bin/lrelease")))))
177 (lambda* (#:key outputs #:allow-other-keys)
178 (let* ((out (assoc-ref outputs "out")))
180 (string-append "PREFIX=" out)
181 (string-append "BINDIR=" out "/bin")
182 (string-append "DATADIR=" out "/share")
183 (string-append "PLUGINDIR=" out "/lib/qt5/plugins")))))
184 (add-after 'install 'qt-wrap
185 (assoc-ref qt:%standard-phases 'qt-wrap)))))
189 (list qtbase-5 qtsvg))
190 (synopsis "Qt5 Configuration Tool")
191 (description "Qt5CT is a program that allows users to configure Qt5
192 settings (such as icons, themes, and fonts) in desktop environments or
193 window managers, that don't provide Qt integration by themselves.")
194 (home-page "https://qt5ct.sourceforge.io/")
195 (license license:bsd-2)))
197 (define-public materialdecoration
198 (let ((commit "6a5de23f2e5162fbee39d16f938473ff970a2ec0")
201 (name "materialdecoration")
203 (git-version "1.1.0" revision commit))
209 (url "https://github.com/lirios/materialdecoration.git")
212 (git-file-name name version))
214 (base32 "1zdrcb39fhhmn76w8anv1dnspz26pdl6izmj1mlm02aza4y8ffp4"))
215 (modules '((guix build utils)
220 (delete-file-recursively "cmake/3rdparty")))))
221 (build-system qt-build-system)
223 `(#:tests? #f ; No target
226 (string-append "-DCMAKE_CXX_FLAGS=-I"
227 #$(this-package-input "qtbase")
228 "/include/qt5/QtXkbCommonSupport/"
229 #$(package-version qtbase-5)))))
231 (list cmake-shared extra-cmake-modules pkg-config))
233 `(("qtbase" ,qtbase-5)
234 ("qtwayland" ,qtwayland)
236 ("xkbcommon" ,libxkbcommon)))
237 (synopsis "Material Decoration for Qt")
238 (description "MaterialDecoration is a client-side decoration for Qt
239 applications on Wayland.")
240 (home-page "https://github.com/lirios/materialdecoration")
241 (license license:lgpl3+))))
243 (define-public grantlee
251 (url "https://github.com/steveire/grantlee")
252 (commit (string-append "v" version))))
253 (file-name (git-file-name name version))
255 (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
257 ;; Optional: lcov and cccc, both are for code coverage
260 (list qtbase-5 qtdeclarative qtscript))
261 (build-system cmake-build-system)
264 (modify-phases %standard-phases
265 (add-before 'check 'check-setup
267 ;; make Qt render "offscreen", required for tests
268 (setenv "QT_QPA_PLATFORM" "offscreen")
270 (home-page "https://github.com/steveire/grantlee")
271 (synopsis "Libraries for text templating with Qt")
272 (description "Grantlee Templates can be used for theming and generation of
273 other text such as code. The syntax uses the syntax of the Django template
274 system, and the core design of Django is reused in Grantlee.")
275 (license license:lgpl2.1+)))
277 (define (qt5-urls component version)
278 "Return a list of URLs for VERSION of the Qt5 COMPONENT."
279 ;; We can't use a mirror:// scheme because these URLs are not exact copies:
280 ;; the layout differs between them.
281 (list (string-append "https://download.qt.io/official_releases/qt/"
282 (version-major+minor version) "/" version
283 "/submodules/" component "-everywhere-opensource-src-"
285 (string-append "https://download.qt.io/official_releases/qt/"
286 (version-major+minor version) "/" version
287 "/submodules/" component "-everywhere-src-"
289 (string-append "https://download.qt.io/archive/qt/"
290 (version-major+minor version) "/" version
291 "/submodules/" component "-everywhere-opensource-src-"
293 (let ((directory (string-append "qt5" (string-drop component 2))))
294 (string-append "http://sources.buildroot.net/" directory "/"
295 component "-everywhere-opensource-src-" version ".tar.xz"))
296 (string-append "https://distfiles.macports.org/qt5/"
297 component "-everywhere-opensource-src-" version ".tar.xz")))
299 (define-public qtbase-5
305 (uri (qt5-urls name version))
308 "1p2fa94m1y8qzhdfi2d7dck93qh1lgsinibwl1wy92bwmacwfhhc"))
309 ;; Use TZDIR to avoid depending on package "tzdata".
310 (patches (search-patches "qtbase-use-TZDIR.patch"
311 "qtbase-moc-ignore-gcc-macro.patch"
312 "qtbase-absolute-runpath.patch"))
313 (modules '((guix build utils)))
315 ;; corelib uses bundled harfbuzz, md4, md5, sha3
317 (with-directory-excursion "src/3rdparty"
318 (for-each delete-file-recursively
319 (list "double-conversion" "freetype" "harfbuzz-ng"
320 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
322 (build-system gnu-build-system)
323 (outputs '("out" "debug"))
326 ;; Use which the package, not the function
327 (@ (gnu packages base) which)))
329 `(("alsa-lib" ,alsa-lib)
332 ("double-conversion" ,double-conversion)
335 ("fontconfig" ,fontconfig)
336 ("freetype" ,freetype)
338 ("gtk+" ,gtk+) ;for GTK theme support
339 ("harfbuzz" ,harfbuzz)
341 ("libinput" ,libinput-minimal)
342 ("libjpeg" ,libjpeg-turbo)
346 ("libxcomposite" ,libxcomposite)
347 ("libxcursor" ,libxcursor)
348 ("libxfixes" ,libxfixes)
350 ("libxinerama" ,libxinerama)
351 ("libxkbcommon" ,libxkbcommon)
353 ("libxrandr" ,libxrandr)
354 ("libxrender" ,libxrender)
358 ("mariadb-dev" ,mariadb "dev")
362 ("postgresql" ,postgresql)
363 ("pulseaudio" ,pulseaudio)
365 ("unixodbc" ,unixodbc)
366 ("xcb-util" ,xcb-util)
367 ("xcb-util-image" ,xcb-util-image)
368 ("xcb-util-keysyms" ,xcb-util-keysyms)
369 ("xcb-util-renderutil" ,xcb-util-renderutil)
370 ("xcb-util-wm" ,xcb-util-wm)
371 ("xdg-utils" ,xdg-utils)
384 (let ((out (assoc-ref %outputs "out")))
387 "-docdir" (string-append out "/share/doc/qt5")
388 "-headerdir" (string-append out "/include/qt5")
389 "-archdatadir" (string-append out "/lib/qt5")
390 "-datadir" (string-append out "/share/qt5")
391 "-examplesdir" (string-append
392 out "/share/doc/qt5/examples")
396 ;; Later stripped into the :debug output.
399 ;; These features require higher versions of Linux than the
400 ;; minimum version of the glibc. See
401 ;; src/corelib/global/minimum-linux_p.h. By disabling these
402 ;; features Qt5 applications can be used on the oldest
403 ;; kernels that the glibc supports, including the RHEL6
404 ;; (2.6.32) and RHEL7 (3.10) kernels.
405 "-no-feature-getentropy" ; requires Linux 3.17
406 "-no-feature-renameat2" ; requires Linux 3.16
408 ;; Do not build examples; if desired, these could go
409 ;; into a separate output, but for the time being, we
410 ;; prefer to save the space and build time.
411 "-no-compile-examples"
412 ;; Most "-system-..." are automatic, but some use
413 ;; the bundled copy by default.
417 ;; explicitly link with openssl instead of dlopening it
419 ;; explicitly link with dbus instead of dlopening it
421 ;; don't use the precompiled headers
423 ;; drop special machine instructions that do not have
425 ,@(if (string-prefix? "x86_64"
426 (or (%current-target-system)
433 (modify-phases %standard-phases
434 (add-after 'configure 'patch-bin-sh
436 (substitute* '("config.status"
438 "mkspecs/features/qt_functions.prf"
439 "qmake/library/qmakebuiltins.cpp")
440 (("/bin/sh") (which "sh")))))
441 (add-after 'configure 'patch-xdg-open
443 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
444 (("^.*const char \\*browsers.*$" all)
445 (string-append "*browser = QStringLiteral(\""
447 "\"); return true; \n" all)))))
449 ;; Overridden to not pass "--enable-fast-install", which makes the
450 ;; configure process fail.
451 (lambda* (#:key outputs configure-flags #:allow-other-keys)
452 (let ((out (assoc-ref outputs "out")))
453 (substitute* "configure"
454 (("/bin/pwd") (which "pwd")))
455 (substitute* "src/corelib/global/global.pri"
456 (("/bin/ls") (which "ls")))
457 ;; The configuration files for other Qt5 packages are searched
458 ;; through a call to "find_package" in Qt5Config.cmake, which
459 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
460 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
461 ;; components can be installed in different places.
462 (substitute* (find-files "." ".*\\.cmake")
463 (("NO_DEFAULT_PATH") ""))
464 (format #t "build directory: ~s~%" (getcwd))
465 (format #t "configure flags: ~s~%" configure-flags)
466 (apply invoke "./configure" configure-flags))))
467 (add-after 'install 'patch-mkspecs
468 (lambda* (#:key outputs #:allow-other-keys)
469 (let* ((out (assoc-ref outputs "out"))
470 (archdata (string-append out "/lib/qt5"))
471 (mkspecs (string-append archdata "/mkspecs"))
472 (qt_config.prf (string-append
473 mkspecs "/features/qt_config.prf")))
474 ;; For each Qt module, let `qmake' uses search paths in the
475 ;; module directory instead of all in QT_INSTALL_PREFIX.
476 (substitute* qt_config.prf
477 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
478 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
479 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
480 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
481 (("\\$\\$\\[QT_HOST_LIBS\\]")
482 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
483 (("\\$\\$\\[QT_INSTALL_BINS\\]")
484 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
486 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
487 (substitute* (string-append mkspecs "/features/qt_functions.prf")
488 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
489 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
491 ;; Resolve qmake spec files within qtbase by absolute paths.
494 (string-append mkspecs "/features/" file))
495 '("device_config.prf" "moc.prf" "qt_build_config.prf"
496 "qt_config.prf" "winrt/package_manifest.prf"))
497 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
498 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))
499 (add-after 'patch-mkspecs 'patch-prl-files
500 (lambda* (#:key outputs #:allow-other-keys)
501 (let ((out (assoc-ref outputs "out")))
502 ;; Insert absolute references to the qtbase libraries because
503 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
504 ;; on context. See <https://bugs.gnu.org/38405>
505 (substitute* (find-files (string-append out "/lib") "\\.prl$")
506 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
507 (string-append out "/lib"))))))
508 (add-after 'unpack 'patch-paths
509 ;; Use the absolute paths for dynamically loaded libs, otherwise
510 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
512 (lambda* (#:key inputs #:allow-other-keys)
514 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
515 "cross-libc" "libc"))))
516 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
517 "src/network/kernel/qhostinfo_unix.cpp")
518 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
519 (string-append a glibc "/lib/lib" b))))
521 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
522 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
523 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
525 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
526 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
527 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
528 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
529 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))))))))
531 (list (search-path-specification
532 (variable "QMAKEPATH")
533 (files '("lib/qt5")))
534 (search-path-specification
535 (variable "QML2_IMPORT_PATH")
536 (files '("lib/qt5/qml")))
537 (search-path-specification
538 (variable "QT_PLUGIN_PATH")
539 (files '("lib/qt5/plugins")))
540 (search-path-specification
541 (variable "XDG_DATA_DIRS")
543 (search-path-specification
544 (variable "XDG_CONFIG_DIRS")
545 (files '("etc/xdg")))))
546 (home-page "https://www.qt.io/")
547 (synopsis "Cross-platform GUI library")
548 (description "Qt is a cross-platform application and UI framework for
549 developers using C++ or QML, a CSS & JavaScript like language.")
550 (license (list license:lgpl2.1 license:lgpl3))))
552 (define-public qtbase
553 (package/inherit qtbase-5
557 (inherit (package-source qtbase-5))
558 (uri (qt5-urls name version))
561 "1wizrfiw6h8bk99brbdpdli40vsk6yqchs66f1r083hp0ygsma11"))
562 (modules '((guix build utils)))
564 ;; corelib uses bundled harfbuzz, md4, md5, sha3
565 '(with-directory-excursion "src/3rdparty"
566 (for-each delete-file-recursively
567 ;; The bundled pcre2 copy is kept, as its headers
568 ;; are required by some internal bootstrap target
569 ;; used for the tools.
570 (list "double-conversion" "freetype" "harfbuzz-ng"
571 "libpng" "libjpeg" "sqlite" "xcb" "zlib"))))))
572 (build-system cmake-build-system)
574 (substitute-keyword-arguments (package-arguments qtbase-5)
575 ;; XXX: There are many test failures, because the test suite
576 ;; requires a real X server (a virtual one such as Xvfb is not
577 ;; enough) or a functional network. It's also quite expensive to
581 ;; cmake) ;requires a CMake >= 3.18.4
582 ((#:configure-flags _ ''())
583 `(let ((out (assoc-ref %outputs "out")))
584 (list "-GNinja" ;the build fails otherwise
585 (string-append "-DINSTALL_ARCHDATADIR=" out "/lib/qt6")
586 (string-append "-DINSTALL_DATADIR=" out "/share/qt6")
587 (string-append "-DINSTALL_DOCDIR=" out "/share/doc/qt6")
588 (string-append "-DINSTALL_MKSPECSDIR=" out "/lib/qt6/mkspecs")
589 (string-append "-DINSTALL_EXAMPLESDIR=" out
590 "/share/doc/qt6/examples")
591 (string-append "-DINSTALL_INCLUDEDIR=" out "/include/qt6")
592 ;; Link with DBus and OpenSSL so they don't get dlopen'ed.
593 "-DINPUT_dbus=linked"
594 "-DINPUT_openssl=linked"
595 ;; These features require higher versions of Linux than the
596 ;; minimum version of the glibc. See
597 ;; src/corelib/global/minimum-linux_p.h. By disabling these
598 ;; features Qt applications can be used on the oldest kernels
599 ;; that the glibc supports, including the RHEL6 (2.6.32) and
600 ;; RHEL7 (3.10) kernels.
601 "-DFEATURE_getentropy=OFF" ; requires Linux 3.17
602 "-DFEATURE_renameat2=OFF" ; requires Linux 3.16
603 ;; Most system libraries are used by default, except in some
604 ;; cases such as for those below.
605 "-DFEATURE_system_pcre2=ON"
606 "-DFEATURE_system_sqlite=ON"
607 ;; Don't use the precompiled headers.
608 "-DBUILD_WITH_PCH=OFF"
609 ;; Drop special machine instructions that do not have runtime
611 ,@(if (string-prefix? "x86_64"
612 (or (%current-target-system)
614 '() ;implicitly enabled
615 '("-DFEATURE_sse2=OFF"
617 "-DFEATURE_ssse3=OFF"
618 "-DFEATURE_sse4_1=OFF"
619 "-DFEATURE_sse4_2=OFF"))
620 "-DFEATURE_mips_dsp=OFF"
621 "-DFEATURE_mips_dspr2=OFF")))
623 `(modify-phases ,phases
624 (delete 'patch-bin-sh)
625 (delete 'patch-xdg-open)
626 (add-after 'patch-paths 'patch-more-paths
628 (substitute* "src/gui/platform/unix/qgenericunixservices.cpp"
630 (format #f "~s" (which "xdg-open"))))
631 (substitute* '("mkspecs/features/qt_functions.prf"
632 "qmake/library/qmakebuiltins.cpp")
636 (assoc-ref %standard-phases 'configure))
638 (lambda* (#:key parallel-build? #:allow-other-keys)
639 (apply invoke "cmake" "--build" "."
641 `("--parallel" ,(number->string (parallel-job-count)))
645 (invoke "cmake" "--install" ".")))
646 (replace 'patch-mkspecs
647 (lambda* (#:key outputs #:allow-other-keys)
648 (let* ((out (assoc-ref outputs "out"))
649 (archdata (string-append out "/lib/qt6"))
650 (mkspecs (string-append archdata "/mkspecs"))
651 (qt_config.prf (string-append
652 mkspecs "/features/qt_config.prf")))
653 ;; For each Qt module, let `qmake' uses search paths in the
654 ;; module directory instead of all in QT_INSTALL_PREFIX.
655 (substitute* qt_config.prf
656 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
657 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt6))")
658 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
659 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
660 (("\\$\\$\\[QT_HOST_LIBS\\]")
661 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
662 (("\\$\\$\\[QT_INSTALL_BINS\\]")
663 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
665 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
666 (substitute* (string-append mkspecs "/features/qt_functions.prf")
667 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
668 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
670 ;; Resolve qmake spec files within qtbase by absolute paths.
673 (string-append mkspecs "/features/" file))
674 '("device_config.prf" "moc.prf" "qt_build_config.prf"
676 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
677 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))))))
679 `(("gtk+" ,gtk+) ;for GTK theme support
681 ("wayland-protocols" ,wayland-protocols)
682 ("xorg-server" ,xorg-server-for-tests)
683 ,@(package-native-inputs qtbase-5)))
685 (list (search-path-specification
686 (variable "QMAKEPATH")
687 (files '("lib/qt6")))
688 (search-path-specification
689 (variable "QML2_IMPORT_PATH")
690 (files '("lib/qt6/qml")))
691 (search-path-specification
692 (variable "QT_PLUGIN_PATH")
693 (files '("lib/qt6/plugins")))
694 (search-path-specification
695 (variable "XDG_DATA_DIRS")
697 (search-path-specification
698 (variable "XDG_CONFIG_DIRS")
699 (files '("etc/xdg")))))))
702 (package (inherit qtbase-5)
707 (uri (qt5-urls name version))
710 "0cdhmhxngv4y7kl5vbcii4l4anbz0hj7dvhlddy1agyl19j9xky4"))))
711 (propagated-inputs `())
712 (native-inputs (list perl))
714 (list mesa qtbase-5 zlib))
717 (modify-phases %standard-phases
718 (add-before 'configure 'configure-qmake
719 (lambda* (#:key inputs outputs #:allow-other-keys)
720 (let* ((out (assoc-ref outputs "out"))
721 (qtbase (assoc-ref inputs "qtbase"))
722 (tmpdir (string-append (getenv "TMPDIR")))
723 (qmake (string-append tmpdir "/qmake"))
724 (qt.conf (string-append tmpdir "/qt.conf")))
725 ;; Use qmake with a customized qt.conf to override install
727 (symlink (which "qmake") qmake)
728 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
729 (with-output-to-file qt.conf
735 Documentation=share/doc/qt5
738 LibraryExecutables=lib/qt5/libexec
741 Plugins=lib/qt5/plugins
742 Imports=lib/qt5/imports
743 Qml2Imports=lib/qt5/qml
744 Translations=share/qt5/translations
746 Examples=share/doc/qt5/examples
752 [EffectiveSourcePaths]
755 " out out qtbase))))))
757 (lambda* (#:key inputs outputs #:allow-other-keys)
758 ;; Valid QT_BUILD_PARTS variables are:
759 ;; libs tools tests examples demos docs translations
760 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
761 (add-before 'check 'set-display
763 ;; make Qt render "offscreen", required for tests
764 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
765 (synopsis "Qt module for displaying SVGs")
766 (description "The QtSvg module provides classes for displaying the
767 contents of SVG files.")))
769 (define-public qtimageformats
770 (package (inherit qtsvg)
771 (name "qtimageformats")
775 (uri (qt5-urls name version))
778 "1xjb2z2h1ajw7z9cwq8djpdvjwalpnmirwcwrlbjqv5r4ghmi82a"))
779 (modules '((guix build utils)))
782 (delete-file-recursively "src/3rdparty")))))
792 (synopsis "Additional Image Format plugins for Qt")
793 (description "The QtImageFormats module contains plugins for adding
794 support for MNG, TGA, TIFF and WBMP image formats.")))
796 (define-public qtx11extras
797 (package (inherit qtsvg)
802 (uri (qt5-urls name version))
805 "0wxsrnnkkn68myy211rfz98brs7j3qmx3hmy097vh5avgsmw11bn"))))
807 (substitute-keyword-arguments (package-arguments qtsvg)
808 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
809 (native-inputs (list perl))
811 (list mesa qtbase-5))
812 (synopsis "Qt Extras for X11")
813 (description "The QtX11Extras module includes the library to access X11
814 from within Qt 5.")))
816 (define-public qtxmlpatterns
817 (package (inherit qtsvg)
818 (name "qtxmlpatterns")
822 (uri (qt5-urls name version))
825 "065vj1gk5i4cg0f9spksyb9ps4px0vssx262y77aakvw408vfmq5"))))
827 (substitute-keyword-arguments (package-arguments qtsvg)
829 `(modify-phases ,phases
830 (add-after 'unpack 'disable-network-tests
831 (lambda _ (substitute* "tests/auto/auto.pro"
832 (("qxmlquery") "# qxmlquery")
833 (("xmlpatterns ") "# xmlpatterns"))))
834 (add-after 'unpack 'skip-qquickxmllistmodel-test
835 (lambda _ (substitute* "tests/auto/auto.pro"
836 ((".*qquickxmllistmodel.*") ""))))))))
837 (native-inputs (list perl qtdeclarative))
838 (inputs (list qtbase-5))
839 (synopsis "Qt XML patterns module")
840 (description "The QtXmlPatterns module is a XQuery and XPath engine for
841 XML and custom data models. It contains programs such as xmlpatterns and
842 xmlpatternsvalidator.")))
844 (define-public qtdeclarative
845 (package (inherit qtsvg)
846 (name "qtdeclarative")
850 (uri (qt5-urls name version))
853 "0ji5131g7h2mrgxw1wxc5mcvmsn3fbw64j28gzpa25gv3vcnkhaw"))))
855 (substitute-keyword-arguments (package-arguments qtsvg)
856 ((#:tests? _ #f) #f) ;TODO: Enable the tests
858 `(modify-phases ,phases
859 (add-after 'build 'fix-qt5core-install-prefix
860 (lambda* (#:key outputs #:allow-other-keys)
861 (let ((out (assoc-ref outputs "out")))
862 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
863 ;; is provided by qtdeclarative.
865 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
866 (("\\$\\{_qt5Core_install_prefix\\}") out)))))))))
875 (list mesa qtbase-5))
876 (synopsis "Qt QML module (Quick 2)")
877 (description "The Qt QML module provides a framework for developing
878 applications and libraries with the QML language. It defines and implements the
879 language and engine infrastructure, and provides an API to enable application
880 developers to extend the QML language with custom types and integrate QML code
881 with JavaScript and C++.")))
883 (define-public qtconnectivity
884 (package (inherit qtsvg)
885 (name "qtconnectivity")
889 (uri (qt5-urls name version))
892 "0b2dnxw1rjbp1srhgns148cwl99f50mx29588dal3avv0f73s597"))))
894 (list perl pkg-config qtdeclarative))
896 (list bluez qtbase-5))
897 (synopsis "Qt Connectivity module")
898 (description "The Qt Connectivity modules provides modules for interacting
899 with Bluetooth and NFC.")))
901 (define-public qtwebsockets
902 (package (inherit qtsvg)
903 (name "qtwebsockets")
907 (uri (qt5-urls name version))
910 "0f120rfqnmlffjhrm5jbpipk1qsbzp1a2v3q8gz94hz6n9dqpav6"))))
912 (substitute-keyword-arguments (package-arguments qtsvg)
913 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
915 (list perl qtdeclarative))
916 (inputs (list qtbase-5))
917 (synopsis "Qt Web Sockets module")
918 (description "WebSocket is a web-based protocol designed to enable two-way
919 communication between a client application and a remote host. The Qt
920 WebSockets module provides C++ and QML interfaces that enable Qt applications
921 to act as a server that can process WebSocket requests, or a client that can
922 consume data received from the server, or both.")))
924 (define-public qtsensors
925 (package (inherit qtsvg)
930 (uri (qt5-urls name version))
933 "0zlhm4js02niibb23rw87wf4ik0gy4ai08fwprnwy7zf4rm1ss3d"))))
935 (substitute-keyword-arguments (package-arguments qtsvg)
936 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
938 `(modify-phases ,phases
939 (add-after 'unpack 'fix-tests
941 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
942 (("2000") "5000") ;lengthen test timeout
943 (("QTest::newRow(\"twist\") << \"twist\"") "")))))))) ;failing test
945 (list perl qtdeclarative))
946 (inputs (list qtbase-5))
947 (synopsis "Qt Sensors module")
948 (description "The Qt Sensors API provides access to sensor hardware via QML
949 and C++ interfaces. The Qt Sensors API also provides a motion gesture
950 recognition API for devices.")))
952 (define-public qtmultimedia
953 (package (inherit qtsvg)
954 (name "qtmultimedia")
958 (uri (qt5-urls name version))
961 "0q76iy1frcgm85mid17lh4p6gnn04n19n6zklgpv4w3md1ng97xw"))
962 (modules '((guix build utils)))
965 (delete-file-recursively
966 "examples/multimedia/spectrum/3rdparty")
967 ;; We also prevent the spectrum example from being built.
968 (substitute* "examples/multimedia/multimedia.pro"
969 (("spectrum") "#"))))))
971 (substitute-keyword-arguments (package-arguments qtsvg)
973 `(modify-phases ,phases
975 (lambda* (#:key outputs #:allow-other-keys)
976 (let ((out (assoc-ref outputs "out")))
977 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
978 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
979 (string-append "PREFIX=" out)))))))
980 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
982 (list perl pkg-config python qtdeclarative))
988 ;; Gstreamer is needed for the mediaplayer plugin
991 (synopsis "Qt Multimedia module")
992 (description "The Qt Multimedia module provides set of APIs to play and
993 record media, and manage a collection of media content. It also contains a
994 set of plugins for interacting with pulseaudio and GStreamer.")))
996 (define-public qtwayland
997 (package (inherit qtsvg)
1002 (uri (qt5-urls name version))
1005 "0yy8qf9kn15iqsxi2r7jbcsc0vsdyfz7bbxmfn4i9qmz1yvg0jgr"))))
1007 (substitute-keyword-arguments (package-arguments qtsvg)
1009 `(modify-phases ,phases
1010 (add-after 'unpack 'disable-failing-tests
1012 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
1013 ;; reason and breaks these two tests.
1014 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
1015 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
1016 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
1018 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
1020 (add-before 'check 'set-test-environment
1022 ;; Do not fail just because /etc/machine-id is missing.
1023 (setenv "DBUS_FATAL_WARNINGS" "0")))))))
1025 (list glib perl pkg-config qtdeclarative))
1027 `(("fontconfig" ,fontconfig)
1028 ("freetype" ,freetype)
1030 ("libxcomposite" ,libxcomposite)
1031 ("libxext" ,libxext)
1032 ("libxkbcommon" ,libxkbcommon)
1033 ("libxrender" ,libxrender)
1036 ("qtbase" ,qtbase-5)
1037 ("vulkan-headers" ,vulkan-headers)
1038 ("wayland" ,wayland)))
1039 (synopsis "Qt Wayland module")
1040 (description "The Qt Wayland module provides the QtWayland client and
1041 compositor libraries.")))
1043 (define-public qtserialport
1044 (package (inherit qtsvg)
1045 (name "qtserialport")
1049 (uri (qt5-urls name version))
1052 "0xg2djwhrj5jqamawlp75g70nmwbp2ph2hh1pm45s36jkxm0k7al"))))
1053 (native-inputs (list perl))
1055 (list qtbase-5 eudev))
1057 (substitute-keyword-arguments (package-arguments qtsvg)
1059 `(modify-phases ,phases
1060 (add-after 'unpack 'patch-dlopen-paths
1061 (lambda* (#:key inputs #:allow-other-keys)
1062 (substitute* "src/serialport/qtudev_p.h"
1063 ;; Use the absolute paths for dynamically loaded libs,
1064 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1065 ;; typically is not set in guix.
1066 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1067 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))))))))
1068 (synopsis "Qt Serial Port module")
1069 (description "The Qt Serial Port module provides the library for
1070 interacting with serial ports from within Qt.")))
1072 (define-public qtserialbus
1073 (package (inherit qtsvg)
1074 (name "qtserialbus")
1078 (uri (qt5-urls name version))
1081 "180gm1jvqfn0h3251zafdd1wd3af00phwaa5qljsbrj6s6ywj79j"))))
1083 (substitute-keyword-arguments (package-arguments qtsvg)
1084 ((#:phases phases '%standard-phases)
1085 `(modify-phases ,phases
1086 (add-after 'unpack 'patch-libsocketcan-reference
1087 (lambda* (#:key inputs #:allow-other-keys)
1088 (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
1089 (libcansocket.so (string-append libcansocket
1090 "/lib/libsocketcan.so")))
1091 (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
1092 (("QStringLiteral\\(\"socketcan\"\\)")
1093 (format #f "QStringLiteral(~s)" libcansocket.so))))))))))
1095 (list libsocketcan qtbase-5 qtserialport))
1096 (synopsis "Qt Serial Bus module")
1097 (description "The Qt Serial Bus API provides classes and functions to
1098 access the various industrial serial buses and protocols, such as CAN, ModBus,
1101 (define-public qtwebchannel
1102 (package (inherit qtsvg)
1103 (name "qtwebchannel")
1107 (uri (qt5-urls name version))
1110 "1w8mcpdqlphgg3a6yfq18liwlj2nkwrafv0n80h242x5l2mk3ljf"))))
1112 (list perl qtdeclarative qtwebsockets))
1113 (inputs (list qtbase-5))
1114 (synopsis "Web communication library for Qt")
1115 (description "The Qt WebChannel module enables peer-to-peer communication
1116 between the host (QML/C++ application) and the client (HTML/JavaScript
1117 application). The transport mechanism is supported out of the box by the two
1118 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1120 (define-public qtwebglplugin
1121 (package (inherit qtsvg)
1122 (name "qtwebglplugin")
1126 (uri (qt5-urls name version))
1129 "1m0p4ssykw07lbip2qyv6w34f8ng13bxb63j0w446f5w0492nn9f"))))
1131 (substitute-keyword-arguments (package-arguments qtsvg)
1133 `(modify-phases ,phases
1134 (add-after 'unpack 'disable-network-tests
1135 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1136 (("webgl") "# webgl"))))))))
1139 (list mesa qtbase-5 qtdeclarative qtwebsockets zlib))
1140 (synopsis "QPA plugin for running an application via a browser using
1141 streamed WebGL commands")
1142 (description "Qt back end that uses WebGL for rendering. It allows Qt
1143 applications (with some limitations) to run in a web browser that supports
1144 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1145 compatible web browser without the use of plug-ins. The API is similar to
1146 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1148 (define-public qtwebview
1149 (package (inherit qtsvg)
1154 (uri (qt5-urls name version))
1157 "0arwaky3jy5ql3z4d8f7k7diidzb1kncdans7pn50hsa1bzacfal"))))
1161 (list qtbase-5 qtdeclarative))
1162 (synopsis "Display web content in a QML application")
1163 (description "Qt WebView provides a way to display web content in a QML
1164 application without necessarily including a full web browser stack by using
1165 native APIs where it makes sense.")))
1167 (define-public qtlocation
1168 (package (inherit qtsvg)
1173 (uri (qt5-urls name version))
1176 "0mlhhhcxx3gpr9kh04c6fljxcj50c2j21r0wb9f7d7nk4flip7b2"))))
1178 (substitute-keyword-arguments (package-arguments qtsvg)
1179 ((#:tests? _ #f) #f) ; TODO: Enable the tests
1181 `(modify-phases ,phases
1182 (add-before 'check 'pre-check
1184 (setenv "HOME" "/tmp")))))))
1186 (list perl qtdeclarative qtquickcontrols qtserialport))
1188 (list icu4c openssl qtbase-5 zlib))
1189 (synopsis "Qt Location and Positioning modules")
1190 (description "The Qt Location module provides an interface for location,
1191 positioning and geolocation plugins.")))
1193 (define-public qttools
1194 (package (inherit qtsvg)
1199 (uri (qt5-urls name version))
1202 "0v7wkzq9i8w3qrw0z8al7lb6clr57lfisyb1fm9cnhi73fvph1vd"))))
1204 (substitute-keyword-arguments (package-arguments qtsvg)
1205 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1207 (list perl qtdeclarative vulkan-headers))
1209 (list mesa qtbase-5))
1210 (synopsis "Qt Tools and Designer modules")
1211 (description "The Qt Tools module provides a set of applications to browse
1212 the documentation, translate applications, generate help files and other stuff
1213 that helps in Qt development.")))
1215 (define-public qtscript
1216 (package (inherit qtsvg)
1221 (uri (qt5-urls name version))
1224 "17yk0p8ci47xlfpllc17arlycng47wrnnskimskzz85bspabc8pm"))
1225 (patches (search-patches "qtscript-disable-tests.patch"))))
1227 (list perl qttools))
1230 (synopsis "Qt Script module")
1231 (description "Qt provides support for application scripting with ECMAScript.
1232 The following guides and references cover aspects of programming with
1233 ECMAScript and Qt.")))
1235 (define-public qtquickcontrols
1236 (package (inherit qtsvg)
1237 (name "qtquickcontrols")
1241 (uri (qt5-urls name version))
1244 "0mjw25wcgd2bvjz9rr4qjydb423c63615rcx1vws4jmydqdihssr"))))
1246 (substitute-keyword-arguments (package-arguments qtsvg)
1247 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1249 (list qtbase-5 qtdeclarative))
1250 (synopsis "Qt Quick Controls and other Quick modules")
1251 (description "The QtScript module provides classes for making Qt
1252 applications scriptable. This module provides a set of extra components that
1253 can be used to build complete interfaces in Qt Quick.")))
1255 (define-public qtquickcontrols2
1256 (package (inherit qtsvg)
1257 (name "qtquickcontrols2")
1261 (uri (qt5-urls name version))
1264 "1cxg4ml07k1zcyi5m4lx06sz8f5l67isb5vhk7nakxm0wnn7p8y4"))))
1266 (substitute-keyword-arguments (package-arguments qtsvg)
1267 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1269 (list qtbase-5 qtdeclarative))
1270 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1271 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1272 module that provides platform integration: native dialogs, menus and menu bars,
1273 and tray icons. It falls back to Qt Widgets when a native implementation is
1276 (define-public qtgraphicaleffects
1277 (package (inherit qtsvg)
1278 (name "qtgraphicaleffects")
1282 (uri (qt5-urls name version))
1285 "0xznn5zqp6xrqfgl54l8cig9asqf9m2hz0p3ga514rh8spmdazr3"))))
1287 (substitute-keyword-arguments (package-arguments qtsvg)
1288 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1290 (list qtbase-5 qtdeclarative))
1291 (synopsis "Qt Graphical Effects module")
1292 (description "The Qt Graphical Effects module provides a set of QML types
1293 for adding visually impressive and configurable effects to user interfaces.
1294 Effects are visual items that can be added to Qt Quick user interface as UI
1295 components. The API consists of over 20 effects provided as separate QML
1296 types. The effects cover functional areas such as blending, masking, blurring,
1297 coloring, and many more.")))
1299 (define-public qtgamepad
1300 (package (inherit qtsvg)
1305 (uri (qt5-urls name version))
1308 "0wa4d8f025hlp4bmdzdy5wcahm9wjg6bkwig8dpw9nrsj3idz5b0"))))
1310 (list perl pkg-config))
1312 `(("fontconfig" ,fontconfig)
1313 ("freetype" ,freetype)
1314 ("libxrender" ,libxrender)
1316 ("qtbase" ,qtbase-5)
1317 ("qtdeclarative" ,qtdeclarative)))
1318 (synopsis "Qt Gamepad module")
1319 (description "The Qt Gamepad module is an add-on library that enables Qt
1320 applications to support the use of gamepad hardware and in some cases remote
1321 control equipment. The module provides both QML and C++ interfaces. The
1322 primary target audience are embedded devices with fullscreen user interfaces,
1323 and mobile applications targeting TV-like form factors.")))
1325 (define-public qtscxml
1326 (package (inherit qtsvg)
1331 (uri (qt5-urls name version))
1334 "0xf5mqsrw16h8xjglymgfc8qg2qa5bi4fgdl4j3dkhvvpr7vrphp"))
1335 (modules '((guix build utils)))
1338 (delete-file-recursively "tests/3rdparty")
1339 ;; the scion test refers to the bundled 3rd party test code.
1340 (substitute* "tests/auto/auto.pro"
1341 (("scion") "#"))))))
1343 (substitute-keyword-arguments (package-arguments qtsvg)
1344 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1346 (list qtbase-5 qtdeclarative))
1347 (synopsis "Qt SCXML module")
1348 (description "The Qt SCXML module provides functionality to create state
1349 machines from SCXML files. This includes both dynamically creating state
1350 machines (loading the SCXML file and instantiating states and transitions) and
1351 generating a C++ file that has a class implementing the state machine. It
1352 also contains functionality to support data models and executable content.")))
1354 (define-public qtpurchasing
1355 (package (inherit qtsvg)
1356 (name "qtpurchasing")
1360 (uri (qt5-urls name version))
1363 "04z6mwzn73gg56hgs7gividinfgndx4kmcnp7w6h3wamrdlkfdx7"))))
1365 (list qtbase-5 qtdeclarative))
1366 (synopsis "Qt Purchasing module")
1367 (description "The Qt Purchasing module provides and in-app API for
1368 purchasing goods and services.")))
1370 (define-public qtcharts
1371 (package (inherit qtsvg)
1376 (uri (qt5-urls name version))
1379 "0y051i1837bfybkf8cm7cx8k5wjmbi47pxawaaz6wm0hd2z5b4qi"))))
1381 (substitute-keyword-arguments (package-arguments qtsvg)
1383 `(modify-phases ,phases
1384 (add-after 'unpack 'remove-failing-test
1386 (substitute* "tests/auto/auto.pro"
1388 (("qml-qtquicktest") "# qml-qtquicktest"))))))))
1390 (list qtbase-5 qtdeclarative))
1391 (synopsis "Qt Charts module")
1392 (description "The Qt Charts module provides a set of easy to use chart
1393 components. It uses the Qt Graphics View Framework, therefore charts can be
1394 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1395 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1396 selecting one of the charts themes.")
1397 (license license:gpl3)))
1399 (define-public qtdatavis3d
1400 (package (inherit qtsvg)
1401 (name "qtdatavis3d")
1405 (uri (qt5-urls name version))
1408 "0sczwqlc36jdywf7bqxz0hm6mr7fn8p1fsnc33jliiqzn9yrg77x"))))
1410 (substitute-keyword-arguments (package-arguments qtsvg)
1411 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1413 (list qtbase-5 qtdeclarative))
1414 (synopsis "Qt Data Visualization module")
1415 (description "The Qt Data Visualization module provides a way to visualize
1416 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1417 visualizing depth maps and large quantities of rapidly changing data, such as
1418 data received from multiple sensors. The look and feel of graphs can be
1419 customized by using themes or by adding custom items and labels to them.")
1420 (license license:gpl3)))
1422 (define-public qtnetworkauth
1423 (package (inherit qtsvg)
1424 (name "qtnetworkauth")
1428 (uri (qt5-urls name version))
1431 "0c7mz715rlpg0cqgs6s0aszmslyamkhnpamc1iij6i571sj5j2f1"))))
1434 (synopsis "Qt Network Authorization module")
1435 (description "The Qt Network Authorization module provides an
1436 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1438 (define-public qtremoteobjects
1439 (package (inherit qtsvg)
1440 (name "qtremoteobjects")
1444 (uri (qt5-urls name version))
1447 "1m0xcqlbxsfn0cd4ajin1h3i4l51dajmkw91v0r4a61xi14i0kks"))))
1449 (substitute-keyword-arguments (package-arguments qtsvg)
1451 `(modify-phases ,phases
1452 (add-after 'unpack 'remove-failing-test
1454 ;; This test can't find its imports.
1455 (substitute* "tests/auto/qml/qml.pro"
1456 (("integration") "# integration")
1457 (("usertypes") "# usertypes"))
1458 ;; disable failing tests: they need network
1459 (substitute* "tests/auto/auto.pro"
1460 (("integration_multiprocess proxy_multiprocess integration_external restart")
1461 "integration_multiprocess"))))))))
1463 (list qtbase-5 qtdeclarative))
1464 (synopsis "Qt Remote Objects module")
1465 (description "The Qt Remote Objects module is an @dfn{inter-process
1466 communication} (IPC) module developed for Qt. The idea is to extend existing
1467 Qt's functionalities to enable an easy exchange of information between
1468 processes or computers.")))
1470 (define-public qtspeech
1471 (package (inherit qtsvg)
1476 (uri (qt5-urls name version))
1479 "0xskp9dzjy5nqszygk8gwvjyiylgynx5sq3nk2vi3zwgfdh5jpm4"))))
1481 (substitute-keyword-arguments (package-arguments qtsvg)
1482 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1486 (list perl qtdeclarative qtmultimedia qtxmlpatterns))
1487 (synopsis "Qt Speech module")
1488 (description "The Qt Speech module enables a Qt application to support
1489 accessibility features such as text-to-speech, which is useful for end-users
1490 who are visually challenged or cannot access the application for whatever
1491 reason. The most common use case where text-to-speech comes in handy is when
1492 the end-user is driving and cannot attend the incoming messages on the phone.
1493 In such a scenario, the messaging application can read out the incoming
1496 (define-public qtspell
1504 (url "https://github.com/manisandro/qtspell")
1506 (file-name (git-file-name name version))
1508 (base32 "19ff6jzm699wrxrk57w3d4kl9qxgdipdikpwls9n4aqv4mw7g969"))))
1509 (build-system cmake-build-system)
1511 `(#:tests? #f)) ;no test
1513 (list pkg-config qttools))
1515 (list enchant qtbase-5))
1516 (home-page "https://github.com/manisandro/qtspell")
1517 (synopsis "Spell checking for Qt text widgets")
1519 "QtSpell adds spell-checking functionality to Qt's text widgets,
1520 using the Enchant spell-checking library.")
1521 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
1522 (license license:gpl2+)))
1524 (define-public qtwebengine
1527 (name "qtwebengine")
1532 (uri (qt5-urls name version))
1535 "0zahr9w6rqdxwh2whsgk3fhcszs7wa9j95lq4sqi8xzin2wcgl17"))
1536 (modules '((ice-9 ftw)
1540 (guix build utils)))
1543 (let ((preserved-third-party-files
1544 '("base/third_party/double_conversion"
1545 "base/third_party/cityhash"
1546 "base/third_party/cityhash_v103"
1547 "base/third_party/dynamic_annotations"
1548 "base/third_party/icu"
1549 "base/third_party/libevent"
1550 "base/third_party/nspr"
1551 "base/third_party/superfasthash"
1552 "base/third_party/symbolize"
1553 "base/third_party/xdg_mime"
1554 "base/third_party/xdg_user_dirs"
1555 "net/third_party/mozilla_security_manager"
1556 "net/third_party/nss"
1557 "net/third_party/quiche"
1558 "net/third_party/uri_template"
1559 "third_party/abseil-cpp"
1561 "third_party/angle/src/common/third_party/base"
1562 "third_party/angle/src/common/third_party/smhasher"
1563 "third_party/angle/src/common/third_party/xxhash"
1564 "third_party/angle/src/third_party/compiler"
1565 "third_party/axe-core"
1567 "third_party/boringssl"
1568 "third_party/boringssl/src/third_party/fiat"
1569 "third_party/breakpad"
1570 "third_party/brotli"
1571 "third_party/catapult/common/py_vulcanize/py_vulcanize"
1572 "third_party/catapult/common/py_vulcanize/third_party"
1573 "third_party/catapult/third_party/beautifulsoup4"
1574 "third_party/catapult/third_party/html5lib-python"
1575 "third_party/catapult/third_party/polymer/components"
1576 "third_party/catapult/tracing"
1577 "third_party/catapult/tracing/third_party"
1580 "third_party/closure_compiler"
1581 "third_party/crashpad"
1582 "third_party/crashpad/crashpad/third_party/lss"
1583 "third_party/crashpad/crashpad/third_party/zlib"
1584 "third_party/crc32c"
1587 "third_party/devtools-frontend"
1588 "third_party/devtools-frontend/src/front_end/third_party"
1589 "third_party/devtools-frontend/src/third_party/typescript"
1590 "third_party/emoji-segmenter"
1591 "third_party/ffmpeg"
1592 "third_party/googletest"
1593 "third_party/harfbuzz-ng/utils"
1594 "third_party/hunspell"
1595 "third_party/iccjpeg"
1597 "third_party/inspector_protocol"
1598 "third_party/jinja2"
1599 "third_party/jsoncpp"
1600 "third_party/jstemplate"
1601 "third_party/khronos"
1602 "third_party/leveldatabase"
1603 "third_party/libaddressinput"
1604 "third_party/libavif"
1605 "third_party/libgifcodec"
1606 "third_party/libjingle_xmpp"
1607 "third_party/libjpeg_turbo"
1608 "third_party/libpng"
1609 "third_party/libsrtp"
1610 "third_party/libsync"
1611 "third_party/libudev"
1612 "third_party/libvpx"
1613 "third_party/libwebm"
1614 "third_party/libwebp"
1615 "third_party/libxml"
1616 "third_party/libxslt"
1617 "third_party/libyuv"
1618 "third_party/lottie"
1621 "third_party/markupsafe"
1622 "third_party/mesa_headers"
1623 "third_party/metrics_proto"
1624 "third_party/modp_b64"
1627 "third_party/one_euro_filter"
1628 "third_party/openh264/src/codec/api/svc"
1631 "third_party/pdfium"
1632 "third_party/pdfium/third_party/agg23"
1633 "third_party/pdfium/third_party/base"
1634 "third_party/pdfium/third_party/freetype"
1635 "third_party/pdfium/third_party/lcms"
1636 "third_party/pdfium/third_party/libopenjpeg20"
1637 "third_party/pdfium/third_party/skia_shared"
1638 "third_party/perfetto"
1641 "third_party/polymer"
1642 "third_party/protobuf"
1643 "third_party/protobuf/third_party/six"
1644 "third_party/pyjson5"
1646 "third_party/rnnoise"
1648 "third_party/skia/include/third_party/skcms/skcms.h"
1649 "third_party/skia/include/third_party/vulkan"
1650 "third_party/skia/third_party/skcms"
1651 "third_party/smhasher"
1652 "third_party/snappy"
1653 "third_party/sqlite"
1654 "third_party/usb_ids"
1655 "third_party/usrsctp"
1656 "third_party/vulkan_memory_allocator"
1657 "third_party/web-animations-js"
1658 "third_party/webrtc"
1659 "third_party/webrtc/common_audio/third_party/ooura/fft_size_128"
1660 "third_party/webrtc/common_audio/third_party/ooura/fft_size_256"
1661 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
1662 "third_party/webrtc/modules/third_party/fft"
1663 "third_party/webrtc/modules/third_party/g711"
1664 "third_party/webrtc/modules/third_party/g722"
1665 "third_party/webrtc/rtc_base/third_party/base64"
1666 "third_party/webrtc/rtc_base/third_party/sigslot"
1667 "third_party/webrtc_overrides"
1668 "third_party/widevine/cdm/widevine_cdm_common.h"
1669 "third_party/widevine/cdm/widevine_cdm_version.h"
1671 "third_party/xcbproto"
1673 "url/third_party/mozilla"
1674 "v8/src/third_party/utf8-decoder"
1675 "v8/src/third_party/valgrind"
1676 "v8/src/third_party/siphash"
1677 "v8/third_party/v8/builtins"
1678 "v8/third_party/inspector_protocol"))
1679 (protected (make-regexp "\\.(gn|gyp)i?$")))
1680 (define preserved-club
1681 (map (lambda (member)
1682 (string-append "./" member))
1683 preserved-third-party-files))
1684 (define (empty? dir)
1685 (equal? (scandir dir) '("." "..")))
1686 (define (third-party? file)
1687 (string-contains file "third_party/"))
1688 (define (useless? file)
1689 (any (cute string-suffix? <> file)
1690 '(".zip" ".so" ".dll" ".exe" ".jar")))
1691 (define (parents child)
1692 ;; Return all parent directories of CHILD up to and including
1693 ;; the closest "third_party".
1694 (let* ((dirs (match (string-split child #\/)
1695 ((dirs ... last) dirs)))
1696 (closest (list-index (lambda (dir)
1697 (string=? "third_party" dir))
1699 (delim (- (length dirs) closest)))
1700 (fold (lambda (dir prev)
1701 (cons (string-append (car prev) "/" dir)
1703 (list (string-join (list-head dirs delim) "/"))
1704 (list-tail dirs delim))))
1705 (define (remove-loudly file)
1706 (format #t "deleting ~a...~%" file)
1709 (define (delete-unwanted-files child stat flag base level)
1711 ((or 'regular 'symlink 'stale-symlink)
1712 (when (third-party? child)
1713 (unless (or (member child preserved-club)
1714 (any (cute member <> preserved-club)
1716 (regexp-exec protected child))
1717 (remove-loudly child)))
1718 (when (and (useless? child) (file-exists? child))
1719 (remove-loudly child))
1721 ('directory-processed
1722 (when (empty? child)
1727 (with-directory-excursion "src/3rdparty"
1728 ;; TODO: Try removing "gn" too for future versions of qtwebengine.
1729 (delete-file-recursively "ninja")
1731 (with-directory-excursion "chromium"
1732 ;; Delete bundled software and binaries that were not explicitly
1734 (nftw "." delete-unwanted-files 'depth 'physical)
1736 ;; Assert that each preserved item is present to catch removals.
1737 (for-each (lambda (third-party)
1738 (unless (file-exists? third-party)
1739 (error (format #f "~s does not exist!~%" third-party))))
1742 ;; Use relative header locations instead of hard coded ones.
1744 "base/third_party/dynamic_annotations/dynamic_annotations.c"
1745 (("base/third_party/valgrind") "valgrind"))
1747 '("third_party/breakpad/breakpad/src/common/linux/http_upload.cc"
1748 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h")
1749 (("third_party/curl") "curl"))
1751 '("components/viz/common/gpu/vulkan_context_provider.h"
1752 "components/viz/common/resources/resource_format_utils.h"
1753 "gpu/config/gpu_info_collector_win.cc"
1754 "gpu/config/gpu_util.cc"
1755 "gpu/config/vulkan_info.h")
1756 (("third_party/vulkan_headers/include/")
1759 ;; Replace Google Analytics bundle with an empty file and hope
1761 (mkdir-p "third_party/analytics")
1762 (call-with-output-file
1763 "third_party/analytics/google-analytics-bundle.js"
1766 ;; Do not enable support for loading the Widevine DRM plugin.
1767 (substitute* "src/buildtools/config/common.pri"
1768 (("enable_widevine=true")
1769 "enable_widevine=false")))))))
1770 (build-system gnu-build-system)
1807 ;; FIXME: libxml2 needs to built with icu support though it links to
1808 ;; libxml2 configure summary still states "Checking for compatible
1809 ;; system libxml2... no"
1834 (substitute-keyword-arguments (package-arguments qtsvg)
1835 ((#:modules modules '())
1836 `((guix build gnu-build-system)
1838 (ice-9 textual-ports)))
1840 `(modify-phases ,phases
1841 (add-before 'configure 'substitute-source
1842 (lambda* (#:key inputs outputs #:allow-other-keys)
1843 (let ((out (assoc-ref outputs "out")))
1844 (with-atomic-file-replacement
1845 "src/buildtools/config/linux.pri"
1847 (display (get-string-all in) out)
1848 (display "\ngn_args += use_system_openh264=true\n" out)))
1849 ;; Qtwebengine is not installed into the same prefix as
1850 ;; qtbase. Some qtbase QTLibraryInfo constants will not
1851 ;; work. Replace with the full path to the qtwebengine
1852 ;; translations and locales in the store.
1853 (substitute* "src/core/web_engine_library_info.cpp"
1854 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
1855 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
1856 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
1857 (string-append "QLatin1String(\"" out "/share/qt5\")")))
1858 ;; Substitute full dynamic library path for nss.
1859 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
1861 (search-input-file inputs "lib/nss/libnssckbi.so")))
1862 ;; Substitute full dynamic library path for udev.
1863 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
1865 (search-input-file inputs "lib/libudev.so.1"))))))
1866 (add-before 'configure 'set-env
1868 ;; Avoids potential race conditions.
1869 (setenv "PYTHONDONTWRITEBYTECODE" "1")
1870 (setenv "NINJAFLAGS"
1871 (string-append "-k1" ;less verbose build output
1872 ;; Respect the '--cores' option of 'guix build'.
1873 " -j" (number->string (parallel-job-count))))))
1876 ;; Valid QT_BUILD_PARTS variables are:
1877 ;; libs tools tests examples demos docs translations
1878 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
1879 "--webengine-printing-and-pdf=no"
1880 "--webengine-ffmpeg=system"
1881 ;; FIXME: Building qtwebengine 5.12.2 with
1882 ;; icu4c >= 68 fails.
1883 ;;"--webengine-icu=system"
1884 "--webengine-pepper-plugins=no"
1885 "-webengine-proprietary-codecs")))))
1886 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
1887 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
1888 ;; before running tests.
1889 ((#:tests? _ #f) #f)))
1890 (native-search-paths
1891 (list (search-path-specification
1892 (file-type 'regular)
1894 (variable "QTWEBENGINEPROCESS_PATH")
1895 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
1896 (home-page "https://wiki.qt.io/QtWebEngine")
1897 (synopsis "Qt WebEngine module")
1898 (description "The Qt5WebEngine module provides support for web applications
1899 using the Chromium browser project. The Chromium source code has Google services
1900 and binaries removed, and adds modular support for using system libraries.")
1901 (license license:lgpl2.1+)))
1903 (define-public single-application-qt5
1904 ;; Change in function signature, nheko requires at least this commit
1905 (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053"))
1907 (name "single-application-qt5")
1908 (version (string-append "3.2.0-" (string-take commit 7)))
1914 (url "https://github.com/itay-grudev/SingleApplication")
1916 (file-name (git-file-name name version))
1919 "163aa2x2qb0h8w26si5ql833ilj427jjbdwlz1p2p8iaq6dh0vq1"))))
1920 (build-system cmake-build-system)
1922 `(#:tests? #f ; no check target
1923 ;; Projects can decide how to build this library. You might need to
1924 ;; override this flag (QApplication, QGuiApplication or
1925 ;; QCoreApplication).
1926 #:configure-flags '("-DQAPPLICATION_CLASS=QApplication")
1928 (modify-phases %standard-phases
1929 ;; No install target, install things manually
1931 (lambda* (#:key inputs outputs source #:allow-other-keys)
1932 (let* ((qt (assoc-ref inputs "qtbase"))
1933 (qt-version ,(version-major (package-version qtbase-5)))
1934 (out (assoc-ref outputs "out")))
1936 "libSingleApplication.a" (string-append out "/lib"))
1940 (string-append source "/" file)
1941 (string-append out "/include")))
1942 '("SingleApplication"
1943 "singleapplication.h" "singleapplication_p.h"))
1947 (home-page "https://github.com/itay-grudev/SingleApplication")
1948 (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6")
1950 "SingleApplication is a replacement of the QtSingleApplication for Qt5 and Qt6.
1952 It keeps the Primary Instance of your Application and kills each subsequent
1953 instances. It can (if enabled) spawn secondary (non-related to the primary)
1954 instances and can send data to the primary instance from secondary
1956 (license license:expat))))
1958 (define-public python-sip
1965 (uri (list (pypi-uri "sip" version)
1966 (string-append "https://www.riverbankcomputing.com/static/"
1967 "Downloads/sip/" version
1968 "/sip-" version ".tar.gz")))
1971 "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"))))
1972 (build-system python-build-system)
1974 (list python-wrapper))
1976 (list python-toml python-packaging))
1977 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1978 (synopsis "Python binding creator for C and C++ libraries")
1980 "SIP is a tool to create Python bindings for C and C++ libraries. It
1981 was originally developed to create PyQt, the Python bindings for the Qt
1982 toolkit, but can be used to create bindings for any C or C++ library.
1984 SIP comprises a code generator and a Python module. The code generator
1985 processes a set of specification files and generates C or C++ code, which
1986 is then compiled to create the bindings extension module. The SIP Python
1987 module provides support functions to the automatically generated code.")
1988 ;; There is a choice between a python like license, gpl2 and gpl3.
1989 ;; For compatibility with pyqt, we need gpl3.
1990 (license license:gpl3)))
1992 (define-public python-sip-4
1994 (inherit python-sip)
2000 (uri (list (pypi-uri "sip" version)
2001 (string-append "https://www.riverbankcomputing.com/static/"
2002 "Downloads/sip/" version
2003 "/sip-" version ".tar.gz")))
2006 "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"))))
2007 (build-system gnu-build-system)
2009 `(("python" ,python-wrapper)))
2010 (propagated-inputs `())
2012 `(#:tests? #f ; no check target
2013 #:imported-modules ((guix build python-build-system)
2014 ,@%gnu-build-system-modules)
2015 #:modules ((srfi srfi-1)
2016 ((guix build python-build-system) #:select (python-version))
2017 ,@%gnu-build-system-modules)
2019 (modify-phases %standard-phases
2021 (lambda* (#:key inputs outputs #:allow-other-keys)
2022 (let* ((out (assoc-ref outputs "out"))
2023 (bin (string-append out "/bin"))
2024 (include (string-append out "/include"))
2025 (python (assoc-ref inputs "python"))
2026 (lib (string-append out "/lib/python"
2027 (python-version python)
2029 (invoke "python" "configure.py"
2032 "--incdir" include)))))))
2033 (license license:gpl3)))
2035 (define-public python-pyqt
2037 (name "python-pyqt")
2042 ;; PyPI is the canonical distribution point of PyQt. Older
2043 ;; releases are available from the web site.
2044 (uri (list (pypi-uri "PyQt5" version)
2045 (string-append "https://www.riverbankcomputing.com/static/"
2046 "Downloads/PyQt5/" version "/PyQt5-"
2047 version ".tar.gz")))
2048 (file-name (string-append "PyQt5-" version ".tar.gz"))
2051 "0aya963kkmbwfwmpd0p6k85y4g7wl5zarjqxxfgir403zalbf4dl"))
2052 (patches (search-patches "pyqt-configure.patch"))))
2053 (build-system gnu-build-system)
2055 (list qtbase-5)) ; for qmake
2057 (list python-sip python-pyqt5-sip))
2059 `(("python" ,python-wrapper)
2060 ("qtbase" ,qtbase-5)
2061 ("qtconnectivity" ,qtconnectivity)
2062 ("qtdeclarative" ,qtdeclarative)
2063 ("qtlocation" ,qtlocation)
2064 ("qtmultimedia" ,qtmultimedia)
2065 ("qtsensors" ,qtsensors)
2066 ("qtserialport" ,qtserialport)
2068 ("qttools" ,qttools)
2069 ("qtwebchannel" ,qtwebchannel)
2070 ("qtwebkit" ,qtwebkit)
2071 ("qtwebsockets" ,qtwebsockets)
2072 ("qtx11extras" ,qtx11extras)
2073 ("qtxmlpatterns" ,qtxmlpatterns)))
2075 `(#:modules ((srfi srfi-1)
2076 ((guix build python-build-system) #:select (python-version))
2077 ,@%gnu-build-system-modules)
2078 #:imported-modules ((guix build python-build-system)
2079 ,@%gnu-build-system-modules)
2081 (modify-phases %standard-phases
2082 ;; When building python-pyqtwebengine, <qprinter.h> can not be
2083 ;; included. Here we substitute the full path to the header in the
2085 (add-before 'configure 'substitute-source
2086 (lambda* (#:key inputs #:allow-other-keys)
2087 (let* ((qtbase (assoc-ref inputs "qtbase"))
2088 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
2089 (substitute* "sip/QtPrintSupport/qprinter.sip"
2094 (lambda* (#:key inputs outputs #:allow-other-keys)
2095 (let* ((out (assoc-ref outputs "out"))
2096 (bin (string-append out "/bin"))
2097 (sip (string-append out "/share/sip"))
2098 (plugins (string-append out "/lib/qt5/plugins"))
2099 (designer (string-append plugins "/designer"))
2100 (qml (string-append plugins "/PyQt5"))
2101 (python (assoc-ref inputs "python"))
2102 (lib (string-append out "/lib/python"
2103 (python-version python)
2105 (stubs (string-append lib "/PyQt5")))
2106 (invoke "python" "configure.py"
2110 "--designer-plugindir" designer
2111 "--qml-plugindir" qml
2112 ; Where to install the PEP 484 Type Hints stub
2113 ; files. Without this the stubs are tried to be
2114 ; installed into the python package's
2115 ; site-package directory, which is read-only.
2117 "--sipdir" sip)))))))
2118 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
2119 (synopsis "Python bindings for Qt")
2121 "PyQt is a set of Python v2 and v3 bindings for the Qt application
2122 framework. The bindings are implemented as a set of Python modules and
2123 contain over 620 classes.")
2124 (license license:gpl3)))
2126 (define-public python-pyqt5-sip
2128 (name "python-pyqt5-sip")
2133 (uri (pypi-uri "PyQt5_sip" version))
2136 "09771b6fdn0rx34l5a0wzcd899yd57zxp5sw3bsqhd25biwhiq4p"))))
2137 (build-system python-build-system)
2139 `(#:tests? #f)) ;; No test code.
2140 (home-page "https://www.riverbankcomputing.com/software/sip/")
2141 (synopsis "Sip module support for PyQt5")
2142 (description "Sip module support for PyQt5")
2143 (license license:lgpl2.1+)))
2145 (define-public python-pyqtwebengine
2147 (name "python-pyqtwebengine")
2152 ;; The newest releases are only available on PyPI. Older ones
2153 ;; are mirrored at the upstream home page.
2154 (uri (list (pypi-uri "PyQtWebEngine" version)
2155 (string-append "https://www.riverbankcomputing.com/static"
2156 "/Downloads/PyQtWebEngine/" version
2157 "/PyQtWebEngine-" version ".tar.gz")))
2160 "0hdr0g0rzlhsnylhfk826pq1lw8p9dqcr8yma2wy9dgjrj6n0ixb"))))
2161 (build-system gnu-build-system)
2163 (list python python-sip
2164 ;; qtbase is required for qmake
2167 `(("python" ,python-wrapper)
2168 ("python-sip" ,python-sip)
2169 ("python-pyqt" ,python-pyqt-without-qtwebkit)
2170 ("qtbase" ,qtbase-5)
2172 ("qtdeclarative" ,qtdeclarative)
2173 ("qtwebchannel" ,qtwebchannel)
2174 ("qtwebengine" ,qtwebengine)))
2176 `(#:modules ((srfi srfi-1)
2177 ((guix build python-build-system) #:select (python-version))
2178 ,@%gnu-build-system-modules)
2179 #:imported-modules ((guix build python-build-system)
2180 ,@%gnu-build-system-modules)
2182 (modify-phases %standard-phases
2184 (lambda* (#:key inputs outputs #:allow-other-keys)
2185 (let* ((out (assoc-ref outputs "out"))
2186 (sipdir (string-append out "/share/sip"))
2187 (pyqt-sipdir (string-append
2188 (assoc-ref inputs "python-pyqt") "/share/sip"))
2189 (python (assoc-ref inputs "python"))
2190 (lib (string-append out "/lib/python"
2191 (python-version python)
2192 "/site-packages/PyQt5"))
2193 (stubs (string-append lib "/PyQt5")))
2196 (invoke "python" "configure.py"
2203 "--pyqt-sipdir" pyqt-sipdir))))
2204 ;; Because this has a different prefix than python-pyqt then we need
2205 ;; to make this a namespace of its own.
2206 (add-after 'install 'make-namespace
2207 (lambda* (#:key inputs outputs #:allow-other-keys)
2208 (let* ((__init__.py (string-append
2209 (assoc-ref outputs "out")
2211 (python-version (assoc-ref inputs "python"))
2212 "/site-packages/PyQt5/__init__.py")))
2213 (with-output-to-file __init__.py
2214 (lambda _ (display "
2215 from pkgutil import extend_path
2216 __path__ = extend_path(__path__, __name__)
2219 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
2220 (synopsis "Python bindings for QtWebEngine")
2222 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
2223 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
2224 set of three modules. Prior to v5.12 these bindings were part of PyQt
2226 (license license:gpl3)))
2228 ;; XXX: This is useful for removing qtwebkit from other packages' dependency
2229 ;; graphs, as well as for preventing python-pyqtwebengine from transitively
2230 ;; depending on qtwebkit.
2231 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
2232 ;; packages that could be used together.
2233 (define-public python-pyqt-without-qtwebkit
2234 (package/inherit python-pyqt
2235 (name "python-pyqt-without-qtwebkit")
2237 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
2239 (define-public python-pyqt-builder
2241 (name "python-pyqt-builder")
2246 (uri (pypi-uri "PyQt-builder" version))
2249 "0nh0054c54ji3sm6d268fccf0y5f613spswwgwqd3rnn816hnljl"))))
2250 (build-system python-build-system)
2253 (home-page "https://www.riverbankcomputing.com/static/Docs/PyQt-builder/")
2254 (synopsis "PEP 517 compliant PyQt build system")
2255 (description "PyQt-builder is a tool for generating Python bindings for C++
2256 libraries that use the Qt application framework. The bindings are built on
2257 top of the PyQt bindings for Qt. PyQt-builder is used to build PyQt itself.")
2258 ;; Either version 2 or 3, but no other version. See the file
2259 ;; 'pyqtbuild/builder.py' in the source distribution for more information.
2260 (license (list license:gpl2 license:gpl3))))
2262 (define-public python-qtpy
2264 (name "python-qtpy")
2269 (uri (pypi-uri "QtPy" version))
2272 "13zbhnl2rm30xafwrzfwdb4mjp7gk4s9h2xagbf83pnjzczhgzdd"))))
2273 (build-system python-build-system)
2274 (propagated-inputs (list python-packaging))
2276 `(;; Not all supported bindings are packaged. Especially PyQt4.
2278 (home-page "https://github.com/spyder-ide/qtpy")
2280 "Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets")
2282 "Provides an abstraction layer on top of the various Qt bindings
2283 (PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
2284 (license license:expat)))
2286 (define-public qscintilla
2292 (uri (string-append "https://www.riverbankcomputing.com/static"
2293 "/Downloads/QScintilla/" version
2294 "/QScintilla-" version ".tar.gz"))
2297 "19r0vpqb4m9bqwxmjp9w6x0hgahkrg7zryk78hwgplj7vdbn0d77"))))
2298 (build-system gnu-build-system)
2301 (modify-phases %standard-phases
2303 (lambda* (#:key outputs #:allow-other-keys)
2304 (let ((out (assoc-ref outputs "out")))
2306 (substitute* "qscintilla.pro"
2307 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
2308 (string-append out "/lib"))
2309 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
2310 (string-append out "/include"))
2311 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
2312 (string-append out "/translations"))
2313 (("\\$\\$\\[QT_INSTALL_DATA\\]")
2314 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
2315 (("\\$\\$\\[QT_HOST_DATA\\]")
2316 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
2317 (invoke "qmake")))))))
2318 (native-inputs (list qtbase-5))
2319 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
2320 (synopsis "Qt port of the Scintilla C++ editor control")
2321 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2322 editor control. QScintilla includes features especially useful when editing
2323 and debugging source code. These include support for syntax styling, error
2324 indicators, code completion and call tips.")
2325 (license license:gpl3+)))
2327 (define-public python-qscintilla
2328 (package/inherit qscintilla
2329 (name "python-qscintilla")
2332 (list "--pyqt=PyQt5"
2333 (string-append "--pyqt-sipdir="
2334 (assoc-ref %build-inputs "python-pyqt")
2336 (string-append "--qsci-incdir="
2337 (assoc-ref %build-inputs "qscintilla")
2339 (string-append "--qsci-libdir="
2340 (assoc-ref %build-inputs "qscintilla")
2343 (modify-phases %standard-phases
2345 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
2346 (let ((out (assoc-ref outputs "out"))
2347 (python (assoc-ref inputs "python")))
2349 (apply invoke "python3" "configure.py"
2351 ;; Install to the right directory
2352 (substitute* '("Makefile"
2354 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2355 (((string-append python "/lib"))
2356 (string-append out "/lib")))
2357 ;; And fix the installed.txt file
2358 (substitute* "installed.txt"
2359 (("/gnu/store/[^/]+") out)))
2362 `(("qscintilla" ,qscintilla)
2364 ("python-pyqt" ,python-pyqt)))
2365 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2366 editor control. QScintilla includes features especially useful when editing
2367 and debugging source code. These include support for syntax styling, error
2368 indicators, code completion and call tips.
2370 This package provides the Python bindings.")))
2372 ;; PyQt only looks for modules in its own directory. It ignores environment
2373 ;; variables such as PYTHONPATH, so we need to build a union package to make
2375 (define-public python-pyqt+qscintilla
2376 (package/inherit python-pyqt
2377 (name "python-pyqt+qscintilla")
2379 (build-system trivial-build-system)
2381 '(#:modules ((guix build union))
2383 (use-modules (ice-9 match)
2385 (match %build-inputs
2386 (((names . directories) ...)
2387 (union-build (assoc-ref %outputs "out")
2391 `(("python-pyqt" ,python-pyqt)
2392 ("python-qscintilla" ,python-qscintilla)))
2393 (synopsis "Union of PyQt and the Qscintilla extension")
2395 "This package contains the union of PyQt and the Qscintilla extension.")))
2397 (define-public qtkeychain
2405 (url "https://github.com/frankosterfeld/qtkeychain/")
2406 (commit (string-append "v" version))))
2407 (file-name (git-file-name name version))
2410 "1zk6r2vc1q48qs7mw2h47bpgrfbb9r7lf9cwq4sb1a4nls87zznk"))))
2411 (build-system cmake-build-system)
2413 (list pkg-config qttools))
2415 (list libsecret qtbase-5))
2417 `(#:tests? #f ; No tests included
2419 (modify-phases %standard-phases
2420 (add-before 'configure 'set-qt-trans-dir
2422 (substitute* "CMakeLists.txt"
2423 (("\\$\\{qt_translations_dir\\}")
2424 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations")))))))
2425 (home-page "https://github.com/frankosterfeld/qtkeychain")
2426 (synopsis "Qt API to store passwords")
2428 "QtKeychain is a Qt library to store passwords and other secret data
2429 securely. It will not store any data unencrypted unless explicitly requested.")
2430 (license license:bsd-3)))
2432 (define-public qtsolutions
2433 (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
2436 (name "qtsolutions")
2437 (version (git-version "0" revision commit))
2442 (url "https://github.com/qtproject/qt-solutions")
2444 (file-name (git-file-name name version))
2446 (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
2447 (modules '((guix build utils)
2451 ;; Unvendor QtLockFile from QtSingleApplication.
2453 (with-directory-excursion "qtsingleapplication/src"
2454 (for-each delete-file
2455 (find-files "." "qtlockedfile.*\\.(h|cpp)"))
2456 (substitute* "qtsingleapplication.pri"
2457 ;; Add include path of LockedFile.
2458 (("INCLUDEPATH \\+=")
2459 "INCLUDEPATH += ../../qtlockedfile/src")
2460 ;; Link library of LockedFile.
2462 "LIBS += -lQtSolutions_LockedFile"))
2463 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
2464 (("#include \"qtlockedfile.*\\.cpp\"") "")
2465 ;; Unwrap namespace added in the vendoring process.
2466 (("QtLP_Private::QtLockedFile")
2469 (build-system gnu-build-system)
2471 `(#:tests? #f ; No target
2473 ((guix build copy-build-system)
2474 ,@%gnu-build-system-modules)
2476 (((guix build copy-build-system) #:prefix copy:)
2477 (guix build gnu-build-system)
2480 (modify-phases %standard-phases
2481 (add-after 'unpack 'patch-source
2482 (lambda* (#:key outputs #:allow-other-keys)
2483 (substitute* (find-files "." "common.pri")
2484 ;; Remove unnecessary prefixes/suffixes in library names.
2487 ;; Disable building of examples.
2488 (substitute* (find-files "." "\\.pro$")
2489 (("SUBDIRS\\+=examples") ""))
2490 ;; Fix deprecated functions.
2491 (substitute* "qtsoap/src/qtsoap.cpp"
2492 (("toAscii") "toUtf8"))
2496 (for-each (lambda (solution)
2497 (with-directory-excursion solution
2498 (invoke "./configure" "-library")
2500 '("qtlockedfile" "qtpropertybrowser" "qtservice"
2501 "qtsingleapplication" "qtsoap"))
2505 (for-each (lambda (solution)
2506 (with-directory-excursion solution
2508 '("qtlockedfile" "qtpropertybrowser" "qtservice"
2509 "qtsingleapplication" "qtsoap"))
2513 (for-each (lambda (solution)
2514 (with-directory-excursion solution
2516 (assoc-ref copy:%standard-phases 'install)
2518 '(("src" "include" #:include-regexp ("\\.h$"))
2521 '("qtlockedfile" "qtpropertybrowser" "qtservice"
2522 "qtsingleapplication" "qtsoap")))))))
2525 (synopsis "Collection of Qt extensions")
2526 (description "QtSolutions is a set of components extending Qt.
2528 @item QtLockedFile: A class that extends QFile with advisory locking functions.
2529 @item QtPropertyBrowser: A framework that enables the user to edit a set of
2531 @item QtService: A helper for writing services such as Unix daemons.
2532 @item QtSingleApplication: A component that provides support for applications
2533 that can be only started once per user.
2534 @item QtSoap: A component that provides basic web service support with version
2535 1.1 of the SOAP protocol.
2537 (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
2538 (license (list license:bsd-3
2539 ;; QScriptParser and QScriptGrammar specifically allow
2540 ;; redistribution under GPL3 or LGPL2.1
2541 license:gpl3 license:lgpl2.1)))))
2551 (string-append "mirror://sourceforge/qwt/qwt/"
2552 version "/qwt-" version ".tar.bz2"))
2554 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
2555 (build-system gnu-build-system)
2557 (list qtbase-5 qtsvg qttools))
2560 (modify-phases %standard-phases
2562 (lambda* (#:key outputs #:allow-other-keys)
2563 (let* ((out (assoc-ref outputs "out"))
2564 (docdir (string-append out "/share/doc/qwt"))
2565 (incdir (string-append out "/include/qwt"))
2566 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2567 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2568 (substitute* '("qwtconfig.pri")
2569 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2570 (format #f "~a = ~a\n" x out))
2571 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2572 (format #f "~a = ~a\n" x docdir))
2573 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2574 (format #f "~a = ~a\n" x incdir))
2575 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2576 (format #f "~a = ~a\n" x pluginsdir))
2577 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2578 (format #f "~a = ~a\n" x featuresdir)))
2579 (substitute* '("doc/doc.pro")
2580 ;; We'll install them in the 'install-man-pages' phase.
2581 (("^unix:doc\\.files.*") ""))
2583 (add-after 'install 'install-man-pages
2584 (lambda* (#:key outputs #:allow-other-keys)
2585 (let* ((out (assoc-ref outputs "out"))
2586 (man (string-append out "/share/man")))
2587 ;; Remove some incomplete manual pages.
2588 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2590 (copy-recursively "doc/man" man)
2592 (home-page "http://qwt.sourceforge.net")
2593 (synopsis "Qt widgets for plots, scales, dials and other technical software
2596 "The Qwt library contains widgets and components which are primarily useful
2597 for technical and scientific purposes. It includes a 2-D plotting widget,
2598 different kinds of sliders, and much more.")
2601 ;; The Qwt license is LGPL2.1 with some exceptions.
2602 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2603 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2604 license:lgpl2.1 license:gpl3))))
2606 (define-public qtwebkit
2609 (version "5.212.0-alpha4")
2613 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2614 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
2617 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
2618 (patches (search-patches "qtwebkit-pbutils-include.patch"
2619 "qtwebkit-fix-building-with-bison-3.7.patch"
2620 "qtwebkit-fix-building-with-glib-2.68.patch"
2621 "qtwebkit-fix-building-with-icu-68.patch"
2622 "qtwebkit-fix-building-with-python-3.9.patch"))))
2623 (build-system cmake-build-system)
2635 ("gst-plugins-base" ,gst-plugins-base)
2636 ("libjpeg" ,libjpeg-turbo)
2638 ("libwebp" ,libwebp)
2640 ("fontconfig" ,fontconfig)
2641 ("libxrender" ,libxrender)
2642 ("qtbase" ,qtbase-5)
2643 ("qtdeclarative" ,qtdeclarative)
2644 ("qtlocation" ,qtlocation)
2645 ("qtmultimedia" ,qtmultimedia)
2646 ("qtsensors" ,qtsensors)
2647 ("qtwebchannel" ,qtwebchannel)
2648 ("libxml2" ,libxml2)
2649 ("libxslt" ,libxslt)
2651 ("libxcomposite" ,libxcomposite)))
2653 `(#:tests? #f ; no apparent tests; it might be necessary to set
2654 ; ENABLE_API_TESTS, see CMakeLists.txt
2656 ;; Parallel builds fail due to a race condition:
2657 ;; <https://bugs.gnu.org/34062>.
2658 #:parallel-build? #f
2660 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2662 "-DUSE_LIBHYPHEN=OFF"
2663 "-DUSE_SYSTEM_MALLOC=ON"
2664 ;; XXX: relative dir installs to build dir?
2665 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2666 %output "/lib/qt5/mkspecs/modules")
2667 ;; Sacrifice a little speed in order to link
2668 ;; libraries and test executables in a
2669 ;; reasonable amount of memory.
2670 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2671 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2672 (home-page "https://www.webkit.org")
2673 (synopsis "Web browser engine and classes to render and interact with web
2675 (description "QtWebKit provides a Web browser engine that makes it easy to
2676 embed content from the World Wide Web into your Qt application. At the same
2677 time Web content can be enhanced with native controls.")
2678 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2679 ;; room for slower or busy hardware.
2680 (properties '((timeout . 64800))) ;18 hours
2682 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2683 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2684 ;; disable it on non-Intel platforms.
2685 (supported-systems '("x86_64-linux" "i686-linux"))
2687 (license license:lgpl2.1+)))
2689 (define-public dotherside
2697 (url "https://github.com/filcuc/DOtherSide")
2698 (commit (string-append "v" version))))
2699 (file-name (git-file-name name version))
2702 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
2703 (build-system cmake-build-system)
2707 (list qtbase-5 qtdeclarative))
2708 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2709 (synopsis "C language library for creating bindings for the Qt QML language")
2711 "DOtherSide is a C language library for creating bindings for the
2712 QT QML language. The following features are implementable from
2715 @item Creating custom QObject
2716 @item Creating custom QAbstractListModels
2717 @item Creating custom properties, signals and slots
2718 @item Creating from QML QObject defined in the binded language
2719 @item Creating from Singleton QML QObject defined in the binded language
2721 (license license:lgpl3))) ;version 3 only (+ exception)
2723 ;; There have been no public releases yet.
2724 (define-public qtcolorwidgets
2725 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2728 (name "qtcolorwidgets")
2729 (version (git-version "0" revision commit))
2733 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2735 (file-name (git-file-name name version))
2738 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2739 (build-system cmake-build-system)
2740 (arguments `(#:tests? #f)) ; There are no tests
2745 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2746 (synopsis "Color management widgets")
2747 (description "QtColorWidgets provides a Qt color dialog that is more
2748 user-friendly than the default @code{QColorDialog} and several other
2749 color-related widgets.")
2750 ;; Includes a license exception for combining with GPL2 code.
2751 (license license:lgpl3+))))
2753 (define-public qcustomplot
2755 (name "qcustomplot")
2760 (uri (string-append "https://www.qcustomplot.com/release/"
2761 version "fixed" "/QCustomPlot.tar.gz"))
2763 (base32 "1324kqyj1v1f8k8d7b15gc3apwz9qxx52p86hvchg33hjdlqhskx"))))
2765 `(("qcustomplot-sharedlib"
2768 (uri (string-append "https://www.qcustomplot.com/release/"
2769 version "fixed" "/QCustomPlot-sharedlib.tar.gz"))
2771 (base32 "0vp8lpxvd1nlp4liqrlvslpqrgfn0wpiwizzdsjbj22zzb8vxikc"))))))
2774 (build-system gnu-build-system)
2777 (modify-phases %standard-phases
2778 (add-after 'unpack 'unpack-extra-files
2779 (lambda* (#:key inputs #:allow-other-keys)
2780 (invoke "tar" "-xvf" (assoc-ref inputs "qcustomplot-sharedlib"))))
2782 (lambda* (#:key outputs #:allow-other-keys)
2783 (chdir "qcustomplot-sharedlib/sharedlib-compilation")
2784 (substitute* "sharedlib-compilation.pro"
2785 ;; Don't build debug library.
2786 (("debug_and_release")
2789 (string-append "DESTDIR="
2790 (assoc-ref outputs "out")
2792 (add-after 'install 'install-header
2793 (lambda* (#:key outputs #:allow-other-keys)
2794 (install-file "../../qcustomplot.h"
2795 (string-append (assoc-ref outputs "out")
2797 (home-page "https://www.qcustomplot.com/")
2798 (synopsis "Qt widget for plotting and data visualization")
2800 "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts.")
2801 (license license:gpl3+)))
2803 (define-public python-shiboken-2
2805 (name "python-shiboken-2")
2809 (uri (string-append "https://download.qt.io/official_releases"
2810 "/QtForPython/pyside2/PySide2-" version
2811 "-src/pyside-setup-opensource-src-"
2815 "02s52hxdsg925zrflxrsk3l7l9wd6c306ds10rfyy4a1xw6yss1w"))))
2816 (build-system cmake-build-system)
2818 (list clang-toolchain
2826 ;; FIXME: Building tests fails
2827 #:configure-flags '("-DBUILD_TESTS=off")
2829 (modify-phases %standard-phases
2830 (add-after 'unpack 'use-shiboken-dir-only
2831 (lambda _ (chdir "sources/shiboken2") #t))
2832 (add-before 'configure 'make-files-writable-and-update-timestamps
2834 ;; The build scripts need to modify some files in
2835 ;; the read-only source directory, and also attempts
2836 ;; to create Zip files which fails because the Zip
2837 ;; format does not support timestamps before 1980.
2838 (let ((circa-1980 (* 10 366 24 60 60)))
2839 (for-each (lambda (file)
2840 (make-file-writable file)
2841 (utime file circa-1980 circa-1980))
2844 (add-before 'configure 'set-build-env
2845 (lambda* (#:key inputs #:allow-other-keys)
2846 (let ((llvm (assoc-ref inputs "clang-toolchain")))
2847 (setenv "CLANG_INSTALL_DIR" llvm)
2849 (home-page "https://wiki.qt.io/Qt_for_Python")
2851 "Shiboken generates bindings for C++ libraries using CPython source code")
2853 "Shiboken generates bindings for C++ libraries using CPython source code")
2856 ;; The main code is GPL3 or LGPL3.
2857 ;; Examples are BSD-3.
2862 (define-public python-pyside-2
2864 (name "python-pyside-2")
2865 (version (package-version python-shiboken-2))
2866 (source (package-source python-shiboken-2))
2867 (build-system cmake-build-system)
2890 (list python-shiboken-2))
2892 `(("cmake" ,cmake-minimal)
2893 ("python" ,python-wrapper)
2894 ("qttools" ,qttools)
2898 ;; FIXME: Building tests fail.
2900 (list "-DBUILD_TESTS=FALSE"
2901 (string-append "-DPYTHON_EXECUTABLE="
2902 (assoc-ref %build-inputs "python")
2904 #:modules ((guix build cmake-build-system)
2908 (modify-phases %standard-phases
2909 (add-after 'unpack 'go-to-source-dir
2910 (lambda _ (chdir "sources/pyside2") #t))
2911 (add-after 'go-to-source-dir 'fix-qt-module-detection
2912 (lambda* (#:key inputs #:allow-other-keys)
2913 ;; Activate qt module support even if it not in the same
2914 ;; directory as qtbase.
2915 (substitute* "../cmake_helpers/helpers.cmake"
2916 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
2918 ;; Add include directories for qt modules.
2919 (let ((dirs (map (lambda (name)
2920 (string-append (assoc-ref inputs name)
2939 (substitute* "cmake/Macros/PySideModules.cmake"
2940 (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all)
2941 (fold (lambda (dir paths)
2942 (string-append paths "${PATH_SEP}" dir))
2945 (setenv "CXXFLAGS" (fold (lambda (dir paths)
2946 (string-append paths " -I" dir))
2949 (add-before 'configure 'set-clang-dir
2950 (lambda* (#:key inputs #:allow-other-keys)
2951 (let ((clang (assoc-ref inputs "clang-toolchain")))
2952 (setenv "CLANG_INSTALL_DIR" clang)
2954 (home-page "https://wiki.qt.io/Qt_for_Python")
2956 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2958 "The Qt for Python product enables the use of Qt5 APIs in Python
2959 applications. It lets Python developers utilize the full potential of Qt,
2960 using the PySide2 module. The PySide2 module provides access to the
2961 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2962 comes with the Shiboken2 CPython binding code generator, which can be used to
2963 generate Python bindings for your C or C++ code.")
2967 ;; this file may be used under the terms of the GNU General
2968 ;; Public License version 2.0 or (at your option) the GNU
2969 ;; General Public license version 3 or any later version
2970 ;; approved by the KDE Free Qt Foundation.
2971 ;; Thus, it is currently v2 or v3, but no "+".
2975 (define-public python-pyside-2-tools
2977 (name "python-pyside-2-tools")
2978 (version (package-version python-shiboken-2))
2979 (source (package-source python-shiboken-2))
2980 (build-system cmake-build-system)
2982 (list python-pyside-2 python-shiboken-2 qtbase-5))
2984 `(("python" ,python-wrapper)))
2988 (list "-DBUILD_TESTS=off"
2989 (string-append "-DPYTHON_EXECUTABLE="
2990 (assoc-ref %build-inputs "python")
2992 #:phases (modify-phases %standard-phases
2993 (add-after 'unpack 'go-to-source-dir
2994 (lambda _ (chdir "sources/pyside2-tools") #t)))))
2995 (home-page "https://wiki.qt.io/Qt_for_Python")
2997 "Contains command line tools for PySide2")
2999 "Contains lupdate, rcc and uic tools for PySide2")
3000 (license license:gpl2)))
3002 (define-public libqglviewer
3004 (name "libqglviewer")
3009 (string-append "http://libqglviewer.com/src/libQGLViewer-"
3013 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
3014 (build-system gnu-build-system)
3016 '(#:tests? #f ; no check target
3018 (list (string-append "PREFIX="
3019 (assoc-ref %outputs "out")))
3021 (modify-phases %standard-phases
3023 (lambda* (#:key make-flags #:allow-other-keys)
3024 (apply invoke (cons "qmake" make-flags)))))))
3026 (list qtbase-5 qttools))
3029 (home-page "http://libqglviewer.com")
3030 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
3032 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
3033 of OpenGL 3D viewers.
3035 It provides some of the typical 3D viewer functionalities, such as the
3036 possibility to move the camera using the mouse, which lacks in most of the
3037 other APIs. Other features include mouse manipulated frames, interpolated
3038 keyFrames, object selection, stereo display, screenshot saving and much more.
3039 It can be used by OpenGL beginners as well as to create complex applications,
3040 being fully customizable and easy to extend.")
3041 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
3043 (license (list license:gpl2 license:gpl3))))
3045 (define-public qhexedit
3053 (url "https://github.com/Simsys/qhexedit2")
3054 (commit (string-append "v" version))))
3055 (file-name (git-file-name name version))
3057 (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
3058 (build-system gnu-build-system)
3061 (modify-phases %standard-phases
3062 (add-after 'unpack 'fix-path
3063 (lambda* (#:key outputs #:allow-other-keys)
3064 (substitute* "src/qhexedit.pro"
3065 (("^unix:DESTDIR = /usr/lib")
3066 (string-append "unix:DESTDIR = "
3067 (assoc-ref outputs "out") "/lib")))))
3071 (invoke "qmake" "qhexedit.pro")))
3072 (add-after 'install 'install-headers
3073 (lambda* (#:key outputs #:allow-other-keys)
3074 (let* ((out (assoc-ref outputs "out"))
3075 (include-dir (string-append out "/include")))
3076 (mkdir-p include-dir)
3077 (for-each (lambda (file)
3078 (install-file file include-dir))
3079 (find-files "." "\\.h$"))))))))
3080 (inputs (list qtbase-5))
3081 (native-inputs (list qttools))
3082 (home-page "https://simsys.github.io")
3083 (synopsis "Binary editor widget for Qt")
3085 "@code{QHexEdit} is a hex editor widget for the Qt framework. It is a
3086 simple editor for binary data, just like @code{QPlainTextEdit} is for text
3088 (license license:lgpl2.1)))
3091 (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
3095 (version (git-version "1.6.0" revision commit-ref))
3100 (url "https://github.com/coin3d/soqt")
3103 (file-name (git-file-name name version))
3105 (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
3106 (build-system cmake-build-system)
3107 (arguments '(#:tests? #f)) ; There are no tests
3109 (list pkg-config cmake))
3111 (list qtbase-5 coin3D-4))
3112 (home-page "https://github.com/coin3d/soqt")
3113 (synopsis "Qt GUI component toolkit library for Coin")
3114 (description "SoQt is a Qt GUI component toolkit library for Coin. It is
3115 also compatible with SGI and TGS Open Inventor, and the API is based on the API
3116 of the InventorXt GUI component toolkit.")
3117 (license license:bsd-3))))