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>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages qt)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix build-system cmake)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system trivial)
38 #:use-module (guix packages)
39 #:use-module (guix utils)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages bison)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages cups)
44 #:use-module (gnu packages databases)
45 #:use-module (gnu packages documentation)
46 #:use-module (gnu packages fontutils)
47 #:use-module (gnu packages flex)
48 #:use-module (gnu packages freedesktop)
49 #:use-module (gnu packages gl)
50 #:use-module (gnu packages glib)
51 #:use-module (gnu packages gperf)
52 #:use-module (gnu packages gstreamer)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages icu4c)
55 #:use-module (gnu packages image)
56 #:use-module (gnu packages linux)
57 #:use-module (gnu packages maths)
58 #:use-module (gnu packages nss)
59 #:use-module (gnu packages pciutils)
60 #:use-module (gnu packages pcre)
61 #:use-module (gnu packages perl)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages pulseaudio)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages python-xyz)
66 #:use-module (gnu packages ruby)
67 #:use-module (gnu packages sdl)
68 #:use-module (gnu packages sqlite)
69 #:use-module (gnu packages tls)
70 #:use-module (gnu packages vulkan)
71 #:use-module (gnu packages xdisorg)
72 #:use-module (gnu packages xorg)
73 #:use-module (gnu packages xml)
74 #:use-module (srfi srfi-1))
76 (define-public grantlee
84 (url "https://github.com/steveire/grantlee.git")
85 (commit (string-append "v" version))))
86 (file-name (git-file-name name version))
88 (base32 "1dmah2gd6zd4fgz2f4ir11dazqg067hjz8xshhywhfsmavchi626"))))
90 ;; Optional: lcov and cccc, both are for code coverage
91 `(("doxygen" ,doxygen)))
94 ("qtscript" ,qtscript)))
95 (build-system cmake-build-system)
98 (modify-phases %standard-phases
99 (add-after 'unpack 'delete-broken-tests
101 ;; TODO: Two date tests (for date01 and date02) fail for unknown
103 ;; Actual (result): ""
104 ;; Expected (output): "01"
105 ;; Actual (result): ""
106 ;; Expected (output): "Jan. 1, 2008"
107 (delete-file "templates/tests/testfilters.cpp")
108 (substitute* "templates/tests/CMakeLists.txt"
109 (("testfilters") ""))
111 (add-before 'check 'check-setup
113 ;; make Qt render "offscreen", required for tests
114 (setenv "QT_QPA_PLATFORM" "offscreen")
116 (home-page "https://github.com/steveire/grantlee")
117 (synopsis "Libraries for text templating with Qt")
118 (description "Grantlee Templates can be used for theming and generation of
119 other text such as code. The syntax uses the syntax of the Django template
120 system, and the core design of Django is reused in Grantlee.")
121 (license license:lgpl2.0+)))
127 (outputs '("out" "examples"))
132 "http://download.qt.io/official_releases/qt/"
133 (version-major+minor version)
135 "/single/qt-everywhere-src-"
139 "0kgzy32s1fr22fxxfhcyncfryb3qxrznlr737r4y5khk4xj1g545"))
140 (modules '((guix build utils)))
143 ;; Remove qtwebengine, which relies on a bundled copy of
144 ;; chromium. Not only does it fail compilation in qt 5.5:
145 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
146 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
147 ;; it might also pose security problems.
148 ;; Alternatively, we could use the "-skip qtwebengine"
149 ;; configuration option.
150 (delete-file-recursively "qtwebengine")
151 ;; The following snippets are copied from their mondular-qt counterparts.
154 (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
155 (list "double-conversion" "freetype" "harfbuzz-ng"
156 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
160 (delete-file-recursively dir))
161 (list "qtimageformats/src/3rdparty"
162 "qtmultimedia/examples/multimedia/spectrum/3rdparty"
164 "qtscxml/tests/3rdparty"
165 "qtcanvas3d/examples/canvas3d/3rdparty"))
166 ;; Tests depend on this example, which depends on the 3rd party code.
167 (substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
169 (substitute* "qtxmlpatterns/tests/auto/auto.pro"
170 (("qxmlquery") "# qxmlquery")
171 (("xmlpatterns ") "# xmlpatterns"))
172 (substitute* "qtwebglplugin/tests/plugins/platforms/platforms.pro"
173 (("webgl") "# webgl"))
174 (substitute* "qtscxml/tests/auto/auto.pro"
176 (substitute* "qtnetworkauth/tests/auto/auto.pro"
177 (("oauth1 ") "# oauth1 "))
178 (substitute* "qtremoteobjects/tests/auto/qml/qml.pro"
179 (("integration") "# integration")
180 (("usertypes") "# usertypes"))
182 (build-system gnu-build-system)
186 `(("alsa-lib" ,alsa-lib)
190 ("double-conversion" ,double-conversion)
192 ("fontconfig" ,fontconfig)
193 ("freetype" ,freetype)
195 ("gstreamer" ,gstreamer)
196 ("gst-plugins-base" ,gst-plugins-base)
197 ("harfbuzz" ,harfbuzz)
200 ("libinput" ,libinput-minimal)
208 ("libxcomposite" ,libxcomposite)
209 ("libxcursor" ,libxcursor)
211 ("libxfixes" ,libxfixes)
213 ("libxinerama" ,libxinerama)
214 ("libxkbcommon" ,libxkbcommon)
216 ("libxrandr" ,libxrandr)
217 ("libxrender" ,libxrender)
224 ("postgresql" ,postgresql)
225 ("pulseaudio" ,pulseaudio)
227 ("sqlite" ,sqlite-with-column-metadata)
229 ("unixodbc" ,unixodbc)
231 ("xcb-util" ,xcb-util)
232 ("xcb-util-image" ,xcb-util-image)
233 ("xcb-util-keysyms" ,xcb-util-keysyms)
234 ("xcb-util-renderutil" ,xcb-util-renderutil)
235 ("xcb-util-wm" ,xcb-util-wm)
242 ("pkg-config" ,pkg-config)
245 ("vulkan-headers" ,vulkan-headers)
246 ("which" ,(@ (gnu packages base) which))))
248 `(#:parallel-build? #f ; Triggers race condition in qtbase module on Hydra.
250 (modify-phases %standard-phases
251 (add-after 'configure 'patch-bin-sh
253 (substitute* '("qtbase/configure"
254 "qtbase/mkspecs/features/qt_functions.prf"
255 "qtbase/qmake/library/qmakebuiltins.cpp")
256 (("/bin/sh") (which "sh")))
259 (lambda* (#:key outputs #:allow-other-keys)
260 (let ((out (assoc-ref outputs "out"))
261 (examples (assoc-ref outputs "examples")))
262 (substitute* '("configure" "qtbase/configure")
263 (("/bin/pwd") (which "pwd")))
264 (substitute* "qtbase/src/corelib/global/global.pri"
265 (("/bin/ls") (which "ls")))
266 ;; do not pass "--enable-fast-install", which makes the
267 ;; configure process fail
272 "-docdir" (string-append out "/share/doc/qt5")
273 "-headerdir" (string-append out "/include/qt5")
274 "-archdatadir" (string-append out "/lib/qt5")
275 "-datadir" (string-append out "/share/qt5")
276 "-examplesdir" (string-append
277 examples "/share/doc/qt5/examples") ; 151MiB
281 ;; These features require higher versions of Linux than the
282 ;; minimum version of the glibc. See
283 ;; src/corelib/global/minimum-linux_p.h. By disabling these
284 ;; features Qt5 applications can be used on the oldest
285 ;; kernels that the glibc supports, including the RHEL6
286 ;; (2.6.32) and RHEL7 (3.10) kernels.
287 "-no-feature-getentropy" ; requires Linux 3.17
288 "-no-feature-renameat2" ; requires Linux 3.16
290 ;; Do not build examples; for the time being, we
291 ;; prefer to save the space and build time.
292 "-no-compile-examples"
293 ;; Most "-system-..." are automatic, but some use
294 ;; the bundled copy by default.
298 ;; explicitly link with openssl instead of dlopening it
300 ;; explicitly link with dbus instead of dlopening it
302 ;; don't use the precompiled headers
304 ;; drop special machine instructions not supported
305 ;; on all instances of the target
306 ,@(if (string-prefix? "x86_64"
307 (or (%current-target-system)
313 (add-after 'install 'patch-mkspecs
314 (lambda* (#:key outputs #:allow-other-keys)
315 (let* ((out (assoc-ref outputs "out"))
316 (archdata (string-append out "/lib/qt5"))
317 (mkspecs (string-append archdata "/mkspecs"))
318 (qt_config.prf (string-append
319 mkspecs "/features/qt_config.prf")))
320 ;; For each Qt module, let `qmake' uses search paths in the
321 ;; module directory instead of all in QT_INSTALL_PREFIX.
322 (substitute* qt_config.prf
323 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
324 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
325 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
326 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
327 (("\\$\\$\\[QT_HOST_LIBS\\]")
328 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
329 (("\\$\\$\\[QT_INSTALL_BINS\\]")
330 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
332 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
333 (substitute* (string-append mkspecs "/features/qt_functions.prf")
334 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
335 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
337 ;; Resolve qmake spec files within qtbase by absolute paths.
340 (string-append mkspecs "/features/" file))
341 '("device_config.prf" "moc.prf" "qt_build_config.prf"
342 "qt_config.prf" "winrt/package_manifest.prf"))
343 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
344 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
346 (add-after 'unpack 'patch-paths
347 ;; Use the absolute paths for dynamically loaded libs, otherwise
348 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
350 (lambda* (#:key inputs #:allow-other-keys)
352 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
353 "cross-libc" "libc"))))
354 (substitute* '("qtbase/src/network/kernel/qdnslookup_unix.cpp"
355 "qtbase/src/network/kernel/qhostinfo_unix.cpp")
356 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
357 (string-append a glibc "/lib/lib" b))))
358 ;; X11/locale (compose path)
359 (substitute* "qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
360 ;; Don't search in /usr/…/X11/locale, …
361 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
362 (string-append "// " line))
363 ;; … but use libx11's path
364 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
365 (string-append a "\"" (assoc-ref inputs "libx11") b)))
367 (substitute* "qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
368 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
369 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
371 (substitute* "qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp"
372 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
373 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
374 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
375 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
378 (list (search-path-specification
379 (variable "QMAKEPATH")
380 (files '("lib/qt5")))
381 (search-path-specification
382 (variable "QML2_IMPORT_PATH")
383 (files '("lib/qt5/qml")))
384 (search-path-specification
385 (variable "QT_PLUGIN_PATH")
386 (files '("lib/qt5/plugins")))
387 (search-path-specification
388 (variable "XDG_DATA_DIRS")
390 (search-path-specification
391 (variable "XDG_CONFIG_DIRS")
392 (files '("etc/xdg")))))
393 (home-page "https://www.qt.io/")
394 (synopsis "Cross-platform GUI library")
395 (description "Qt is a cross-platform application and UI framework for
396 developers using C++ or QML, a CSS & JavaScript like language.")
397 (license (list license:lgpl2.1 license:lgpl3))
399 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
400 ;; see <http://hydra.gnu.org/build/112828>.
401 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
402 (supported-systems (delete "mips64el-linux" %supported-systems))))
405 (package (inherit qt)
409 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
410 (string-copy version 0 (string-rindex version #\.))
412 "/qt-everywhere-opensource-src-"
416 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
417 (patches (search-patches "qt4-ldflags.patch"))
418 (modules '((guix build utils)))
420 ;; Remove webkit module, which is not built.
421 '(begin (delete-file-recursively "src/3rdparty/webkit")
424 `(,@(fold alist-delete
426 '("harfbuzz" "libjpeg"))
427 ("libjpeg" ,libjpeg-8)
430 `(,@(fold alist-delete
431 (package-native-inputs qt)
432 '("vulkan-headers"))))
434 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
435 ;; but we can't make them a separate output because "out" and "examples"
436 ;; would refer to each other.
437 (outputs '("out" ;112MiB core + 37MiB examples
438 "doc")) ;280MiB of HTML + code
441 (modify-phases %standard-phases
444 (lambda* (#:key outputs #:allow-other-keys)
445 (let ((out (assoc-ref outputs "out"))
446 (doc (assoc-ref outputs "doc")))
447 (substitute* '("configure")
448 (("/bin/pwd") (which "pwd")))
449 (substitute* "src/corelib/global/global.pri"
450 (("/bin/ls") (which "ls")))
456 "-nomake" "examples demos"
457 ;; Note: Don't pass '-docdir' since 'qmake' and
458 ;; libQtCore would record its value, thereby defeating
459 ;; the whole point of having a separate output.
460 "-datadir" (string-append out "/share/qt-" ,version
462 "-importdir" (string-append out "/lib/qt-4"
464 "-plugindir" (string-append out "/lib/qt-4"
466 "-translationdir" (string-append out "/share/qt-" ,version
468 "-demosdir" (string-append out "/share/qt-" ,version
470 "-examplesdir" (string-append out "/share/qt-" ,version
474 ;; explicitly link with dbus instead of dlopening it
476 ;; Skip the webkit module; it fails to build on armhf
477 ;; and, apart from that, may pose security risks.
479 ;; don't use the precompiled headers
481 ;; drop special machine instructions not supported
482 ;; on all instances of the target
483 ,@(if (string-prefix? "x86_64"
484 (or (%current-target-system)
498 (lambda* (#:key outputs #:allow-other-keys)
499 ;; Because of qt4-documentation-path.patch, documentation ends up
500 ;; being installed in OUT. Move it to the right place.
501 (let* ((out (assoc-ref outputs "out"))
502 (doc (assoc-ref outputs "doc"))
503 (olddoc (string-append out "/doc"))
504 (docdir (string-append doc "/share/doc/qt-" ,version)))
505 (mkdir-p (dirname docdir))
507 ;; Note: We can't use 'rename-file' here because OUT and DOC are
508 ;; different "devices" due to bind-mounts.
509 (copy-recursively olddoc docdir)
510 (delete-file-recursively olddoc)
513 (define-public qtbase
519 (uri (string-append "https://download.qt.io/official_releases/qt/"
520 (version-major+minor version) "/" version
521 "/submodules/" name "-everywhere-src-"
525 "071yc9iz14qs4s8yvrwllyfdzp5yjxsdpvbjxdrf0g5q69vqigy6"))
526 ;; Use TZDIR to avoid depending on package "tzdata".
527 (patches (search-patches "qtbase-use-TZDIR.patch"
528 "qtbase-old-kernel.patch"))
529 (modules '((guix build utils)))
531 ;; corelib uses bundled harfbuzz, md4, md5, sha3
533 (with-directory-excursion "src/3rdparty"
534 (for-each delete-file-recursively
535 (list "double-conversion" "freetype" "harfbuzz-ng"
536 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
539 (build-system gnu-build-system)
542 ("which" ,(@ (gnu packages base) which))))
544 `(("alsa-lib" ,alsa-lib)
547 ("double-conversion" ,double-conversion)
550 ("fontconfig" ,fontconfig)
551 ("freetype" ,freetype)
553 ("harfbuzz" ,harfbuzz)
555 ("libinput" ,libinput-minimal)
560 ("libxcomposite" ,libxcomposite)
561 ("libxcursor" ,libxcursor)
562 ("libxfixes" ,libxfixes)
564 ("libxinerama" ,libxinerama)
565 ("libxkbcommon" ,libxkbcommon)
567 ("libxrandr" ,libxrandr)
568 ("libxrender" ,libxrender)
576 ("postgresql" ,postgresql)
577 ("pulseaudio" ,pulseaudio)
578 ("sqlite" ,sqlite-with-column-metadata)
579 ("unixodbc" ,unixodbc)
580 ("xcb-util" ,xcb-util)
581 ("xcb-util-image" ,xcb-util-image)
582 ("xcb-util-keysyms" ,xcb-util-keysyms)
583 ("xcb-util-renderutil" ,xcb-util-renderutil)
584 ("xcb-util-wm" ,xcb-util-wm)
591 ("pkg-config" ,pkg-config)
593 ("vulkan-headers" ,vulkan-headers)
597 (modify-phases %standard-phases
598 (add-after 'configure 'patch-bin-sh
600 (substitute* '("config.status"
602 "mkspecs/features/qt_functions.prf"
603 "qmake/library/qmakebuiltins.cpp")
604 (("/bin/sh") (which "sh")))
607 (lambda* (#:key outputs #:allow-other-keys)
608 (let ((out (assoc-ref outputs "out")))
609 (substitute* "configure"
610 (("/bin/pwd") (which "pwd")))
611 (substitute* "src/corelib/global/global.pri"
612 (("/bin/ls") (which "ls")))
613 ;; The configuration files for other Qt5 packages are searched
614 ;; through a call to "find_package" in Qt5Config.cmake, which
615 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
616 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
617 ;; components can be installed in different places.
618 (substitute* (find-files "." ".*\\.cmake")
619 (("NO_DEFAULT_PATH") ""))
620 ;; do not pass "--enable-fast-install", which makes the
621 ;; configure process fail
626 "-docdir" (string-append out "/share/doc/qt5")
627 "-headerdir" (string-append out "/include/qt5")
628 "-archdatadir" (string-append out "/lib/qt5")
629 "-datadir" (string-append out "/share/qt5")
630 "-examplesdir" (string-append
631 out "/share/doc/qt5/examples")
635 ;; These features require higher versions of Linux than the
636 ;; minimum version of the glibc. See
637 ;; src/corelib/global/minimum-linux_p.h. By disabling these
638 ;; features Qt5 applications can be used on the oldest
639 ;; kernels that the glibc supports, including the RHEL6
640 ;; (2.6.32) and RHEL7 (3.10) kernels.
641 "-no-feature-getentropy" ; requires Linux 3.17
643 ;; Do not build examples; if desired, these could go
644 ;; into a separate output, but for the time being, we
645 ;; prefer to save the space and build time.
646 "-no-compile-examples"
647 ;; Most "-system-..." are automatic, but some use
648 ;; the bundled copy by default.
652 ;; explicitly link with openssl instead of dlopening it
654 ;; explicitly link with dbus instead of dlopening it
656 ;; don't use the precompiled headers
658 ;; drop special machine instructions that do not have
660 ,@(if (string-prefix? "x86_64"
661 (or (%current-target-system)
667 (add-after 'install 'patch-mkspecs
668 (lambda* (#:key outputs #:allow-other-keys)
669 (let* ((out (assoc-ref outputs "out"))
670 (archdata (string-append out "/lib/qt5"))
671 (mkspecs (string-append archdata "/mkspecs"))
672 (qt_config.prf (string-append
673 mkspecs "/features/qt_config.prf")))
674 ;; For each Qt module, let `qmake' uses search paths in the
675 ;; module directory instead of all in QT_INSTALL_PREFIX.
676 (substitute* qt_config.prf
677 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
678 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
679 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
680 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
681 (("\\$\\$\\[QT_HOST_LIBS\\]")
682 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
683 (("\\$\\$\\[QT_INSTALL_BINS\\]")
684 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
686 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
687 (substitute* (string-append mkspecs "/features/qt_functions.prf")
688 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
689 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
691 ;; Resolve qmake spec files within qtbase by absolute paths.
694 (string-append mkspecs "/features/" file))
695 '("device_config.prf" "moc.prf" "qt_build_config.prf"
696 "qt_config.prf" "winrt/package_manifest.prf"))
697 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
698 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
700 (add-after 'unpack 'patch-paths
701 ;; Use the absolute paths for dynamically loaded libs, otherwise
702 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
704 (lambda* (#:key inputs #:allow-other-keys)
706 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
707 "cross-libc" "libc"))))
708 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
709 "src/network/kernel/qhostinfo_unix.cpp")
710 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
711 (string-append a glibc "/lib/lib" b))))
712 ;; X11/locale (compose path)
713 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
714 ;; Don't search in /usr/…/X11/locale, …
715 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
716 (string-append "// " line))
717 ;; … but use libx11's path
718 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
719 (string-append a "\"" (assoc-ref inputs "libx11") b)))
721 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
722 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
723 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
725 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
726 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
727 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
728 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
729 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
732 (list (search-path-specification
733 (variable "QMAKEPATH")
734 (files '("lib/qt5")))
735 (search-path-specification
736 (variable "QML2_IMPORT_PATH")
737 (files '("lib/qt5/qml")))
738 (search-path-specification
739 (variable "QT_PLUGIN_PATH")
740 (files '("lib/qt5/plugins")))
741 (search-path-specification
742 (variable "XDG_DATA_DIRS")
744 (search-path-specification
745 (variable "XDG_CONFIG_DIRS")
746 (files '("etc/xdg")))))
747 (home-page "https://www.qt.io/")
748 (synopsis "Cross-platform GUI library")
749 (description "Qt is a cross-platform application and UI framework for
750 developers using C++ or QML, a CSS & JavaScript like language.")
751 (license (list license:lgpl2.1 license:lgpl3))))
754 (package (inherit qtbase)
759 (uri (string-append "https://download.qt.io/official_releases/qt/"
760 (version-major+minor version) "/" version
761 "/submodules/" name "-everywhere-src-"
765 "14a4rprbj9f9rhixbk7143xdz34d7d39xh9v2sc1w43q9sf2rsi1"))))
766 (propagated-inputs `())
767 (native-inputs `(("perl" ,perl)))
774 (modify-phases %standard-phases
775 (add-before 'configure 'configure-qmake
776 (lambda* (#:key inputs outputs #:allow-other-keys)
777 (let* ((out (assoc-ref outputs "out"))
778 (qtbase (assoc-ref inputs "qtbase"))
779 (tmpdir (string-append (getenv "TMPDIR")))
780 (qmake (string-append tmpdir "/qmake"))
781 (qt.conf (string-append tmpdir "/qt.conf")))
782 ;; Use qmake with a customized qt.conf to override install
784 (symlink (which "qmake") qmake)
785 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
786 (with-output-to-file qt.conf
792 Documentation=share/doc/qt5
795 LibraryExecutables=lib/qt5/libexec
798 Plugins=lib/qt5/plugins
799 Imports=lib/qt5/imports
800 Qml2Imports=lib/qt5/qml
801 Translations=share/qt5/translations
803 Examples=share/doc/qt5/examples
809 [EffectiveSourcePaths]
815 (lambda* (#:key inputs outputs #:allow-other-keys)
816 ;; Valid QT_BUILD_PARTS variables are:
817 ;; libs tools tests examples demos docs translations
818 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
819 (add-before 'check 'set-display
821 ;; make Qt render "offscreen", required for tests
822 (setenv "QT_QPA_PLATFORM" "offscreen")
824 (synopsis "Qt module for displaying SVGs")
825 (description "The QtSvg module provides classes for displaying the
826 contents of SVG files.")))
828 (define-public qtimageformats
829 (package (inherit qtsvg)
830 (name "qtimageformats")
834 (uri (string-append "https://download.qt.io/official_releases/qt/"
835 (version-major+minor version) "/" version
836 "/submodules/" name "-everywhere-src-"
840 "0zq8igsjyyhxsjr43vpaasrqjw3x0g6rwqf8kaz7y9vs7ny63ch4"))
841 (modules '((guix build utils)))
844 (delete-file-recursively "src/3rdparty")
855 (synopsis "Additional Image Format plugins for Qt")
856 (description "The QtImageFormats module contains plugins for adding
857 support for MNG, TGA, TIFF and WBMP image formats.")))
859 (define-public qtx11extras
860 (package (inherit qtsvg)
865 (uri (string-append "https://download.qt.io/official_releases/qt/"
866 (version-major+minor version) "/" version
867 "/submodules/" name "-everywhere-src-"
871 "11fd2mc20qmnyv1vqhaqad2q6m0i4lmkr432rmqvpkgphpkfp7pr"))))
873 (substitute-keyword-arguments (package-arguments qtsvg)
874 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
875 (native-inputs `(("perl" ,perl)))
879 (synopsis "Qt Extras for X11")
880 (description "The QtX11Extras module includes the library to access X11
881 from within Qt 5.")))
883 (define-public qtxmlpatterns
884 (package (inherit qtsvg)
885 (name "qtxmlpatterns")
889 (uri (string-append "https://download.qt.io/official_releases/qt/"
890 (version-major+minor version) "/" version
891 "/submodules/" name "-everywhere-src-"
895 "1vhfvgi39miqsx3iq7c9sii2sykq0yfng69b70i0smr20zihpl4b"))))
897 (substitute-keyword-arguments (package-arguments qtsvg)
899 `(modify-phases ,phases
900 (add-after 'unpack 'disable-network-tests
901 (lambda _ (substitute* "tests/auto/auto.pro"
902 (("qxmlquery") "# qxmlquery")
903 (("xmlpatterns ") "# xmlpatterns"))
905 (native-inputs `(("perl" ,perl)))
906 (inputs `(("qtbase" ,qtbase)))
907 (synopsis "Qt XML patterns module")
908 (description "The QtXmlPatterns module is a XQuery and XPath engine for
909 XML and custom data models. It contains programs such as xmlpatterns and
910 xmlpatternsvalidator.")))
912 (define-public qtdeclarative
913 (package (inherit qtsvg)
914 (name "qtdeclarative")
918 (uri (string-append "https://download.qt.io/official_releases/qt/"
919 (version-major+minor version) "/" version
920 "/submodules/" name "-everywhere-src-"
924 "1rhsf9bma2zwwpixk2fsg31x7c1pmsk144npypgc9w86swhkc9lf"))))
926 (substitute-keyword-arguments (package-arguments qtsvg)
927 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
930 ("pkg-config" ,pkg-config)
933 ("qtxmlpatterns" ,qtxmlpatterns)))
937 (synopsis "Qt QML module (Quick 2)")
938 (description "The Qt QML module provides a framework for developing
939 applications and libraries with the QML language. It defines and implements the
940 language and engine infrastructure, and provides an API to enable application
941 developers to extend the QML language with custom types and integrate QML code
942 with JavaScript and C++.")))
944 (define-public qtconnectivity
945 (package (inherit qtsvg)
946 (name "qtconnectivity")
950 (uri (string-append "https://download.qt.io/official_releases/qt/"
951 (version-major+minor version) "/" version
952 "/submodules/" name "-everywhere-src-"
956 "0amks3qad31i7cha85kvcaxvlmmgkc3gm4jdkw2p02ixxfygr30l"))))
959 ("pkg-config" ,pkg-config)
960 ("qtdeclarative" ,qtdeclarative)))
964 (synopsis "Qt Connectivity module")
965 (description "The Qt Connectivity modules provides modules for interacting
966 with Bluetooth and NFC.")))
968 (define-public qtwebsockets
969 (package (inherit qtsvg)
970 (name "qtwebsockets")
974 (uri (string-append "https://download.qt.io/official_releases/qt/"
975 (version-major+minor version) "/" version
976 "/submodules/" name "-everywhere-src-"
980 "1ffmapfy68xwwbxbg19ng6b5h8v42cf78s21j7rgq49gm70r0402"))))
982 (substitute-keyword-arguments (package-arguments qtsvg)
983 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
986 ("qtdeclarative" ,qtdeclarative)))
987 (inputs `(("qtbase" ,qtbase)))
988 (synopsis "Qt Web Sockets module")
989 (description "WebSocket is a web-based protocol designed to enable two-way
990 communication between a client application and a remote host. The Qt
991 WebSockets module provides C++ and QML interfaces that enable Qt applications
992 to act as a server that can process WebSocket requests, or a client that can
993 consume data received from the server, or both.")))
995 (define-public qtsensors
996 (package (inherit qtsvg)
1001 (uri (string-append "https://download.qt.io/official_releases/qt/"
1002 (version-major+minor version) "/" version
1003 "/submodules/" name "-everywhere-src-"
1007 "0n88c8xi9pbyh7q1pcqv4yjv6nx62abflj8qgfr4qzb0sp8m6mx7"))))
1009 (substitute-keyword-arguments (package-arguments qtsvg)
1010 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
1012 `(modify-phases ,phases
1013 (add-after 'unpack 'fix-tests
1015 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
1016 (("2000") "5000") ;lengthen test timeout
1017 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
1021 ("qtdeclarative" ,qtdeclarative)))
1022 (inputs `(("qtbase" ,qtbase)))
1023 (synopsis "Qt Sensors module")
1024 (description "The Qt Sensors API provides access to sensor hardware via QML
1025 and C++ interfaces. The Qt Sensors API also provides a motion gesture
1026 recognition API for devices.")))
1028 (define-public qtmultimedia
1029 (package (inherit qtsvg)
1030 (name "qtmultimedia")
1034 (uri (string-append "https://download.qt.io/official_releases/qt/"
1035 (version-major+minor version) "/" version
1036 "/submodules/" name "-everywhere-src-"
1040 "0h9wx86zj20n4xc3qnml0i360x2dc1yd2z2af1flj8fwyzppi03j"))
1041 (modules '((guix build utils)))
1044 (delete-file-recursively
1045 "examples/multimedia/spectrum/3rdparty")
1046 ;; We also prevent the spectrum example from being built.
1047 (substitute* "examples/multimedia/multimedia.pro"
1051 (substitute-keyword-arguments (package-arguments qtsvg)
1053 `(modify-phases ,phases
1055 (lambda* (#:key outputs #:allow-other-keys)
1056 (let ((out (assoc-ref outputs "out")))
1057 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
1058 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
1059 (string-append "PREFIX=" out)))))))
1060 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1063 ("pkg-config" ,pkg-config)
1064 ("python" ,python-2)
1065 ("qtdeclarative" ,qtdeclarative)))
1067 `(("alsa-lib" ,alsa-lib)
1069 ("pulseaudio" ,pulseaudio)
1071 ;; Gstreamer is needed for the mediaplayer plugin
1072 ("gstreamer" ,gstreamer)
1073 ("gst-plugins-base" ,gst-plugins-base)))
1074 (synopsis "Qt Multimedia module")
1075 (description "The Qt Multimedia module provides set of APIs to play and
1076 record media, and manage a collection of media content. It also contains a
1077 set of plugins for interacting with pulseaudio and GStreamer.")))
1079 (define-public qtwayland
1080 (package (inherit qtsvg)
1085 (uri (string-append "https://download.qt.io/official_releases/qt/"
1086 (version-major+minor version) "/" version
1087 "/submodules/" name "-everywhere-src-"
1091 "1chz4wchgkzd45h143i5hkqg0whcgdbj37gkg7j4kj31whllzjb2"))
1092 (modules '((guix build utils)))
1094 ;; The examples try to build and cause the build to fail
1096 (delete-file-recursively "examples")
1099 (substitute-keyword-arguments (package-arguments qtsvg)
1101 `(modify-phases ,phases
1102 (add-before 'check 'set-ld-library-path
1103 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
1105 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
1106 ;; wayland platform plugin.
1108 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
1113 ("pkg-config" ,pkg-config)
1114 ("qtdeclarative" ,qtdeclarative)))
1116 `(("fontconfig" ,fontconfig)
1117 ("freetype" ,freetype)
1119 ("libxcomposite" ,libxcomposite)
1120 ("libxext" ,libxext)
1121 ("libxkbcommon" ,libxkbcommon)
1122 ("libxrender" ,libxrender)
1126 ("wayland" ,wayland)))
1127 (synopsis "Qt Wayland module")
1128 (description "The Qt Wayland module provides the QtWayland client and
1129 compositor libraries.")))
1131 (define-public qtserialport
1132 (package (inherit qtsvg)
1133 (name "qtserialport")
1137 (uri (string-append "https://download.qt.io/official_releases/qt/"
1138 (version-major+minor version) "/" version
1139 "/submodules/" name "-everywhere-src-"
1143 "1nkbfsxzgicwns3k11hhzjxy2hgrigj8xcw2by0jc1j71mnmxi4n"))))
1144 (native-inputs `(("perl" ,perl)))
1146 `(("qtbase" ,qtbase)
1149 (substitute-keyword-arguments (package-arguments qtsvg)
1151 `(modify-phases ,phases
1152 (add-after 'unpack 'patch-dlopen-paths
1153 (lambda* (#:key inputs #:allow-other-keys)
1154 (substitute* "src/serialport/qtudev_p.h"
1155 ;; Use the absolute paths for dynamically loaded libs,
1156 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1157 ;; typically is not set in guix.
1158 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1159 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1161 (synopsis "Qt Serial Port module")
1162 (description "The Qt Serial Port module provides the library for
1163 interacting with serial ports from within Qt.")))
1165 (define-public qtserialbus
1166 (package (inherit qtsvg)
1167 (name "qtserialbus")
1171 (uri (string-append "https://download.qt.io/official_releases/qt/"
1172 (version-major+minor version) "/" version
1173 "/submodules/" name "-everywhere-src-"
1177 "0vf12jk1ma0v0dlpliw1x9i04iaik1kjkiaby7gaxm2abprxwr2n"))))
1179 `(("qtbase" ,qtbase)
1180 ("qtserialport" ,qtserialport)))
1181 (synopsis "Qt Serial Bus module")
1182 (description "The Qt Serial Bus API provides classes and functions to
1183 access the various industrial serial buses and protocols, such as CAN, ModBus,
1186 (define-public qtwebchannel
1187 (package (inherit qtsvg)
1188 (name "qtwebchannel")
1192 (uri (string-append "https://download.qt.io/official_releases/qt/"
1193 (version-major+minor version) "/" version
1194 "/submodules/" name "-everywhere-src-"
1198 "1wrdawlqvcw84h8q52mvbjhp1vkd6fhz6c8ijlg9rw0s3fj4y99w"))))
1201 ("qtdeclarative" ,qtdeclarative)
1202 ("qtwebsockets" ,qtwebsockets)))
1203 (inputs `(("qtbase" ,qtbase)))
1204 (synopsis "Web communication library for Qt")
1205 (description "The Qt WebChannel module enables peer-to-peer communication
1206 between the host (QML/C++ application) and the client (HTML/JavaScript
1207 application). The transport mechanism is supported out of the box by the two
1208 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1210 (define-public qtwebglplugin
1211 (package (inherit qtsvg)
1212 (name "qtwebglplugin")
1216 (uri (string-append "https://download.qt.io/official_releases/qt/"
1217 (version-major+minor version) "/" version
1218 "/submodules/" name "-everywhere-src-"
1222 "0wqz8lycmi7pffzy0pz5960w109lbk4mkbw0l1lh64avl6clq7b9"))))
1224 (substitute-keyword-arguments (package-arguments qtsvg)
1226 `(modify-phases ,phases
1227 (add-after 'unpack 'disable-network-tests
1228 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1229 (("webgl") "# webgl"))
1235 ("qtdeclarative" ,qtdeclarative)
1236 ("qtwebsockets" ,qtwebsockets)))
1237 (synopsis "QPA plugin for running an application via a browser using
1238 streamed WebGL commands")
1239 (description "Qt back end that uses WebGL for rendering. It allows Qt
1240 applications (with some limitations) to run in a web browser that supports
1241 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1242 compatible web browser without the use of plug-ins. The API is similar to
1243 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1245 (define-public qtwebview
1246 (package (inherit qtsvg)
1251 (uri (string-append "https://download.qt.io/official_releases/qt/"
1252 (version-major+minor version) "/" version
1253 "/submodules/" name "-everywhere-src-"
1257 "1njmn1n03dp4md8cz58cq2z6bsxd8nwlw0238zmavh7px3jzc9kh"))))
1261 `(("qtbase" ,qtbase)
1262 ("qtdeclarative" ,qtdeclarative)))
1263 (synopsis "Display web content in a QML application")
1264 (description "Qt WebView provides a way to display web content in a QML
1265 application without necessarily including a full web browser stack by using
1266 native APIs where it makes sense.")))
1268 (define-public qtlocation
1269 (package (inherit qtsvg)
1274 (uri (string-append "https://download.qt.io/official_releases/qt/"
1275 (version-major+minor version) "/" version
1276 "/submodules/" name "-everywhere-src-"
1280 "1sq0f41jwmsimv9a1wl2nk5nifjppm5j92rr4n4s7qwnnjjrir2q"))))
1282 (substitute-keyword-arguments (package-arguments qtsvg)
1283 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1286 ("qtdeclarative" ,qtdeclarative)
1287 ("qtquickcontrols" ,qtquickcontrols)
1288 ("qtserialport" ,qtserialport)))
1291 ("openssl" ,openssl)
1294 (synopsis "Qt Location and Positioning modules")
1295 (description "The Qt Location module provides an interface for location,
1296 positioning and geolocation plugins.")))
1298 (define-public qttools
1299 (package (inherit qtsvg)
1304 (uri (string-append "https://download.qt.io/official_releases/qt/"
1305 (version-major+minor version) "/" version
1306 "/submodules/" name "-everywhere-src-"
1310 "13lzdxxi02yhvx4mflhisl6aqv2fiss5m804cqccd1wvp8dyh1f2"))))
1312 (substitute-keyword-arguments (package-arguments qtsvg)
1313 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1316 ("qtdeclarative" ,qtdeclarative)
1317 ("vulkan-headers" ,vulkan-headers)))
1320 ("qtbase" ,qtbase)))
1321 (synopsis "Qt Tools and Designer modules")
1322 (description "The Qt Tools module provides a set of applications to browse
1323 the documentation, translate applications, generate help files and other stuff
1324 that helps in Qt development.")))
1326 (define-public qtscript
1327 (package (inherit qtsvg)
1332 (uri (string-append "https://download.qt.io/official_releases/qt/"
1333 (version-major+minor version) "/" version
1334 "/submodules/" name "-everywhere-src-"
1338 "027cvggbcvwyz76cn1bl1zvqg0nq7iica1b7yx7xyy0hb36g715v"))
1339 (patches (search-patches "qtscript-disable-tests.patch"))))
1342 ("qttools" ,qttools)))
1344 `(("qtbase" ,qtbase)))
1345 (synopsis "Qt Script module")
1346 (description "Qt provides support for application scripting with ECMAScript.
1347 The following guides and references cover aspects of programming with
1348 ECMAScript and Qt.")))
1350 (define-public qtquickcontrols
1351 (package (inherit qtsvg)
1352 (name "qtquickcontrols")
1356 (uri (string-append "https://download.qt.io/official_releases/qt/"
1357 (version-major+minor version) "/" version
1358 "/submodules/" name "-everywhere-src-"
1362 "0dvmy31qbl76yy0j5y8m7mvnmqyg2c01fmlkn0snvc5h5ah5skjf"))))
1364 (substitute-keyword-arguments (package-arguments qtsvg)
1365 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1367 `(("qtbase" ,qtbase)
1368 ("qtdeclarative" ,qtdeclarative)))
1369 (synopsis "Qt Quick Controls and other Quick modules")
1370 (description "The QtScript module provides classes for making Qt
1371 applications scriptable. This module provides a set of extra components that
1372 can be used to build complete interfaces in Qt Quick.")))
1374 (define-public qtquickcontrols2
1375 (package (inherit qtsvg)
1376 (name "qtquickcontrols2")
1380 (uri (string-append "https://download.qt.io/official_releases/qt/"
1381 (version-major+minor version) "/" version
1382 "/submodules/" name "-everywhere-src-"
1386 "11nhpb0xckv5jjkqj5szr94c2rvyjwr89ch58hh64nsqaav30mpl"))))
1388 (substitute-keyword-arguments (package-arguments qtsvg)
1389 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1391 `(("qtbase" ,qtbase)
1392 ("qtdeclarative" ,qtdeclarative)))
1393 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1394 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1395 module that provides platform integration: native dialogs, menus and menu bars,
1396 and tray icons. It falls back to Qt Widgets when a native implementation is
1399 (define-public qtgraphicaleffects
1400 (package (inherit qtsvg)
1401 (name "qtgraphicaleffects")
1405 (uri (string-append "https://download.qt.io/official_releases/qt/"
1406 (version-major+minor version) "/" version
1407 "/submodules/" name "-everywhere-src-"
1411 "1qjpdzkamf27cg5n1wsf0zk939lcgppgydfjzap9s4fxzj1nkn0l"))))
1413 (substitute-keyword-arguments (package-arguments qtsvg)
1414 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1416 `(("qtbase" ,qtbase)
1417 ("qtdeclarative" ,qtdeclarative)))
1418 (synopsis "Qt Graphical Effects module")
1419 (description "The Qt Graphical Effects module provides a set of QML types
1420 for adding visually impressive and configurable effects to user interfaces.
1421 Effects are visual items that can be added to Qt Quick user interface as UI
1422 components. The API consists of over 20 effects provided as separate QML
1423 types. The effects cover functional areas such as blending, masking, blurring,
1424 coloring, and many more.")))
1426 (define-public qtdeclarative-render2d
1427 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
1428 (package (inherit qtsvg)
1429 (name "qtdeclarative-render2d")
1433 (uri (string-append "https://download.qt.io/official_releases/qt/"
1434 (version-major+minor version) "/" version
1435 "/submodules/" name "-everywhere-src-"
1439 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1440 (modules '((guix build utils)))
1443 (delete-file-recursively "tools/opengldummy/3rdparty")
1447 `(("qtbase" ,qtbase)
1448 ("qtdeclarative" ,qtdeclarative)))
1449 (synopsis "Qt Declarative Render module")
1450 (description "The Qt Declarative Render 2D module provides a Raster
1451 backend for QtQuick scene graph.")
1452 (properties `((superseded . ,qtdeclarative)))))
1454 (define-public qtgamepad
1455 (package (inherit qtsvg)
1460 (uri (string-append "https://download.qt.io/official_releases/qt/"
1461 (version-major+minor version) "/" version
1462 "/submodules/" name "-everywhere-src-"
1466 "1k222cx18zq48sfna91hmy427qzk2n2xz3dlyz59iyz72k6915g9"))))
1469 ("pkg-config" ,pkg-config)))
1471 `(("fontconfig" ,fontconfig)
1472 ("freetype" ,freetype)
1473 ("libxrender" ,libxrender)
1476 ("qtdeclarative" ,qtdeclarative)))
1477 (synopsis "Qt Gamepad module")
1478 (description "The Qt Gamepad module is an add-on library that enables Qt
1479 applications to support the use of gamepad hardware and in some cases remote
1480 control equipment. The module provides both QML and C++ interfaces. The
1481 primary target audience are embedded devices with fullscreen user interfaces,
1482 and mobile applications targeting TV-like form factors.")))
1484 (define-public qtscxml
1485 (package (inherit qtsvg)
1490 (uri (string-append "https://download.qt.io/official_releases/qt/"
1491 (version-major+minor version) "/" version
1492 "/submodules/" name "-everywhere-src-"
1496 "1mv8mz36v34dckrzy5r41mq3sqznbalrhndk3avz2154xmkjf5qk"))
1497 (modules '((guix build utils)))
1500 (delete-file-recursively "tests/3rdparty")
1501 ;; the scion test refers to the bundled 3rd party test code.
1502 (substitute* "tests/auto/auto.pro"
1506 `(("qtbase" ,qtbase)
1507 ("qtdeclarative" ,qtdeclarative)))
1508 (synopsis "Qt SCXML module")
1509 (description "The Qt SCXML module provides functionality to create state
1510 machines from SCXML files. This includes both dynamically creating state
1511 machines (loading the SCXML file and instantiating states and transitions) and
1512 generating a C++ file that has a class implementing the state machine. It
1513 also contains functionality to support data models and executable content.")))
1515 (define-public qtpurchasing
1516 (package (inherit qtsvg)
1517 (name "qtpurchasing")
1521 (uri (string-append "https://download.qt.io/official_releases/qt/"
1522 (version-major+minor version) "/" version
1523 "/submodules/" name "-everywhere-src-"
1527 "1fd0gxdj5mrh81iwimq1243i3n47sqv9ik8nslahfh0q3dsx7k8n"))))
1529 `(("qtbase" ,qtbase)
1530 ("qtdeclarative" ,qtdeclarative)))
1531 (synopsis "Qt Purchasing module")
1532 (description "The Qt Purchasing module provides and in-app API for
1533 purchasing goods and services.")))
1535 (define-public qtcanvas3d
1536 (package (inherit qtsvg)
1541 (uri (string-append "https://download.qt.io/official_releases/qt/"
1542 (version-major+minor version) "/" version
1543 "/submodules/" name "-everywhere-src-"
1547 "0f110z7cmkzns9k00aa5zhzq2fpybfxkd7gdlwzcbhc8hn20986m"))
1548 (modules '((guix build utils)))
1551 (delete-file-recursively "examples/canvas3d/3rdparty")
1554 (substitute-keyword-arguments (package-arguments qtsvg)
1555 ;; Building the tests depends on the bundled 3rd party javascript files,
1556 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1557 ;; fail, so we skip building them for now.
1559 `(modify-phases ,phases
1561 (lambda* (#:key outputs #:allow-other-keys)
1562 (let ((out (assoc-ref outputs "out")))
1563 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1564 (string-append "PREFIX=" out)))))))
1565 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1568 `(("qtbase" ,qtbase)
1569 ("qtdeclarative" ,qtdeclarative)))
1570 (synopsis "Qt Canvas 3D module")
1571 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1572 drawing calls from Qt Quick JavaScript.")))
1574 (define-public qtcharts
1575 (package (inherit qtsvg)
1580 (uri (string-append "https://download.qt.io/official_releases/qt/"
1581 (version-major+minor version) "/" version
1582 "/submodules/" name "-everywhere-src-"
1586 "1p4m1nkbbxlkwmbmasx5r83skzssmlcgfzyvj30x2dyrqkmz7627"))))
1588 (substitute-keyword-arguments (package-arguments qtsvg)
1589 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1591 `(("qtbase" ,qtbase)
1592 ("qtdeclarative" ,qtdeclarative)))
1593 (synopsis "Qt Charts module")
1594 (description "The Qt Charts module provides a set of easy to use chart
1595 components. It uses the Qt Graphics View Framework, therefore charts can be
1596 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1597 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1598 selecting one of the charts themes.")
1599 (license license:gpl3)))
1601 (define-public qtdatavis3d
1602 (package (inherit qtsvg)
1603 (name "qtdatavis3d")
1607 (uri (string-append "https://download.qt.io/official_releases/qt/"
1608 (version-major+minor version) "/" version
1609 "/submodules/" name "-everywhere-src-"
1613 "1kqwr3avcvcyy4i28vjgxk1bsjj9011zr668hsk1zrjxnnwjwdl3"))))
1615 (substitute-keyword-arguments (package-arguments qtsvg)
1616 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1618 `(("qtbase" ,qtbase)
1619 ("qtdeclarative" ,qtdeclarative)))
1620 (synopsis "Qt Data Visualization module")
1621 (description "The Qt Data Visualization module provides a way to visualize
1622 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1623 visualizing depth maps and large quantities of rapidly changing data, such as
1624 data received from multiple sensors. The look and feel of graphs can be
1625 customized by using themes or by adding custom items and labels to them.")
1626 (license license:gpl3)))
1628 (define-public qtnetworkauth
1629 (package (inherit qtsvg)
1630 (name "qtnetworkauth")
1634 (uri (string-append "https://download.qt.io/official_releases/qt/"
1635 (version-major+minor version) "/" version
1636 "/submodules/" name "-everywhere-src-"
1640 "0dd35698wzg89975vi2ijl2lym495fjizsl03mjixsjnvb1x0q50"))))
1642 (substitute-keyword-arguments (package-arguments qtsvg)
1644 `(modify-phases ,phases
1645 (add-after 'unpack 'remove-failing-test
1647 ;; These tests can't find their test data.
1648 (substitute* "tests/auto/auto.pro"
1649 (("oauth1 ") "# oauth1 "))
1652 `(("qtbase" ,qtbase)))
1653 (synopsis "Qt Network Authorization module")
1654 (description "The Qt Network Authorization module provides an
1655 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1657 (define-public qtremoteobjects
1658 (package (inherit qtsvg)
1659 (name "qtremoteobjects")
1663 (uri (string-append "https://download.qt.io/official_releases/qt/"
1664 (version-major+minor version) "/" version
1665 "/submodules/" name "-everywhere-src-"
1669 "1d3jzsxfyjhgb6wj9iv1388bv7j6pi08346nmkm1c1a4iykhc0zp"))))
1671 (substitute-keyword-arguments (package-arguments qtsvg)
1673 `(modify-phases ,phases
1674 (add-after 'unpack 'remove-failing-test
1676 ;; This test can't find its imports.
1677 (substitute* "tests/auto/qml/qml.pro"
1678 (("integration") "# integration")
1679 (("usertypes") "# usertypes"))
1682 `(("qtbase" ,qtbase)
1683 ("qtdeclarative" ,qtdeclarative)))
1684 (synopsis "Qt Remote Objects module")
1685 (description "The Qt Remote Objects module is an @dfn{inter-process
1686 communication} (IPC) module developed for Qt. The idea is to extend existing
1687 Qt's functionalities to enable an easy exchange of information between
1688 processes or computers.")))
1690 (define-public qtspeech
1691 (package (inherit qtsvg)
1696 (uri (string-append "https://download.qt.io/official_releases/qt/"
1697 (version-major+minor version) "/" version
1698 "/submodules/" name "-everywhere-src-"
1702 "158p7zqd0vg55gf88jzc3d4f7649ihh80k0m1q46m2yp6fpdjbxr"))))
1704 (substitute-keyword-arguments (package-arguments qtsvg)
1705 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1707 `(("qtbase" ,qtbase)))
1710 ("qtdeclarative" ,qtdeclarative)
1711 ("qtmultimedia" ,qtmultimedia)
1712 ("qtxmlpatterns" ,qtxmlpatterns)))
1713 (synopsis "Qt Speech module")
1714 (description "The Qt Speech module enables a Qt application to support
1715 accessibility features such as text-to-speech, which is useful for end-users
1716 who are visually challenged or cannot access the application for whatever
1717 reason. The most common use case where text-to-speech comes in handy is when
1718 the end-user is driving and cannot attend the incoming messages on the phone.
1719 In such a scenario, the messaging application can read out the incoming
1722 (define-public python-sip
1730 (string-append "mirror://sourceforge/pyqt/sip/"
1731 "sip-" version "/sip-" version ".tar.gz"))
1734 "0pniq03jk1n5bs90yjihw3s3rsmjd8m89y9zbnymzgwrcl2sflz3"))))
1735 (build-system gnu-build-system)
1737 `(("python" ,python-wrapper)))
1739 `(#:tests? #f ; no check target
1740 #:modules ((srfi srfi-1)
1741 ,@%gnu-build-system-modules)
1743 (modify-phases %standard-phases
1745 (lambda* (#:key inputs outputs #:allow-other-keys)
1746 (let* ((out (assoc-ref outputs "out"))
1747 (bin (string-append out "/bin"))
1748 (include (string-append out "/include"))
1749 (python (assoc-ref inputs "python"))
1751 (last (string-split python #\-)))
1754 (take (string-split python-version #\.) 2)
1756 (lib (string-append out "/lib/python"
1759 (invoke "python" "configure.py"
1762 "--incdir" include)))))))
1763 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1764 (synopsis "Python binding creator for C and C++ libraries")
1766 "SIP is a tool to create Python bindings for C and C++ libraries. It
1767 was originally developed to create PyQt, the Python bindings for the Qt
1768 toolkit, but can be used to create bindings for any C or C++ library.
1770 SIP comprises a code generator and a Python module. The code generator
1771 processes a set of specification files and generates C or C++ code, which
1772 is then compiled to create the bindings extension module. The SIP Python
1773 module provides support functions to the automatically generated code.")
1774 ;; There is a choice between a python like license, gpl2 and gpl3.
1775 ;; For compatibility with pyqt, we need gpl3.
1776 (license license:gpl3)))
1778 (define-public python2-sip
1779 (package (inherit python-sip)
1780 (name "python2-sip")
1782 `(("python" ,python-2)))))
1784 (define-public python-pyqt
1786 (name "python-pyqt")
1792 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1793 "PyQt-" version "/PyQt5_gpl-"
1797 "0wqh4srqkcc03rvkwrcshaa028psrq58xkys6npnyhqxc0apvdf9"))
1798 (patches (search-patches "pyqt-configure.patch"
1799 "pyqt-public-sip.patch"))))
1800 (build-system gnu-build-system)
1802 `(("qtbase" ,qtbase))) ; for qmake
1804 `(("python-sip" ,python-sip)))
1806 `(("python" ,python-wrapper)
1808 ("qtconnectivity" ,qtconnectivity)
1809 ("qtdeclarative" ,qtdeclarative)
1810 ("qtlocation" ,qtlocation)
1811 ("qtmultimedia" ,qtmultimedia)
1812 ("qtsensors" ,qtsensors)
1813 ("qtserialport" ,qtserialport)
1815 ("qttools" ,qttools)
1816 ("qtwebchannel" ,qtwebchannel)
1817 ("qtwebkit" ,qtwebkit)
1818 ("qtwebsockets" ,qtwebsockets)
1819 ("qtx11extras" ,qtx11extras)
1820 ("qtxmlpatterns" ,qtxmlpatterns)))
1822 `(#:modules ((srfi srfi-1)
1823 ,@%gnu-build-system-modules)
1825 (modify-phases %standard-phases
1827 (lambda* (#:key inputs outputs #:allow-other-keys)
1828 (let* ((out (assoc-ref outputs "out"))
1829 (bin (string-append out "/bin"))
1830 (sip (string-append out "/share/sip"))
1831 (plugins (string-append out "/plugins"))
1832 (designer (string-append plugins "/designer"))
1833 (qml (string-append plugins "/PyQt5"))
1834 (python (assoc-ref inputs "python"))
1836 (last (string-split python #\-)))
1839 (take (string-split python-version #\.) 2)
1841 (lib (string-append out "/lib/python"
1844 (stubs (string-append lib "/PyQt5")))
1845 (invoke "python" "configure.py"
1849 "--designer-plugindir" designer
1850 "--qml-plugindir" qml
1851 ; Where to install the PEP 484 Type Hints stub
1852 ; files. Without this the stubs are tried to be
1853 ; installed into the python package's
1854 ; site-package directory, which is read-only.
1856 "--sipdir" sip)))))))
1857 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1858 (synopsis "Python bindings for Qt")
1860 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1861 framework. The bindings are implemented as a set of Python modules and
1862 contain over 620 classes.")
1863 (license license:gpl3)))
1865 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
1866 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
1867 ;; packages that could be used together.
1868 (define-public python-pyqt-without-qtwebkit
1869 (package (inherit python-pyqt)
1870 (name "python-pyqt-without-qtwebkit")
1872 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
1874 (define-public python2-pyqt
1875 (package (inherit python-pyqt)
1876 (name "python2-pyqt")
1878 `(("python-sip" ,python2-sip)
1879 ("qtbase" ,qtbase)))
1881 `(("python" ,python-2)
1882 ("python2-enum34" ,python2-enum34)
1883 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1885 (define-public python2-pyqt-4
1886 (package (inherit python-pyqt)
1887 (name "python2-pyqt")
1893 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1894 "PyQt-" version "/PyQt4_gpl_x11-"
1898 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
1900 `(("python-sip" ,python2-sip)
1902 (inputs `(("python" ,python-2)))
1904 `(#:tests? #f ; no check target
1905 #:modules ((srfi srfi-1)
1906 ,@%gnu-build-system-modules)
1908 (modify-phases %standard-phases
1910 (lambda* (#:key inputs outputs #:allow-other-keys)
1911 (let* ((out (assoc-ref outputs "out"))
1912 (bin (string-append out "/bin"))
1913 (sip (string-append out "/share/sip"))
1914 (python (assoc-ref inputs "python"))
1916 (last (string-split python #\-)))
1919 (take (string-split python-version #\.) 2)
1921 (lib (string-append out "/lib/python"
1924 (invoke "python" "configure.py"
1928 "--sipdir" sip)))))))
1929 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1931 (define-public qscintilla
1937 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1938 "QScintilla-" version "/QScintilla_gpl-"
1942 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
1943 (build-system gnu-build-system)
1946 (modify-phases %standard-phases
1948 (lambda* (#:key outputs #:allow-other-keys)
1949 (let ((out (assoc-ref outputs "out")))
1951 (substitute* "qscintilla.pro"
1952 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1953 (string-append out "/lib"))
1954 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1955 (string-append out "/include"))
1956 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1957 (string-append out "/translations"))
1958 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1959 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1960 (("\\$\\$\\[QT_HOST_DATA\\]")
1961 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
1962 (invoke "qmake")))))))
1963 (native-inputs `(("qtbase" ,qtbase)))
1964 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1965 (synopsis "Qt port of the Scintilla C++ editor control")
1966 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1967 editor control. QScintilla includes features especially useful when editing
1968 and debugging source code. These include support for syntax styling, error
1969 indicators, code completion and call tips.")
1970 (license license:gpl3+)))
1972 (define-public python-qscintilla
1973 (package (inherit qscintilla)
1974 (name "python-qscintilla")
1977 (list "--pyqt=PyQt5"
1978 (string-append "--pyqt-sipdir="
1979 (assoc-ref %build-inputs "python-pyqt")
1981 (string-append "--qsci-incdir="
1982 (assoc-ref %build-inputs "qscintilla")
1984 (string-append "--qsci-libdir="
1985 (assoc-ref %build-inputs "qscintilla")
1988 (modify-phases %standard-phases
1990 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
1991 (let ((out (assoc-ref outputs "out"))
1992 (python (assoc-ref inputs "python")))
1994 (apply invoke "python3" "configure.py"
1996 ;; Install to the right directory
1997 (substitute* '("Makefile"
1999 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2000 (((string-append python "/lib"))
2001 (string-append out "/lib")))
2002 ;; And fix the installed.txt file
2003 (substitute* "installed.txt"
2004 (("/gnu/store/[^/]+") out)))
2007 `(("qscintilla" ,qscintilla)
2009 ("python-pyqt" ,python-pyqt)))
2010 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2011 editor control. QScintilla includes features especially useful when editing
2012 and debugging source code. These include support for syntax styling, error
2013 indicators, code completion and call tips.
2015 This package provides the Python bindings.")))
2017 ;; PyQt only looks for modules in its own directory. It ignores environment
2018 ;; variables such as PYTHONPATH, so we need to build a union package to make
2020 (define-public python-pyqt+qscintilla
2021 (package (inherit python-pyqt)
2022 (name "python-pyqt+qscintilla")
2024 (build-system trivial-build-system)
2026 '(#:modules ((guix build union))
2028 (use-modules (ice-9 match)
2030 (match %build-inputs
2031 (((names . directories) ...)
2032 (union-build (assoc-ref %outputs "out")
2036 `(("python-pyqt" ,python-pyqt)
2037 ("python-qscintilla" ,python-qscintilla)))
2038 (synopsis "Union of PyQt and the Qscintilla extension")
2040 "This package contains the union of PyQt and the Qscintilla extension.")))
2042 (define-public qtkeychain
2050 (url "https://github.com/frankosterfeld/qtkeychain/")
2051 (commit (string-append "v" version))))
2052 (file-name (git-file-name name version))
2055 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
2056 (build-system cmake-build-system)
2058 `(("pkg-config" ,pkg-config)
2059 ("qttools" ,qttools)))
2061 `(("qtbase" ,qtbase)))
2063 `(#:tests? #f ; No tests included
2065 (modify-phases %standard-phases
2066 (add-before 'configure 'set-qt-trans-dir
2068 (substitute* "CMakeLists.txt"
2069 (("\\$\\{qt_translations_dir\\}")
2070 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
2072 (home-page "https://github.com/frankosterfeld/qtkeychain")
2073 (synopsis "Qt API to store passwords")
2075 "QtKeychain is a Qt library to store passwords and other secret data
2076 securely. It will not store any data unencrypted unless explicitly requested.")
2077 (license license:bsd-3)))
2087 (string-append "mirror://sourceforge/qwt/qwt/"
2088 version "/qwt-" version ".tar.bz2"))
2090 (base32 "1navkcnmn0qz8kzsyqmk32d929zl72l0b580w1ica7z5559j2a8m"))))
2091 (build-system gnu-build-system)
2093 `(("qtbase" ,qtbase)
2095 ("qttools" ,qttools)))
2098 (modify-phases %standard-phases
2100 (lambda* (#:key outputs #:allow-other-keys)
2101 (let* ((out (assoc-ref outputs "out"))
2102 (docdir (string-append out "/share/doc/qwt"))
2103 (incdir (string-append out "/include/qwt"))
2104 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2105 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2106 (substitute* '("qwtconfig.pri")
2107 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2108 (format #f "~a = ~a\n" x out))
2109 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2110 (format #f "~a = ~a\n" x docdir))
2111 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2112 (format #f "~a = ~a\n" x incdir))
2113 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2114 (format #f "~a = ~a\n" x pluginsdir))
2115 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2116 (format #f "~a = ~a\n" x featuresdir)))
2117 (substitute* '("doc/doc.pro")
2118 ;; We'll install them in the 'install-man-pages' phase.
2119 (("^unix:doc\\.files.*") ""))
2121 (add-after 'install 'install-man-pages
2122 (lambda* (#:key outputs #:allow-other-keys)
2123 (let* ((out (assoc-ref outputs "out"))
2124 (man (string-append out "/share/man")))
2125 ;; Remove some incomplete manual pages.
2126 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2128 (copy-recursively "doc/man" man)
2130 (home-page "http://qwt.sourceforge.net")
2131 (synopsis "Qt widgets for plots, scales, dials and other technical software
2134 "The Qwt library contains widgets and components which are primarily useful
2135 for technical and scientific purposes. It includes a 2-D plotting widget,
2136 different kinds of sliders, and much more.")
2139 ;; The Qwt license is LGPL2.1 with some exceptions.
2140 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2141 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2142 license:lgpl2.1 license:gpl3))))
2144 (define-public qtwebkit
2147 (version "5.212.0-alpha2")
2151 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2152 name "-" version "/" name "-" version ".tar.xz"))
2155 "12lg7w00d8wsj672s1y5z5gm0xdcgs16nas0b5bgq4byavg03ygq"))
2156 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2157 (build-system cmake-build-system)
2160 ("python" ,python-2.7)
2165 ("pkg-config" ,pkg-config)))
2169 ("gst-plugins-base" ,gst-plugins-base)
2170 ("libjpeg" ,libjpeg)
2172 ("libwebp" ,libwebp)
2174 ("fontconfig" ,fontconfig)
2175 ("libxrender" ,libxrender)
2177 ("qtdeclarative" ,qtdeclarative)
2178 ("qtlocation" ,qtlocation)
2179 ("qtmultimedia" ,qtmultimedia)
2180 ("qtsensors" ,qtsensors)
2181 ("qtwebchannel" ,qtwebchannel)
2182 ("libxml2" ,libxml2)
2183 ("libxslt" ,libxslt)
2185 ("libxcomposite" ,libxcomposite)))
2187 `(#:tests? #f ; no apparent tests; it might be necessary to set
2188 ; ENABLE_API_TESTS, see CMakeLists.txt
2190 ;; Parallel builds fail due to a race condition:
2191 ;; <https://bugs.gnu.org/34062>.
2192 #:parallel-build? #f
2194 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2196 "-DUSE_LIBHYPHEN=OFF"
2197 "-DUSE_SYSTEM_MALLOC=ON"
2198 ;; XXX: relative dir installs to build dir?
2199 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2200 %output "/lib/qt5/mkspecs/modules")
2201 ;; Sacrifice a little speed in order to link
2202 ;; libraries and test executables in a
2203 ;; reasonable amount of memory.
2204 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2205 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2206 (home-page "https://www.webkit.org")
2207 (synopsis "Web browser engine and classes to render and interact with web
2209 (description "QtWebKit provides a Web browser engine that makes it easy to
2210 embed content from the World Wide Web into your Qt application. At the same
2211 time Web content can be enhanced with native controls.")
2212 (license license:lgpl2.1+)))
2214 (define-public dotherside
2221 (uri (string-append "https://github.com/filcuc/DOtherSide/"
2222 "archive/v" version ".tar.gz"))
2223 (file-name (string-append name "-" version ".tar.gz"))
2226 "0azq7qlsrfdwbd6qsi7d3c1knn42qw0r47g43xf7clwbinapswpz"))))
2227 (build-system cmake-build-system)
2229 `(("qttools" ,qttools)))
2231 `(("qtbase" ,qtbase)
2232 ("qtdeclarative" ,qtdeclarative)))
2233 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2234 (synopsis "C language library for creating bindings for the Qt QML language")
2236 "DOtherSide is a C language library for creating bindings for the
2237 QT QML language. The following features are implementable from
2240 @item Creating custom QObject
2241 @item Creating custom QAbstractListModels
2242 @item Creating custom properties, signals and slots
2243 @item Creating from QML QObject defined in the binded language
2244 @item Creating from Singleton QML QObject defined in the binded language
2246 (license license:lgpl3))) ;version 3 only (+ exception)
2248 ;; There have been no public releases yet.
2249 (define-public qtcolorwidgets
2250 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2253 (name "qtcolorwidgets")
2254 (version (git-version "0" revision commit))
2258 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2260 (file-name (git-file-name name version))
2263 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2264 (build-system cmake-build-system)
2265 (arguments `(#:tests? #f)) ; There are no tests
2267 `(("qttools" ,qttools)))
2269 `(("qtbase" ,qtbase)))
2270 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2271 (synopsis "Color management widgets")
2272 (description "QtColorWidgets provides a Qt color dialog that is more
2273 user-friendly than the default @code{QColorDialog} and several other
2274 color-related widgets.")
2275 ;; Includes a license exception for combining with GPL2 code.
2276 (license license:lgpl3+))))