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 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages qt)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build utils)
29 #:use-module (guix build-system cmake)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix packages)
32 #:use-module (guix utils)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages bison)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages cups)
37 #:use-module (gnu packages databases)
38 #:use-module (gnu packages documentation)
39 #:use-module (gnu packages fontutils)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages freedesktop)
42 #:use-module (gnu packages gl)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gnuzilla)
45 #:use-module (gnu packages gperf)
46 #:use-module (gnu packages gtk)
47 #:use-module (gnu packages icu4c)
48 #:use-module (gnu packages image)
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages databases)
51 #:use-module (gnu packages pciutils)
52 #:use-module (gnu packages pcre)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages pulseaudio)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages ruby)
58 #:use-module (gnu packages tls)
59 #:use-module (gnu packages xdisorg)
60 #:use-module (gnu packages xorg)
61 #:use-module (gnu packages xml))
63 (define-public grantlee
70 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
72 (file-name (string-append name "-" version ".tar.gz"))
74 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
76 `(("doxygen" ,doxygen)))
79 ("qtscript" ,qtscript)))
80 (build-system cmake-build-system)
83 (modify-phases %standard-phases
86 (zero? (system* "ctest" ;; exclude 2 tests which require a display
87 "-E" "htmlbuildertest|plainmarkupbuildertest")))))))
88 (home-page "https://github.com/steveire/grantlee")
89 (synopsis "Libraries for text templating with Qt")
90 (description "Grantlee Templates can be used for theming and generation of
91 other text such as code. The syntax uses the syntax of the Django template
92 system, and the core design of Django is reused in Grantlee.")
93 (license license:lgpl2.0+)))
103 "http://download.qt.io/official_releases/qt/"
104 (version-major+minor version)
106 "/single/qt-everywhere-opensource-src-"
110 "1cw93mrlkqbwndfqyjpsvjzkpzi39px2is040xvk18mvg3y1prl3"))
111 (modules '((guix build utils)))
114 ;; Remove qtwebengine, which relies on a bundled copy of
115 ;; chromium. Not only does it fail compilation in qt 5.5:
116 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
117 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
118 ;; it might also pose security problems.
119 ;; Alternatively, we could use the "-skip qtwebengine"
120 ;; configuration option.
121 (delete-file-recursively "qtwebengine")
122 ;; Remove one of the two bundled harfbuzz copies in addition
123 ;; to passing "-system-harfbuzz".
124 (delete-file-recursively "qtbase/src/3rdparty/harfbuzz-ng")
125 ;; Remove the bundled sqlite copy in addition to
126 ;; passing "-system-sqlite".
127 (delete-file-recursively "qtbase/src/3rdparty/sqlite")))))
128 (build-system gnu-build-system)
132 `(("alsa-lib" ,alsa-lib)
136 ("fontconfig" ,fontconfig)
137 ("freetype" ,freetype)
139 ("harfbuzz" ,harfbuzz)
146 ("libxcomposite" ,libxcomposite)
147 ("libxcursor" ,libxcursor)
148 ("libxfixes" ,libxfixes)
150 ("libxinerama" ,libxinerama)
151 ("libxkbcommon" ,libxkbcommon)
153 ("libxrandr" ,libxrandr)
154 ("libxrender" ,libxrender)
161 ("postgresql" ,postgresql)
162 ("pulseaudio" ,pulseaudio)
166 ("unixodbc" ,unixodbc)
167 ("xcb-util" ,xcb-util)
168 ("xcb-util-image" ,xcb-util-image)
169 ("xcb-util-keysyms" ,xcb-util-keysyms)
170 ("xcb-util-renderutil" ,xcb-util-renderutil)
171 ("xcb-util-wm" ,xcb-util-wm)
178 ("pkg-config" ,pkg-config)
181 ("which" ,(@ (gnu packages base) which))))
183 `(;; FIXME: Disabling parallel building is a quick hack to avoid the
184 ;; failure described in
185 ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
186 ;; A more structural fix is needed.
189 (modify-phases %standard-phases
190 (add-after 'configure 'patch-bin-sh
192 (substitute* '("qtbase/config.status"
194 "qtbase/mkspecs/features/qt_functions.prf"
195 "qtbase/qmake/library/qmakebuiltins.cpp")
196 (("/bin/sh") (which "sh")))
199 (lambda* (#:key outputs #:allow-other-keys)
200 (let ((out (assoc-ref outputs "out")))
201 (substitute* '("configure" "qtbase/configure")
202 (("/bin/pwd") (which "pwd")))
203 (substitute* "qtbase/src/corelib/global/global.pri"
204 (("/bin/ls") (which "ls")))
205 ;; do not pass "--enable-fast-install", which makes the
206 ;; configure process fail
213 ;; Do not build examples; if desired, these could go
214 ;; into a separate output, but for the time being, we
215 ;; prefer to save the space and build time.
217 ;; Most "-system-..." are automatic, but some use
218 ;; the bundled copy by default.
221 ;; explicitly link with openssl instead of dlopening it
223 ;; explicitly link with dbus instead of dlopening it
225 ;; drop special machine instructions not supported
226 ;; on all instances of the target
227 ,@(if (string-prefix? "x86_64"
228 (or (%current-target-system)
239 "-no-mips_dspr2"))))))))
240 (home-page "https://www.qt.io/")
241 (synopsis "Cross-platform GUI library")
242 (description "Qt is a cross-platform application and UI framework for
243 developers using C++ or QML, a CSS & JavaScript like language.")
244 (license license:lgpl2.1)
246 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
247 ;; see <http://hydra.gnu.org/build/112828>.
248 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
249 (supported-systems (delete "mips64el-linux" %supported-systems))))
252 (package (inherit qt)
256 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
257 (string-copy version 0 (string-rindex version #\.))
259 "/qt-everywhere-opensource-src-"
263 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
264 (patches (search-patches "qt4-ldflags.patch"))
265 (modules '((guix build utils)))
267 ;; Remove webkit module, which is not built.
268 '(delete-file-recursively "src/3rdparty/webkit"))))
269 (inputs `(,@(alist-delete "harfbuzz"
270 (alist-delete "libjpeg" (package-inputs qt)))
271 ("libjepg" ,libjpeg-8)
274 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
275 ;; but we can't make them a separate output because "out" and "examples"
276 ;; would refer to each other.
277 (outputs '("out" ;112MiB core + 37MiB examples
278 "doc")) ;280MiB of HTML + code
281 (modify-phases %standard-phases
284 (lambda* (#:key outputs #:allow-other-keys)
285 (let ((out (assoc-ref outputs "out"))
286 (doc (assoc-ref outputs "doc")))
287 (substitute* '("configure")
288 (("/bin/pwd") (which "pwd")))
294 ;; Note: Don't pass '-docdir' since 'qmake' and
295 ;; libQtCore would record its value, thereby defeating
296 ;; the whole point of having a separate output.
297 "-datadir" (string-append out "/share/qt-" ,version
299 "-importdir" (string-append out "/lib/qt-4"
301 "-plugindir" (string-append out "/lib/qt-4"
303 "-translationdir" (string-append out "/share/qt-" ,version
305 "-demosdir" (string-append out "/share/qt-" ,version
307 "-examplesdir" (string-append out "/share/qt-" ,version
311 ;; explicitly link with dbus instead of dlopening it
313 ;; Skip the webkit module; it fails to build on armhf
314 ;; and, apart from that, may pose security risks.
316 ;; drop special machine instructions not supported
317 ;; on all instances of the target
318 ,@(if (string-prefix? "x86_64"
319 (or (%current-target-system)
333 (lambda* (#:key outputs #:allow-other-keys)
334 ;; Because of qt4-documentation-path.patch, documentation ends up
335 ;; being installed in OUT. Move it to the right place.
336 (let* ((out (assoc-ref outputs "out"))
337 (doc (assoc-ref outputs "doc"))
338 (olddoc (string-append out "/doc"))
339 (docdir (string-append doc "/share/doc/qt-" ,version)))
340 (mkdir-p (dirname docdir))
342 ;; Note: We can't use 'rename-file' here because OUT and DOC are
343 ;; different "devices" due to bind-mounts.
344 (copy-recursively olddoc docdir)
345 (delete-file-recursively olddoc)
348 (define-public qtbase
354 (uri (string-append "https://download.qt.io/official_releases/qt/"
355 (version-major+minor version) "/" version
356 "/submodules/" name "-opensource-src-"
360 "0ip6xnizsn269r4s1nq9lkx8cdxkjqr1fidwrj3sa8xb7h96syry"))
361 (modules '((guix build utils)))
364 ;; Remove one of the two bundled harfbuzz copies in addition
365 ;; to passing "-system-harfbuzz".
366 (delete-file-recursively "src/3rdparty/harfbuzz-ng")
367 ;; Remove the bundled sqlite copy in addition to
368 ;; passing "-system-sqlite".
369 (delete-file-recursively "src/3rdparty/sqlite")))))
370 (build-system gnu-build-system)
374 `(("alsa-lib" ,alsa-lib)
379 ("fontconfig" ,fontconfig)
380 ("freetype" ,freetype)
382 ("harfbuzz" ,harfbuzz)
384 ("libinput" ,libinput)
389 ("libxcomposite" ,libxcomposite)
390 ("libxcursor" ,libxcursor)
391 ("libxfixes" ,libxfixes)
393 ("libxinerama" ,libxinerama)
394 ("libxkbcommon" ,libxkbcommon)
396 ("libxrandr" ,libxrandr)
397 ("libxrender" ,libxrender)
405 ("postgresql" ,postgresql)
406 ("pulseaudio" ,pulseaudio)
408 ("unixodbc" ,unixodbc)
409 ("xcb-util" ,xcb-util)
410 ("xcb-util-image" ,xcb-util-image)
411 ("xcb-util-keysyms" ,xcb-util-keysyms)
412 ("xcb-util-renderutil" ,xcb-util-renderutil)
413 ("xcb-util-wm" ,xcb-util-wm)
420 ("pkg-config" ,pkg-config)
423 ("which" ,(@ (gnu packages base) which))))
426 (modify-phases %standard-phases
427 (add-after 'configure 'patch-bin-sh
429 (substitute* '("config.status"
431 "mkspecs/features/qt_functions.prf"
432 "qmake/library/qmakebuiltins.cpp")
433 (("/bin/sh") (which "sh")))
436 (lambda* (#:key outputs #:allow-other-keys)
437 (let ((out (assoc-ref outputs "out")))
438 (substitute* "configure"
439 (("/bin/pwd") (which "pwd")))
440 (substitute* "src/corelib/global/global.pri"
441 (("/bin/ls") (which "ls")))
442 ;; The configuration files for other Qt5 packages are searched
443 ;; through a call to "find_package" in Qt5Config.cmake, which
444 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
445 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
446 ;; components can be installed in different places.
447 (substitute* (find-files "." ".*\\.cmake")
448 (("NO_DEFAULT_PATH") ""))
449 ;; do not pass "--enable-fast-install", which makes the
450 ;; configure process fail
457 ;; Do not build examples; if desired, these could go
458 ;; into a separate output, but for the time being, we
459 ;; prefer to save the space and build time.
461 ;; Most "-system-..." are automatic, but some use
462 ;; the bundled copy by default.
465 ;; explicitly link with openssl instead of dlopening it
467 ;; explicitly link with dbus instead of dlopening it
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)
483 "-no-mips_dspr2")))))
484 (add-after 'install 'patch-qt_config.prf
485 (lambda* (#:key outputs #:allow-other-keys)
486 (let* ((out (assoc-ref outputs "out"))
487 (qt_config.prf (string-append
488 out "/mkspecs/features/qt_config.prf")))
489 ;; For each Qt module, let `qmake' uses search paths in the
490 ;; module directory instead of all in QT_INSTALL_PREFIX.
491 (substitute* qt_config.prf
492 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
493 "$$replace(dir, mkspecs/modules, include)")
494 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
495 "$$replace(dir, mkspecs/modules, lib)")
496 (("\\$\\$\\[QT_HOST_LIBS\\]")
497 "$$replace(dir, mkspecs/modules, lib)")
498 (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
499 "$$replace(dir, mkspecs/modules, plugins)")
500 (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
501 "$$replace(dir, mkspecs/modules, libexec)")
502 (("\\$\\$\\[QT_INSTALL_BINS\\]")
503 "$$replace(dir, mkspecs/modules, bin)")
504 (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
505 "$$replace(dir, mkspecs/modules, imports)")
506 (("\\$\\$\\[QT_INSTALL_QML\\]")
507 "$$replace(dir, mkspecs/modules, qml)"))
510 (list (search-path-specification
511 (variable "QMAKEPATH")
513 (search-path-specification
514 (variable "QML2_IMPORT_PATH")
516 (search-path-specification
517 (variable "QT_PLUGIN_PATH")
518 (files '("plugins")))
519 (search-path-specification
520 (variable "XDG_DATA_DIRS")
522 (search-path-specification
523 (variable "XDG_CONFIG_DIRS")
524 (files '("etc/xdg")))))
525 (home-page "https://www.qt.io/")
526 (synopsis "Cross-platform GUI library")
527 (description "Qt is a cross-platform application and UI framework for
528 developers using C++ or QML, a CSS & JavaScript like language.")
529 (license (list license:lgpl2.1 license:lgpl3))))
532 (package (inherit qtbase)
537 (uri (string-append "https://download.qt.io/official_releases/qt/"
538 (version-major+minor version) "/" version
539 "/submodules/" name "-opensource-src-"
543 "10fqrlqkiq83xhx79g8d2sjy7hjdnp28067z8f4byj7db81rzy51"))))
544 (propagated-inputs `())
545 (native-inputs `(("perl" ,perl)))
552 (modify-phases %standard-phases
554 (lambda* (#:key outputs #:allow-other-keys)
555 (let ((out (assoc-ref outputs "out")))
556 (zero? (system* "qmake" (string-append "PREFIX=" out))))))
557 (add-before 'install 'fix-Makefiles
558 (lambda* (#:key inputs outputs #:allow-other-keys)
559 (let ((out (assoc-ref outputs "out"))
560 (qtbase (assoc-ref inputs "qtbase")))
561 (substitute* (find-files "." "Makefile")
562 (((string-append "INSTALL_ROOT)" qtbase))
563 (string-append "INSTALL_ROOT)" out)))))))))))
565 (define-public qtimageformats
566 (package (inherit qtsvg)
567 (name "qtimageformats")
571 (uri (string-append "https://download.qt.io/official_releases/qt/"
572 (version-major+minor version) "/" version
573 "/submodules/" name "-opensource-src-"
577 "1rb27x7i2pmvsck6wax2cg31gqpzaakciy45wm5l3lcl86j48czg"))
578 (modules '((guix build utils)))
581 (delete-file-recursively "src/3rdparty")))))
591 (define-public qtx11extras
592 (package (inherit qtsvg)
597 (uri (string-append "https://download.qt.io/official_releases/qt/"
598 (version-major+minor version) "/" version
599 "/submodules/" name "-opensource-src-"
603 "1yrkn8pqdbvbqykas3wx1vdfimhjkgx3s5jgdxib9dgmgyx6vjzw"))))
604 (native-inputs `(("perl" ,perl)))
607 ("qtbase" ,qtbase)))))
609 (define-public qtxmlpatterns
610 (package (inherit qtsvg)
611 (name "qtxmlpatterns")
615 (uri (string-append "https://download.qt.io/official_releases/qt/"
616 (version-major+minor version) "/" version
617 "/submodules/" name "-opensource-src-"
621 "02z2qxamslg6sphnaykjcjfpypq4b69pb586s43vw4fplm72m21q"))))
622 (native-inputs `(("perl" ,perl)))
623 (inputs `(("qtbase" ,qtbase)))))
625 (define-public qtdeclarative
626 (package (inherit qtsvg)
627 (name "qtdeclarative")
631 (uri (string-append "https://download.qt.io/official_releases/qt/"
632 (version-major+minor version) "/" version
633 "/submodules/" name "-opensource-src-"
637 "1x7rij423g5chlfd2kix54f393vxwjvdfsn1c7sybqmfycwn5pl6"))))
640 ("pkg-config" ,pkg-config)
643 ("qtxmlpatterns" ,qtxmlpatterns)))
646 ("qtbase" ,qtbase)))))
648 (define-public qtconnectivity
649 (package (inherit qtsvg)
650 (name "qtconnectivity")
654 (uri (string-append "https://download.qt.io/official_releases/qt/"
655 (version-major+minor version) "/" version
656 "/submodules/" name "-opensource-src-"
660 "00r7lc1w3snfp2qfqmviqzv0cw16zd8m1sfpvxvpl65yqmzcli4q"))))
663 ("pkg-config" ,pkg-config)
664 ("qtdeclarative" ,qtdeclarative)))
667 ("qtbase" ,qtbase)))))
669 (define-public qtwebsockets
670 (package (inherit qtsvg)
671 (name "qtwebsockets")
675 (uri (string-append "https://download.qt.io/official_releases/qt/"
676 (version-major+minor version) "/" version
677 "/submodules/" name "-opensource-src-"
681 "0hwb2l7iwf4wf7l95dli8j3b7h0nffp56skfg1x810kzj0df26vl"))))
684 ("qtdeclarative" ,qtdeclarative)))
685 (inputs `(("qtbase" ,qtbase)))))
687 (define-public qtsensors
688 (package (inherit qtsvg)
693 (uri (string-append "https://download.qt.io/official_releases/qt/"
694 (version-major+minor version) "/" version
695 "/submodules/" name "-opensource-src-"
699 "1gii6wg2xd3bkb86y5hgpmwcpl04xav030zscpl6fhscl9kcqg98"))))
702 ("qtdeclarative" ,qtdeclarative)))
703 (inputs `(("qtbase" ,qtbase)))))
705 (define-public qtmultimedia
706 (package (inherit qtsvg)
707 (name "qtmultimedia")
711 (uri (string-append "https://download.qt.io/official_releases/qt/"
712 (version-major+minor version) "/" version
713 "/submodules/" name "-opensource-src-"
717 "0ndmhiflmyr144nq8drd5njsdi282ixsm4730q5n0ji2v9dp1bh5"))
718 (modules '((guix build utils)))
721 (delete-file-recursively
722 "examples/multimedia/spectrum/3rdparty")))))
725 ("pkg-config" ,pkg-config)
727 ("qtdeclarative" ,qtdeclarative)))
729 `(("alsa-lib" ,alsa-lib)
731 ("pulseaudio" ,pulseaudio)
732 ("qtbase" ,qtbase)))))
734 (define-public qtwayland
735 (package (inherit qtsvg)
740 (uri (string-append "https://download.qt.io/official_releases/qt/"
741 (version-major+minor version) "/" version
742 "/submodules/" name "-opensource-src-"
746 "04dynjcr6gxi3hcqdf688a4hkabi2l17slpcx9k0f3dxygwcgf96"))))
750 ("pkg-config" ,pkg-config)
751 ("qtdeclarative" ,qtdeclarative)))
753 `(("fontconfig" ,fontconfig)
754 ("freetype" ,freetype)
756 ("libxcomposite" ,libxcomposite)
758 ("libxkbcommon" ,libxkbcommon)
759 ("libxrender" ,libxrender)
763 ("wayland" ,wayland)))))
765 (define-public qtserialport
766 (package (inherit qtsvg)
767 (name "qtserialport")
771 (uri (string-append "https://download.qt.io/official_releases/qt/"
772 (version-major+minor version) "/" version
773 "/submodules/" name "-opensource-src-"
777 "0rc2l14s59qskp16wqlkizfai32s41qlm7a86r3qahx28gc51qaw"))))
778 (native-inputs `(("perl" ,perl)))
783 (define-public qtwebchannel
784 (package (inherit qtsvg)
785 (name "qtwebchannel")
789 (uri (string-append "https://download.qt.io/official_releases/qt/"
790 (version-major+minor version) "/" version
791 "/submodules/" name "-opensource-src-"
795 "05lqfidlh1ahdd1j9y20p2037qbcq51zkdzj2m8fwhn7ghbwvd1s"))))
798 ("qtdeclarative" ,qtdeclarative)
799 ("qtwebsockets" ,qtwebsockets)))
800 (inputs `(("qtbase" ,qtbase)))))
802 (define-public qtlocation
803 (package (inherit qtsvg)
808 (uri (string-append "https://download.qt.io/official_releases/qt/"
809 (version-major+minor version) "/" version
810 "/submodules/" name "-opensource-src-"
814 "0rd898gndn41jrp78203lxd94ybfv693l0qg0myag4r46ikk69vh"))))
817 ("qtdeclarative" ,qtdeclarative)
818 ("qtquickcontrols" ,qtquickcontrols)
819 ("qtserialport" ,qtserialport)))
820 (inputs `(("qtbase" ,qtbase)))))
822 (define-public qttools
823 (package (inherit qtsvg)
828 (uri (string-append "https://download.qt.io/official_releases/qt/"
829 (version-major+minor version) "/" version
830 "/submodules/" name "-opensource-src-"
834 "004m9l7bgh7qnncbyl3d5fkggdrqx58ib21xv4hflvvarxrssibg"))))
837 ("qtdeclarative" ,qtdeclarative)))
840 ("qtbase" ,qtbase)))))
842 (define-public qtscript
843 (package (inherit qtsvg)
848 (uri (string-append "https://download.qt.io/official_releases/qt/"
849 (version-major+minor version) "/" version
850 "/submodules/" name "-opensource-src-"
854 "0040890p5ilyrmcpndz1hhp08x2ms5gw4lp4n5iax2a957yy2i4w"))))
857 ("qttools" ,qttools)))
859 `(("qtbase" ,qtbase)))))
861 (define-public qtquickcontrols
862 (package (inherit qtsvg)
863 (name "qtquickcontrols")
867 (uri (string-append "https://download.qt.io/official_releases/qt/"
868 (version-major+minor version) "/" version
869 "/submodules/" name "-opensource-src-"
873 "0cpcrmz9n5b4bgmshmk093lirl9xwqb23inchnai1zqg21vrmqfq"))))
876 ("qtdeclarative" ,qtdeclarative)))))
878 (define-public qtquickcontrols2
879 (package (inherit qtsvg)
880 (name "qtquickcontrols2")
884 (uri (string-append "https://download.qt.io/official_releases/qt/"
885 (version-major+minor version) "/" version
886 "/submodules/" name "-opensource-src-"
890 "0i8h933vhvx1bmniqdx0idg6vk82w9byd3dq0bb2phwjg5vv1xb3"))))
893 ("qtdeclarative" ,qtdeclarative)))))
895 (define-public qtgraphicaleffects
896 (package (inherit qtsvg)
897 (name "qtgraphicaleffects")
901 (uri (string-append "https://download.qt.io/official_releases/qt/"
902 (version-major+minor version) "/" version
903 "/submodules/" name "-opensource-src-"
907 "1rwdjg5mk6xpadmxfq64xfp573zp5lrj9illb9105ra5wff565n8"))))
910 ("qtdeclarative" ,qtdeclarative)))))
912 (define-public python-sip
920 (string-append "mirror://sourceforge/pyqt/sip/"
921 "sip-" version "/sip-" version ".tar.gz"))
924 "1dlw4kyiwd9bzmd1djm79c121r219abaz86lvizdk6ksq20mrp7i"))))
925 (build-system gnu-build-system)
927 `(("python" ,python-wrapper)))
929 `(#:tests? #f ; no check target
930 #:modules ((srfi srfi-1)
931 ,@%gnu-build-system-modules)
933 (modify-phases %standard-phases
935 (lambda* (#:key inputs outputs #:allow-other-keys)
936 (let* ((out (assoc-ref outputs "out"))
937 (bin (string-append out "/bin"))
938 (include (string-append out "/include"))
939 (python (assoc-ref inputs "python"))
941 (last (string-split python #\-)))
944 (take (string-split python-version #\.) 2)
946 (lib (string-append out "/lib/python"
950 (system* "python" "configure.py"
953 "--incdir" include))))))))
954 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
955 (synopsis "Python binding creator for C and C++ libraries")
957 "SIP is a tool to create Python bindings for C and C++ libraries. It
958 was originally developed to create PyQt, the Python bindings for the Qt
959 toolkit, but can be used to create bindings for any C or C++ library.
961 SIP comprises a code generator and a Python module. The code generator
962 processes a set of specification files and generates C or C++ code, which
963 is then compiled to create the bindings extension module. The SIP Python
964 module provides support functions to the automatically generated code.")
965 ;; There is a choice between a python like license, gpl2 and gpl3.
966 ;; For compatibility with pyqt, we need gpl3.
967 (license license:gpl3)))
969 (define-public python2-sip
970 (package (inherit python-sip)
973 `(("python" ,python-2)))))
975 (define-public python-pyqt
983 (string-append "mirror://sourceforge/pyqt/PyQt5/"
984 "PyQt-" version "/PyQt5_gpl-"
988 "1qgh42zsr9jppl9k7fcdbhxcd1wrb7wyaj9lng9nxfa19in1lj1f"))
989 (patches (search-patches "pyqt-configure.patch"))))
990 (build-system gnu-build-system)
992 `(("python-sip" ,python-sip)
993 ("qtbase" ,qtbase))) ; for qmake
995 `(("python" ,python-wrapper)))
997 `(#:modules ((srfi srfi-1)
998 ,@%gnu-build-system-modules)
1000 (modify-phases %standard-phases
1002 (lambda* (#:key inputs outputs #:allow-other-keys)
1003 (let* ((out (assoc-ref outputs "out"))
1004 (bin (string-append out "/bin"))
1005 (sip (string-append out "/share/sip"))
1006 (plugins (string-append out "/plugins"))
1007 (designer (string-append plugins "/designer"))
1008 (qml (string-append plugins "/PyQt5"))
1009 (python (assoc-ref inputs "python"))
1011 (last (string-split python #\-)))
1014 (take (string-split python-version #\.) 2)
1016 (lib (string-append out "/lib/python"
1019 (zero? (system* "python" "configure.py"
1023 "--designer-plugindir" designer
1024 "--qml-plugindir" qml
1025 "--sipdir" sip))))))))
1026 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1027 (synopsis "Python bindings for Qt")
1029 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1030 framework. The bindings are implemented as a set of Python modules and
1031 contain over 620 classes.")
1032 (license license:gpl3)))
1034 (define-public python2-pyqt
1035 (package (inherit python-pyqt)
1036 (name "python2-pyqt")
1038 `(("python-sip" ,python2-sip)
1039 ("qtbase" ,qtbase)))
1041 `(("python" ,python-2)))))
1043 (define-public python-pyqt-5.5
1044 (package (inherit python-pyqt)
1050 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1051 "PyQt-" version "/PyQt-gpl-"
1055 "056qmkv02wdcfblqdaxiswrgn4wa88sz22i1x58dpb1iniavplfd"))
1056 (patches (search-patches "pyqt-configure.patch"))))
1058 `(#:modules ((srfi srfi-1)
1059 ,@%gnu-build-system-modules)
1061 (modify-phases %standard-phases
1063 (lambda* (#:key inputs outputs #:allow-other-keys)
1064 (let* ((out (assoc-ref outputs "out"))
1065 (bin (string-append out "/bin"))
1066 (sip (string-append out "/share/sip"))
1067 (plugins (string-append out "/plugins"))
1068 (designer (string-append plugins "/designer"))
1069 (qml (string-append plugins "/PyQt5"))
1070 (python (assoc-ref inputs "python"))
1072 (last (string-split python #\-)))
1075 (take (string-split python-version #\.) 2)
1077 (lib (string-append out "/lib/python"
1080 (zero? (system* "python" "configure.py"
1084 "--designer-plugindir" designer
1085 "--qml-plugindir" qml
1086 "--sipdir" sip))))))))
1088 `(("python-sip" ,python-sip)
1091 (define-public python2-pyqt-5.5
1092 (package (inherit python-pyqt-5.5)
1093 (name "python2-pyqt")
1095 `(("python-sip" ,python2-sip)
1098 `(("python" ,python-2)))))
1100 (define-public python-pyqt-4
1101 (package (inherit python-pyqt)
1102 (name "python-pyqt")
1108 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1109 "PyQt-" version "/PyQt-x11-gpl-"
1113 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
1115 `(("python-sip" ,python-sip)
1118 `(#:tests? #f ; no check target
1119 #:modules ((srfi srfi-1)
1120 ,@%gnu-build-system-modules)
1124 (lambda* (#:key inputs outputs #:allow-other-keys)
1125 (let* ((out (assoc-ref outputs "out"))
1126 (bin (string-append out "/bin"))
1127 (sip (string-append out "/share/sip"))
1128 (python (assoc-ref inputs "python"))
1130 (last (string-split python #\-)))
1133 (take (string-split python-version #\.) 2)
1135 (lib (string-append out "/lib/python"
1138 (zero? (system* "python" "configure.py"
1144 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1146 (define-public python2-pyqt-4
1147 (package (inherit python-pyqt-4)
1148 (name "python2-pyqt")
1150 `(("python-sip" ,python2-sip)
1153 `(("python" ,python-2)))))
1155 (define-public qtkeychain
1162 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1163 "archive/v" version ".tar.gz"))
1164 (file-name (string-append name "-" version ".tar.gz"))
1166 (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
1167 (build-system cmake-build-system)
1169 `(("qttools" ,qttools)))
1171 `(("qtbase" ,qtbase)))
1173 `(#:tests? #f ; No tests included
1175 (modify-phases %standard-phases
1177 'configure 'set-qt-trans-dir
1179 (substitute* "CMakeLists.txt"
1180 (("\\$\\{qt_translations_dir\\}")
1181 "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
1182 (home-page "https://github.com/frankosterfeld/qtkeychain")
1183 (synopsis "Qt API to store passwords")
1185 "QtKeychain is a Qt library to store passwords and other secret data
1186 securely. It will not store any data unencrypted unless explicitly requested.")
1187 (license license:bsd-3)))
1197 (string-append "mirror://sourceforge/qwt/qwt/"
1198 version "/qwt-" version ".tar.bz2"))
1200 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1201 (build-system gnu-build-system)
1203 `(("qtbase" ,qtbase)
1205 ("qttools" ,qttools)))
1208 (modify-phases %standard-phases
1210 (lambda* (#:key outputs #:allow-other-keys)
1211 (let ((out (assoc-ref outputs "out")))
1212 (substitute* '("qwtconfig.pri")
1213 (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
1214 (zero? (system* "qmake")))))
1215 (add-after 'install 'install-documentation
1216 (lambda* (#:key outputs #:allow-other-keys)
1217 (let* ((out (assoc-ref outputs "out"))
1218 (man (string-append out "/share/man")))
1219 ;; Remove some incomplete manual pages.
1220 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1222 (copy-recursively "doc/man" man)
1224 (home-page "http://qwt.sourceforge.net")
1225 (synopsis "Qt widgets for plots, scales, dials and other technical software
1228 "The Qwt library contains widgets and components which are primarily useful
1229 for technical and scientific purposes. It includes a 2-D plotting widget,
1230 different kinds of sliders, and much more.")
1233 ;; The Qwt license is LGPL2.1 with some exceptions.
1234 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1235 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1236 license:lgpl2.1 license:gpl3))))
1238 (define-public qtwebkit
1245 (uri (string-append "http://download.qt.io/community_releases/"
1246 (version-major+minor version)
1247 "/" version "/qtwebkit-opensource-src-" version
1249 ;; Note: since Qt 5.6, Qt no longer officially supports qtwebkit:
1250 ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>.
1253 "1prlpl3zslzpr1iv7m3irvxjxn3v8nlxh21v9k2kaq4fpwy2b8y7"))))
1254 (build-system gnu-build-system)
1257 ("python" ,python-2.7)
1262 ("pkg-config" ,pkg-config)))
1265 ("libjpeg" ,libjpeg)
1267 ("libwebp" ,libwebp)
1269 ("fontconfig" ,fontconfig)
1270 ("libxrender", libxrender)
1272 ("qtdeclarative" ,qtdeclarative)
1273 ("qtmultimedia" ,qtmultimedia)
1274 ("libxml2" ,libxml2)
1275 ("libxslt" ,libxslt)
1277 ("libxcomposite" ,libxcomposite)))
1280 (modify-phases %standard-phases
1282 (lambda* (#:key outputs #:allow-other-keys)
1283 (let ((out (assoc-ref outputs "out")))
1285 (string-append (getcwd) "/Tools/qmake:"
1286 (getenv "QMAKEPATH")))
1287 (system* "qmake"))))
1288 ;; prevent webkit from trying to install into the qtbase store directory,
1289 ;; and replace references to the build directory in linker options:
1290 (add-before 'build 'patch-installpaths
1291 (lambda* (#:key outputs inputs #:allow-other-keys)
1292 (let* ((out (assoc-ref outputs "out"))
1293 (qtbase (assoc-ref inputs "qtbase"))
1295 (linkbuild (string-append "-L" builddir))
1296 (linkout (string-append "-L" out))
1301 (mf (string-append (dirname in) "/"
1303 ;; by default, these Makefiles are
1304 ;; generated during install, but we need
1305 ;; to generate them now
1306 (system* "qmake" in "-o" mf)
1308 '(("Source/api.pri" . "Makefile.api")
1309 ("Source/widgetsapi.pri"
1310 . "Makefile.widgetsapi")
1311 ("Source/WebKit2/WebProcess.pro"
1312 . "Makefile.WebProcess")
1313 ("Source/WebKit2/PluginProcess.pro"
1314 . "Makefile.PluginProcess")
1315 ("Source/WebKit/qt/declarative/public.pri"
1316 . "Makefile.declarative.public")
1317 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1318 . "Makefile.declarative.experimental")
1319 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
1321 ;; Order of qmake calls and substitutions matters here.
1322 (system* "qmake" "-prl" "Source/widgetsapi.pri"
1323 "-o" "Source/Makefile")
1324 (substitute* (find-files "lib" "libQt5.*\\.prl")
1325 ((linkbuild) linkout))
1326 (substitute* (find-files "lib"
1327 "libQt5WebKit.*\\.la")
1329 (string-append "libdir='" out "/lib'"))
1330 ((linkbuild) linkout))
1331 (substitute* (find-files "lib/pkgconfig"
1333 (((string-append "prefix=" qtbase))
1334 (string-append "prefix=" out))
1335 ((linkbuild) linkout))
1336 ;; Makefiles must be modified after .prl/.la/.pc
1337 ;; files, lest they get rebuilt:
1338 (substitute* makefiles
1339 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
1341 (((string-append "-Wl,-rpath," builddir))
1342 (string-append "-Wl,-rpath," out)))))))))
1343 (home-page "https://www.webkit.org")
1344 (synopsis "Web browser engine and classes to render and interact with web
1346 (description "QtWebKit provides a Web browser engine that makes it easy to
1347 embed content from the World Wide Web into your Qt application. At the same
1348 time Web content can be enhanced with native controls.")
1350 (license license:lgpl2.1+)))