fb242a01da99829d99320bc821e0968d76766365
[jackhill/guix/guix.git] / gnu / packages / qt.scm
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, 2017 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
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.
15 ;;;
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.
20 ;;;
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/>.
23
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 sdl)
59 #:use-module (gnu packages tls)
60 #:use-module (gnu packages xdisorg)
61 #:use-module (gnu packages xorg)
62 #:use-module (gnu packages xml))
63
64 (define-public grantlee
65 (package
66 (name "grantlee")
67 (version "5.1.0")
68 (source
69 (origin
70 (method url-fetch)
71 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
72 version ".tar.gz"))
73 (file-name (string-append name "-" version ".tar.gz"))
74 (sha256
75 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
76 (native-inputs
77 `(("doxygen" ,doxygen)))
78 (inputs
79 `(("qtbase" ,qtbase)
80 ("qtscript" ,qtscript)))
81 (build-system cmake-build-system)
82 (arguments
83 `(#:phases
84 (modify-phases %standard-phases
85 (replace 'check
86 (lambda _
87 (zero? (system* "ctest" ;; exclude 2 tests which require a display
88 "-E" "htmlbuildertest|plainmarkupbuildertest")))))))
89 (home-page "https://github.com/steveire/grantlee")
90 (synopsis "Libraries for text templating with Qt")
91 (description "Grantlee Templates can be used for theming and generation of
92 other text such as code. The syntax uses the syntax of the Django template
93 system, and the core design of Django is reused in Grantlee.")
94 (license license:lgpl2.0+)))
95
96 (define-public qt
97 (package
98 (name "qt")
99 (version "5.6.2")
100 (source (origin
101 (method url-fetch)
102 (uri
103 (string-append
104 "http://download.qt.io/official_releases/qt/"
105 (version-major+minor version)
106 "/" version
107 "/single/qt-everywhere-opensource-src-"
108 version ".tar.xz"))
109 (sha256
110 (base32
111 "1cw93mrlkqbwndfqyjpsvjzkpzi39px2is040xvk18mvg3y1prl3"))
112 (modules '((guix build utils)))
113 (snippet
114 '(begin
115 ;; Remove qtwebengine, which relies on a bundled copy of
116 ;; chromium. Not only does it fail compilation in qt 5.5:
117 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
118 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
119 ;; it might also pose security problems.
120 ;; Alternatively, we could use the "-skip qtwebengine"
121 ;; configuration option.
122 (delete-file-recursively "qtwebengine")
123 ;; Remove one of the two bundled harfbuzz copies in addition
124 ;; to passing "-system-harfbuzz".
125 (delete-file-recursively "qtbase/src/3rdparty/harfbuzz-ng")
126 ;; Remove the bundled sqlite copy in addition to
127 ;; passing "-system-sqlite".
128 (delete-file-recursively "qtbase/src/3rdparty/sqlite")))))
129 (build-system gnu-build-system)
130 (propagated-inputs
131 `(("mesa" ,mesa)))
132 (inputs
133 `(("alsa-lib" ,alsa-lib)
134 ("dbus" ,dbus)
135 ("cups" ,cups)
136 ("expat" ,expat)
137 ("fontconfig" ,fontconfig)
138 ("freetype" ,freetype)
139 ("glib" ,glib)
140 ("harfbuzz" ,harfbuzz)
141 ("icu4c" ,icu4c)
142 ("libjpeg" ,libjpeg)
143 ("libmng" ,libmng)
144 ("libpci" ,pciutils)
145 ("libpng" ,libpng)
146 ("libx11" ,libx11)
147 ("libxcomposite" ,libxcomposite)
148 ("libxcursor" ,libxcursor)
149 ("libxfixes" ,libxfixes)
150 ("libxi" ,libxi)
151 ("libxinerama" ,libxinerama)
152 ("libxkbcommon" ,libxkbcommon)
153 ("libxml2" ,libxml2)
154 ("libxrandr" ,libxrandr)
155 ("libxrender" ,libxrender)
156 ("libxslt" ,libxslt)
157 ("libxtst" ,libxtst)
158 ("mtdev" ,mtdev)
159 ("mysql" ,mysql)
160 ("nss" ,nss)
161 ("openssl" ,openssl)
162 ("postgresql" ,postgresql)
163 ("pulseaudio" ,pulseaudio)
164 ("pcre" ,pcre)
165 ("sqlite" ,sqlite)
166 ("udev" ,eudev)
167 ("unixodbc" ,unixodbc)
168 ("xcb-util" ,xcb-util)
169 ("xcb-util-image" ,xcb-util-image)
170 ("xcb-util-keysyms" ,xcb-util-keysyms)
171 ("xcb-util-renderutil" ,xcb-util-renderutil)
172 ("xcb-util-wm" ,xcb-util-wm)
173 ("zlib" ,zlib)))
174 (native-inputs
175 `(("bison" ,bison)
176 ("flex" ,flex)
177 ("gperf" ,gperf)
178 ("perl" ,perl)
179 ("pkg-config" ,pkg-config)
180 ("python" ,python-2)
181 ("ruby" ,ruby)
182 ("which" ,(@ (gnu packages base) which))))
183 (arguments
184 `(;; FIXME: Disabling parallel building is a quick hack to avoid the
185 ;; failure described in
186 ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
187 ;; A more structural fix is needed.
188 #:parallel-build? #f
189 #:phases
190 (modify-phases %standard-phases
191 (add-after 'configure 'patch-bin-sh
192 (lambda _
193 (substitute* '("qtbase/config.status"
194 "qtbase/configure"
195 "qtbase/mkspecs/features/qt_functions.prf"
196 "qtbase/qmake/library/qmakebuiltins.cpp")
197 (("/bin/sh") (which "sh")))
198 #t))
199 (replace 'configure
200 (lambda* (#:key outputs #:allow-other-keys)
201 (let ((out (assoc-ref outputs "out")))
202 (substitute* '("configure" "qtbase/configure")
203 (("/bin/pwd") (which "pwd")))
204 (substitute* "qtbase/src/corelib/global/global.pri"
205 (("/bin/ls") (which "ls")))
206 ;; do not pass "--enable-fast-install", which makes the
207 ;; configure process fail
208 (zero? (system*
209 "./configure"
210 "-verbose"
211 "-prefix" out
212 "-opensource"
213 "-confirm-license"
214 ;; Do not build examples; if desired, these could go
215 ;; into a separate output, but for the time being, we
216 ;; prefer to save the space and build time.
217 "-nomake" "examples"
218 ;; Most "-system-..." are automatic, but some use
219 ;; the bundled copy by default.
220 "-system-sqlite"
221 "-system-harfbuzz"
222 ;; explicitly link with openssl instead of dlopening it
223 "-openssl-linked"
224 ;; explicitly link with dbus instead of dlopening it
225 "-dbus-linked"
226 ;; drop special machine instructions not supported
227 ;; on all instances of the target
228 ,@(if (string-prefix? "x86_64"
229 (or (%current-target-system)
230 (%current-system)))
231 '()
232 '("-no-sse2"))
233 "-no-sse3"
234 "-no-ssse3"
235 "-no-sse4.1"
236 "-no-sse4.2"
237 "-no-avx"
238 "-no-avx2"
239 "-no-mips_dsp"
240 "-no-mips_dspr2"))))))))
241 (home-page "https://www.qt.io/")
242 (synopsis "Cross-platform GUI library")
243 (description "Qt is a cross-platform application and UI framework for
244 developers using C++ or QML, a CSS & JavaScript like language.")
245 (license license:lgpl2.1)
246
247 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
248 ;; see <http://hydra.gnu.org/build/112828>.
249 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
250 (supported-systems (delete "mips64el-linux" %supported-systems))))
251
252 (define-public qt-4
253 (package (inherit qt)
254 (version "4.8.7")
255 (source (origin
256 (method url-fetch)
257 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
258 (string-copy version 0 (string-rindex version #\.))
259 "/" version
260 "/qt-everywhere-opensource-src-"
261 version ".tar.gz"))
262 (sha256
263 (base32
264 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
265 (patches (search-patches "qt4-ldflags.patch"))
266 (modules '((guix build utils)))
267 (snippet
268 ;; Remove webkit module, which is not built.
269 '(delete-file-recursively "src/3rdparty/webkit"))))
270 (inputs `(,@(alist-delete "harfbuzz"
271 (alist-delete "libjpeg" (package-inputs qt)))
272 ("libjepg" ,libjpeg-8)
273 ("libsm" ,libsm)))
274
275 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
276 ;; but we can't make them a separate output because "out" and "examples"
277 ;; would refer to each other.
278 (outputs '("out" ;112MiB core + 37MiB examples
279 "doc")) ;280MiB of HTML + code
280 (arguments
281 `(#:phases
282 (modify-phases %standard-phases
283 (replace
284 'configure
285 (lambda* (#:key outputs #:allow-other-keys)
286 (let ((out (assoc-ref outputs "out"))
287 (doc (assoc-ref outputs "doc")))
288 (substitute* '("configure")
289 (("/bin/pwd") (which "pwd")))
290
291 (zero? (system*
292 "./configure"
293 "-verbose"
294 "-prefix" out
295 ;; Note: Don't pass '-docdir' since 'qmake' and
296 ;; libQtCore would record its value, thereby defeating
297 ;; the whole point of having a separate output.
298 "-datadir" (string-append out "/share/qt-" ,version
299 "/data")
300 "-importdir" (string-append out "/lib/qt-4"
301 "/imports")
302 "-plugindir" (string-append out "/lib/qt-4"
303 "/plugins")
304 "-translationdir" (string-append out "/share/qt-" ,version
305 "/translations")
306 "-demosdir" (string-append out "/share/qt-" ,version
307 "/demos")
308 "-examplesdir" (string-append out "/share/qt-" ,version
309 "/examples")
310 "-opensource"
311 "-confirm-license"
312 ;; explicitly link with dbus instead of dlopening it
313 "-dbus-linked"
314 ;; Skip the webkit module; it fails to build on armhf
315 ;; and, apart from that, may pose security risks.
316 "-no-webkit"
317 ;; drop special machine instructions not supported
318 ;; on all instances of the target
319 ,@(if (string-prefix? "x86_64"
320 (or (%current-target-system)
321 (%current-system)))
322 '()
323 '("-no-mmx"
324 "-no-3dnow"
325 "-no-sse"
326 "-no-sse2"))
327 "-no-sse3"
328 "-no-ssse3"
329 "-no-sse4.1"
330 "-no-sse4.2"
331 "-no-avx")))))
332 (add-after
333 'install 'move-doc
334 (lambda* (#:key outputs #:allow-other-keys)
335 ;; Because of qt4-documentation-path.patch, documentation ends up
336 ;; being installed in OUT. Move it to the right place.
337 (let* ((out (assoc-ref outputs "out"))
338 (doc (assoc-ref outputs "doc"))
339 (olddoc (string-append out "/doc"))
340 (docdir (string-append doc "/share/doc/qt-" ,version)))
341 (mkdir-p (dirname docdir))
342
343 ;; Note: We can't use 'rename-file' here because OUT and DOC are
344 ;; different "devices" due to bind-mounts.
345 (copy-recursively olddoc docdir)
346 (delete-file-recursively olddoc)
347 #t))))))))
348
349 (define-public qtbase
350 (package
351 (name "qtbase")
352 (version "5.7.1")
353 (source (origin
354 (method url-fetch)
355 (uri (string-append "https://download.qt.io/official_releases/qt/"
356 (version-major+minor version) "/" version
357 "/submodules/" name "-opensource-src-"
358 version ".tar.xz"))
359 (sha256
360 (base32
361 "0zjmcrmnnmaz1lr9wc5i6y565hsvl8ycn790ivqaz62dv54zbkgd"))
362 (modules '((guix build utils)))
363 (snippet
364 '(begin
365 ;; Remove one of the two bundled harfbuzz copies in addition
366 ;; to passing "-system-harfbuzz".
367 (delete-file-recursively "src/3rdparty/harfbuzz-ng")
368 ;; Remove the bundled sqlite copy in addition to
369 ;; passing "-system-sqlite".
370 (delete-file-recursively "src/3rdparty/sqlite")))))
371 (build-system gnu-build-system)
372 (propagated-inputs
373 `(("mesa" ,mesa)))
374 (inputs
375 `(("alsa-lib" ,alsa-lib)
376 ("cups" ,cups)
377 ("dbus" ,dbus)
378 ("eudev" ,eudev)
379 ("expat" ,expat)
380 ("fontconfig" ,fontconfig)
381 ("freetype" ,freetype)
382 ("glib" ,glib)
383 ("harfbuzz" ,harfbuzz)
384 ("icu4c" ,icu4c)
385 ("libinput" ,libinput)
386 ("libjpeg" ,libjpeg)
387 ("libmng" ,libmng)
388 ("libpng" ,libpng)
389 ("libx11" ,libx11)
390 ("libxcomposite" ,libxcomposite)
391 ("libxcursor" ,libxcursor)
392 ("libxfixes" ,libxfixes)
393 ("libxi" ,libxi)
394 ("libxinerama" ,libxinerama)
395 ("libxkbcommon" ,libxkbcommon)
396 ("libxml2" ,libxml2)
397 ("libxrandr" ,libxrandr)
398 ("libxrender" ,libxrender)
399 ("libxslt" ,libxslt)
400 ("libxtst" ,libxtst)
401 ("mtdev" ,mtdev)
402 ("mysql" ,mysql)
403 ("nss" ,nss)
404 ("openssl" ,openssl)
405 ("pcre" ,pcre)
406 ("postgresql" ,postgresql)
407 ("pulseaudio" ,pulseaudio)
408 ("sqlite" ,sqlite)
409 ("unixodbc" ,unixodbc)
410 ("xcb-util" ,xcb-util)
411 ("xcb-util-image" ,xcb-util-image)
412 ("xcb-util-keysyms" ,xcb-util-keysyms)
413 ("xcb-util-renderutil" ,xcb-util-renderutil)
414 ("xcb-util-wm" ,xcb-util-wm)
415 ("zlib" ,zlib)))
416 (native-inputs
417 `(("bison" ,bison)
418 ("flex" ,flex)
419 ("gperf" ,gperf)
420 ("perl" ,perl)
421 ("pkg-config" ,pkg-config)
422 ("python" ,python-2)
423 ("ruby" ,ruby)
424 ("which" ,(@ (gnu packages base) which))))
425 (arguments
426 `(#:phases
427 (modify-phases %standard-phases
428 (add-after 'configure 'patch-bin-sh
429 (lambda _
430 (substitute* '("config.status"
431 "configure"
432 "mkspecs/features/qt_functions.prf"
433 "qmake/library/qmakebuiltins.cpp")
434 (("/bin/sh") (which "sh")))
435 #t))
436 (replace 'configure
437 (lambda* (#:key outputs #:allow-other-keys)
438 (let ((out (assoc-ref outputs "out")))
439 (substitute* "configure"
440 (("/bin/pwd") (which "pwd")))
441 (substitute* "src/corelib/global/global.pri"
442 (("/bin/ls") (which "ls")))
443 ;; The configuration files for other Qt5 packages are searched
444 ;; through a call to "find_package" in Qt5Config.cmake, which
445 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
446 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
447 ;; components can be installed in different places.
448 (substitute* (find-files "." ".*\\.cmake")
449 (("NO_DEFAULT_PATH") ""))
450 ;; do not pass "--enable-fast-install", which makes the
451 ;; configure process fail
452 (zero? (system*
453 "./configure"
454 "-verbose"
455 "-prefix" out
456 "-opensource"
457 "-confirm-license"
458 ;; Do not build examples; if desired, these could go
459 ;; into a separate output, but for the time being, we
460 ;; prefer to save the space and build time.
461 "-nomake" "examples"
462 ;; Most "-system-..." are automatic, but some use
463 ;; the bundled copy by default.
464 "-system-sqlite"
465 "-system-harfbuzz"
466 ;; explicitly link with openssl instead of dlopening it
467 "-openssl-linked"
468 ;; explicitly link with dbus instead of dlopening it
469 "-dbus-linked"
470 ;; drop special machine instructions not supported
471 ;; on all instances of the target
472 ,@(if (string-prefix? "x86_64"
473 (or (%current-target-system)
474 (%current-system)))
475 '()
476 '("-no-sse2"))
477 "-no-sse3"
478 "-no-ssse3"
479 "-no-sse4.1"
480 "-no-sse4.2"
481 "-no-avx"
482 "-no-avx2"
483 "-no-mips_dsp"
484 "-no-mips_dspr2")))))
485 (add-after 'install 'patch-qt_config.prf
486 (lambda* (#:key outputs #:allow-other-keys)
487 (let* ((out (assoc-ref outputs "out"))
488 (qt_config.prf (string-append
489 out "/mkspecs/features/qt_config.prf")))
490 ;; For each Qt module, let `qmake' uses search paths in the
491 ;; module directory instead of all in QT_INSTALL_PREFIX.
492 (substitute* qt_config.prf
493 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
494 "$$replace(dir, mkspecs/modules, include)")
495 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
496 "$$replace(dir, mkspecs/modules, lib)")
497 (("\\$\\$\\[QT_HOST_LIBS\\]")
498 "$$replace(dir, mkspecs/modules, lib)")
499 (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
500 "$$replace(dir, mkspecs/modules, plugins)")
501 (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
502 "$$replace(dir, mkspecs/modules, libexec)")
503 (("\\$\\$\\[QT_INSTALL_BINS\\]")
504 "$$replace(dir, mkspecs/modules, bin)")
505 (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
506 "$$replace(dir, mkspecs/modules, imports)")
507 (("\\$\\$\\[QT_INSTALL_QML\\]")
508 "$$replace(dir, mkspecs/modules, qml)"))
509 #t))))))
510 (native-search-paths
511 (list (search-path-specification
512 (variable "QMAKEPATH")
513 (files '("")))
514 (search-path-specification
515 (variable "QML2_IMPORT_PATH")
516 (files '("qml")))
517 (search-path-specification
518 (variable "QT_PLUGIN_PATH")
519 (files '("plugins")))
520 (search-path-specification
521 (variable "XDG_DATA_DIRS")
522 (files '("share")))
523 (search-path-specification
524 (variable "XDG_CONFIG_DIRS")
525 (files '("etc/xdg")))))
526 (home-page "https://www.qt.io/")
527 (synopsis "Cross-platform GUI library")
528 (description "Qt is a cross-platform application and UI framework for
529 developers using C++ or QML, a CSS & JavaScript like language.")
530 (license (list license:lgpl2.1 license:lgpl3))))
531
532 (define-public qtsvg
533 (package (inherit qtbase)
534 (name "qtsvg")
535 (version "5.7.1")
536 (source (origin
537 (method url-fetch)
538 (uri (string-append "https://download.qt.io/official_releases/qt/"
539 (version-major+minor version) "/" version
540 "/submodules/" name "-opensource-src-"
541 version ".tar.xz"))
542 (sha256
543 (base32
544 "0irr9h566hl9nx8p919rz276zbfvvd6vqdb6i9g6b3piikdigw5h"))))
545 (propagated-inputs `())
546 (native-inputs `(("perl" ,perl)))
547 (inputs
548 `(("mesa" ,mesa)
549 ("qtbase" ,qtbase)
550 ("zlib" ,zlib)))
551 (arguments
552 `(#:phases
553 (modify-phases %standard-phases
554 (replace 'configure
555 (lambda* (#:key outputs #:allow-other-keys)
556 (let ((out (assoc-ref outputs "out")))
557 ;; Valid QT_BUILD_PARTS variables are:
558 ;; libs tools tests examples demos docs translations
559 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
560 (string-append "PREFIX=" out))))))
561 (add-before 'install 'fix-Makefiles
562 (lambda* (#:key inputs outputs #:allow-other-keys)
563 (let ((out (assoc-ref outputs "out"))
564 (qtbase (assoc-ref inputs "qtbase")))
565 (substitute* (find-files "." "Makefile")
566 (((string-append "INSTALL_ROOT)" qtbase))
567 (string-append "INSTALL_ROOT)" out)))
568 #t)))
569 (add-before 'check 'set-display
570 (lambda _
571 ;; make Qt render "offscreen", required for tests
572 (setenv "QT_QPA_PLATFORM" "offscreen")
573 #t)))))))
574
575 (define-public qtimageformats
576 (package (inherit qtsvg)
577 (name "qtimageformats")
578 (version "5.7.1")
579 (source (origin
580 (method url-fetch)
581 (uri (string-append "https://download.qt.io/official_releases/qt/"
582 (version-major+minor version) "/" version
583 "/submodules/" name "-opensource-src-"
584 version ".tar.xz"))
585 (sha256
586 (base32
587 "1x3p1xmw7spxa4bwriyrwsfrq31jabsdjsi5fras9y39naia55sg"))
588 (modules '((guix build utils)))
589 (snippet
590 '(begin
591 (delete-file-recursively "src/3rdparty")))))
592 (native-inputs `())
593 (inputs
594 `(("jasper" ,jasper)
595 ("libmng" ,libmng)
596 ("libtiff" ,libtiff)
597 ("libwebp" ,libwebp)
598 ("mesa" ,mesa)
599 ("qtbase" ,qtbase)
600 ("zlib" ,zlib)))))
601
602 (define-public qtx11extras
603 (package (inherit qtsvg)
604 (name "qtx11extras")
605 (version "5.7.1")
606 (source (origin
607 (method url-fetch)
608 (uri (string-append "https://download.qt.io/official_releases/qt/"
609 (version-major+minor version) "/" version
610 "/submodules/" name "-opensource-src-"
611 version ".tar.xz"))
612 (sha256
613 (base32
614 "09z49jm70f5i0gcdz9a16z00pg96x8pz7vri5wpirh3fqqn0qnjz"))))
615 (arguments
616 (substitute-keyword-arguments (package-arguments qtsvg)
617 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
618 (native-inputs `(("perl" ,perl)))
619 (inputs
620 `(("mesa" ,mesa)
621 ("qtbase" ,qtbase)))))
622
623 (define-public qtxmlpatterns
624 (package (inherit qtsvg)
625 (name "qtxmlpatterns")
626 (version "5.7.1")
627 (source (origin
628 (method url-fetch)
629 (uri (string-append "https://download.qt.io/official_releases/qt/"
630 (version-major+minor version) "/" version
631 "/submodules/" name "-opensource-src-"
632 version ".tar.xz"))
633 (sha256
634 (base32
635 "1rgqnpg64gn5agmvjwy0am8hp5fpxl3cdkixr1yrsdxi5a6961d8"))))
636 (arguments
637 (substitute-keyword-arguments (package-arguments qtsvg)
638 ((#:phases phases)
639 `(modify-phases ,phases
640 (add-after 'unpack 'disable-network-tests
641 (lambda _ (substitute* "tests/auto/auto.pro"
642 (("qxmlquery") "# qxmlquery")
643 (("xmlpatterns") "# xmlpatterns"))
644 #t))))))
645 (native-inputs `(("perl" ,perl)))
646 (inputs `(("qtbase" ,qtbase)))))
647
648 (define-public qtdeclarative
649 (package (inherit qtsvg)
650 (name "qtdeclarative")
651 (version "5.7.1")
652 (source (origin
653 (method url-fetch)
654 (uri (string-append "https://download.qt.io/official_releases/qt/"
655 (version-major+minor version) "/" version
656 "/submodules/" name "-opensource-src-"
657 version ".tar.xz"))
658 (sha256
659 (base32
660 "0mjxfwnplpx60jc6y94krg00isddl9bfwc7dayl981njb4qds4zx"))))
661 (arguments
662 (substitute-keyword-arguments (package-arguments qtsvg)
663 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
664 (native-inputs
665 `(("perl" ,perl)
666 ("pkg-config" ,pkg-config)
667 ("python" ,python-2)
668 ("qtsvg" ,qtsvg)
669 ("qtxmlpatterns" ,qtxmlpatterns)))
670 (inputs
671 `(("mesa" ,mesa)
672 ("qtbase" ,qtbase)))))
673
674 (define-public qtconnectivity
675 (package (inherit qtsvg)
676 (name "qtconnectivity")
677 (version "5.7.1")
678 (source (origin
679 (method url-fetch)
680 (uri (string-append "https://download.qt.io/official_releases/qt/"
681 (version-major+minor version) "/" version
682 "/submodules/" name "-opensource-src-"
683 version ".tar.xz"))
684 (sha256
685 (base32
686 "0rmr7bd4skby7bax9hpj2sid2bq3098nkw7xm02mdp04hc3bks5k"))))
687 (native-inputs
688 `(("perl" ,perl)
689 ("pkg-config" ,pkg-config)
690 ("qtdeclarative" ,qtdeclarative)))
691 (inputs
692 `(("bluez" ,bluez)
693 ("qtbase" ,qtbase)))))
694
695 (define-public qtwebsockets
696 (package (inherit qtsvg)
697 (name "qtwebsockets")
698 (version "5.7.1")
699 (source (origin
700 (method url-fetch)
701 (uri (string-append "https://download.qt.io/official_releases/qt/"
702 (version-major+minor version) "/" version
703 "/submodules/" name "-opensource-src-"
704 version ".tar.xz"))
705 (sha256
706 (base32
707 "1laj0slwibs0bg69kgrdhc9k1s6yisq3pcsr0r9rhbkzisv7aajw"))))
708 (arguments
709 (substitute-keyword-arguments (package-arguments qtsvg)
710 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
711 (native-inputs
712 `(("perl" ,perl)
713 ("qtdeclarative" ,qtdeclarative)))
714 (inputs `(("qtbase" ,qtbase)))))
715
716 (define-public qtsensors
717 (package (inherit qtsvg)
718 (name "qtsensors")
719 (version "5.7.1")
720 (source (origin
721 (method url-fetch)
722 (uri (string-append "https://download.qt.io/official_releases/qt/"
723 (version-major+minor version) "/" version
724 "/submodules/" name "-opensource-src-"
725 version ".tar.xz"))
726 (sha256
727 (base32
728 "041v1x8pwfzpyk6y0sy5zgm915pi15xdhiy18fd5wqayvcp99cyc"))))
729 (native-inputs
730 `(("perl" ,perl)
731 ("qtdeclarative" ,qtdeclarative)))
732 (inputs `(("qtbase" ,qtbase)))))
733
734 (define-public qtmultimedia
735 (package (inherit qtsvg)
736 (name "qtmultimedia")
737 (version "5.7.1")
738 (source (origin
739 (method url-fetch)
740 (uri (string-append "https://download.qt.io/official_releases/qt/"
741 (version-major+minor version) "/" version
742 "/submodules/" name "-opensource-src-"
743 version ".tar.xz"))
744 (sha256
745 (base32
746 "1vvxmgmvjnz9w1h2ph1j2fy77ij141ycx5fric60lq02pxzifax5"))
747 (modules '((guix build utils)))
748 (snippet
749 '(begin
750 (delete-file-recursively
751 "examples/multimedia/spectrum/3rdparty")
752 ;; We also prevent the spectrum example from being built.
753 (substitute* "examples/multimedia/multimedia.pro"
754 (("spectrum") "#"))))))
755 (arguments
756 (substitute-keyword-arguments (package-arguments qtsvg)
757 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
758 (native-inputs
759 `(("perl" ,perl)
760 ("pkg-config" ,pkg-config)
761 ("python" ,python-2)
762 ("qtdeclarative" ,qtdeclarative)))
763 (inputs
764 `(("alsa-lib" ,alsa-lib)
765 ("mesa" ,mesa)
766 ("pulseaudio" ,pulseaudio)
767 ("qtbase" ,qtbase)))))
768
769 (define-public qtwayland
770 (package (inherit qtsvg)
771 (name "qtwayland")
772 (version "5.7.1")
773 (source (origin
774 (method url-fetch)
775 (uri (string-append "https://download.qt.io/official_releases/qt/"
776 (version-major+minor version) "/" version
777 "/submodules/" name "-opensource-src-"
778 version ".tar.xz"))
779 (sha256
780 (base32
781 "1iq1c89y4ggq0dxjlf62jyhh8a9l3x7y914x84w5pby8h3hwagzj"))))
782 (native-inputs
783 `(("glib" ,glib)
784 ("perl" ,perl)
785 ("pkg-config" ,pkg-config)
786 ("qtdeclarative" ,qtdeclarative)))
787 (inputs
788 `(("fontconfig" ,fontconfig)
789 ("freetype" ,freetype)
790 ("libx11" ,libx11)
791 ("libxcomposite" ,libxcomposite)
792 ("libxext" ,libxext)
793 ("libxkbcommon" ,libxkbcommon)
794 ("libxrender" ,libxrender)
795 ("mesa" ,mesa)
796 ("mtdev" ,mtdev)
797 ("qtbase" ,qtbase)
798 ("wayland" ,wayland)))))
799
800 (define-public qtserialport
801 (package (inherit qtsvg)
802 (name "qtserialport")
803 (version "5.7.1")
804 (source (origin
805 (method url-fetch)
806 (uri (string-append "https://download.qt.io/official_releases/qt/"
807 (version-major+minor version) "/" version
808 "/submodules/" name "-opensource-src-"
809 version ".tar.xz"))
810 (sha256
811 (base32
812 "09jsryc0z49cz9783kq48rkn42f10c6krzivp812ddwjsfdy3mbn"))))
813 (native-inputs `(("perl" ,perl)))
814 (inputs
815 `(("qtbase" ,qtbase)
816 ("eudev" ,eudev)))))
817
818 (define-public qtserialbus
819 (package (inherit qtsvg)
820 (name "qtserialbus")
821 (version "5.7.1")
822 (source (origin
823 (method url-fetch)
824 (uri (string-append "https://download.qt.io/official_releases/qt/"
825 (version-major+minor version) "/" version
826 "/submodules/" name "-opensource-src-"
827 version ".tar.xz"))
828 (sha256
829 (base32
830 "0mxi43l2inpbar8rmg21qjg33bv3f1ycxjgvzjf12ncnybhdnzkj"))))
831 (inputs
832 `(("qtbase" ,qtbase)
833 ("qtserialport" ,qtserialport)))))
834
835 (define-public qtwebchannel
836 (package (inherit qtsvg)
837 (name "qtwebchannel")
838 (version "5.7.1")
839 (source (origin
840 (method url-fetch)
841 (uri (string-append "https://download.qt.io/official_releases/qt/"
842 (version-major+minor version) "/" version
843 "/submodules/" name "-opensource-src-"
844 version ".tar.xz"))
845 (sha256
846 (base32
847 "16rij92dxy4k5231l3dpmhy7cnz0cjkn50cpzaf014zrdz3kmav3"))))
848 (native-inputs
849 `(("perl" ,perl)
850 ("qtdeclarative" ,qtdeclarative)
851 ("qtwebsockets" ,qtwebsockets)))
852 (inputs `(("qtbase" ,qtbase)))))
853
854 (define-public qtlocation
855 (package (inherit qtsvg)
856 (name "qtlocation")
857 (version "5.7.1")
858 (source (origin
859 (method url-fetch)
860 (uri (string-append "https://download.qt.io/official_releases/qt/"
861 (version-major+minor version) "/" version
862 "/submodules/" name "-opensource-src-"
863 version ".tar.xz"))
864 (sha256
865 (base32
866 "17zkzffzwbg6aqhsggs23cmwzq4y45m938842lsc423hfm7fdsgr"))))
867 (arguments
868 (substitute-keyword-arguments (package-arguments qtsvg)
869 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
870 (native-inputs
871 `(("perl" ,perl)
872 ("qtdeclarative" ,qtdeclarative)
873 ("qtquickcontrols" ,qtquickcontrols)
874 ("qtserialport" ,qtserialport)))
875 (inputs `(("qtbase" ,qtbase)))))
876
877 (define-public qttools
878 (package (inherit qtsvg)
879 (name "qttools")
880 (version "5.7.1")
881 (source (origin
882 (method url-fetch)
883 (uri (string-append "https://download.qt.io/official_releases/qt/"
884 (version-major+minor version) "/" version
885 "/submodules/" name "-opensource-src-"
886 version ".tar.xz"))
887 (sha256
888 (base32
889 "1b6zqa5690b8lqms7rrhb8rcq0xg5hp117v3m08qngbcd0i706b4"))))
890 (arguments
891 (substitute-keyword-arguments (package-arguments qtsvg)
892 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
893 (native-inputs
894 `(("perl" ,perl)
895 ("qtdeclarative" ,qtdeclarative)))
896 (inputs
897 `(("mesa" ,mesa)
898 ("qtbase" ,qtbase)))))
899
900 (define-public qtscript
901 (package (inherit qtsvg)
902 (name "qtscript")
903 (version "5.7.1")
904 (source (origin
905 (method url-fetch)
906 (uri (string-append "https://download.qt.io/official_releases/qt/"
907 (version-major+minor version) "/" version
908 "/submodules/" name "-opensource-src-"
909 version ".tar.xz"))
910 (sha256
911 (base32
912 "09m41n95448pszr7inlg03ycb66s1a9hzfylaka92382acf1myav"))))
913 (native-inputs
914 `(("perl" ,perl)
915 ("qttools" ,qttools)))
916 (inputs
917 `(("qtbase" ,qtbase)))))
918
919 (define-public qtquickcontrols
920 (package (inherit qtsvg)
921 (name "qtquickcontrols")
922 (version "5.7.1")
923 (source (origin
924 (method url-fetch)
925 (uri (string-append "https://download.qt.io/official_releases/qt/"
926 (version-major+minor version) "/" version
927 "/submodules/" name "-opensource-src-"
928 version ".tar.xz"))
929 (sha256
930 (base32
931 "17cyfyqzjbm9dhq9pjscz36y84y16rmxwk6h826gjfprddrimsvg"))))
932 (arguments
933 (substitute-keyword-arguments (package-arguments qtsvg)
934 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
935 (inputs
936 `(("qtbase" ,qtbase)
937 ("qtdeclarative" ,qtdeclarative)))))
938
939 (define-public qtquickcontrols2
940 (package (inherit qtsvg)
941 (name "qtquickcontrols2")
942 (version "5.7.1")
943 (source (origin
944 (method url-fetch)
945 (uri (string-append "https://download.qt.io/official_releases/qt/"
946 (version-major+minor version) "/" version
947 "/submodules/" name "-opensource-src-"
948 version ".tar.xz"))
949 (sha256
950 (base32
951 "1v77ydy4k15lksp3bi2kgha2h7m79g4n7c2qhbr09xnvpb8ars7j"))))
952 (arguments
953 (substitute-keyword-arguments (package-arguments qtsvg)
954 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
955 (inputs
956 `(("qtbase" ,qtbase)
957 ("qtdeclarative" ,qtdeclarative)))))
958
959 (define-public qtgraphicaleffects
960 (package (inherit qtsvg)
961 (name "qtgraphicaleffects")
962 (version "5.7.1")
963 (source (origin
964 (method url-fetch)
965 (uri (string-append "https://download.qt.io/official_releases/qt/"
966 (version-major+minor version) "/" version
967 "/submodules/" name "-opensource-src-"
968 version ".tar.xz"))
969 (sha256
970 (base32
971 "1j2drnx7zp3w6cgvy7bn00fyk5v7vw1j1hidaqcg78lzb6zgls1c"))))
972 (arguments
973 (substitute-keyword-arguments (package-arguments qtsvg)
974 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
975 (inputs
976 `(("qtbase" ,qtbase)
977 ("qtdeclarative" ,qtdeclarative)))))
978
979 (define-public qtdeclarative-render2d
980 (package (inherit qtsvg)
981 (name "qtdeclarative-render2d")
982 (version "5.7.1")
983 (source (origin
984 (method url-fetch)
985 (uri (string-append "https://download.qt.io/official_releases/qt/"
986 (version-major+minor version) "/" version
987 "/submodules/" name "-opensource-src-"
988 version ".tar.xz"))
989 (sha256
990 (base32
991 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
992 (modules '((guix build utils)))
993 (snippet
994 '(delete-file-recursively "tools/opengldummy/3rdparty"))))
995 (native-inputs `())
996 (inputs
997 `(("qtbase" ,qtbase)
998 ("qtdeclarative" ,qtdeclarative)))))
999
1000 (define-public qtgamepad
1001 (package (inherit qtsvg)
1002 (name "qtgamepad")
1003 (version "5.7.1")
1004 (source (origin
1005 (method url-fetch)
1006 (uri (string-append "https://download.qt.io/official_releases/qt/"
1007 (version-major+minor version) "/" version
1008 "/submodules/" name "-opensource-src-"
1009 version ".tar.xz"))
1010 (sha256
1011 (base32
1012 "10lijbsg9xx5ddbbjymdgl41nxz99yn1qgiww2kkggxwwdjj2axv"))))
1013 (native-inputs
1014 `(("perl" ,perl)
1015 ("pkg-config" ,pkg-config)))
1016 (inputs
1017 `(("fontconfig" ,fontconfig)
1018 ("freetype" ,freetype)
1019 ("libxrender" ,libxrender)
1020 ("sdl2" ,sdl2)
1021 ("qtbase" ,qtbase)
1022 ("qtdeclarative" ,qtdeclarative)))))
1023
1024 (define-public qtscxml
1025 (package (inherit qtsvg)
1026 (name "qtscxml")
1027 (version "5.7.1")
1028 (source (origin
1029 (method url-fetch)
1030 (uri (string-append "https://download.qt.io/official_releases/qt/"
1031 (version-major+minor version) "/" version
1032 "/submodules/" name "-opensource-src-"
1033 version ".tar.xz"))
1034 (sha256
1035 (base32
1036 "135kknqdmib2cjryfmvfgv7a2qx9pyba3m7i7nkbc5d742r4mbcx"))
1037 (modules '((guix build utils)))
1038 (snippet
1039 '(begin
1040 (delete-file-recursively "tests/3rdparty")
1041 ;; the scion test refers to the bundled 3rd party test code.
1042 (substitute* "tests/auto/auto.pro"
1043 (("scion") "#"))))))
1044 (inputs
1045 `(("qtbase" ,qtbase)
1046 ("qtdeclarative" ,qtdeclarative)))))
1047
1048 (define-public qtpurchasing
1049 (package (inherit qtsvg)
1050 (name "qtpurchasing")
1051 (version "5.7.1")
1052 (source (origin
1053 (method url-fetch)
1054 (uri (string-append "https://download.qt.io/official_releases/qt/"
1055 (version-major+minor version) "/" version
1056 "/submodules/" name "-opensource-src-"
1057 version ".tar.xz"))
1058 (sha256
1059 (base32
1060 "0hkvrgafz1hx9q4yc3nskv3pd3fszghvvd5a7mj33ynf55wpb57n"))))
1061 (inputs
1062 `(("qtbase" ,qtbase)
1063 ("qtdeclarative" ,qtdeclarative)))))
1064
1065 (define-public qtcanvas3d
1066 (package (inherit qtsvg)
1067 (name "qtcanvas3d")
1068 (version "5.7.1")
1069 (source (origin
1070 (method url-fetch)
1071 (uri (string-append "https://download.qt.io/official_releases/qt/"
1072 (version-major+minor version) "/" version
1073 "/submodules/" name "-opensource-src-"
1074 version ".tar.xz"))
1075 (sha256
1076 (base32
1077 "1d5xpq3mhjg4ipxzap7s2vnlfcd02d3yq720npv10xxp2ww0i1x8"))
1078 (modules '((guix build utils)))
1079 (snippet
1080 '(delete-file-recursively "examples/canvas3d/3rdparty"))))
1081 (arguments
1082 (substitute-keyword-arguments (package-arguments qtsvg)
1083 ;; Building the tests depends on the bundled 3rd party javascript files,
1084 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1085 ;; fail, so we skip building them for now.
1086 ((#:phases phases)
1087 `(modify-phases ,phases
1088 (replace 'configure
1089 (lambda* (#:key outputs #:allow-other-keys)
1090 (let ((out (assoc-ref outputs "out")))
1091 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools"
1092 (string-append "PREFIX=" out))))))))
1093 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1094 (native-inputs `())
1095 (inputs
1096 `(("qtbase" ,qtbase)
1097 ("qtdeclarative" ,qtdeclarative)))))
1098
1099 (define-public qtcharts
1100 (package (inherit qtsvg)
1101 (name "qtcharts")
1102 (version "5.7.1")
1103 (source (origin
1104 (method url-fetch)
1105 (uri (string-append "https://download.qt.io/official_releases/qt/"
1106 (version-major+minor version) "/" version
1107 "/submodules/" name "-opensource-src-"
1108 version ".tar.xz"))
1109 (sha256
1110 (base32
1111 "1qrzcddwff2hxsbxrraff16j4abah2zkra2756s1mvydj9lyxzl5"))))
1112 (arguments
1113 (substitute-keyword-arguments (package-arguments qtsvg)
1114 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1115 (inputs
1116 `(("qtbase" ,qtbase)
1117 ("qtdeclarative" ,qtdeclarative)))))
1118
1119 (define-public qtdatavis3d
1120 (package (inherit qtsvg)
1121 (name "qtdatavis3d")
1122 (version "5.7.1")
1123 (source (origin
1124 (method url-fetch)
1125 (uri (string-append "https://download.qt.io/official_releases/qt/"
1126 (version-major+minor version) "/" version
1127 "/submodules/" name "-opensource-src-"
1128 version ".tar.xz"))
1129 (sha256
1130 (base32
1131 "1y00p0wyj5cw9c2925y537vpmmg9q3kpf7qr1s7sv67dvvf8bzqv"))))
1132 (arguments
1133 (substitute-keyword-arguments (package-arguments qtsvg)
1134 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1135 (inputs
1136 `(("qtbase" ,qtbase)
1137 ("qtdeclarative" ,qtdeclarative)))))
1138
1139 (define-public python-sip
1140 (package
1141 (name "python-sip")
1142 (version "4.18.1")
1143 (source
1144 (origin
1145 (method url-fetch)
1146 (uri
1147 (string-append "mirror://sourceforge/pyqt/sip/"
1148 "sip-" version "/sip-" version ".tar.gz"))
1149 (sha256
1150 (base32
1151 "1452zy3g0qv4fpd9c0y4gq437kn0xf7bbfniibv5n43zpwnpmklv"))))
1152 (build-system gnu-build-system)
1153 (native-inputs
1154 `(("python" ,python-wrapper)))
1155 (arguments
1156 `(#:tests? #f ; no check target
1157 #:modules ((srfi srfi-1)
1158 ,@%gnu-build-system-modules)
1159 #:phases
1160 (modify-phases %standard-phases
1161 (replace 'configure
1162 (lambda* (#:key inputs outputs #:allow-other-keys)
1163 (let* ((out (assoc-ref outputs "out"))
1164 (bin (string-append out "/bin"))
1165 (include (string-append out "/include"))
1166 (python (assoc-ref inputs "python"))
1167 (python-version
1168 (last (string-split python #\-)))
1169 (python-major+minor
1170 (string-join
1171 (take (string-split python-version #\.) 2)
1172 "."))
1173 (lib (string-append out "/lib/python"
1174 python-major+minor
1175 "/site-packages")))
1176 (zero?
1177 (system* "python" "configure.py"
1178 "--bindir" bin
1179 "--destdir" lib
1180 "--incdir" include))))))))
1181 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1182 (synopsis "Python binding creator for C and C++ libraries")
1183 (description
1184 "SIP is a tool to create Python bindings for C and C++ libraries. It
1185 was originally developed to create PyQt, the Python bindings for the Qt
1186 toolkit, but can be used to create bindings for any C or C++ library.
1187
1188 SIP comprises a code generator and a Python module. The code generator
1189 processes a set of specification files and generates C or C++ code, which
1190 is then compiled to create the bindings extension module. The SIP Python
1191 module provides support functions to the automatically generated code.")
1192 ;; There is a choice between a python like license, gpl2 and gpl3.
1193 ;; For compatibility with pyqt, we need gpl3.
1194 (license license:gpl3)))
1195
1196 (define-public python2-sip
1197 (package (inherit python-sip)
1198 (name "python2-sip")
1199 (native-inputs
1200 `(("python" ,python-2)))))
1201
1202 (define-public python-pyqt
1203 (package
1204 (name "python-pyqt")
1205 (version "5.7")
1206 (source
1207 (origin
1208 (method url-fetch)
1209 (uri
1210 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1211 "PyQt-" version "/PyQt5_gpl-"
1212 version ".tar.gz"))
1213 (sha256
1214 (base32
1215 "01avscn1bir0h8zzfh1jvpljgwg6qkax5nk142xrm63rbyx969l9"))
1216 (patches (search-patches "pyqt-configure.patch"))))
1217 (build-system gnu-build-system)
1218 (native-inputs
1219 `(("qtbase" ,qtbase))) ; for qmake
1220 (propagated-inputs
1221 `(("python-sip" ,python-sip)))
1222 (inputs
1223 `(("python" ,python-wrapper)
1224 ("qtbase" ,qtbase)
1225 ("qtconnectivity" ,qtconnectivity)
1226 ("qtdeclarative" ,qtdeclarative)
1227 ("qtlocation" ,qtlocation)
1228 ("qtmultimedia" ,qtmultimedia)
1229 ("qtsensors" ,qtsensors)
1230 ("qtserialport" ,qtserialport)
1231 ("qtsvg" ,qtsvg)
1232 ("qttools" ,qttools)
1233 ("qtwebchannel" ,qtwebchannel)
1234 ("qtwebkit" ,qtwebkit)
1235 ("qtwebsockets" ,qtwebsockets)
1236 ("qtx11extras" ,qtx11extras)
1237 ("qtxmlpatterns" ,qtxmlpatterns)))
1238 (arguments
1239 `(#:modules ((srfi srfi-1)
1240 ,@%gnu-build-system-modules)
1241 #:phases
1242 (modify-phases %standard-phases
1243 (replace 'configure
1244 (lambda* (#:key inputs outputs #:allow-other-keys)
1245 (let* ((out (assoc-ref outputs "out"))
1246 (bin (string-append out "/bin"))
1247 (sip (string-append out "/share/sip"))
1248 (plugins (string-append out "/plugins"))
1249 (designer (string-append plugins "/designer"))
1250 (qml (string-append plugins "/PyQt5"))
1251 (python (assoc-ref inputs "python"))
1252 (python-version
1253 (last (string-split python #\-)))
1254 (python-major+minor
1255 (string-join
1256 (take (string-split python-version #\.) 2)
1257 "."))
1258 (lib (string-append out "/lib/python"
1259 python-major+minor
1260 "/site-packages"))
1261 (stubs (string-append lib "/PyQt5")))
1262 (zero? (system* "python" "configure.py"
1263 "--confirm-license"
1264 "--bindir" bin
1265 "--destdir" lib
1266 "--designer-plugindir" designer
1267 "--qml-plugindir" qml
1268 ; Where to install the PEP 484 Type Hints stub
1269 ; files. Without this the stubs are tried to be
1270 ; installed into the python package's
1271 ; site-package directory, which is read-only.
1272 "--stubsdir" stubs
1273 "--sipdir" sip))))))))
1274 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1275 (synopsis "Python bindings for Qt")
1276 (description
1277 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1278 framework. The bindings are implemented as a set of Python modules and
1279 contain over 620 classes.")
1280 (license license:gpl3)))
1281
1282 (define-public python2-pyqt
1283 (package (inherit python-pyqt)
1284 (name "python2-pyqt")
1285 (native-inputs
1286 `(("python-sip" ,python2-sip)
1287 ("qtbase" ,qtbase)))
1288 (inputs
1289 `(("python" ,python-2)
1290 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1291
1292 (define-public python-pyqt-4
1293 (package (inherit python-pyqt)
1294 (name "python-pyqt")
1295 (version "4.11.4")
1296 (source
1297 (origin
1298 (method url-fetch)
1299 (uri
1300 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1301 "PyQt-" version "/PyQt-x11-gpl-"
1302 version ".tar.gz"))
1303 (sha256
1304 (base32
1305 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
1306 (native-inputs
1307 `(("python-sip" ,python-sip)
1308 ("qt" ,qt-4)))
1309 (inputs `(("python" ,python-wrapper)))
1310 (arguments
1311 `(#:tests? #f ; no check target
1312 #:modules ((srfi srfi-1)
1313 ,@%gnu-build-system-modules)
1314 #:phases
1315 (modify-phases %standard-phases
1316 (replace 'configure
1317 (lambda* (#:key inputs outputs #:allow-other-keys)
1318 (let* ((out (assoc-ref outputs "out"))
1319 (bin (string-append out "/bin"))
1320 (sip (string-append out "/share/sip"))
1321 (python (assoc-ref inputs "python"))
1322 (python-version
1323 (last (string-split python #\-)))
1324 (python-major+minor
1325 (string-join
1326 (take (string-split python-version #\.) 2)
1327 "."))
1328 (lib (string-append out "/lib/python"
1329 python-major+minor
1330 "/site-packages")))
1331 (zero? (system* "python" "configure.py"
1332 "--confirm-license"
1333 "--bindir" bin
1334 "--destdir" lib
1335 "--sipdir" sip))))))))
1336 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1337
1338 (define-public python2-pyqt-4
1339 (package (inherit python-pyqt-4)
1340 (name "python2-pyqt")
1341 (native-inputs
1342 `(("python-sip" ,python2-sip)
1343 ("qt" ,qt-4)))
1344 (inputs
1345 `(("python" ,python-2)))))
1346
1347 (define-public qtkeychain
1348 (package
1349 (name "qtkeychain")
1350 (version "0.7.0")
1351 (source
1352 (origin
1353 (method url-fetch)
1354 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1355 "archive/v" version ".tar.gz"))
1356 (file-name (string-append name "-" version ".tar.gz"))
1357 (sha256
1358 (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
1359 (build-system cmake-build-system)
1360 (native-inputs
1361 `(("qttools" ,qttools)))
1362 (inputs
1363 `(("qtbase" ,qtbase)))
1364 (arguments
1365 `(#:tests? #f ; No tests included
1366 #:phases
1367 (modify-phases %standard-phases
1368 (add-before
1369 'configure 'set-qt-trans-dir
1370 (lambda _
1371 (substitute* "CMakeLists.txt"
1372 (("\\$\\{qt_translations_dir\\}")
1373 "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
1374 (home-page "https://github.com/frankosterfeld/qtkeychain")
1375 (synopsis "Qt API to store passwords")
1376 (description
1377 "QtKeychain is a Qt library to store passwords and other secret data
1378 securely. It will not store any data unencrypted unless explicitly requested.")
1379 (license license:bsd-3)))
1380
1381 (define-public qwt
1382 (package
1383 (name "qwt")
1384 (version "6.1.3")
1385 (source
1386 (origin
1387 (method url-fetch)
1388 (uri
1389 (string-append "mirror://sourceforge/qwt/qwt/"
1390 version "/qwt-" version ".tar.bz2"))
1391 (sha256
1392 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1393 (build-system gnu-build-system)
1394 (inputs
1395 `(("qtbase" ,qtbase)
1396 ("qtsvg" ,qtsvg)
1397 ("qttools" ,qttools)))
1398 (arguments
1399 `(#:phases
1400 (modify-phases %standard-phases
1401 (replace 'configure
1402 (lambda* (#:key outputs #:allow-other-keys)
1403 (let ((out (assoc-ref outputs "out")))
1404 (substitute* '("qwtconfig.pri")
1405 (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
1406 (zero? (system* "qmake")))))
1407 (add-after 'install 'install-documentation
1408 (lambda* (#:key outputs #:allow-other-keys)
1409 (let* ((out (assoc-ref outputs "out"))
1410 (man (string-append out "/share/man")))
1411 ;; Remove some incomplete manual pages.
1412 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1413 (mkdir-p man)
1414 (copy-recursively "doc/man" man)
1415 #t))))))
1416 (home-page "http://qwt.sourceforge.net")
1417 (synopsis "Qt widgets for plots, scales, dials and other technical software
1418 GUI components")
1419 (description
1420 "The Qwt library contains widgets and components which are primarily useful
1421 for technical and scientific purposes. It includes a 2-D plotting widget,
1422 different kinds of sliders, and much more.")
1423 (license
1424 (list
1425 ;; The Qwt license is LGPL2.1 with some exceptions.
1426 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1427 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1428 license:lgpl2.1 license:gpl3))))
1429
1430 (define-public qtwebkit
1431 (package
1432 (name "qtwebkit")
1433 (version "5.7.1")
1434 (source
1435 (origin
1436 (method url-fetch)
1437 (uri (string-append "http://download.qt.io/community_releases/"
1438 (version-major+minor version)
1439 "/" version "/qtwebkit-opensource-src-" version
1440 ".tar.xz"))
1441 ;; Note: since Qt 5.6, Qt no longer officially supports qtwebkit:
1442 ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>.
1443 (sha256
1444 (base32
1445 "00szgcra6pf2myfjrdbsr1gmrxycpbjqlzkplna5yr1rjg4gfv54"))))
1446 (build-system gnu-build-system)
1447 (native-inputs
1448 `(("perl" ,perl)
1449 ("python" ,python-2.7)
1450 ("ruby" ,ruby)
1451 ("bison" ,bison)
1452 ("flex" ,flex)
1453 ("gperf" ,gperf)
1454 ("pkg-config" ,pkg-config)))
1455 (inputs
1456 `(("icu" ,icu4c)
1457 ("libjpeg" ,libjpeg)
1458 ("libpng" ,libpng)
1459 ("libwebp" ,libwebp)
1460 ("sqlite" ,sqlite)
1461 ("fontconfig" ,fontconfig)
1462 ("libxrender", libxrender)
1463 ("qtbase" ,qtbase)
1464 ("qtdeclarative" ,qtdeclarative)
1465 ("qtmultimedia" ,qtmultimedia)
1466 ("libxml2" ,libxml2)
1467 ("libxslt" ,libxslt)
1468 ("libx11" ,libx11)
1469 ("libxcomposite" ,libxcomposite)))
1470 (arguments
1471 `(#:phases
1472 (modify-phases %standard-phases
1473 (replace 'configure
1474 (lambda* (#:key outputs #:allow-other-keys)
1475 (let ((out (assoc-ref outputs "out")))
1476 (setenv "QMAKEPATH"
1477 (string-append (getcwd) "/Tools/qmake:"
1478 (getenv "QMAKEPATH")))
1479 (system* "qmake"))))
1480 ;; prevent webkit from trying to install into the qtbase store directory,
1481 ;; and replace references to the build directory in linker options:
1482 (add-before 'build 'patch-installpaths
1483 (lambda* (#:key outputs inputs #:allow-other-keys)
1484 (let* ((out (assoc-ref outputs "out"))
1485 (qtbase (assoc-ref inputs "qtbase"))
1486 (builddir (getcwd))
1487 (linkbuild (string-append "-L" builddir))
1488 (linkout (string-append "-L" out))
1489 (makefiles
1490 (map-in-order
1491 (lambda (i)
1492 (let* ((in (car i))
1493 (mf (string-append (dirname in) "/"
1494 (cdr i))))
1495 ;; by default, these Makefiles are
1496 ;; generated during install, but we need
1497 ;; to generate them now
1498 (system* "qmake" in "-o" mf)
1499 mf))
1500 '(("Source/api.pri" . "Makefile.api")
1501 ("Source/widgetsapi.pri"
1502 . "Makefile.widgetsapi")
1503 ("Source/WebKit2/WebProcess.pro"
1504 . "Makefile.WebProcess")
1505 ("Source/WebKit2/PluginProcess.pro"
1506 . "Makefile.PluginProcess")
1507 ("Source/WebKit/qt/declarative/public.pri"
1508 . "Makefile.declarative.public")
1509 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1510 . "Makefile.declarative.experimental")
1511 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
1512 . "Makefile")))))
1513 ;; Order of qmake calls and substitutions matters here.
1514 (system* "qmake" "-prl" "Source/widgetsapi.pri"
1515 "-o" "Source/Makefile")
1516 (substitute* (find-files "lib" "libQt5.*\\.prl")
1517 ((linkbuild) linkout))
1518 (substitute* (find-files "lib"
1519 "libQt5WebKit.*\\.la")
1520 (("libdir='.*'")
1521 (string-append "libdir='" out "/lib'"))
1522 ((linkbuild) linkout))
1523 (substitute* (find-files "lib/pkgconfig"
1524 "Qt5WebKit.*\\.pc")
1525 (((string-append "prefix=" qtbase))
1526 (string-append "prefix=" out))
1527 ((linkbuild) linkout))
1528 ;; Makefiles must be modified after .prl/.la/.pc
1529 ;; files, lest they get rebuilt:
1530 (substitute* makefiles
1531 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
1532 out )
1533 (((string-append "-Wl,-rpath," builddir))
1534 (string-append "-Wl,-rpath," out)))))))))
1535 (home-page "https://www.webkit.org")
1536 (synopsis "Web browser engine and classes to render and interact with web
1537 content")
1538 (description "QtWebKit provides a Web browser engine that makes it easy to
1539 embed content from the World Wide Web into your Qt application. At the same
1540 time Web content can be enhanced with native controls.")
1541
1542 (license license:lgpl2.1+)))
1543
1544 (define-public dotherside
1545 (package
1546 (name "dotherside")
1547 (version "0.5.2")
1548 (source
1549 (origin
1550 (method url-fetch)
1551 (uri (string-append "https://github.com/filcuc/DOtherSide/"
1552 "archive/v" version ".tar.gz"))
1553 (file-name (string-append name "-" version ".tar.gz"))
1554 (sha256
1555 (base32
1556 "0pqlrvy4ajjir80ra79ka3n0rjj0ir0f0m91cq86iz3nnw8w148z"))))
1557 (build-system cmake-build-system)
1558 (native-inputs
1559 `(("qttools" ,qttools)))
1560 (inputs
1561 `(("qtbase" ,qtbase)
1562 ("qtdeclarative" ,qtdeclarative)))
1563 (home-page "https://github.com/frankosterfeld/qtkeychain")
1564 (synopsis "C language library for creating bindings for the Qt QML language")
1565 (description
1566 "DOtherSide is a C language library for creating bindings for the
1567 QT QML language. The following features are implementable from
1568 a binding language:
1569 @itemize
1570 @item Creating custom QObject
1571 @item Creating custom QAbstractListModels
1572 @item Creating custom properties, signals and slots
1573 @item Creating from QML QObject defined in the binded language
1574 @item Creating from Singleton QML QObject defined in the binded language
1575 @end itemize\n")
1576 (license license:lgpl3))) ;version 3 only (+ exception)