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 Nils Gillmann <ng0@n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017, 2018 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 gnuzilla)
52 #:use-module (gnu packages gperf)
53 #:use-module (gnu packages gstreamer)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages icu4c)
56 #:use-module (gnu packages image)
57 #:use-module (gnu packages linux)
58 #:use-module (gnu packages maths)
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
83 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
85 (file-name (string-append name "-" version ".tar.gz"))
87 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
89 ;; Optional: lcov and cccc, both are for code coverage
90 `(("doxygen" ,doxygen)))
93 ("qtscript" ,qtscript)))
94 (build-system cmake-build-system)
97 (modify-phases %standard-phases
98 (add-before 'check 'check-setup
100 ;; make Qt render "offscreen", required for tests
101 (setenv "QT_QPA_PLATFORM" "offscreen")
103 (home-page "https://github.com/steveire/grantlee")
104 (synopsis "Libraries for text templating with Qt")
105 (description "Grantlee Templates can be used for theming and generation of
106 other text such as code. The syntax uses the syntax of the Django template
107 system, and the core design of Django is reused in Grantlee.")
108 (license license:lgpl2.0+)))
114 (outputs '("out" "examples"))
119 "http://download.qt.io/official_releases/qt/"
120 (version-major+minor version)
122 "/single/qt-everywhere-src-"
126 "10faac59jvz6dxxljdkaknlxazpnaxgvqdcszabfbbkc1f24n466"))
127 (patches (search-patches "qt-5-renameat2.patch"))
128 (modules '((guix build utils)))
131 ;; Remove qtwebengine, which relies on a bundled copy of
132 ;; chromium. Not only does it fail compilation in qt 5.5:
133 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
134 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
135 ;; it might also pose security problems.
136 ;; Alternatively, we could use the "-skip qtwebengine"
137 ;; configuration option.
138 (delete-file-recursively "qtwebengine")
139 ;; The following snippets are copied from their mondular-qt counterparts.
142 (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
143 (list "double-conversion" "freetype" "harfbuzz-ng"
144 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
148 (delete-file-recursively dir))
149 (list "qtimageformats/src/3rdparty"
150 "qtmultimedia/examples/multimedia/spectrum/3rdparty"
152 "qtscxml/tests/3rdparty"
153 "qtcanvas3d/examples/canvas3d/3rdparty"))
154 ;; Tests depend on this example, which depends on the 3rd party code.
155 (substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
157 (substitute* "qtxmlpatterns/tests/auto/auto.pro"
158 (("qxmlquery") "# qxmlquery")
159 (("xmlpatterns ") "# xmlpatterns"))
160 (substitute* "qtwebglplugin/tests/plugins/platforms/platforms.pro"
161 (("webgl") "# webgl"))
162 (substitute* "qtscxml/tests/auto/auto.pro"
164 (substitute* "qtnetworkauth/tests/auto/auto.pro"
165 (("oauth1 ") "# oauth1 "))
166 (substitute* "qtremoteobjects/tests/auto/qml/qml.pro"
167 (("integration") "# integration")
168 (("usertypes") "# usertypes"))
170 (build-system gnu-build-system)
174 `(("alsa-lib" ,alsa-lib)
178 ("double-conversion" ,double-conversion)
180 ("fontconfig" ,fontconfig)
181 ("freetype" ,freetype)
183 ("gstreamer" ,gstreamer)
184 ("gst-plugins-base" ,gst-plugins-base)
185 ("harfbuzz" ,harfbuzz)
188 ("libinput" ,libinput-minimal)
196 ("libxcomposite" ,libxcomposite)
197 ("libxcursor" ,libxcursor)
199 ("libxfixes" ,libxfixes)
201 ("libxinerama" ,libxinerama)
202 ("libxkbcommon" ,libxkbcommon)
204 ("libxrandr" ,libxrandr)
205 ("libxrender" ,libxrender)
212 ("postgresql" ,postgresql)
213 ("pulseaudio" ,pulseaudio)
215 ("sqlite" ,sqlite-with-column-metadata)
217 ("unixodbc" ,unixodbc)
219 ("xcb-util" ,xcb-util)
220 ("xcb-util-image" ,xcb-util-image)
221 ("xcb-util-keysyms" ,xcb-util-keysyms)
222 ("xcb-util-renderutil" ,xcb-util-renderutil)
223 ("xcb-util-wm" ,xcb-util-wm)
230 ("pkg-config" ,pkg-config)
233 ("vulkan-headers" ,vulkan-headers)
234 ("which" ,(@ (gnu packages base) which))))
236 `(#:parallel-build? #f ; Triggers race condition in qtbase module on Hydra.
238 (modify-phases %standard-phases
239 (add-after 'configure 'patch-bin-sh
241 (substitute* '("qtbase/configure"
242 "qtbase/mkspecs/features/qt_functions.prf"
243 "qtbase/qmake/library/qmakebuiltins.cpp")
244 (("/bin/sh") (which "sh")))
247 (lambda* (#:key outputs #:allow-other-keys)
248 (let ((out (assoc-ref outputs "out"))
249 (examples (assoc-ref outputs "examples")))
250 (substitute* '("configure" "qtbase/configure")
251 (("/bin/pwd") (which "pwd")))
252 (substitute* "qtbase/src/corelib/global/global.pri"
253 (("/bin/ls") (which "ls")))
254 ;; do not pass "--enable-fast-install", which makes the
255 ;; configure process fail
260 "-docdir" (string-append out "/share/doc/qt5")
261 "-headerdir" (string-append out "/include/qt5")
262 "-archdatadir" (string-append out "/lib/qt5")
263 "-datadir" (string-append out "/share/qt5")
264 "-examplesdir" (string-append
265 examples "/share/doc/qt5/examples") ; 151MiB
269 ;; These features require higher versions of Linux than the
270 ;; minimum version of the glibc. See
271 ;; src/corelib/global/minimum-linux_p.h. By disabling these
272 ;; features Qt5 applications can be used on the oldest
273 ;; kernels that the glibc supports, including the RHEL6
274 ;; (2.6.32) and RHEL7 (3.10) kernels.
275 "-no-feature-getentropy" ; requires Linux 3.17
276 "-no-feature-renameat2" ; requires Linux 3.16
278 ;; Do not build examples; for the time being, we
279 ;; prefer to save the space and build time.
280 "-no-compile-examples"
281 ;; Most "-system-..." are automatic, but some use
282 ;; the bundled copy by default.
286 ;; explicitly link with openssl instead of dlopening it
288 ;; explicitly link with dbus instead of dlopening it
290 ;; don't use the precompiled headers
292 ;; drop special machine instructions not supported
293 ;; on all instances of the target
294 ,@(if (string-prefix? "x86_64"
295 (or (%current-target-system)
301 (add-after 'install 'patch-mkspecs
302 (lambda* (#:key outputs #:allow-other-keys)
303 (let* ((out (assoc-ref outputs "out"))
304 (archdata (string-append out "/lib/qt5"))
305 (mkspecs (string-append archdata "/mkspecs"))
306 (qt_config.prf (string-append
307 mkspecs "/features/qt_config.prf")))
308 ;; For each Qt module, let `qmake' uses search paths in the
309 ;; module directory instead of all in QT_INSTALL_PREFIX.
310 (substitute* qt_config.prf
311 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
312 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
313 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
314 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
315 (("\\$\\$\\[QT_HOST_LIBS\\]")
316 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
317 (("\\$\\$\\[QT_INSTALL_BINS\\]")
318 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
320 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
321 (substitute* (string-append mkspecs "/features/qt_functions.prf")
322 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
323 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
325 ;; Resolve qmake spec files within qtbase by absolute paths.
328 (string-append mkspecs "/features/" file))
329 '("device_config.prf" "moc.prf" "qt_build_config.prf"
330 "qt_config.prf" "winrt/package_manifest.prf"))
331 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
332 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
334 (add-after 'unpack 'patch-paths
335 ;; Use the absolute paths for dynamically loaded libs, otherwise
336 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
338 (lambda* (#:key inputs #:allow-other-keys)
340 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
341 "cross-libc" "libc"))))
342 (substitute* '("qtbase/src/network/kernel/qdnslookup_unix.cpp"
343 "qtbase/src/network/kernel/qhostinfo_unix.cpp")
344 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
345 (string-append a glibc "/lib/lib" b))))
346 ;; X11/locale (compose path)
347 (substitute* "qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
348 ;; Don't search in /usr/…/X11/locale, …
349 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
350 (string-append "// " line))
351 ;; … but use libx11's path
352 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
353 (string-append a "\"" (assoc-ref inputs "libx11") b)))
355 (substitute* "qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
356 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
357 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
359 (substitute* "qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp"
360 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
361 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
362 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
363 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
366 (list (search-path-specification
367 (variable "QMAKEPATH")
368 (files '("lib/qt5")))
369 (search-path-specification
370 (variable "QML2_IMPORT_PATH")
371 (files '("lib/qt5/qml")))
372 (search-path-specification
373 (variable "QT_PLUGIN_PATH")
374 (files '("lib/qt5/plugins")))
375 (search-path-specification
376 (variable "XDG_DATA_DIRS")
378 (search-path-specification
379 (variable "XDG_CONFIG_DIRS")
380 (files '("etc/xdg")))))
381 (home-page "https://www.qt.io/")
382 (synopsis "Cross-platform GUI library")
383 (description "Qt is a cross-platform application and UI framework for
384 developers using C++ or QML, a CSS & JavaScript like language.")
385 (license (list license:lgpl2.1 license:lgpl3))
387 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
388 ;; see <http://hydra.gnu.org/build/112828>.
389 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
390 (supported-systems (delete "mips64el-linux" %supported-systems))))
393 (package (inherit qt)
397 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
398 (string-copy version 0 (string-rindex version #\.))
400 "/qt-everywhere-opensource-src-"
404 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
405 (patches (search-patches "qt4-ldflags.patch"))
406 (modules '((guix build utils)))
408 ;; Remove webkit module, which is not built.
409 '(begin (delete-file-recursively "src/3rdparty/webkit")
412 `(,@(fold alist-delete
414 '("harfbuzz" "libjpeg"))
415 ("libjpeg" ,libjpeg-8)
418 `(,@(fold alist-delete
419 (package-native-inputs qt)
420 '("vulkan-headers"))))
422 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
423 ;; but we can't make them a separate output because "out" and "examples"
424 ;; would refer to each other.
425 (outputs '("out" ;112MiB core + 37MiB examples
426 "doc")) ;280MiB of HTML + code
429 (modify-phases %standard-phases
432 (lambda* (#:key outputs #:allow-other-keys)
433 (let ((out (assoc-ref outputs "out"))
434 (doc (assoc-ref outputs "doc")))
435 (substitute* '("configure")
436 (("/bin/pwd") (which "pwd")))
437 (substitute* "src/corelib/global/global.pri"
438 (("/bin/ls") (which "ls")))
444 "-nomake" "examples demos"
445 ;; Note: Don't pass '-docdir' since 'qmake' and
446 ;; libQtCore would record its value, thereby defeating
447 ;; the whole point of having a separate output.
448 "-datadir" (string-append out "/share/qt-" ,version
450 "-importdir" (string-append out "/lib/qt-4"
452 "-plugindir" (string-append out "/lib/qt-4"
454 "-translationdir" (string-append out "/share/qt-" ,version
456 "-demosdir" (string-append out "/share/qt-" ,version
458 "-examplesdir" (string-append out "/share/qt-" ,version
462 ;; explicitly link with dbus instead of dlopening it
464 ;; Skip the webkit module; it fails to build on armhf
465 ;; and, apart from that, may pose security risks.
467 ;; don't use the precompiled headers
469 ;; drop special machine instructions not supported
470 ;; on all instances of the target
471 ,@(if (string-prefix? "x86_64"
472 (or (%current-target-system)
486 (lambda* (#:key outputs #:allow-other-keys)
487 ;; Because of qt4-documentation-path.patch, documentation ends up
488 ;; being installed in OUT. Move it to the right place.
489 (let* ((out (assoc-ref outputs "out"))
490 (doc (assoc-ref outputs "doc"))
491 (olddoc (string-append out "/doc"))
492 (docdir (string-append doc "/share/doc/qt-" ,version)))
493 (mkdir-p (dirname docdir))
495 ;; Note: We can't use 'rename-file' here because OUT and DOC are
496 ;; different "devices" due to bind-mounts.
497 (copy-recursively olddoc docdir)
498 (delete-file-recursively olddoc)
501 (define-public qtbase
507 (uri (string-append "https://download.qt.io/official_releases/qt/"
508 (version-major+minor version) "/" version
509 "/submodules/" name "-everywhere-src-"
513 "01q1rn5rp9biq3z38953z2hgm4nirvp2jfv8wg7isnld8v1yg0b3"))
514 ;; Use TZDIR to avoid depending on package "tzdata".
515 (patches (search-patches "qtbase-use-TZDIR.patch"))
516 (modules '((guix build utils)))
518 ;; corelib uses bundled harfbuzz, md4, md5, sha3
522 (delete-file-recursively (string-append "src/3rdparty/" dir)))
523 (list "double-conversion" "freetype" "harfbuzz-ng"
524 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
527 (build-system gnu-build-system)
530 ("which" ,(@ (gnu packages base) which))))
532 `(("alsa-lib" ,alsa-lib)
535 ("double-conversion" ,double-conversion)
538 ("fontconfig" ,fontconfig)
539 ("freetype" ,freetype)
541 ("harfbuzz" ,harfbuzz)
543 ("libinput" ,libinput-minimal)
548 ("libxcomposite" ,libxcomposite)
549 ("libxcursor" ,libxcursor)
550 ("libxfixes" ,libxfixes)
552 ("libxinerama" ,libxinerama)
553 ("libxkbcommon" ,libxkbcommon)
555 ("libxrandr" ,libxrandr)
556 ("libxrender" ,libxrender)
564 ("postgresql" ,postgresql)
565 ("pulseaudio" ,pulseaudio)
566 ("sqlite" ,sqlite-with-column-metadata)
567 ("unixodbc" ,unixodbc)
568 ("xcb-util" ,xcb-util)
569 ("xcb-util-image" ,xcb-util-image)
570 ("xcb-util-keysyms" ,xcb-util-keysyms)
571 ("xcb-util-renderutil" ,xcb-util-renderutil)
572 ("xcb-util-wm" ,xcb-util-wm)
579 ("pkg-config" ,pkg-config)
581 ("vulkan-headers" ,vulkan-headers)
585 (modify-phases %standard-phases
586 (add-after 'configure 'patch-bin-sh
588 (substitute* '("config.status"
590 "mkspecs/features/qt_functions.prf"
591 "qmake/library/qmakebuiltins.cpp")
592 (("/bin/sh") (which "sh")))
595 (lambda* (#:key outputs #:allow-other-keys)
596 (let ((out (assoc-ref outputs "out")))
597 (substitute* "configure"
598 (("/bin/pwd") (which "pwd")))
599 (substitute* "src/corelib/global/global.pri"
600 (("/bin/ls") (which "ls")))
601 ;; The configuration files for other Qt5 packages are searched
602 ;; through a call to "find_package" in Qt5Config.cmake, which
603 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
604 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
605 ;; components can be installed in different places.
606 (substitute* (find-files "." ".*\\.cmake")
607 (("NO_DEFAULT_PATH") ""))
608 ;; do not pass "--enable-fast-install", which makes the
609 ;; configure process fail
614 "-docdir" (string-append out "/share/doc/qt5")
615 "-headerdir" (string-append out "/include/qt5")
616 "-archdatadir" (string-append out "/lib/qt5")
617 "-datadir" (string-append out "/share/qt5")
618 "-examplesdir" (string-append
619 out "/share/doc/qt5/examples")
623 ;; These features require higher versions of Linux than the
624 ;; minimum version of the glibc. See
625 ;; src/corelib/global/minimum-linux_p.h. By disabling these
626 ;; features Qt5 applications can be used on the oldest
627 ;; kernels that the glibc supports, including the RHEL6
628 ;; (2.6.32) and RHEL7 (3.10) kernels.
629 "-no-feature-getentropy" ; requires Linux 3.17
631 ;; Do not build examples; if desired, these could go
632 ;; into a separate output, but for the time being, we
633 ;; prefer to save the space and build time.
634 "-no-compile-examples"
635 ;; Most "-system-..." are automatic, but some use
636 ;; the bundled copy by default.
640 ;; explicitly link with openssl instead of dlopening it
642 ;; explicitly link with dbus instead of dlopening it
644 ;; don't use the precompiled headers
646 ;; drop special machine instructions that do not have
648 ,@(if (string-prefix? "x86_64"
649 (or (%current-target-system)
655 (add-after 'install 'patch-mkspecs
656 (lambda* (#:key outputs #:allow-other-keys)
657 (let* ((out (assoc-ref outputs "out"))
658 (archdata (string-append out "/lib/qt5"))
659 (mkspecs (string-append archdata "/mkspecs"))
660 (qt_config.prf (string-append
661 mkspecs "/features/qt_config.prf")))
662 ;; For each Qt module, let `qmake' uses search paths in the
663 ;; module directory instead of all in QT_INSTALL_PREFIX.
664 (substitute* qt_config.prf
665 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
666 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
667 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
668 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
669 (("\\$\\$\\[QT_HOST_LIBS\\]")
670 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
671 (("\\$\\$\\[QT_INSTALL_BINS\\]")
672 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
674 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
675 (substitute* (string-append mkspecs "/features/qt_functions.prf")
676 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
677 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
679 ;; Resolve qmake spec files within qtbase by absolute paths.
682 (string-append mkspecs "/features/" file))
683 '("device_config.prf" "moc.prf" "qt_build_config.prf"
684 "qt_config.prf" "winrt/package_manifest.prf"))
685 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
686 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
688 (add-after 'unpack 'patch-paths
689 ;; Use the absolute paths for dynamically loaded libs, otherwise
690 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
692 (lambda* (#:key inputs #:allow-other-keys)
694 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
695 "cross-libc" "libc"))))
696 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
697 "src/network/kernel/qhostinfo_unix.cpp")
698 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
699 (string-append a glibc "/lib/lib" b))))
700 ;; X11/locale (compose path)
701 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
702 ;; Don't search in /usr/…/X11/locale, …
703 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
704 (string-append "// " line))
705 ;; … but use libx11's path
706 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
707 (string-append a "\"" (assoc-ref inputs "libx11") b)))
709 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
710 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
711 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
713 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
714 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
715 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
716 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
717 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
720 (list (search-path-specification
721 (variable "QMAKEPATH")
722 (files '("lib/qt5")))
723 (search-path-specification
724 (variable "QML2_IMPORT_PATH")
725 (files '("lib/qt5/qml")))
726 (search-path-specification
727 (variable "QT_PLUGIN_PATH")
728 (files '("lib/qt5/plugins")))
729 (search-path-specification
730 (variable "XDG_DATA_DIRS")
732 (search-path-specification
733 (variable "XDG_CONFIG_DIRS")
734 (files '("etc/xdg")))))
735 (home-page "https://www.qt.io/")
736 (synopsis "Cross-platform GUI library")
737 (description "Qt is a cross-platform application and UI framework for
738 developers using C++ or QML, a CSS & JavaScript like language.")
739 (license (list license:lgpl2.1 license:lgpl3))))
742 (package (inherit qtbase)
747 (uri (string-append "https://download.qt.io/official_releases/qt/"
748 (version-major+minor version) "/" version
749 "/submodules/" name "-everywhere-src-"
753 "0rni3cdcli91v7k8ra9s9phpznvkza8qqvcrv9yyfrmlapwbn5mw"))))
754 (propagated-inputs `())
755 (native-inputs `(("perl" ,perl)))
762 (modify-phases %standard-phases
763 (add-before 'configure 'configure-qmake
764 (lambda* (#:key inputs outputs #:allow-other-keys)
765 (let* ((out (assoc-ref outputs "out"))
766 (qtbase (assoc-ref inputs "qtbase"))
767 (tmpdir (string-append (getenv "TMPDIR")))
768 (qmake (string-append tmpdir "/qmake"))
769 (qt.conf (string-append tmpdir "/qt.conf")))
770 ;; Use qmake with a customized qt.conf to override install
772 (symlink (which "qmake") qmake)
773 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
774 (with-output-to-file qt.conf
780 Documentation=share/doc/qt5
783 LibraryExecutables=lib/qt5/libexec
786 Plugins=lib/qt5/plugins
787 Imports=lib/qt5/imports
788 Qml2Imports=lib/qt5/qml
789 Translations=share/qt5/translations
791 Examples=share/doc/qt5/examples
797 [EffectiveSourcePaths]
803 (lambda* (#:key inputs outputs #:allow-other-keys)
804 ;; Valid QT_BUILD_PARTS variables are:
805 ;; libs tools tests examples demos docs translations
806 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
807 (add-before 'check 'set-display
809 ;; make Qt render "offscreen", required for tests
810 (setenv "QT_QPA_PLATFORM" "offscreen")
812 (synopsis "Qt module for displaying SVGs")
813 (description "The QtSvg module provides classes for displaying the
814 contents of SVG files.")))
816 (define-public qtimageformats
817 (package (inherit qtsvg)
818 (name "qtimageformats")
822 (uri (string-append "https://download.qt.io/official_releases/qt/"
823 (version-major+minor version) "/" version
824 "/submodules/" name "-everywhere-src-"
828 "0s1s33k0wrnf9fi1wlm1kaq9hs1fx89597nhk53vzdfha42x3r97"))
829 (modules '((guix build utils)))
832 (delete-file-recursively "src/3rdparty")
843 (synopsis "Additional Image Format plugins for Qt")
844 (description "The QtImageFormats module contains plugins for adding
845 support for MNG, TGA, TIFF and WBMP image formats.")))
847 (define-public qtx11extras
848 (package (inherit qtsvg)
853 (uri (string-append "https://download.qt.io/official_releases/qt/"
854 (version-major+minor version) "/" version
855 "/submodules/" name "-everywhere-src-"
859 "12cha7pd3cjx7zr0l7rbi1j2pfwmfpdwc7w3dsqbyi1d0mhwl1zl"))))
861 (substitute-keyword-arguments (package-arguments qtsvg)
862 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
863 (native-inputs `(("perl" ,perl)))
867 (synopsis "Qt Extras for X11")
868 (description "The QtX11Extras module includes the library to access X11
869 from within Qt 5.")))
871 (define-public qtxmlpatterns
872 (package (inherit qtsvg)
873 (name "qtxmlpatterns")
877 (uri (string-append "https://download.qt.io/official_releases/qt/"
878 (version-major+minor version) "/" version
879 "/submodules/" name "-everywhere-src-"
883 "0ik7m1a0shjsyzs8n9hfx8m9hy1p3wg505slcs0xznj0pa0gdmaz"))))
885 (substitute-keyword-arguments (package-arguments qtsvg)
887 `(modify-phases ,phases
888 (add-after 'unpack 'disable-network-tests
889 (lambda _ (substitute* "tests/auto/auto.pro"
890 (("qxmlquery") "# qxmlquery")
891 (("xmlpatterns ") "# xmlpatterns"))
893 (native-inputs `(("perl" ,perl)))
894 (inputs `(("qtbase" ,qtbase)))
895 (synopsis "Qt XML patterns module")
896 (description "The QtXmlPatterns module is a XQuery and XPath engine for
897 XML and custom data models. It contains programs such as xmlpatterns and
898 xmlpatternsvalidator.")))
900 (define-public qtdeclarative
901 (package (inherit qtsvg)
902 (name "qtdeclarative")
906 (uri (string-append "https://download.qt.io/official_releases/qt/"
907 (version-major+minor version) "/" version
908 "/submodules/" name "-everywhere-src-"
912 "1kgj6q53rk573yi47j32mn1mfk5ag98zvhv9qgrlb78y0gw8c392"))))
914 (substitute-keyword-arguments (package-arguments qtsvg)
915 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
918 ("pkg-config" ,pkg-config)
921 ("qtxmlpatterns" ,qtxmlpatterns)))
925 (synopsis "Qt QML module (Quick 2)")
926 (description "The Qt QML module provides a framework for developing
927 applications and libraries with the QML language. It defines and implements the
928 language and engine infrastructure, and provides an API to enable application
929 developers to extend the QML language with custom types and integrate QML code
930 with JavaScript and C++.")))
932 (define-public qtconnectivity
933 (package (inherit qtsvg)
934 (name "qtconnectivity")
938 (uri (string-append "https://download.qt.io/official_releases/qt/"
939 (version-major+minor version) "/" version
940 "/submodules/" name "-everywhere-src-"
944 "1ia21llw610wd7licdm81p8zpkrkvkc5yc7y4wplgg6k2jyip42q"))))
947 ("pkg-config" ,pkg-config)
948 ("qtdeclarative" ,qtdeclarative)))
952 (synopsis "Qt Connectivity module")
953 (description "The Qt Connectivity modules provides modules for interacting
954 with Bluetooth and NFC.")))
956 (define-public qtwebsockets
957 (package (inherit qtsvg)
958 (name "qtwebsockets")
962 (uri (string-append "https://download.qt.io/official_releases/qt/"
963 (version-major+minor version) "/" version
964 "/submodules/" name "-everywhere-src-"
968 "13cbr2pffv1hwvm8d8kzask0pyc2j3brgq23vi5i1i70kihrfqdf"))))
970 (substitute-keyword-arguments (package-arguments qtsvg)
971 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
974 ("qtdeclarative" ,qtdeclarative)))
975 (inputs `(("qtbase" ,qtbase)))
976 (synopsis "Qt Web Sockets module")
977 (description "WebSocket is a web-based protocol designed to enable two-way
978 communication between a client application and a remote host. The Qt
979 WebSockets module provides C++ and QML interfaces that enable Qt applications
980 to act as a server that can process WebSocket requests, or a client that can
981 consume data received from the server, or both.")))
983 (define-public qtsensors
984 (package (inherit qtsvg)
989 (uri (string-append "https://download.qt.io/official_releases/qt/"
990 (version-major+minor version) "/" version
991 "/submodules/" name "-everywhere-src-"
995 "1iv3gmk121myqdr64d9lf2m816ypxrb526gn0ssxx8gp4j4c69qf"))))
997 (substitute-keyword-arguments (package-arguments qtsvg)
998 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
1000 `(modify-phases ,phases
1001 (add-after 'unpack 'fix-tests
1003 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
1004 (("2000") "5000") ;lengthen test timeout
1005 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
1009 ("qtdeclarative" ,qtdeclarative)))
1010 (inputs `(("qtbase" ,qtbase)))
1011 (synopsis "Qt Sensors module")
1012 (description "The Qt Sensors API provides access to sensor hardware via QML
1013 and C++ interfaces. The Qt Sensors API also provides a motion gesture
1014 recognition API for devices.")))
1016 (define-public qtmultimedia
1017 (package (inherit qtsvg)
1018 (name "qtmultimedia")
1022 (uri (string-append "https://download.qt.io/official_releases/qt/"
1023 (version-major+minor version) "/" version
1024 "/submodules/" name "-everywhere-src-"
1028 "0vbjrxsdahgbgpc2zcvgg3mpijzd5kknz5clfcw2cq3310yqyq15"))
1029 (modules '((guix build utils)))
1032 (delete-file-recursively
1033 "examples/multimedia/spectrum/3rdparty")
1034 ;; We also prevent the spectrum example from being built.
1035 (substitute* "examples/multimedia/multimedia.pro"
1039 (substitute-keyword-arguments (package-arguments qtsvg)
1041 `(modify-phases ,phases
1043 (lambda* (#:key outputs #:allow-other-keys)
1044 (let ((out (assoc-ref outputs "out")))
1045 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
1046 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
1047 (string-append "PREFIX=" out)))))))
1048 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1051 ("pkg-config" ,pkg-config)
1052 ("python" ,python-2)
1053 ("qtdeclarative" ,qtdeclarative)))
1055 `(("alsa-lib" ,alsa-lib)
1057 ("pulseaudio" ,pulseaudio)
1059 ;; Gstreamer is needed for the mediaplayer plugin
1060 ("gstreamer" ,gstreamer)
1061 ("gst-plugins-base" ,gst-plugins-base)))
1062 (synopsis "Qt Multimedia module")
1063 (description "The Qt Multimedia module provides set of APIs to play and
1064 record media, and manage a collection of media content. It also contains a
1065 set of plugins for interacting with pulseaudio and GStreamer.")))
1067 (define-public qtwayland
1068 (package (inherit qtsvg)
1073 (uri (string-append "https://download.qt.io/official_releases/qt/"
1074 (version-major+minor version) "/" version
1075 "/submodules/" name "-everywhere-src-"
1079 "0wdpxjr3zfmgcfg14zlwd8mjbc191pvlchj1xxd0lj30ldfy2daf"))
1080 (modules '((guix build utils)))
1082 ;; The examples try to build and cause the build to fail
1084 (delete-file-recursively "examples")
1087 (substitute-keyword-arguments (package-arguments qtsvg)
1089 `(modify-phases ,phases
1090 (add-before 'check 'set-ld-library-path
1091 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
1093 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
1094 ;; wayland platform plugin.
1096 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
1101 ("pkg-config" ,pkg-config)
1102 ("qtdeclarative" ,qtdeclarative)))
1104 `(("fontconfig" ,fontconfig)
1105 ("freetype" ,freetype)
1107 ("libxcomposite" ,libxcomposite)
1108 ("libxext" ,libxext)
1109 ("libxkbcommon" ,libxkbcommon)
1110 ("libxrender" ,libxrender)
1114 ("wayland" ,wayland)))
1115 (synopsis "Qt Wayland module")
1116 (description "The Qt Wayland module provides the QtWayland client and
1117 compositor libraries.")))
1119 (define-public qtserialport
1120 (package (inherit qtsvg)
1121 (name "qtserialport")
1125 (uri (string-append "https://download.qt.io/official_releases/qt/"
1126 (version-major+minor version) "/" version
1127 "/submodules/" name "-everywhere-src-"
1131 "0vkgvicm67vds2iqmhnjsqwnx1f8zhbzc31w6q198i0x8b76j6xh"))))
1132 (native-inputs `(("perl" ,perl)))
1134 `(("qtbase" ,qtbase)
1137 (substitute-keyword-arguments (package-arguments qtsvg)
1139 `(modify-phases ,phases
1140 (add-after 'unpack 'patch-dlopen-paths
1141 (lambda* (#:key inputs #:allow-other-keys)
1142 (substitute* "src/serialport/qtudev_p.h"
1143 ;; Use the absolute paths for dynamically loaded libs,
1144 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1145 ;; typically is not set in guix.
1146 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1147 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1149 (synopsis "Qt Serial Port module")
1150 (description "The Qt Serial Port module provides the library for
1151 interacting with serial ports from within Qt.")))
1153 (define-public qtserialbus
1154 (package (inherit qtsvg)
1155 (name "qtserialbus")
1159 (uri (string-append "https://download.qt.io/official_releases/qt/"
1160 (version-major+minor version) "/" version
1161 "/submodules/" name "-everywhere-src-"
1165 "07k4g5qfh657das2f5i6ph0hl4bva13yzlmxnay7qpzqcb0w4x0p"))))
1167 `(("qtbase" ,qtbase)
1168 ("qtserialport" ,qtserialport)))
1169 (synopsis "Qt Serial Bus module")
1170 (description "The Qt Serial Bus API provides classes and functions to
1171 access the various industrial serial buses and protocols, such as CAN, ModBus,
1174 (define-public qtwebchannel
1175 (package (inherit qtsvg)
1176 (name "qtwebchannel")
1180 (uri (string-append "https://download.qt.io/official_releases/qt/"
1181 (version-major+minor version) "/" version
1182 "/submodules/" name "-everywhere-src-"
1186 "1z02dhrd1h2rpdhww9py9dnhss80xwf45n568y7gr3gay7ldlpwl"))))
1189 ("qtdeclarative" ,qtdeclarative)
1190 ("qtwebsockets" ,qtwebsockets)))
1191 (inputs `(("qtbase" ,qtbase)))
1192 (synopsis "Web communication library for Qt")
1193 (description "The Qt WebChannel module enables peer-to-peer communication
1194 between the host (QML/C++ application) and the client (HTML/JavaScript
1195 application). The transport mechanism is supported out of the box by the two
1196 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1198 (define-public qtwebglplugin
1199 (package (inherit qtsvg)
1200 (name "qtwebglplugin")
1204 (uri (string-append "https://download.qt.io/official_releases/qt/"
1205 (version-major+minor version) "/" version
1206 "/submodules/" name "-everywhere-src-"
1210 "0vazz9yr1qgpcq7p77vg9mrjxy6hjabvwj9irw5l5w7fmsk2ns0n"))))
1212 (substitute-keyword-arguments (package-arguments qtsvg)
1214 `(modify-phases ,phases
1215 (add-after 'unpack 'disable-network-tests
1216 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1217 (("webgl") "# webgl"))
1223 ("qtdeclarative" ,qtdeclarative)
1224 ("qtwebsockets" ,qtwebsockets)))
1225 (synopsis "QPA plugin for running an application via a browser using
1226 streamed WebGL commands")
1227 (description "Qt back end that uses WebGL for rendering. It allows Qt
1228 applications (with some limitations) to run in a web browser that supports
1229 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1230 compatible web browser without the use of plug-ins. The API is similar to
1231 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1233 (define-public qtwebview
1234 (package (inherit qtsvg)
1239 (uri (string-append "https://download.qt.io/official_releases/qt/"
1240 (version-major+minor version) "/" version
1241 "/submodules/" name "-everywhere-src-"
1245 "1r30n9vjcgh2cd2iycfwwwpmbz7grrd3iqrc0afwnri3vylnfqil"))))
1249 `(("qtbase" ,qtbase)
1250 ("qtdeclarative" ,qtdeclarative)))
1251 (synopsis "Display web content in a QML application")
1252 (description "Qt WebView provides a way to display web content in a QML
1253 application without necessarily including a full web browser stack by using
1254 native APIs where it makes sense.")))
1256 (define-public qtlocation
1257 (package (inherit qtsvg)
1262 (uri (string-append "https://download.qt.io/official_releases/qt/"
1263 (version-major+minor version) "/" version
1264 "/submodules/" name "-everywhere-src-"
1268 "0kh2c2ahg8xkpvqsva13i35ndsc0x0ypnmd6vix5pm5jvwg9366n"))))
1270 (substitute-keyword-arguments (package-arguments qtsvg)
1271 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1274 ("qtdeclarative" ,qtdeclarative)
1275 ("qtquickcontrols" ,qtquickcontrols)
1276 ("qtserialport" ,qtserialport)))
1279 ("openssl" ,openssl)
1282 (synopsis "Qt Location and Positioning modules")
1283 (description "The Qt Location module provides an interface for location,
1284 positioning and geolocation plugins.")))
1286 (define-public qttools
1287 (package (inherit qtsvg)
1292 (uri (string-append "https://download.qt.io/official_releases/qt/"
1293 (version-major+minor version) "/" version
1294 "/submodules/" name "-everywhere-src-"
1298 "1f1iqvksrlgkxdbagb6vvjib3argbv9l7iis6ymb8n0rfwn37s7h"))))
1300 (substitute-keyword-arguments (package-arguments qtsvg)
1301 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1304 ("qtdeclarative" ,qtdeclarative)
1305 ("vulkan-headers" ,vulkan-headers)))
1308 ("qtbase" ,qtbase)))
1309 (synopsis "Qt Tools and Designer modules")
1310 (description "The Qt Tools module provides a set of applications to browse
1311 the documentation, translate applications, generate help files and other stuff
1312 that helps in Qt development.")))
1314 (define-public qtscript
1315 (package (inherit qtsvg)
1320 (uri (string-append "https://download.qt.io/official_releases/qt/"
1321 (version-major+minor version) "/" version
1322 "/submodules/" name "-everywhere-src-"
1326 "0xprhd1brn30dqf5vy4inqgzpq48i8nlc428x9rr8fk5hdm4dhmj"))
1327 (patches (search-patches "qtscript-disable-tests.patch"))))
1330 ("qttools" ,qttools)))
1332 `(("qtbase" ,qtbase)))
1333 (synopsis "Qt Script module")
1334 (description "Qt provides support for application scripting with ECMAScript.
1335 The following guides and references cover aspects of programming with
1336 ECMAScript and Qt.")))
1338 (define-public qtquickcontrols
1339 (package (inherit qtsvg)
1340 (name "qtquickcontrols")
1344 (uri (string-append "https://download.qt.io/official_releases/qt/"
1345 (version-major+minor version) "/" version
1346 "/submodules/" name "-everywhere-src-"
1350 "1q11nr85436xzrf4mbrbav306hrz0s2qaclqhhb0g88vzcq2wxww"))))
1352 (substitute-keyword-arguments (package-arguments qtsvg)
1353 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1355 `(("qtbase" ,qtbase)
1356 ("qtdeclarative" ,qtdeclarative)))
1357 (synopsis "Qt Quick Controls and other Quick modules")
1358 (description "The QtScript module provides classes for making Qt
1359 applications scriptable. This module provides a set of extra components that
1360 can be used to build complete interfaces in Qt Quick.")))
1362 (define-public qtquickcontrols2
1363 (package (inherit qtsvg)
1364 (name "qtquickcontrols2")
1368 (uri (string-append "https://download.qt.io/official_releases/qt/"
1369 (version-major+minor version) "/" version
1370 "/submodules/" name "-everywhere-src-"
1374 "116b5nhmsx898626s37r446yci7kxd3k7xap1dh9spqklkwlj1da"))))
1376 (substitute-keyword-arguments (package-arguments qtsvg)
1377 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1379 `(("qtbase" ,qtbase)
1380 ("qtdeclarative" ,qtdeclarative)))
1381 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1382 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1383 module that provides platform integration: native dialogs, menus and menu bars,
1384 and tray icons. It falls back to Qt Widgets when a native implementation is
1387 (define-public qtgraphicaleffects
1388 (package (inherit qtsvg)
1389 (name "qtgraphicaleffects")
1393 (uri (string-append "https://download.qt.io/official_releases/qt/"
1394 (version-major+minor version) "/" version
1395 "/submodules/" name "-everywhere-src-"
1399 "1zd9wjh2hhd6lby0z3ak0ff6zkbv73hh0drrg9qp2yrgjfismp59"))))
1401 (substitute-keyword-arguments (package-arguments qtsvg)
1402 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1404 `(("qtbase" ,qtbase)
1405 ("qtdeclarative" ,qtdeclarative)))
1406 (synopsis "Qt Graphical Effects module")
1407 (description "The Qt Graphical Effects module provides a set of QML types
1408 for adding visually impressive and configurable effects to user interfaces.
1409 Effects are visual items that can be added to Qt Quick user interface as UI
1410 components. The API consists of over 20 effects provided as separate QML
1411 types. The effects cover functional areas such as blending, masking, blurring,
1412 coloring, and many more.")))
1414 (define-public qtdeclarative-render2d
1415 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
1416 (package (inherit qtsvg)
1417 (name "qtdeclarative-render2d")
1421 (uri (string-append "https://download.qt.io/official_releases/qt/"
1422 (version-major+minor version) "/" version
1423 "/submodules/" name "-everywhere-src-"
1427 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1428 (modules '((guix build utils)))
1431 (delete-file-recursively "tools/opengldummy/3rdparty")
1435 `(("qtbase" ,qtbase)
1436 ("qtdeclarative" ,qtdeclarative)))
1437 (synopsis "Qt Declarative Render module")
1438 (description "The Qt Declarative Render 2D module provides a Raster
1439 backend for QtQuick scene graph.")
1440 (properties `((superseded . ,qtdeclarative)))))
1442 (define-public qtgamepad
1443 (package (inherit qtsvg)
1448 (uri (string-append "https://download.qt.io/official_releases/qt/"
1449 (version-major+minor version) "/" version
1450 "/submodules/" name "-everywhere-src-"
1454 "076874iyadj7pkprlk24h257nb8i4sni9c6kbixm5zrr2y73fbxf"))))
1457 ("pkg-config" ,pkg-config)))
1459 `(("fontconfig" ,fontconfig)
1460 ("freetype" ,freetype)
1461 ("libxrender" ,libxrender)
1464 ("qtdeclarative" ,qtdeclarative)))
1465 (synopsis "Qt Gamepad module")
1466 (description "The Qt Gamepad module is an add-on library that enables Qt
1467 applications to support the use of gamepad hardware and in some cases remote
1468 control equipment. The module provides both QML and C++ interfaces. The
1469 primary target audience are embedded devices with fullscreen user interfaces,
1470 and mobile applications targeting TV-like form factors.")))
1472 (define-public qtscxml
1473 (package (inherit qtsvg)
1478 (uri (string-append "https://download.qt.io/official_releases/qt/"
1479 (version-major+minor version) "/" version
1480 "/submodules/" name "-everywhere-src-"
1484 "197p5x1dadgjb39pd2vw60r63lvz68i0pm5i8xbyzgzm94hwn9fn"))
1485 (modules '((guix build utils)))
1488 (delete-file-recursively "tests/3rdparty")
1489 ;; the scion test refers to the bundled 3rd party test code.
1490 (substitute* "tests/auto/auto.pro"
1494 `(("qtbase" ,qtbase)
1495 ("qtdeclarative" ,qtdeclarative)))
1496 (synopsis "Qt SCXML module")
1497 (description "The Qt SCXML module provides functionality to create state
1498 machines from SCXML files. This includes both dynamically creating state
1499 machines (loading the SCXML file and instantiating states and transitions) and
1500 generating a C++ file that has a class implementing the state machine. It
1501 also contains functionality to support data models and executable content.")))
1503 (define-public qtpurchasing
1504 (package (inherit qtsvg)
1505 (name "qtpurchasing")
1509 (uri (string-append "https://download.qt.io/official_releases/qt/"
1510 (version-major+minor version) "/" version
1511 "/submodules/" name "-everywhere-src-"
1515 "1xld1yx085mhnqdipy29g2yy5af67hfm0wy4mvj7pl6y5qj8jw9d"))))
1517 `(("qtbase" ,qtbase)
1518 ("qtdeclarative" ,qtdeclarative)))
1519 (synopsis "Qt Purchasing module")
1520 (description "The Qt Purchasing module provides and in-app API for
1521 purchasing goods and services.")))
1523 (define-public qtcanvas3d
1524 (package (inherit qtsvg)
1529 (uri (string-append "https://download.qt.io/official_releases/qt/"
1530 (version-major+minor version) "/" version
1531 "/submodules/" name "-everywhere-src-"
1535 "0h7arss7wr0jwl87kiwgbf0nlcgpbriyf7cnv9j4h7g8d09a777x"))
1536 (modules '((guix build utils)))
1539 (delete-file-recursively "examples/canvas3d/3rdparty")
1542 (substitute-keyword-arguments (package-arguments qtsvg)
1543 ;; Building the tests depends on the bundled 3rd party javascript files,
1544 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1545 ;; fail, so we skip building them for now.
1547 `(modify-phases ,phases
1549 (lambda* (#:key outputs #:allow-other-keys)
1550 (let ((out (assoc-ref outputs "out")))
1551 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1552 (string-append "PREFIX=" out)))))))
1553 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1556 `(("qtbase" ,qtbase)
1557 ("qtdeclarative" ,qtdeclarative)))
1558 (synopsis "Qt Canvas 3D module")
1559 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1560 drawing calls from Qt Quick JavaScript.")))
1562 (define-public qtcharts
1563 (package (inherit qtsvg)
1568 (uri (string-append "https://download.qt.io/official_releases/qt/"
1569 (version-major+minor version) "/" version
1570 "/submodules/" name "-everywhere-src-"
1574 "0551qfqnsfiy8kb1ng2v0yn7s6ggy7ghcmis983sbzxzjv2i58zn"))))
1576 (substitute-keyword-arguments (package-arguments qtsvg)
1577 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1579 `(("qtbase" ,qtbase)
1580 ("qtdeclarative" ,qtdeclarative)))
1581 (synopsis "Qt Charts module")
1582 (description "The Qt Charts module provides a set of easy to use chart
1583 components. It uses the Qt Graphics View Framework, therefore charts can be
1584 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1585 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1586 selecting one of the charts themes.")
1587 (license license:gpl3)))
1589 (define-public qtdatavis3d
1590 (package (inherit qtsvg)
1591 (name "qtdatavis3d")
1595 (uri (string-append "https://download.qt.io/official_releases/qt/"
1596 (version-major+minor version) "/" version
1597 "/submodules/" name "-everywhere-src-"
1601 "05pzvrhvxhxjlav4axrhwlnxjzlr7mi8k3f06g59ryrwmb99kd37"))))
1603 (substitute-keyword-arguments (package-arguments qtsvg)
1604 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1606 `(("qtbase" ,qtbase)
1607 ("qtdeclarative" ,qtdeclarative)))
1608 (synopsis "Qt Data Visualization module")
1609 (description "The Qt Data Visualization module provides a way to visualize
1610 data in 3D as bar, scatter, and surface graphs. It is especially useful for
1611 visualizing depth maps and large quantities of rapidly changing data, such as
1612 data received from multiple sensors. The look and feel of graphs can be
1613 customized by using themes or by adding custom items and labels to them.")
1614 (license license:gpl3)))
1616 (define-public qtnetworkauth
1617 (package (inherit qtsvg)
1618 (name "qtnetworkauth")
1622 (uri (string-append "https://download.qt.io/official_releases/qt/"
1623 (version-major+minor version) "/" version
1624 "/submodules/" name "-everywhere-src-"
1628 "1zmpvkhf2kmnr8vsa6jq675d5cpnmsg3f8yds6g91yq1g3prqdvr"))))
1630 (substitute-keyword-arguments (package-arguments qtsvg)
1632 `(modify-phases ,phases
1633 (add-after 'unpack 'remove-failing-test
1635 ;; These tests can't find their test data.
1636 (substitute* "tests/auto/auto.pro"
1637 (("oauth1 ") "# oauth1 "))
1640 `(("qtbase" ,qtbase)))
1641 (synopsis "Qt Network Authorization module")
1642 (description "The Qt Network Authorization module provides an
1643 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
1645 (define-public qtremoteobjects
1646 (package (inherit qtsvg)
1647 (name "qtremoteobjects")
1651 (uri (string-append "https://download.qt.io/official_releases/qt/"
1652 (version-major+minor version) "/" version
1653 "/submodules/" name "-everywhere-src-"
1657 "06awsaf15rch1y9p2q9kdlmlaa8g28whbzf04b10zfflyijnvg7j"))))
1659 (substitute-keyword-arguments (package-arguments qtsvg)
1661 `(modify-phases ,phases
1662 (add-after 'unpack 'remove-failing-test
1664 ;; This test can't find its imports.
1665 (substitute* "tests/auto/qml/qml.pro"
1666 (("integration") "# integration")
1667 (("usertypes") "# usertypes"))
1670 `(("qtbase" ,qtbase)
1671 ("qtdeclarative" ,qtdeclarative)))
1672 (synopsis "Qt Remote Objects module")
1673 (description "The Qt Remote Objects module is an @dfn{inter-process
1674 communication} (IPC) module developed for Qt. The idea is to extend existing
1675 Qt's functionalities to enable an easy exchange of information between
1676 processes or computers.")))
1678 (define-public qtspeech
1679 (package (inherit qtsvg)
1684 (uri (string-append "https://download.qt.io/official_releases/qt/"
1685 (version-major+minor version) "/" version
1686 "/submodules/" name "-everywhere-src-"
1690 "110xr2y174sayi9f6swzp1wx7mx4sw9rifcdx2bkbsnbfab6zg8a"))))
1692 (substitute-keyword-arguments (package-arguments qtsvg)
1693 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1695 `(("qtbase" ,qtbase)))
1698 ("qtdeclarative" ,qtdeclarative)
1699 ("qtmultimedia" ,qtmultimedia)
1700 ("qtxmlpatterns" ,qtxmlpatterns)))
1701 (synopsis "Qt Speech module")
1702 (description "The Qt Speech module enables a Qt application to support
1703 accessibility features such as text-to-speech, which is useful for end-users
1704 who are visually challenged or cannot access the application for whatever
1705 reason. The most common use case where text-to-speech comes in handy is when
1706 the end-user is driving and cannot attend the incoming messages on the phone.
1707 In such a scenario, the messaging application can read out the incoming
1710 (define-public python-sip
1718 (string-append "mirror://sourceforge/pyqt/sip/"
1719 "sip-" version "/sip-" version ".tar.gz"))
1722 "08iqj9qyanc6a4bllbd87gv8pd1gkplw1jhfa1sz0gcq3g1pyq94"))))
1723 (build-system gnu-build-system)
1725 `(("python" ,python-wrapper)))
1727 `(#:tests? #f ; no check target
1728 #:modules ((srfi srfi-1)
1729 ,@%gnu-build-system-modules)
1731 (modify-phases %standard-phases
1733 (lambda* (#:key inputs outputs #:allow-other-keys)
1734 (let* ((out (assoc-ref outputs "out"))
1735 (bin (string-append out "/bin"))
1736 (include (string-append out "/include"))
1737 (python (assoc-ref inputs "python"))
1739 (last (string-split python #\-)))
1742 (take (string-split python-version #\.) 2)
1744 (lib (string-append out "/lib/python"
1747 (invoke "python" "configure.py"
1750 "--incdir" include)))))))
1751 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1752 (synopsis "Python binding creator for C and C++ libraries")
1754 "SIP is a tool to create Python bindings for C and C++ libraries. It
1755 was originally developed to create PyQt, the Python bindings for the Qt
1756 toolkit, but can be used to create bindings for any C or C++ library.
1758 SIP comprises a code generator and a Python module. The code generator
1759 processes a set of specification files and generates C or C++ code, which
1760 is then compiled to create the bindings extension module. The SIP Python
1761 module provides support functions to the automatically generated code.")
1762 ;; There is a choice between a python like license, gpl2 and gpl3.
1763 ;; For compatibility with pyqt, we need gpl3.
1764 (license license:gpl3)))
1766 (define-public python2-sip
1767 (package (inherit python-sip)
1768 (name "python2-sip")
1770 `(("python" ,python-2)))))
1772 (define-public python-pyqt
1774 (name "python-pyqt")
1780 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1781 "PyQt-" version "/PyQt5_gpl-"
1785 "00wn9svgyp0fsrkc4ma15zcxg31pw4gsgaz6nwb3fhy3al8miakw"))
1786 (patches (search-patches "pyqt-configure.patch"
1787 "pyqt-public-sip.patch"))))
1788 (build-system gnu-build-system)
1790 `(("qtbase" ,qtbase))) ; for qmake
1792 `(("python-sip" ,python-sip)))
1794 `(("python" ,python-wrapper)
1796 ("qtconnectivity" ,qtconnectivity)
1797 ("qtdeclarative" ,qtdeclarative)
1798 ("qtlocation" ,qtlocation)
1799 ("qtmultimedia" ,qtmultimedia)
1800 ("qtsensors" ,qtsensors)
1801 ("qtserialport" ,qtserialport)
1803 ("qttools" ,qttools)
1804 ("qtwebchannel" ,qtwebchannel)
1805 ("qtwebkit" ,qtwebkit)
1806 ("qtwebsockets" ,qtwebsockets)
1807 ("qtx11extras" ,qtx11extras)
1808 ("qtxmlpatterns" ,qtxmlpatterns)))
1810 `(#:modules ((srfi srfi-1)
1811 ,@%gnu-build-system-modules)
1813 (modify-phases %standard-phases
1815 (lambda* (#:key inputs outputs #:allow-other-keys)
1816 (let* ((out (assoc-ref outputs "out"))
1817 (bin (string-append out "/bin"))
1818 (sip (string-append out "/share/sip"))
1819 (plugins (string-append out "/plugins"))
1820 (designer (string-append plugins "/designer"))
1821 (qml (string-append plugins "/PyQt5"))
1822 (python (assoc-ref inputs "python"))
1824 (last (string-split python #\-)))
1827 (take (string-split python-version #\.) 2)
1829 (lib (string-append out "/lib/python"
1832 (stubs (string-append lib "/PyQt5")))
1833 (invoke "python" "configure.py"
1837 "--designer-plugindir" designer
1838 "--qml-plugindir" qml
1839 ; Where to install the PEP 484 Type Hints stub
1840 ; files. Without this the stubs are tried to be
1841 ; installed into the python package's
1842 ; site-package directory, which is read-only.
1844 "--sipdir" sip)))))))
1845 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1846 (synopsis "Python bindings for Qt")
1848 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1849 framework. The bindings are implemented as a set of Python modules and
1850 contain over 620 classes.")
1851 (license license:gpl3)))
1853 ;; XXX: This is useful because qtwebkit does not build reliably at this time.
1854 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
1855 ;; packages that could be used together.
1856 (define-public python-pyqt-without-qtwebkit
1857 (package (inherit python-pyqt)
1858 (name "python-pyqt-without-qtwebkit")
1860 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
1862 (define-public python2-pyqt
1863 (package (inherit python-pyqt)
1864 (name "python2-pyqt")
1866 `(("python-sip" ,python2-sip)
1867 ("qtbase" ,qtbase)))
1869 `(("python" ,python-2)
1870 ("python2-enum34" ,python2-enum34)
1871 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1873 (define-public python2-pyqt-4
1874 (package (inherit python-pyqt)
1875 (name "python2-pyqt")
1881 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1882 "PyQt-" version "/PyQt4_gpl_x11-"
1886 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
1888 `(("python-sip" ,python2-sip)
1890 (inputs `(("python" ,python-2)))
1892 `(#:tests? #f ; no check target
1893 #:modules ((srfi srfi-1)
1894 ,@%gnu-build-system-modules)
1896 (modify-phases %standard-phases
1898 (lambda* (#:key inputs outputs #:allow-other-keys)
1899 (let* ((out (assoc-ref outputs "out"))
1900 (bin (string-append out "/bin"))
1901 (sip (string-append out "/share/sip"))
1902 (python (assoc-ref inputs "python"))
1904 (last (string-split python #\-)))
1907 (take (string-split python-version #\.) 2)
1909 (lib (string-append out "/lib/python"
1912 (zero? (system* "python" "configure.py"
1916 "--sipdir" sip))))))))
1917 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1919 (define-public qscintilla
1925 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1926 "QScintilla-" version "/QScintilla_gpl-"
1930 "06hs6civq13dvzlws0spjb7gwyk6kynpnfwg5plhahnxf7g5h137"))))
1931 (build-system gnu-build-system)
1934 (modify-phases %standard-phases
1936 (lambda* (#:key outputs #:allow-other-keys)
1937 (let ((out (assoc-ref outputs "out")))
1939 (substitute* "qscintilla.pro"
1940 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1941 (string-append out "/lib"))
1942 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1943 (string-append out "/include"))
1944 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1945 (string-append out "/translations"))
1946 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1947 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1948 (("\\$\\$\\[QT_HOST_DATA\\]")
1949 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
1950 (invoke "qmake")))))))
1951 (native-inputs `(("qtbase" ,qtbase)))
1952 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1953 (synopsis "Qt port of the Scintilla C++ editor control")
1954 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1955 editor control. QScintilla includes features especially useful when editing
1956 and debugging source code. These include support for syntax styling, error
1957 indicators, code completion and call tips.")
1958 (license license:gpl3+)))
1960 (define-public python-qscintilla
1961 (package (inherit qscintilla)
1962 (name "python-qscintilla")
1965 (list "--pyqt=PyQt5"
1966 (string-append "--pyqt-sipdir="
1967 (assoc-ref %build-inputs "python-pyqt")
1969 (string-append "--qsci-incdir="
1970 (assoc-ref %build-inputs "qscintilla")
1972 (string-append "--qsci-libdir="
1973 (assoc-ref %build-inputs "qscintilla")
1976 (modify-phases %standard-phases
1978 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1980 (apply invoke "python3" "configure.py"
1982 ;; Install to the right directory
1983 (substitute* '("Makefile"
1985 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
1986 (assoc-ref outputs "out")))
1987 ;; And fix the installed.txt file
1988 (substitute* "installed.txt"
1989 (("/gnu/store/[^/]+")
1990 (assoc-ref outputs "out")))
1993 `(("qscintilla" ,qscintilla)
1995 ("python-pyqt" ,python-pyqt)))
1996 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1997 editor control. QScintilla includes features especially useful when editing
1998 and debugging source code. These include support for syntax styling, error
1999 indicators, code completion and call tips.
2001 This package provides the Python bindings.")))
2003 ;; PyQt only looks for modules in its own directory. It ignores environment
2004 ;; variables such as PYTHONPATH, so we need to build a union package to make
2006 (define-public python-pyqt+qscintilla
2007 (package (inherit python-pyqt)
2008 (name "python-pyqt+qscintilla")
2010 (build-system trivial-build-system)
2012 '(#:modules ((guix build union))
2014 (use-modules (ice-9 match)
2016 (match %build-inputs
2017 (((names . directories) ...)
2018 (union-build (assoc-ref %outputs "out")
2022 `(("python-pyqt" ,python-pyqt)
2023 ("python-qscintilla" ,python-qscintilla)))
2024 (synopsis "Union of PyQt and the Qscintilla extension")
2026 "This package contains the union of PyQt and the Qscintilla extension.")))
2028 (define-public qtkeychain
2036 (url "https://github.com/frankosterfeld/qtkeychain/")
2037 (commit (string-append "v" version))))
2038 (file-name (git-file-name name version))
2041 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
2042 (build-system cmake-build-system)
2044 `(("pkg-config" ,pkg-config)
2045 ("qttools" ,qttools)))
2047 `(("qtbase" ,qtbase)))
2049 `(#:tests? #f ; No tests included
2051 (modify-phases %standard-phases
2052 (add-before 'configure 'set-qt-trans-dir
2054 (substitute* "CMakeLists.txt"
2055 (("\\$\\{qt_translations_dir\\}")
2056 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
2058 (home-page "https://github.com/frankosterfeld/qtkeychain")
2059 (synopsis "Qt API to store passwords")
2061 "QtKeychain is a Qt library to store passwords and other secret data
2062 securely. It will not store any data unencrypted unless explicitly requested.")
2063 (license license:bsd-3)))
2073 (string-append "mirror://sourceforge/qwt/qwt/"
2074 version "/qwt-" version ".tar.bz2"))
2076 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
2077 (build-system gnu-build-system)
2079 `(("qtbase" ,qtbase)
2081 ("qttools" ,qttools)))
2084 (modify-phases %standard-phases
2086 (lambda* (#:key outputs #:allow-other-keys)
2087 (let* ((out (assoc-ref outputs "out"))
2088 (docdir (string-append out "/share/doc/qwt"))
2089 (incdir (string-append out "/include/qwt"))
2090 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2091 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
2092 (substitute* '("qwtconfig.pri")
2093 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2094 (format #f "~a = ~a\n" x out))
2095 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2096 (format #f "~a = ~a\n" x docdir))
2097 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2098 (format #f "~a = ~a\n" x incdir))
2099 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2100 (format #f "~a = ~a\n" x pluginsdir))
2101 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2102 (format #f "~a = ~a\n" x featuresdir)))
2103 (substitute* '("doc/doc.pro")
2104 ;; We'll install them in the 'install-man-pages' phase.
2105 (("^unix:doc\\.files.*") ""))
2106 (zero? (system* "qmake")))))
2107 (add-after 'install 'install-man-pages
2108 (lambda* (#:key outputs #:allow-other-keys)
2109 (let* ((out (assoc-ref outputs "out"))
2110 (man (string-append out "/share/man")))
2111 ;; Remove some incomplete manual pages.
2112 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2114 (copy-recursively "doc/man" man)
2116 (home-page "http://qwt.sourceforge.net")
2117 (synopsis "Qt widgets for plots, scales, dials and other technical software
2120 "The Qwt library contains widgets and components which are primarily useful
2121 for technical and scientific purposes. It includes a 2-D plotting widget,
2122 different kinds of sliders, and much more.")
2125 ;; The Qwt license is LGPL2.1 with some exceptions.
2126 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2127 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2128 license:lgpl2.1 license:gpl3))))
2130 (define-public qtwebkit
2133 (version "5.212.0-alpha2")
2137 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
2138 name "-" version "/" name "-" version ".tar.xz"))
2141 "12lg7w00d8wsj672s1y5z5gm0xdcgs16nas0b5bgq4byavg03ygq"))
2142 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2143 (build-system cmake-build-system)
2146 ("python" ,python-2.7)
2151 ("pkg-config" ,pkg-config)))
2155 ("gst-plugins-base" ,gst-plugins-base)
2156 ("libjpeg" ,libjpeg)
2158 ("libwebp" ,libwebp)
2160 ("fontconfig" ,fontconfig)
2161 ("libxrender" ,libxrender)
2163 ("qtdeclarative" ,qtdeclarative)
2164 ("qtlocation" ,qtlocation)
2165 ("qtmultimedia" ,qtmultimedia)
2166 ("qtsensors" ,qtsensors)
2167 ("qtwebchannel" ,qtwebchannel)
2168 ("libxml2" ,libxml2)
2169 ("libxslt" ,libxslt)
2171 ("libxcomposite" ,libxcomposite)))
2173 `(#:tests? #f ; no apparent tests; it might be necessary to set
2174 ; ENABLE_API_TESTS, see CMakeLists.txt
2175 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2177 "-DUSE_LIBHYPHEN=OFF"
2178 "-DUSE_SYSTEM_MALLOC=ON"
2179 ;; XXX: relative dir installs to build dir?
2180 (string-append "-DECM_MKSPECS_INSTALL_DIR="
2181 %output "/lib/qt5/mkspecs/modules")
2182 ;; Sacrifice a little speed in order to link
2183 ;; libraries and test executables in a
2184 ;; reasonable amount of memory.
2185 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2186 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
2187 (home-page "https://www.webkit.org")
2188 (synopsis "Web browser engine and classes to render and interact with web
2190 (description "QtWebKit provides a Web browser engine that makes it easy to
2191 embed content from the World Wide Web into your Qt application. At the same
2192 time Web content can be enhanced with native controls.")
2193 (license license:lgpl2.1+)))
2195 (define-public dotherside
2202 (uri (string-append "https://github.com/filcuc/DOtherSide/"
2203 "archive/v" version ".tar.gz"))
2204 (file-name (string-append name "-" version ".tar.gz"))
2207 "0azq7qlsrfdwbd6qsi7d3c1knn42qw0r47g43xf7clwbinapswpz"))))
2208 (build-system cmake-build-system)
2210 `(("qttools" ,qttools)))
2212 `(("qtbase" ,qtbase)
2213 ("qtdeclarative" ,qtdeclarative)))
2214 (home-page "https://filcuc.github.io/DOtherSide/index.html")
2215 (synopsis "C language library for creating bindings for the Qt QML language")
2217 "DOtherSide is a C language library for creating bindings for the
2218 QT QML language. The following features are implementable from
2221 @item Creating custom QObject
2222 @item Creating custom QAbstractListModels
2223 @item Creating custom properties, signals and slots
2224 @item Creating from QML QObject defined in the binded language
2225 @item Creating from Singleton QML QObject defined in the binded language
2227 (license license:lgpl3))) ;version 3 only (+ exception)