1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; Copyright © 2015, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
10 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
12 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
13 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages qt)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix packages)
34 #:use-module (guix download)
35 #:use-module (guix git-download)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system trivial)
39 #:use-module (guix packages)
40 #:use-module (guix utils)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages bison)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages cups)
45 #:use-module (gnu packages databases)
46 #:use-module (gnu packages documentation)
47 #:use-module (gnu packages fontutils)
48 #:use-module (gnu packages flex)
49 #:use-module (gnu packages freedesktop)
50 #:use-module (gnu packages gcc)
51 #:use-module (gnu packages gl)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gperf)
54 #:use-module (gnu packages gstreamer)
55 #:use-module (gnu packages gtk)
56 #:use-module (gnu packages icu4c)
57 #:use-module (gnu packages image)
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages maths)
60 #:use-module (gnu packages nss)
61 #:use-module (gnu packages pciutils)
62 #:use-module (gnu packages pcre)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages pulseaudio)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages python-xyz)
68 #:use-module (gnu packages ruby)
69 #:use-module (gnu packages sdl)
70 #:use-module (gnu packages sqlite)
71 #:use-module (gnu packages tls)
72 #:use-module (gnu packages vulkan)
73 #:use-module (gnu packages xdisorg)
74 #:use-module (gnu packages xorg)
75 #:use-module (gnu packages xml)
76 #:use-module (srfi srfi-1))
78 (define-public grantlee
86 (url "https://github.com/steveire/grantlee.git")
87 (commit (string-append "v" version))))
88 (file-name (git-file-name name version))
90 (base32 "1dmah2gd6zd4fgz2f4ir11dazqg067hjz8xshhywhfsmavchi626"))))
92 ;; Optional: lcov and cccc, both are for code coverage
93 `(("doxygen" ,doxygen)))
96 ("qtscript" ,qtscript)))
97 (build-system cmake-build-system)
100 (modify-phases %standard-phases
101 (add-after 'unpack 'delete-broken-tests
103 ;; TODO: Two date tests (for date01 and date02) fail for unknown
105 ;; Actual (result): ""
106 ;; Expected (output): "01"
107 ;; Actual (result): ""
108 ;; Expected (output): "Jan. 1, 2008"
109 (delete-file "templates/tests/testfilters.cpp")
110 (substitute* "templates/tests/CMakeLists.txt"
111 (("testfilters") ""))
113 (add-before 'check 'check-setup
115 ;; make Qt render "offscreen", required for tests
116 (setenv "QT_QPA_PLATFORM" "offscreen")
118 (home-page "https://github.com/steveire/grantlee")
119 (synopsis "Libraries for text templating with Qt")
120 (description "Grantlee Templates can be used for theming and generation of
121 other text such as code. The syntax uses the syntax of the Django template
122 system, and the core design of Django is reused in Grantlee.")
123 (license license:lgpl2.0+)))
129 (outputs '("out" "examples"))
134 "http://download.qt.io/official_releases/qt/"
135 (version-major+minor version)
137 "/single/qt-everywhere-src-"
141 "0kgzy32s1fr22fxxfhcyncfryb3qxrznlr737r4y5khk4xj1g545"))
142 (modules '((guix build utils)))
145 ;; Remove qtwebengine, which relies on a bundled copy of
146 ;; chromium. Not only does it fail compilation in qt 5.5:
147 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
148 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
149 ;; it might also pose security problems.
150 ;; Alternatively, we could use the "-skip qtwebengine"
151 ;; configuration option.
152 (delete-file-recursively "qtwebengine")
153 ;; The following snippets are copied from their mondular-qt counterparts.
156 (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
157 (list "double-conversion" "freetype" "harfbuzz-ng"
158 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
162 (delete-file-recursively dir))
163 (list "qtimageformats/src/3rdparty"
164 "qtmultimedia/examples/multimedia/spectrum/3rdparty"
166 "qtscxml/tests/3rdparty"
167 "qtcanvas3d/examples/canvas3d/3rdparty"))
168 ;; Tests depend on this example, which depends on the 3rd party code.
169 (substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
171 (substitute* "qtxmlpatterns/tests/auto/auto.pro"
172 (("qxmlquery") "# qxmlquery")
173 (("xmlpatterns ") "# xmlpatterns"))
174 (substitute* "qtwebglplugin/tests/plugins/platforms/platforms.pro"
175 (("webgl") "# webgl"))
176 (substitute* "qtscxml/tests/auto/auto.pro"
178 (substitute* "qtnetworkauth/tests/auto/auto.pro"
179 (("oauth1 ") "# oauth1 "))
180 (substitute* "qtremoteobjects/tests/auto/qml/qml.pro"
181 (("integration") "# integration")
182 (("usertypes") "# usertypes"))
184 (build-system gnu-build-system)
188 `(("alsa-lib" ,alsa-lib)
192 ("double-conversion" ,double-conversion)
194 ("fontconfig" ,fontconfig)
195 ("freetype" ,freetype)
197 ("gstreamer" ,gstreamer)
198 ("gst-plugins-base" ,gst-plugins-base)
199 ("harfbuzz" ,harfbuzz)
202 ("libinput" ,libinput-minimal)
210 ("libxcomposite" ,libxcomposite)
211 ("libxcursor" ,libxcursor)
213 ("libxfixes" ,libxfixes)
215 ("libxinerama" ,libxinerama)
216 ("libxkbcommon" ,libxkbcommon)
218 ("libxrandr" ,libxrandr)
219 ("libxrender" ,libxrender)
226 ("postgresql" ,postgresql)
227 ("pulseaudio" ,pulseaudio)
229 ("sqlite" ,sqlite-with-column-metadata)
231 ("unixodbc" ,unixodbc)
233 ("xcb-util" ,xcb-util)
234 ("xcb-util-image" ,xcb-util-image)
235 ("xcb-util-keysyms" ,xcb-util-keysyms)
236 ("xcb-util-renderutil" ,xcb-util-renderutil)
237 ("xcb-util-wm" ,xcb-util-wm)
244 ("pkg-config" ,pkg-config)
247 ("vulkan-headers" ,vulkan-headers)
248 ("which" ,(@ (gnu packages base) which))))
250 `(#:parallel-build? #f ; Triggers race condition in qtbase module on Hydra.
252 (modify-phases %standard-phases
253 (add-after 'configure 'patch-bin-sh
255 (substitute* '("qtbase/configure"
256 "qtbase/mkspecs/features/qt_functions.prf"
257 "qtbase/qmake/library/qmakebuiltins.cpp")
258 (("/bin/sh") (which "sh")))
261 (lambda* (#:key outputs #:allow-other-keys)
262 (let ((out (assoc-ref outputs "out"))
263 (examples (assoc-ref outputs "examples")))
264 (substitute* '("configure" "qtbase/configure")
265 (("/bin/pwd") (which "pwd")))
266 (substitute* "qtbase/src/corelib/global/global.pri"
267 (("/bin/ls") (which "ls")))
268 ;; do not pass "--enable-fast-install", which makes the
269 ;; configure process fail
274 "-docdir" (string-append out "/share/doc/qt5")
275 "-headerdir" (string-append out "/include/qt5")
276 "-archdatadir" (string-append out "/lib/qt5")
277 "-datadir" (string-append out "/share/qt5")
278 "-examplesdir" (string-append
279 examples "/share/doc/qt5/examples") ; 151MiB
283 ;; These features require higher versions of Linux than the
284 ;; minimum version of the glibc. See
285 ;; src/corelib/global/minimum-linux_p.h. By disabling these
286 ;; features Qt5 applications can be used on the oldest
287 ;; kernels that the glibc supports, including the RHEL6
288 ;; (2.6.32) and RHEL7 (3.10) kernels.
289 "-no-feature-getentropy" ; requires Linux 3.17
290 "-no-feature-renameat2" ; requires Linux 3.16
292 ;; Do not build examples; for the time being, we
293 ;; prefer to save the space and build time.
294 "-no-compile-examples"
295 ;; Most "-system-..." are automatic, but some use
296 ;; the bundled copy by default.
300 ;; explicitly link with openssl instead of dlopening it
302 ;; explicitly link with dbus instead of dlopening it
304 ;; don't use the precompiled headers
306 ;; drop special machine instructions not supported
307 ;; on all instances of the target
308 ,@(if (string-prefix? "x86_64"
309 (or (%current-target-system)
315 (add-after 'install 'patch-mkspecs
316 (lambda* (#:key outputs #:allow-other-keys)
317 (let* ((out (assoc-ref outputs "out"))
318 (archdata (string-append out "/lib/qt5"))
319 (mkspecs (string-append archdata "/mkspecs"))
320 (qt_config.prf (string-append
321 mkspecs "/features/qt_config.prf")))
322 ;; For each Qt module, let `qmake' uses search paths in the
323 ;; module directory instead of all in QT_INSTALL_PREFIX.
324 (substitute* qt_config.prf
325 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
326 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
327 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
328 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
329 (("\\$\\$\\[QT_HOST_LIBS\\]")
330 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
331 (("\\$\\$\\[QT_INSTALL_BINS\\]")
332 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
334 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
335 (substitute* (string-append mkspecs "/features/qt_functions.prf")
336 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
337 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
339 ;; Resolve qmake spec files within qtbase by absolute paths.
342 (string-append mkspecs "/features/" file))
343 '("device_config.prf" "moc.prf" "qt_build_config.prf"
344 "qt_config.prf" "winrt/package_manifest.prf"))
345 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
346 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
348 (add-after 'unpack 'patch-paths
349 ;; Use the absolute paths for dynamically loaded libs, otherwise
350 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
352 (lambda* (#:key inputs #:allow-other-keys)
354 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
355 "cross-libc" "libc"))))
356 (substitute* '("qtbase/src/network/kernel/qdnslookup_unix.cpp"
357 "qtbase/src/network/kernel/qhostinfo_unix.cpp")
358 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
359 (string-append a glibc "/lib/lib" b))))
360 ;; X11/locale (compose path)
361 (substitute* "qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
362 ;; Don't search in /usr/…/X11/locale, …
363 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
364 (string-append "// " line))
365 ;; … but use libx11's path
366 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
367 (string-append a "\"" (assoc-ref inputs "libx11") b)))
369 (substitute* "qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
370 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
371 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
373 (substitute* "qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp"
374 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
375 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
376 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
377 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
380 (list (search-path-specification
381 (variable "QMAKEPATH")
382 (files '("lib/qt5")))
383 (search-path-specification
384 (variable "QML2_IMPORT_PATH")
385 (files '("lib/qt5/qml")))
386 (search-path-specification
387 (variable "QT_PLUGIN_PATH")
388 (files '("lib/qt5/plugins")))
389 (search-path-specification
390 (variable "XDG_DATA_DIRS")
392 (search-path-specification
393 (variable "XDG_CONFIG_DIRS")
394 (files '("etc/xdg")))))
395 (home-page "https://www.qt.io/")
396 (synopsis "Cross-platform GUI library")
397 (description "Qt is a cross-platform application and UI framework for
398 developers using C++ or QML, a CSS & JavaScript like language.")
399 (license (list license:lgpl2.1 license:lgpl3))
401 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
402 ;; see <http://hydra.gnu.org/build/112828>.
403 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
404 (supported-systems (delete "mips64el-linux" %supported-systems))))
407 (package (inherit qt)
411 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
412 (string-copy version 0 (string-rindex version #\.))
414 "/qt-everywhere-opensource-src-"
418 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
419 (patches (search-patches "qt4-ldflags.patch"))
420 (modules '((guix build utils)))
422 ;; Remove webkit module, which is not built.
423 '(begin (delete-file-recursively "src/3rdparty/webkit")
426 `(,@(fold alist-delete
428 '("harfbuzz" "libjpeg" "openssl"))
429 ("libjpeg" ,libjpeg-8)
431 ("openssl" ,openssl-1.0)))
433 `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
434 ;; We could build it with -std=gnu++98, but then we'll get in trouble with
435 ;; ICU later. Just keep using GCC 5 for now.
438 (package-native-inputs qt)
439 '("vulkan-headers"))))
441 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
442 ;; but we can't make them a separate output because "out" and "examples"
443 ;; would refer to each other.
444 (outputs '("out" ;112MiB core + 37MiB examples
445 "doc")) ;280MiB of HTML + code
448 (modify-phases %standard-phases
451 (lambda* (#:key outputs #:allow-other-keys)
452 (let ((out (assoc-ref outputs "out"))
453 (doc (assoc-ref outputs "doc")))
454 (substitute* '("configure")
455 (("/bin/pwd") (which "pwd")))
456 (substitute* "src/corelib/global/global.pri"
457 (("/bin/ls") (which "ls")))
463 "-nomake" "examples demos"
464 ;; Note: Don't pass '-docdir' since 'qmake' and
465 ;; libQtCore would record its value, thereby defeating
466 ;; the whole point of having a separate output.
467 "-datadir" (string-append out "/share/qt-" ,version
469 "-importdir" (string-append out "/lib/qt-4"
471 "-plugindir" (string-append out "/lib/qt-4"
473 "-translationdir" (string-append out "/share/qt-" ,version
475 "-demosdir" (string-append out "/share/qt-" ,version
477 "-examplesdir" (string-append out "/share/qt-" ,version
481 ;; explicitly link with dbus instead of dlopening it
483 ;; Skip the webkit module; it fails to build on armhf
484 ;; and, apart from that, may pose security risks.
486 ;; don't use the precompiled headers
488 ;; drop special machine instructions not supported
489 ;; on all instances of the target
490 ,@(if (string-prefix? "x86_64"
491 (or (%current-target-system)
505 (lambda* (#:key outputs #:allow-other-keys)
506 ;; Because of qt4-documentation-path.patch, documentation ends up
507 ;; being installed in OUT. Move it to the right place.
508 (let* ((out (assoc-ref outputs "out"))
509 (doc (assoc-ref outputs "doc"))
510 (olddoc (string-append out "/doc"))
511 (docdir (string-append doc "/share/doc/qt-" ,version)))
512 (mkdir-p (dirname docdir))
514 ;; Note: We can't use 'rename-file' here because OUT and DOC are
515 ;; different "devices" due to bind-mounts.
516 (copy-recursively olddoc docdir)
517 (delete-file-recursively olddoc)
520 (define-public qtbase
526 (uri (string-append "https://download.qt.io/official_releases/qt/"
527 (version-major+minor version) "/" version
528 "/submodules/" name "-everywhere-src-"
532 "071yc9iz14qs4s8yvrwllyfdzp5yjxsdpvbjxdrf0g5q69vqigy6"))
533 ;; Use TZDIR to avoid depending on package "tzdata".
534 (patches (search-patches "qtbase-use-TZDIR.patch"
535 "qtbase-old-kernel.patch"))
536 (modules '((guix build utils)))
538 ;; corelib uses bundled harfbuzz, md4, md5, sha3
540 (with-directory-excursion "src/3rdparty"
541 (for-each delete-file-recursively
542 (list "double-conversion" "freetype" "harfbuzz-ng"
543 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
546 (build-system gnu-build-system)
549 ("which" ,(@ (gnu packages base) which))))
551 `(("alsa-lib" ,alsa-lib)
554 ("double-conversion" ,double-conversion)
557 ("fontconfig" ,fontconfig)
558 ("freetype" ,freetype)
560 ("harfbuzz" ,harfbuzz)
562 ("libinput" ,libinput-minimal)
567 ("libxcomposite" ,libxcomposite)
568 ("libxcursor" ,libxcursor)
569 ("libxfixes" ,libxfixes)
571 ("libxinerama" ,libxinerama)
572 ("libxkbcommon" ,libxkbcommon)
574 ("libxrandr" ,libxrandr)
575 ("libxrender" ,libxrender)
583 ("postgresql" ,postgresql)
584 ("pulseaudio" ,pulseaudio)
585 ("sqlite" ,sqlite-with-column-metadata)
586 ("unixodbc" ,unixodbc)
587 ("xcb-util" ,xcb-util)
588 ("xcb-util-image" ,xcb-util-image)
589 ("xcb-util-keysyms" ,xcb-util-keysyms)
590 ("xcb-util-renderutil" ,xcb-util-renderutil)
591 ("xcb-util-wm" ,xcb-util-wm)
598 ("pkg-config" ,pkg-config)
600 ("vulkan-headers" ,vulkan-headers)
604 (modify-phases %standard-phases
605 (add-after 'configure 'patch-bin-sh
607 (substitute* '("config.status"
609 "mkspecs/features/qt_functions.prf"
610 "qmake/library/qmakebuiltins.cpp")
611 (("/bin/sh") (which "sh")))
614 (lambda* (#:key outputs #:allow-other-keys)
615 (let ((out (assoc-ref outputs "out")))
616 (substitute* "configure"
617 (("/bin/pwd") (which "pwd")))
618 (substitute* "src/corelib/global/global.pri"
619 (("/bin/ls") (which "ls")))
620 ;; The configuration files for other Qt5 packages are searched
621 ;; through a call to "find_package" in Qt5Config.cmake, which
622 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
623 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
624 ;; components can be installed in different places.
625 (substitute* (find-files "." ".*\\.cmake")
626 (("NO_DEFAULT_PATH") ""))
627 ;; do not pass "--enable-fast-install", which makes the
628 ;; configure process fail
633 "-docdir" (string-append out "/share/doc/qt5")
634 "-headerdir" (string-append out "/include/qt5")
635 "-archdatadir" (string-append out "/lib/qt5")
636 "-datadir" (string-append out "/share/qt5")
637 "-examplesdir" (string-append
638 out "/share/doc/qt5/examples")
642 ;; These features require higher versions of Linux than the
643 ;; minimum version of the glibc. See
644 ;; src/corelib/global/minimum-linux_p.h. By disabling these
645 ;; features Qt5 applications can be used on the oldest
646 ;; kernels that the glibc supports, including the RHEL6
647 ;; (2.6.32) and RHEL7 (3.10) kernels.
648 "-no-feature-getentropy" ; requires Linux 3.17
650 ;; Do not build examples; if desired, these could go
651 ;; into a separate output, but for the time being, we
652 ;; prefer to save the space and build time.
653 "-no-compile-examples"
654 ;; Most "-system-..." are automatic, but some use
655 ;; the bundled copy by default.
659 ;; explicitly link with openssl instead of dlopening it
661 ;; explicitly link with dbus instead of dlopening it
663 ;; don't use the precompiled headers
665 ;; drop special machine instructions that do not have
667 ,@(if (string-prefix? "x86_64"
668 (or (%current-target-system)
674 (add-after 'install 'patch-mkspecs
675 (lambda* (#:key outputs #:allow-other-keys)
676 (let* ((out (assoc-ref outputs "out"))
677 (archdata (string-append out "/lib/qt5"))
678 (mkspecs (string-append archdata "/mkspecs"))
679 (qt_config.prf (string-append
680 mkspecs "/features/qt_config.prf")))
681 ;; For each Qt module, let `qmake' uses search paths in the
682 ;; module directory instead of all in QT_INSTALL_PREFIX.
683 (substitute* qt_config.prf
684 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
685 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
686 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
687 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
688 (("\\$\\$\\[QT_HOST_LIBS\\]")
689 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
690 (("\\$\\$\\[QT_INSTALL_BINS\\]")
691 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
693 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
694 (substitute* (string-append mkspecs "/features/qt_functions.prf")
695 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
696 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
698 ;; Resolve qmake spec files within qtbase by absolute paths.
701 (string-append mkspecs "/features/" file))
702 '("device_config.prf" "moc.prf" "qt_build_config.prf"
703 "qt_config.prf" "winrt/package_manifest.prf"))
704 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
705 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
707 (add-after 'unpack 'patch-paths
708 ;; Use the absolute paths for dynamically loaded libs, otherwise
709 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
711 (lambda* (#:key inputs #:allow-other-keys)
713 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
714 "cross-libc" "libc"))))
715 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
716 "src/network/kernel/qhostinfo_unix.cpp")
717 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
718 (string-append a glibc "/lib/lib" b))))
719 ;; X11/locale (compose path)
720 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
721 ;; Don't search in /usr/…/X11/locale, …
722 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
723 (string-append "// " line))
724 ;; … but use libx11's path
725 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
726 (string-append a "\"" (assoc-ref inputs "libx11") b)))
728 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
729 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
730 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
732 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
733 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
734 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
735 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
736 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
739 (list (search-path-specification
740 (variable "QMAKEPATH")
741 (files '("lib/qt5")))
742 (search-path-specification
743 (variable "QML2_IMPORT_PATH")
744 (files '("lib/qt5/qml")))
745 (search-path-specification
746 (variable "QT_PLUGIN_PATH")
747 (files '("lib/qt5/plugins")))
748 (search-path-specification
749 (variable "XDG_DATA_DIRS")
751 (search-path-specification
752 (variable "XDG_CONFIG_DIRS")
753 (files '("etc/xdg")))))
754 (home-page "https://www.qt.io/")
755 (synopsis "Cross-platform GUI library")
756 (description "Qt is a cross-platform application and UI framework for
757 developers using C++ or QML, a CSS & JavaScript like language.")
758 (license (list license:lgpl2.1 license:lgpl3))))
761 (package (inherit qtbase)
766 (uri (string-append "https://download.qt.io/official_releases/qt/"
767 (version-major+minor version) "/" version
768 "/submodules/" name "-everywhere-src-"
772 "14a4rprbj9f9rhixbk7143xdz34d7d39xh9v2sc1w43q9sf2rsi1"))))
773 (propagated-inputs `())
774 (native-inputs `(("perl" ,perl)))
781 (modify-phases %standard-phases
782 (add-before 'configure 'configure-qmake
783 (lambda* (#:key inputs outputs #:allow-other-keys)
784 (let* ((out (assoc-ref outputs "out"))
785 (qtbase (assoc-ref inputs "qtbase"))
786 (tmpdir (string-append (getenv "TMPDIR")))
787 (qmake (string-append tmpdir "/qmake"))
788 (qt.conf (string-append tmpdir "/qt.conf")))
789 ;; Use qmake with a customized qt.conf to override install
791 (symlink (which "qmake") qmake)
792 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
793 (with-output-to-file qt.conf
799 Documentation=share/doc/qt5
802 LibraryExecutables=lib/qt5/libexec
805 Plugins=lib/qt5/plugins
806 Imports=lib/qt5/imports
807 Qml2Imports=lib/qt5/qml
808 Translations=share/qt5/translations
810 Examples=share/doc/qt5/examples
816 [EffectiveSourcePaths]
822 (lambda* (#:key inputs outputs #:allow-other-keys)
823 ;; Valid QT_BUILD_PARTS variables are:
824 ;; libs tools tests examples demos docs translations
825 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
826 (add-before 'check 'set-display
828 ;; make Qt render "offscreen", required for tests
829 (setenv "QT_QPA_PLATFORM" "offscreen")
831 (synopsis "Qt module for displaying SVGs")
832 (description "The QtSvg module provides classes for displaying the
833 contents of SVG files.")))
835 (define-public qtimageformats
836 (package (inherit qtsvg)
837 (name "qtimageformats")
841 (uri (string-append "https://download.qt.io/official_releases/qt/"
842 (version-major+minor version) "/" version
843 "/submodules/" name "-everywhere-src-"
847 "0zq8igsjyyhxsjr43vpaasrqjw3x0g6rwqf8kaz7y9vs7ny63ch4"))
848 (modules '((guix build utils)))
851 (delete-file-recursively "src/3rdparty")
862 (synopsis "Additional Image Format plugins for Qt")
863 (description "The QtImageFormats module contains plugins for adding
864 support for MNG, TGA, TIFF and WBMP image formats.")))
866 (define-public qtx11extras
867 (package (inherit qtsvg)
872 (uri (string-append "https://download.qt.io/official_releases/qt/"
873 (version-major+minor version) "/" version
874 "/submodules/" name "-everywhere-src-"
878 "11fd2mc20qmnyv1vqhaqad2q6m0i4lmkr432rmqvpkgphpkfp7pr"))))
880 (substitute-keyword-arguments (package-arguments qtsvg)
881 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
882 (native-inputs `(("perl" ,perl)))
886 (synopsis "Qt Extras for X11")
887 (description "The QtX11Extras module includes the library to access X11
888 from within Qt 5.")))
890 (define-public qtxmlpatterns
891 (package (inherit qtsvg)
892 (name "qtxmlpatterns")
896 (uri (string-append "https://download.qt.io/official_releases/qt/"
897 (version-major+minor version) "/" version
898 "/submodules/" name "-everywhere-src-"
902 "1vhfvgi39miqsx3iq7c9sii2sykq0yfng69b70i0smr20zihpl4b"))))
904 (substitute-keyword-arguments (package-arguments qtsvg)
906 `(modify-phases ,phases
907 (add-after 'unpack 'disable-network-tests
908 (lambda _ (substitute* "tests/auto/auto.pro"
909 (("qxmlquery") "# qxmlquery")
910 (("xmlpatterns ") "# xmlpatterns"))
912 (native-inputs `(("perl" ,perl)))
913 (inputs `(("qtbase" ,qtbase)))
914 (synopsis "Qt XML patterns module")
915 (description "The QtXmlPatterns module is a XQuery and XPath engine for
916 XML and custom data models. It contains programs such as xmlpatterns and
917 xmlpatternsvalidator.")))
919 (define-public qtdeclarative
920 (package (inherit qtsvg)
921 (name "qtdeclarative")
925 (uri (string-append "https://download.qt.io/official_releases/qt/"
926 (version-major+minor version) "/" version
927 "/submodules/" name "-everywhere-src-"
931 "1rhsf9bma2zwwpixk2fsg31x7c1pmsk144npypgc9w86swhkc9lf"))))
933 (substitute-keyword-arguments (package-arguments qtsvg)
934 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
937 ("pkg-config" ,pkg-config)
940 ("qtxmlpatterns" ,qtxmlpatterns)))
944 (synopsis "Qt QML module (Quick 2)")
945 (description "The Qt QML module provides a framework for developing
946 applications and libraries with the QML language. It defines and implements the
947 language and engine infrastructure, and provides an API to enable application
948 developers to extend the QML language with custom types and integrate QML code
949 with JavaScript and C++.")))
951 (define-public qtconnectivity
952 (package (inherit qtsvg)
953 (name "qtconnectivity")
957 (uri (string-append "https://download.qt.io/official_releases/qt/"
958 (version-major+minor version) "/" version
959 "/submodules/" name "-everywhere-src-"
963 "0amks3qad31i7cha85kvcaxvlmmgkc3gm4jdkw2p02ixxfygr30l"))))
966 ("pkg-config" ,pkg-config)
967 ("qtdeclarative" ,qtdeclarative)))
971 (synopsis "Qt Connectivity module")
972 (description "The Qt Connectivity modules provides modules for interacting
973 with Bluetooth and NFC.")))
975 (define-public qtwebsockets
976 (package (inherit qtsvg)
977 (name "qtwebsockets")
981 (uri (string-append "https://download.qt.io/official_releases/qt/"
982 (version-major+minor version) "/" version
983 "/submodules/" name "-everywhere-src-"
987 "1ffmapfy68xwwbxbg19ng6b5h8v42cf78s21j7rgq49gm70r0402"))))
989 (substitute-keyword-arguments (package-arguments qtsvg)
990 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
993 ("qtdeclarative" ,qtdeclarative)))
994 (inputs `(("qtbase" ,qtbase)))
995 (synopsis "Qt Web Sockets module")
996 (description "WebSocket is a web-based protocol designed to enable two-way
997 communication between a client application and a remote host. The Qt
998 WebSockets module provides C++ and QML interfaces that enable Qt applications
999 to act as a server that can process WebSocket requests, or a client that can
1000 consume data received from the server, or both.")))
1002 (define-public qtsensors
1003 (package (inherit qtsvg)
1008 (uri (string-append "https://download.qt.io/official_releases/qt/"
1009 (version-major+minor version) "/" version
1010 "/submodules/" name "-everywhere-src-"
1014 "0n88c8xi9pbyh7q1pcqv4yjv6nx62abflj8qgfr4qzb0sp8m6mx7"))))
1016 (substitute-keyword-arguments (package-arguments qtsvg)
1017 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
1019 `(modify-phases ,phases
1020 (add-after 'unpack 'fix-tests
1022 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
1023 (("2000") "5000") ;lengthen test timeout
1024 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
1028 ("qtdeclarative" ,qtdeclarative)))
1029 (inputs `(("qtbase" ,qtbase)))
1030 (synopsis "Qt Sensors module")
1031 (description "The Qt Sensors API provides access to sensor hardware via QML
1032 and C++ interfaces. The Qt Sensors API also provides a motion gesture
1033 recognition API for devices.")))
1035 (define-public qtmultimedia
1036 (package (inherit qtsvg)
1037 (name "qtmultimedia")
1041 (uri (string-append "https://download.qt.io/official_releases/qt/"
1042 (version-major+minor version) "/" version
1043 "/submodules/" name "-everywhere-src-"
1047 "0h9wx86zj20n4xc3qnml0i360x2dc1yd2z2af1flj8fwyzppi03j"))
1048 (modules '((guix build utils)))
1051 (delete-file-recursively
1052 "examples/multimedia/spectrum/3rdparty")
1053 ;; We also prevent the spectrum example from being built.
1054 (substitute* "examples/multimedia/multimedia.pro"
1058 (substitute-keyword-arguments (package-arguments qtsvg)
1060 `(modify-phases ,phases
1062 (lambda* (#:key outputs #:allow-other-keys)
1063 (let ((out (assoc-ref outputs "out")))
1064 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
1065 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
1066 (string-append "PREFIX=" out)))))))
1067 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1070 ("pkg-config" ,pkg-config)
1071 ("python" ,python-2)
1072 ("qtdeclarative" ,qtdeclarative)))
1074 `(("alsa-lib" ,alsa-lib)
1076 ("pulseaudio" ,pulseaudio)
1078 ;; Gstreamer is needed for the mediaplayer plugin
1079 ("gstreamer" ,gstreamer)
1080 ("gst-plugins-base" ,gst-plugins-base)))
1081 (synopsis "Qt Multimedia module")
1082 (description "The Qt Multimedia module provides set of APIs to play and
1083 record media, and manage a collection of media content. It also contains a
1084 set of plugins for interacting with pulseaudio and GStreamer.")))
1086 (define-public qtwayland
1087 (package (inherit qtsvg)
1092 (uri (string-append "https://download.qt.io/official_releases/qt/"
1093 (version-major+minor version) "/" version
1094 "/submodules/" name "-everywhere-src-"
1098 "1chz4wchgkzd45h143i5hkqg0whcgdbj37gkg7j4kj31whllzjb2"))
1099 (modules '((guix build utils)))
1101 ;; The examples try to build and cause the build to fail
1103 (delete-file-recursively "examples")
1106 (substitute-keyword-arguments (package-arguments qtsvg)
1108 `(modify-phases ,phases
1109 (add-before 'check 'set-ld-library-path
1110 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
1112 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
1113 ;; wayland platform plugin.
1115 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
1120 ("pkg-config" ,pkg-config)
1121 ("qtdeclarative" ,qtdeclarative)))
1123 `(("fontconfig" ,fontconfig)
1124 ("freetype" ,freetype)
1126 ("libxcomposite" ,libxcomposite)
1127 ("libxext" ,libxext)
1128 ("libxkbcommon" ,libxkbcommon)
1129 ("libxrender" ,libxrender)
1133 ("wayland" ,wayland)))
1134 (synopsis "Qt Wayland module")
1135 (description "The Qt Wayland module provides the QtWayland client and
1136 compositor libraries.")))
1138 (define-public qtserialport
1139 (package (inherit qtsvg)
1140 (name "qtserialport")
1144 (uri (string-append "https://download.qt.io/official_releases/qt/"
1145 (version-major+minor version) "/" version
1146 "/submodules/" name "-everywhere-src-"
1150 "1nkbfsxzgicwns3k11hhzjxy2hgrigj8xcw2by0jc1j71mnmxi4n"))))
1151 (native-inputs `(("perl" ,perl)))
1153 `(("qtbase" ,qtbase)
1156 (substitute-keyword-arguments (package-arguments qtsvg)
1158 `(modify-phases ,phases
1159 (add-after 'unpack 'patch-dlopen-paths
1160 (lambda* (#:key inputs #:allow-other-keys)
1161 (substitute* "src/serialport/qtudev_p.h"
1162 ;; Use the absolute paths for dynamically loaded libs,
1163 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1164 ;; typically is not set in guix.
1165 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1166 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1168 (synopsis "Qt Serial Port module")
1169 (description "The Qt Serial Port module provides the library for
1170 interacting with serial ports from within Qt.")))
1172 (define-public qtserialbus
1173 (package (inherit qtsvg)
1174 (name "qtserialbus")
1178 (uri (string-append "https://download.qt.io/official_releases/qt/"
1179 (version-major+minor version) "/" version
1180 "/submodules/" name "-everywhere-src-"
1184 "0vf12jk1ma0v0dlpliw1x9i04iaik1kjkiaby7gaxm2abprxwr2n"))))
1186 `(("qtbase" ,qtbase)
1187 ("qtserialport" ,qtserialport)))
1188 (synopsis "Qt Serial Bus module")
1189 (description "The Qt Serial Bus API provides classes and functions to
1190 access the various industrial serial buses and protocols, such as CAN, ModBus,
1193 (define-public qtwebchannel
1194 (package (inherit qtsvg)
1195 (name "qtwebchannel")
1199 (uri (string-append "https://download.qt.io/official_releases/qt/"
1200 (version-major+minor version) "/" version
1201 "/submodules/" name "-everywhere-src-"
1205 "1wrdawlqvcw84h8q52mvbjhp1vkd6fhz6c8ijlg9rw0s3fj4y99w"))))
1208 ("qtdeclarative" ,qtdeclarative)
1209 ("qtwebsockets" ,qtwebsockets)))
1210 (inputs `(("qtbase" ,qtbase)))
1211 (synopsis "Web communication library for Qt")
1212 (description "The Qt WebChannel module enables peer-to-peer communication
1213 between the host (QML/C++ application) and the client (HTML/JavaScript
1214 application). The transport mechanism is supported out of the box by the two
1215 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1217 (define-public qtwebglplugin
1218 (package (inherit qtsvg)
1219 (name "qtwebglplugin")
1223 (uri (string-append "https://download.qt.io/official_releases/qt/"
1224 (version-major+minor version) "/" version
1225 "/submodules/" name "-everywhere-src-"
1229 "0wqz8lycmi7pffzy0pz5960w109lbk4mkbw0l1lh64avl6clq7b9"))))
1231 (substitute-keyword-arguments (package-arguments qtsvg)
1233 `(modify-phases ,phases
1234 (add-after 'unpack 'disable-network-tests
1235 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1236 (("webgl") "# webgl"))
1242 ("qtdeclarative" ,qtdeclarative)
1243 ("qtwebsockets" ,qtwebsockets)))
1244 (synopsis "QPA plugin for running an application via a browser using
1245 streamed WebGL commands")
1246 (description "Qt back end that uses WebGL for rendering. It allows Qt
1247 applications (with some limitations) to run in a web browser that supports
1248 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1249 compatible web browser without the use of plug-ins. The API is similar to
1250 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1252 (define-public qtwebview
1253 (package (inherit qtsvg)
1258 (uri (string-append "https://download.qt.io/official_releases/qt/"
1259 (version-major+minor version) "/" version
1260 "/submodules/" name "-everywhere-src-"
1264 "1njmn1n03dp4md8cz58cq2z6bsxd8nwlw0238zmavh7px3jzc9kh"))))
1268 `(("qtbase" ,qtbase)
1269 ("qtdeclarative" ,qtdeclarative)))
1270 (synopsis "Display web content in a QML application")
1271 (description "Qt WebView provides a way to display web content in a QML
1272 application without necessarily including a full web browser stack by using
1273 native APIs where it makes sense.")))
1275 (define-public qtlocation
1276 (package (inherit qtsvg)
1281 (uri (string-append "https://download.qt.io/official_releases/qt/"
1282 (version-major+minor version) "/" version
1283 "/submodules/" name "-everywhere-src-"
1287 "1sq0f41jwmsimv9a1wl2nk5nifjppm5j92rr4n4s7qwnnjjrir2q"))))
1289 (substitute-keyword-arguments (package-arguments qtsvg)
1290 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1293 ("qtdeclarative" ,qtdeclarative)
1294 ("qtquickcontrols" ,qtquickcontrols)
1295 ("qtserialport" ,qtserialport)))
1298 ("openssl" ,openssl)
1301 (synopsis "Qt Location and Positioning modules")
1302 (description "The Qt Location module provides an interface for location,
1303 positioning and geolocation plugins.")))
1305 (define-public qttools
1306 (package (inherit qtsvg)
1311 (uri (string-append "https://download.qt.io/official_releases/qt/"
1312 (version-major+minor version) "/" version
1313 "/submodules/" name "-everywhere-src-"
1317 "13lzdxxi02yhvx4mflhisl6aqv2fiss5m804cqccd1wvp8dyh1f2"))))
1319 (substitute-keyword-arguments (package-arguments qtsvg)
1320 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1323 ("qtdeclarative" ,qtdeclarative)
1324 ("vulkan-headers" ,vulkan-headers)))
1327 ("qtbase" ,qtbase)))
1328 (synopsis "Qt Tools and Designer modules")
1329 (description "The Qt Tools module provides a set of applications to browse
1330 the documentation, translate applications, generate help files and other stuff
1331 that helps in Qt development.")))
1333 (define-public qtscript
1334 (package (inherit qtsvg)
1339 (uri (string-append "https://download.qt.io/official_releases/qt/"
1340 (version-major+minor version) "/" version
1341 "/submodules/" name "-everywhere-src-"
1345 "027cvggbcvwyz76cn1bl1zvqg0nq7iica1b7yx7xyy0hb36g715v"))
1346 (patches (search-patches "qtscript-disable-tests.patch"))))
1349 ("qttools" ,qttools)))
1351 `(("qtbase" ,qtbase)))
1352 (synopsis "Qt Script module")
1353 (description "Qt provides support for application scripting with ECMAScript.
1354 The following guides and references cover aspects of programming with
1355 ECMAScript and Qt.")))
1357 (define-public qtquickcontrols
1358 (package (inherit qtsvg)
1359 (name "qtquickcontrols")
1363 (uri (string-append "https://download.qt.io/official_releases/qt/"
1364 (version-major+minor version) "/" version
1365 "/submodules/" name "-everywhere-src-"
1369 "0dvmy31qbl76yy0j5y8m7mvnmqyg2c01fmlkn0snvc5h5ah5skjf"))))
1371 (substitute-keyword-arguments (package-arguments qtsvg)
1372 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1374 `(("qtbase" ,qtbase)
1375 ("qtdeclarative" ,qtdeclarative)))
1376 (synopsis "Qt Quick Controls and other Quick modules")
1377 (description "The QtScript module provides classes for making Qt
1378 applications scriptable. This module provides a set of extra components that
1379 can be used to build complete interfaces in Qt Quick.")))
1381 (define-public qtquickcontrols2
1382 (package (inherit qtsvg)
1383 (name "qtquickcontrols2")
1387 (uri (string-append "https://download.qt.io/official_releases/qt/"
1388 (version-major+minor version) "/" version
1389 "/submodules/" name "-everywhere-src-"
1393 "11nhpb0xckv5jjkqj5szr94c2rvyjwr89ch58hh64nsqaav30mpl"))))
1395 (substitute-keyword-arguments (package-arguments qtsvg)
1396 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1398 `(("qtbase" ,qtbase)
1399 ("qtdeclarative" ,qtdeclarative)))
1400 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1401 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1402 module that provides platform integration: native dialogs, menus and menu bars,
1403 and tray icons. It falls back to Qt Widgets when a native implementation is
1406 (define-public qtgraphicaleffects
1407 (package (inherit qtsvg)
1408 (name "qtgraphicaleffects")
1412 (uri (string-append "https://download.qt.io/official_releases/qt/"
1413 (version-major+minor version) "/" version
1414 "/submodules/" name "-everywhere-src-"
1418 "1qjpdzkamf27cg5n1wsf0zk939lcgppgydfjzap9s4fxzj1nkn0l"))))
1420 (substitute-keyword-arguments (package-arguments qtsvg)
1421 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1423 `(("qtbase" ,qtbase)
1424 ("qtdeclarative" ,qtdeclarative)))
1425 (synopsis "Qt Graphical Effects module")
1426 (description "The Qt Graphical Effects module provides a set of QML types
1427 for adding visually impressive and configurable effects to user interfaces.
1428 Effects are visual items that can be added to Qt Quick user interface as UI
1429 components. The API consists of over 20 effects provided as separate QML
1430 types. The effects cover functional areas such as blending, masking, blurring,
1431 coloring, and many more.")))
1433 (define-public qtdeclarative-render2d
1434 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
1435 (package (inherit qtsvg)
1436 (name "qtdeclarative-render2d")
1440 (uri (string-append "https://download.qt.io/official_releases/qt/"
1441 (version-major+minor version) "/" version
1442 "/submodules/" name "-everywhere-src-"
1446 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1447 (modules '((guix build utils)))
1450 (delete-file-recursively "tools/opengldummy/3rdparty")
1454 `(("qtbase" ,qtbase)
1455 ("qtdeclarative" ,qtdeclarative)))
1456 (synopsis "Qt Declarative Render module")
1457 (description "The Qt Declarative Render 2D module provides a Raster
1458 backend for QtQuick scene graph.")
1459 (properties `((superseded . ,qtdeclarative)))))
1461 (define-public qtgamepad
1462 (package (inherit qtsvg)
1467 (uri (string-append "https://download.qt.io/official_releases/qt/"
1468 (version-major+minor version) "/" version
1469 "/submodules/" name "-everywhere-src-"
1473 "1k222cx18zq48sfna91hmy427qzk2n2xz3dlyz59iyz72k6915g9"))))
1476 ("pkg-config" ,pkg-config)))
1478 `(("fontconfig" ,fontconfig)
1479 ("freetype" ,freetype)
1480 ("libxrender" ,libxrender)
1483 ("qtdeclarative" ,qtdeclarative)))
1484 (synopsis "Qt Gamepad module")
1485 (description "The Qt Gamepad module is an add-on library that enables Qt
1486 applications to support the use of gamepad hardware and in some cases remote
1487 control equipment. The module provides both QML and C++ interfaces. The
1488 primary target audience are embedded devices with fullscreen user interfaces,
1489 and mobile applications targeting TV-like form factors.")))
1491 (define-public qtscxml
1492 (package (inherit qtsvg)
1497 (uri (string-append "https://download.qt.io/official_releases/qt/"
1498 (version-major+minor version) "/" version
1499 "/submodules/" name "-everywhere-src-"
1503 "1mv8mz36v34dckrzy5r41mq3sqznbalrhndk3avz2154xmkjf5qk"))
1504 (modules '((guix build utils)))
1507 (delete-file-recursively "tests/3rdparty")
1508 ;; the scion test refers to the bundled 3rd party test code.
1509 (substitute* "tests/auto/auto.pro"
1513 `(("qtbase" ,qtbase)
1514 ("qtdeclarative" ,qtdeclarative)))
1515 (synopsis "Qt SCXML module")
1516 (description "The Qt SCXML module provides functionality to create state
1517 machines from SCXML files. This includes both dynamically creating state
1518 machines (loading the SCXML file and instantiating states and transitions) and
1519 generating a C++ file that has a class implementing the state machine. It
1520 also contains functionality to support data models and executable content.")))
1522 (define-public qtpurchasing
1523 (package (inherit qtsvg)
1524 (name "qtpurchasing")
1528 (uri (string-append "https://download.qt.io/official_releases/qt/"
1529 (version-major+minor version) "/" version
1530 "/submodules/" name "-everywhere-src-"
1534 "1fd0gxdj5mrh81iwimq1243i3n47sqv9ik8nslahfh0q3dsx7k8n"))))
1536 `(("qtbase" ,qtbase)
1537 ("qtdeclarative" ,qtdeclarative)))
1538 (synopsis "Qt Purchasing module")
1539 (description "The Qt Purchasing module provides and in-app API for
1540 purchasing goods and services.")))
1542 (define-public qtcanvas3d
1543 (package (inherit qtsvg)
1548 (uri (string-append "https://download.qt.io/official_releases/qt/"
1549 (version-major+minor version) "/" version
1550 "/submodules/" name "-everywhere-src-"
1554 "0f110z7cmkzns9k00aa5zhzq2fpybfxkd7gdlwzcbhc8hn20986m"))
1555 (modules '((guix build utils)))
1558 (delete-file-recursively "examples/canvas3d/3rdparty")
1561 (substitute-keyword-arguments (package-arguments qtsvg)
1562 ;; Building the tests depends on the bundled 3rd party javascript files,
1563 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1564 ;; fail, so we skip building them for now.
1566 `(modify-phases ,phases
1568 (lambda* (#:key outputs #:allow-other-keys)
1569 (let ((out (assoc-ref outputs "out")))
1570 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1571 (string-append "PREFIX=" out)))))))
1572 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1575 `(("qtbase" ,qtbase)
1576 ("qtdeclarative" ,qtdeclarative)))
1577 (synopsis "Qt Canvas 3D module")
1578 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1579 drawing calls from Qt Quick JavaScript.")))
1581 (define-public qtcharts
1582 (package (inherit qtsvg)
1587 (uri (string-append "https://download.qt.io/official_releases/qt/"
1588 (version-major+minor version) "/" version
1589 "/submodules/" name "-everywhere-src-"
1593 "1p4m1nkbbxlkwmbmasx5r83skzssmlcgfzyvj30x2dyrqkmz7627"))))
1595 (substitute-keyword-arguments (package-arguments qtsvg)
1596 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1598 `(("qtbase" ,qtbase)
1599 ("qtdeclarative" ,qtdeclarative)))
1600 (synopsis "Qt Charts module")
1601 (description "The Qt Charts module provides a set of easy to use chart
1602 components. It uses the Qt Graphics View Framework, therefore charts can be
1603 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1604 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1605 selecting one of the charts themes.")
1606 (license license:gpl3)))
1608 (define-public qtdatavis3d
1609 (package (inherit qtsvg)
1610 (name "qtdatavis3d")
1614 (uri (string-append "https://download.qt.io/official_releases/qt/"
1615 (version-major+minor version) "/" version
1616 "/submodules/" name "-everywhere-src-"
1620 "1kqwr3avcvcyy4i28vjgxk1bsjj9011zr668hsk1zrjxnnwjwdl3"))))
1622 (substitute-keyword-arguments (package-arguments qtsvg)
1623 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1625 `(("qtbase" ,qtbase)
1626 ("qtdeclarative" ,qtdeclarative)))
1627 (synopsis "Qt Data Visualization module")
1628 (description "The Qt Data Visualization module provides a way to visualize
1629 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1630 visualizing depth maps and large quantities of rapidly changing data, such as
1631 data received from multiple sensors. The look and feel of graphs can be
1632 customized by using themes or by adding custom items and labels to them.")
1633 (license license:gpl3)))
1635 (define-public qtnetworkauth
1636 (package (inherit qtsvg)
1637 (name "qtnetworkauth")
1641 (uri (string-append "https://download.qt.io/official_releases/qt/"
1642 (version-major+minor version) "/" version
1643 "/submodules/" name "-everywhere-src-"
1647 "0dd35698wzg89975vi2ijl2lym495fjizsl03mjixsjnvb1x0q50"))))
1649 (substitute-keyword-arguments (package-arguments qtsvg)
1651 `(modify-phases ,phases
1652 (add-after 'unpack 'remove-failing-test
1654 ;; These tests can't find their test data.
1655 (substitute* "tests/auto/auto.pro"
1656 (("oauth1 ") "# oauth1 "))
1659 `(("qtbase" ,qtbase)))
1660 (synopsis "Qt Network Authorization module")
1661 (description "The Qt Network Authorization module provides an
1662 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1664 (define-public qtremoteobjects
1665 (package (inherit qtsvg)
1666 (name "qtremoteobjects")
1670 (uri (string-append "https://download.qt.io/official_releases/qt/"
1671 (version-major+minor version) "/" version
1672 "/submodules/" name "-everywhere-src-"
1676 "1d3jzsxfyjhgb6wj9iv1388bv7j6pi08346nmkm1c1a4iykhc0zp"))))
1678 (substitute-keyword-arguments (package-arguments qtsvg)
1680 `(modify-phases ,phases
1681 (add-after 'unpack 'remove-failing-test
1683 ;; This test can't find its imports.
1684 (substitute* "tests/auto/qml/qml.pro"
1685 (("integration") "# integration")
1686 (("usertypes") "# usertypes"))
1689 `(("qtbase" ,qtbase)
1690 ("qtdeclarative" ,qtdeclarative)))
1691 (synopsis "Qt Remote Objects module")
1692 (description "The Qt Remote Objects module is an @dfn{inter-process
1693 communication} (IPC) module developed for Qt. The idea is to extend existing
1694 Qt's functionalities to enable an easy exchange of information between
1695 processes or computers.")))
1697 (define-public qtspeech
1698 (package (inherit qtsvg)
1703 (uri (string-append "https://download.qt.io/official_releases/qt/"
1704 (version-major+minor version) "/" version
1705 "/submodules/" name "-everywhere-src-"
1709 "158p7zqd0vg55gf88jzc3d4f7649ihh80k0m1q46m2yp6fpdjbxr"))))
1711 (substitute-keyword-arguments (package-arguments qtsvg)
1712 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1714 `(("qtbase" ,qtbase)))
1717 ("qtdeclarative" ,qtdeclarative)
1718 ("qtmultimedia" ,qtmultimedia)
1719 ("qtxmlpatterns" ,qtxmlpatterns)))
1720 (synopsis "Qt Speech module")
1721 (description "The Qt Speech module enables a Qt application to support
1722 accessibility features such as text-to-speech, which is useful for end-users
1723 who are visually challenged or cannot access the application for whatever
1724 reason. The most common use case where text-to-speech comes in handy is when
1725 the end-user is driving and cannot attend the incoming messages on the phone.
1726 In such a scenario, the messaging application can read out the incoming
1729 (define-public python-sip
1737 (string-append "mirror://sourceforge/pyqt/sip/"
1738 "sip-" version "/sip-" version ".tar.gz"))
1741 "0pniq03jk1n5bs90yjihw3s3rsmjd8m89y9zbnymzgwrcl2sflz3"))))
1742 (build-system gnu-build-system)
1744 `(("python" ,python-wrapper)))
1746 `(#:tests? #f ; no check target
1747 #:modules ((srfi srfi-1)
1748 ,@%gnu-build-system-modules)
1750 (modify-phases %standard-phases
1752 (lambda* (#:key inputs outputs #:allow-other-keys)
1753 (let* ((out (assoc-ref outputs "out"))
1754 (bin (string-append out "/bin"))
1755 (include (string-append out "/include"))
1756 (python (assoc-ref inputs "python"))
1758 (last (string-split python #\-)))
1761 (take (string-split python-version #\.) 2)
1763 (lib (string-append out "/lib/python"
1766 (invoke "python" "configure.py"
1769 "--incdir" include)))))))
1770 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1771 (synopsis "Python binding creator for C and C++ libraries")
1773 "SIP is a tool to create Python bindings for C and C++ libraries. It
1774 was originally developed to create PyQt, the Python bindings for the Qt
1775 toolkit, but can be used to create bindings for any C or C++ library.
1777 SIP comprises a code generator and a Python module. The code generator
1778 processes a set of specification files and generates C or C++ code, which
1779 is then compiled to create the bindings extension module. The SIP Python
1780 module provides support functions to the automatically generated code.")
1781 ;; There is a choice between a python like license, gpl2 and gpl3.
1782 ;; For compatibility with pyqt, we need gpl3.
1783 (license license:gpl3)))
1785 (define-public python2-sip
1786 (package (inherit python-sip)
1787 (name "python2-sip")
1789 `(("python" ,python-2)))))
1791 (define-public python-pyqt
1793 (name "python-pyqt")
1799 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1800 "PyQt-" version "/PyQt5_gpl-"
1804 "0wqh4srqkcc03rvkwrcshaa028psrq58xkys6npnyhqxc0apvdf9"))
1805 (patches (search-patches "pyqt-configure.patch"
1806 "pyqt-public-sip.patch"))))
1807 (build-system gnu-build-system)
1809 `(("qtbase" ,qtbase))) ; for qmake
1811 `(("python-sip" ,python-sip)))
1813 `(("python" ,python-wrapper)
1815 ("qtconnectivity" ,qtconnectivity)
1816 ("qtdeclarative" ,qtdeclarative)
1817 ("qtlocation" ,qtlocation)
1818 ("qtmultimedia" ,qtmultimedia)
1819 ("qtsensors" ,qtsensors)
1820 ("qtserialport" ,qtserialport)
1822 ("qttools" ,qttools)
1823 ("qtwebchannel" ,qtwebchannel)
1824 ("qtwebkit" ,qtwebkit)
1825 ("qtwebsockets" ,qtwebsockets)
1826 ("qtx11extras" ,qtx11extras)
1827 ("qtxmlpatterns" ,qtxmlpatterns)))
1829 `(#:modules ((srfi srfi-1)
1830 ,@%gnu-build-system-modules)
1832 (modify-phases %standard-phases
1834 (lambda* (#:key inputs outputs #:allow-other-keys)
1835 (let* ((out (assoc-ref outputs "out"))
1836 (bin (string-append out "/bin"))
1837 (sip (string-append out "/share/sip"))
1838 (plugins (string-append out "/plugins"))
1839 (designer (string-append plugins "/designer"))
1840 (qml (string-append plugins "/PyQt5"))
1841 (python (assoc-ref inputs "python"))
1843 (last (string-split python #\-)))
1846 (take (string-split python-version #\.) 2)
1848 (lib (string-append out "/lib/python"
1851 (stubs (string-append lib "/PyQt5")))
1852 (invoke "python" "configure.py"
1856 "--designer-plugindir" designer
1857 "--qml-plugindir" qml
1858 ; Where to install the PEP 484 Type Hints stub
1859 ; files. Without this the stubs are tried to be
1860 ; installed into the python package's
1861 ; site-package directory, which is read-only.
1863 "--sipdir" sip)))))))
1864 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1865 (synopsis "Python bindings for Qt")
1867 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1868 framework. The bindings are implemented as a set of Python modules and
1869 contain over 620 classes.")
1870 (license license:gpl3)))
1872 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
1873 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
1874 ;; packages that could be used together.
1875 (define-public python-pyqt-without-qtwebkit
1876 (package (inherit python-pyqt)
1877 (name "python-pyqt-without-qtwebkit")
1879 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
1881 (define-public python2-pyqt
1882 (package (inherit python-pyqt)
1883 (name "python2-pyqt")
1885 `(("python-sip" ,python2-sip)
1886 ("qtbase" ,qtbase)))
1888 `(("python" ,python-2)
1889 ("python2-enum34" ,python2-enum34)
1890 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1892 (define-public python2-pyqt-4
1893 (package (inherit python-pyqt)
1894 (name "python2-pyqt")
1900 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1901 "PyQt-" version "/PyQt4_gpl_x11-"
1905 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
1907 `(("python-sip" ,python2-sip)
1909 (inputs `(("python" ,python-2)))
1911 `(#:tests? #f ; no check target
1912 #:modules ((srfi srfi-1)
1913 ,@%gnu-build-system-modules)
1915 (modify-phases %standard-phases
1917 (lambda* (#:key inputs outputs #:allow-other-keys)
1918 (let* ((out (assoc-ref outputs "out"))
1919 (bin (string-append out "/bin"))
1920 (sip (string-append out "/share/sip"))
1921 (python (assoc-ref inputs "python"))
1923 (last (string-split python #\-)))
1926 (take (string-split python-version #\.) 2)
1928 (lib (string-append out "/lib/python"
1931 (invoke "python" "configure.py"
1935 "--sipdir" sip)))))))
1936 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1938 (define-public qscintilla
1944 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1945 "QScintilla-" version "/QScintilla_gpl-"
1949 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
1950 (build-system gnu-build-system)
1953 (modify-phases %standard-phases
1955 (lambda* (#:key outputs #:allow-other-keys)
1956 (let ((out (assoc-ref outputs "out")))
1958 (substitute* "qscintilla.pro"
1959 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1960 (string-append out "/lib"))
1961 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1962 (string-append out "/include"))
1963 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1964 (string-append out "/translations"))
1965 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1966 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1967 (("\\$\\$\\[QT_HOST_DATA\\]")
1968 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
1969 (invoke "qmake")))))))
1970 (native-inputs `(("qtbase" ,qtbase)))
1971 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1972 (synopsis "Qt port of the Scintilla C++ editor control")
1973 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1974 editor control. QScintilla includes features especially useful when editing
1975 and debugging source code. These include support for syntax styling, error
1976 indicators, code completion and call tips.")
1977 (license license:gpl3+)))
1979 (define-public python-qscintilla
1980 (package (inherit qscintilla)
1981 (name "python-qscintilla")
1984 (list "--pyqt=PyQt5"
1985 (string-append "--pyqt-sipdir="
1986 (assoc-ref %build-inputs "python-pyqt")
1988 (string-append "--qsci-incdir="
1989 (assoc-ref %build-inputs "qscintilla")
1991 (string-append "--qsci-libdir="
1992 (assoc-ref %build-inputs "qscintilla")
1995 (modify-phases %standard-phases
1997 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
1998 (let ((out (assoc-ref outputs "out"))
1999 (python (assoc-ref inputs "python")))
2001 (apply invoke "python3" "configure.py"
2003 ;; Install to the right directory
2004 (substitute* '("Makefile"
2006 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2007 (((string-append python "/lib"))
2008 (string-append out "/lib")))
2009 ;; And fix the installed.txt file
2010 (substitute* "installed.txt"
2011 (("/gnu/store/[^/]+") out)))
2014 `(("qscintilla" ,qscintilla)
2016 ("python-pyqt" ,python-pyqt)))
2017 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2018 editor control. QScintilla includes features especially useful when editing
2019 and debugging source code. These include support for syntax styling, error
2020 indicators, code completion and call tips.
2022 This package provides the Python bindings.")))
2024 ;; PyQt only looks for modules in its own directory. It ignores environment
2025 ;; variables such as PYTHONPATH, so we need to build a union package to make
2027 (define-public python-pyqt+qscintilla
2028 (package (inherit python-pyqt)
2029 (name "python-pyqt+qscintilla")
2031 (build-system trivial-build-system)
2033 '(#:modules ((guix build union))
2035 (use-modules (ice-9 match)
2037 (match %build-inputs
2038 (((names . directories) ...)
2039 (union-build (assoc-ref %outputs "out")
2043 `(("python-pyqt" ,python-pyqt)
2044 ("python-qscintilla" ,python-qscintilla)))
2045 (synopsis "Union of PyQt and the Qscintilla extension")
2047 "This package contains the union of PyQt and the Qscintilla extension.")))
2049 (define-public qtkeychain
2057 (url "https://github.com/frankosterfeld/qtkeychain/")
2058 (commit (string-append "v" version))))
2059 (file-name (git-file-name name version))
2062 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
2063 (build-system cmake-build-system)
2065 `(("pkg-config" ,pkg-config)
2066 ("qttools" ,qttools)))
2068 `(("qtbase" ,qtbase)))
2070 `(#:tests? #f ; No tests included
2072 (modify-phases %standard-phases
2073 (add-before 'configure 'set-qt-trans-dir
2075 (substitute* "CMakeLists.txt"
2076 (("\\$\\{qt_translations_dir\\}")
2077 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
2079 (home-page "https://github.com/frankosterfeld/qtkeychain")
2080 (synopsis "Qt API to store passwords")
2082 "QtKeychain is a Qt library to store passwords and other secret data
2083 securely. It will not store any data unencrypted unless explicitly requested.")
2084 (license license:bsd-3)))
2094 (string-append "mirror://sourceforge/qwt/qwt/"
2095 version "/qwt-" version ".tar.bz2"))
2097 (base32 "1navkcnmn0qz8kzsyqmk32d929zl72l0b580w1ica7z5559j2a8m"))))
2098 (build-system gnu-build-system)
2100 `(("qtbase" ,qtbase)
2102 ("qttools" ,qttools)))
2105 (modify-phases %standard-phases
2107 (lambda* (#:key outputs #:allow-other-keys)
2108 (let* ((out (assoc-ref outputs "out"))
2109 (docdir (string-append out "/share/doc/qwt"))
2110 (incdir (string-append out "/include/qwt"))
2111 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2112 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2113 (substitute* '("qwtconfig.pri")
2114 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2115 (format #f "~a = ~a\n" x out))
2116 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2117 (format #f "~a = ~a\n" x docdir))
2118 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2119 (format #f "~a = ~a\n" x incdir))
2120 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2121 (format #f "~a = ~a\n" x pluginsdir))
2122 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2123 (format #f "~a = ~a\n" x featuresdir)))
2124 (substitute* '("doc/doc.pro")
2125 ;; We'll install them in the 'install-man-pages' phase.
2126 (("^unix:doc\\.files.*") ""))
2128 (add-after 'install 'install-man-pages
2129 (lambda* (#:key outputs #:allow-other-keys)
2130 (let* ((out (assoc-ref outputs "out"))
2131 (man (string-append out "/share/man")))
2132 ;; Remove some incomplete manual pages.
2133 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2135 (copy-recursively "doc/man" man)
2137 (home-page "http://qwt.sourceforge.net")
2138 (synopsis "Qt widgets for plots, scales, dials and other technical software
2141 "The Qwt library contains widgets and components which are primarily useful
2142 for technical and scientific purposes. It includes a 2-D plotting widget,
2143 different kinds of sliders, and much more.")
2146 ;; The Qwt license is LGPL2.1 with some exceptions.
2147 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2148 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2149 license:lgpl2.1 license:gpl3))))
2151 (define-public qtwebkit
2154 (version "5.212.0-alpha3")
2158 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2159 name "-" version "/" name "-" version ".tar.xz"))
2162 "05syvwi3jw9abwsc93rmjkna0vyh6bkfrsqhwir48ms54icfwzim"))
2163 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2164 (build-system cmake-build-system)
2167 ("python" ,python-2.7)
2172 ("pkg-config" ,pkg-config)))
2176 ("gst-plugins-base" ,gst-plugins-base)
2177 ("libjpeg" ,libjpeg)
2179 ("libwebp" ,libwebp)
2181 ("fontconfig" ,fontconfig)
2182 ("libxrender" ,libxrender)
2184 ("qtdeclarative" ,qtdeclarative)
2185 ("qtlocation" ,qtlocation)
2186 ("qtmultimedia" ,qtmultimedia)
2187 ("qtsensors" ,qtsensors)
2188 ("qtwebchannel" ,qtwebchannel)
2189 ("libxml2" ,libxml2)
2190 ("libxslt" ,libxslt)
2192 ("libxcomposite" ,libxcomposite)))
2194 `(#:tests? #f ; no apparent tests; it might be necessary to set
2195 ; ENABLE_API_TESTS, see CMakeLists.txt
2197 ;; Parallel builds fail due to a race condition:
2198 ;; <https://bugs.gnu.org/34062>.
2199 #:parallel-build? #f
2201 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2203 "-DUSE_LIBHYPHEN=OFF"
2204 "-DUSE_SYSTEM_MALLOC=ON"
2205 ;; XXX: relative dir installs to build dir?
2206 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2207 %output "/lib/qt5/mkspecs/modules")
2208 ;; Sacrifice a little speed in order to link
2209 ;; libraries and test executables in a
2210 ;; reasonable amount of memory.
2211 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2212 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2213 (home-page "https://www.webkit.org")
2214 (synopsis "Web browser engine and classes to render and interact with web
2216 (description "QtWebKit provides a Web browser engine that makes it easy to
2217 embed content from the World Wide Web into your Qt application. At the same
2218 time Web content can be enhanced with native controls.")
2219 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2220 ;; room for slower or busy hardware.
2221 (properties '((timeout . 64800))) ;18 hours
2222 (license license:lgpl2.1+)))
2224 (define-public dotherside
2231 (uri (string-append "https://github.com/filcuc/DOtherSide/"
2232 "archive/v" version ".tar.gz"))
2233 (file-name (string-append name "-" version ".tar.gz"))
2236 "0azq7qlsrfdwbd6qsi7d3c1knn42qw0r47g43xf7clwbinapswpz"))))
2237 (build-system cmake-build-system)
2239 `(("qttools" ,qttools)))
2241 `(("qtbase" ,qtbase)
2242 ("qtdeclarative" ,qtdeclarative)))
2243 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2244 (synopsis "C language library for creating bindings for the Qt QML language")
2246 "DOtherSide is a C language library for creating bindings for the
2247 QT QML language. The following features are implementable from
2250 @item Creating custom QObject
2251 @item Creating custom QAbstractListModels
2252 @item Creating custom properties, signals and slots
2253 @item Creating from QML QObject defined in the binded language
2254 @item Creating from Singleton QML QObject defined in the binded language
2256 (license license:lgpl3))) ;version 3 only (+ exception)
2258 ;; There have been no public releases yet.
2259 (define-public qtcolorwidgets
2260 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2263 (name "qtcolorwidgets")
2264 (version (git-version "0" revision commit))
2268 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2270 (file-name (git-file-name name version))
2273 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2274 (build-system cmake-build-system)
2275 (arguments `(#:tests? #f)) ; There are no tests
2277 `(("qttools" ,qttools)))
2279 `(("qtbase" ,qtbase)))
2280 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2281 (synopsis "Color management widgets")
2282 (description "QtColorWidgets provides a Qt color dialog that is more
2283 user-friendly than the default @code{QColorDialog} and several other
2284 color-related widgets.")
2285 ;; Includes a license exception for combining with GPL2 code.
2286 (license license:lgpl3+))))