gnu: python-pandas: Fix build on 32-bit.
[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 (setenv "QT_QPA_PLATFORM" "offscreen")
572 #t)))))))
573
574 (define-public qtimageformats
575 (package (inherit qtsvg)
576 (name "qtimageformats")
577 (version "5.7.1")
578 (source (origin
579 (method url-fetch)
580 (uri (string-append "https://download.qt.io/official_releases/qt/"
581 (version-major+minor version) "/" version
582 "/submodules/" name "-opensource-src-"
583 version ".tar.xz"))
584 (sha256
585 (base32
586 "1x3p1xmw7spxa4bwriyrwsfrq31jabsdjsi5fras9y39naia55sg"))
587 (modules '((guix build utils)))
588 (snippet
589 '(begin
590 (delete-file-recursively "src/3rdparty")))))
591 (native-inputs `())
592 (inputs
593 `(("jasper" ,jasper)
594 ("libmng" ,libmng)
595 ("libtiff" ,libtiff)
596 ("libwebp" ,libwebp)
597 ("mesa" ,mesa)
598 ("qtbase" ,qtbase)
599 ("zlib" ,zlib)))))
600
601 (define-public qtx11extras
602 (package (inherit qtsvg)
603 (name "qtx11extras")
604 (version "5.7.1")
605 (source (origin
606 (method url-fetch)
607 (uri (string-append "https://download.qt.io/official_releases/qt/"
608 (version-major+minor version) "/" version
609 "/submodules/" name "-opensource-src-"
610 version ".tar.xz"))
611 (sha256
612 (base32
613 "09z49jm70f5i0gcdz9a16z00pg96x8pz7vri5wpirh3fqqn0qnjz"))))
614 (arguments
615 (substitute-keyword-arguments (package-arguments qtsvg)
616 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
617 (native-inputs `(("perl" ,perl)))
618 (inputs
619 `(("mesa" ,mesa)
620 ("qtbase" ,qtbase)))))
621
622 (define-public qtxmlpatterns
623 (package (inherit qtsvg)
624 (name "qtxmlpatterns")
625 (version "5.7.1")
626 (source (origin
627 (method url-fetch)
628 (uri (string-append "https://download.qt.io/official_releases/qt/"
629 (version-major+minor version) "/" version
630 "/submodules/" name "-opensource-src-"
631 version ".tar.xz"))
632 (sha256
633 (base32
634 "1rgqnpg64gn5agmvjwy0am8hp5fpxl3cdkixr1yrsdxi5a6961d8"))))
635 (arguments
636 (substitute-keyword-arguments (package-arguments qtsvg)
637 ((#:phases phases)
638 `(modify-phases ,phases
639 (add-after 'unpack 'disable-network-tests
640 (lambda _ (substitute* "tests/auto/auto.pro"
641 (("qxmlquery") "# qxmlquery")
642 (("xmlpatterns") "# xmlpatterns"))
643 #t))))))
644 (native-inputs `(("perl" ,perl)))
645 (inputs `(("qtbase" ,qtbase)))))
646
647 (define-public qtdeclarative
648 (package (inherit qtsvg)
649 (name "qtdeclarative")
650 (version "5.7.1")
651 (source (origin
652 (method url-fetch)
653 (uri (string-append "https://download.qt.io/official_releases/qt/"
654 (version-major+minor version) "/" version
655 "/submodules/" name "-opensource-src-"
656 version ".tar.xz"))
657 (sha256
658 (base32
659 "0mjxfwnplpx60jc6y94krg00isddl9bfwc7dayl981njb4qds4zx"))))
660 (arguments
661 (substitute-keyword-arguments (package-arguments qtsvg)
662 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
663 (native-inputs
664 `(("perl" ,perl)
665 ("pkg-config" ,pkg-config)
666 ("python" ,python-2)
667 ("qtsvg" ,qtsvg)
668 ("qtxmlpatterns" ,qtxmlpatterns)))
669 (inputs
670 `(("mesa" ,mesa)
671 ("qtbase" ,qtbase)))))
672
673 (define-public qtconnectivity
674 (package (inherit qtsvg)
675 (name "qtconnectivity")
676 (version "5.7.1")
677 (source (origin
678 (method url-fetch)
679 (uri (string-append "https://download.qt.io/official_releases/qt/"
680 (version-major+minor version) "/" version
681 "/submodules/" name "-opensource-src-"
682 version ".tar.xz"))
683 (sha256
684 (base32
685 "0rmr7bd4skby7bax9hpj2sid2bq3098nkw7xm02mdp04hc3bks5k"))))
686 (native-inputs
687 `(("perl" ,perl)
688 ("pkg-config" ,pkg-config)
689 ("qtdeclarative" ,qtdeclarative)))
690 (inputs
691 `(("bluez" ,bluez)
692 ("qtbase" ,qtbase)))))
693
694 (define-public qtwebsockets
695 (package (inherit qtsvg)
696 (name "qtwebsockets")
697 (version "5.7.1")
698 (source (origin
699 (method url-fetch)
700 (uri (string-append "https://download.qt.io/official_releases/qt/"
701 (version-major+minor version) "/" version
702 "/submodules/" name "-opensource-src-"
703 version ".tar.xz"))
704 (sha256
705 (base32
706 "1laj0slwibs0bg69kgrdhc9k1s6yisq3pcsr0r9rhbkzisv7aajw"))))
707 (arguments
708 (substitute-keyword-arguments (package-arguments qtsvg)
709 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
710 (native-inputs
711 `(("perl" ,perl)
712 ("qtdeclarative" ,qtdeclarative)))
713 (inputs `(("qtbase" ,qtbase)))))
714
715 (define-public qtsensors
716 (package (inherit qtsvg)
717 (name "qtsensors")
718 (version "5.7.1")
719 (source (origin
720 (method url-fetch)
721 (uri (string-append "https://download.qt.io/official_releases/qt/"
722 (version-major+minor version) "/" version
723 "/submodules/" name "-opensource-src-"
724 version ".tar.xz"))
725 (sha256
726 (base32
727 "041v1x8pwfzpyk6y0sy5zgm915pi15xdhiy18fd5wqayvcp99cyc"))))
728 (native-inputs
729 `(("perl" ,perl)
730 ("qtdeclarative" ,qtdeclarative)))
731 (inputs `(("qtbase" ,qtbase)))))
732
733 (define-public qtmultimedia
734 (package (inherit qtsvg)
735 (name "qtmultimedia")
736 (version "5.7.1")
737 (source (origin
738 (method url-fetch)
739 (uri (string-append "https://download.qt.io/official_releases/qt/"
740 (version-major+minor version) "/" version
741 "/submodules/" name "-opensource-src-"
742 version ".tar.xz"))
743 (sha256
744 (base32
745 "1vvxmgmvjnz9w1h2ph1j2fy77ij141ycx5fric60lq02pxzifax5"))
746 (modules '((guix build utils)))
747 (snippet
748 '(begin
749 (delete-file-recursively
750 "examples/multimedia/spectrum/3rdparty")
751 ;; We also prevent the spectrum example from being built.
752 (substitute* "examples/multimedia/multimedia.pro"
753 (("spectrum") "#"))))))
754 (arguments
755 (substitute-keyword-arguments (package-arguments qtsvg)
756 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
757 (native-inputs
758 `(("perl" ,perl)
759 ("pkg-config" ,pkg-config)
760 ("python" ,python-2)
761 ("qtdeclarative" ,qtdeclarative)))
762 (inputs
763 `(("alsa-lib" ,alsa-lib)
764 ("mesa" ,mesa)
765 ("pulseaudio" ,pulseaudio)
766 ("qtbase" ,qtbase)))))
767
768 (define-public qtwayland
769 (package (inherit qtsvg)
770 (name "qtwayland")
771 (version "5.7.1")
772 (source (origin
773 (method url-fetch)
774 (uri (string-append "https://download.qt.io/official_releases/qt/"
775 (version-major+minor version) "/" version
776 "/submodules/" name "-opensource-src-"
777 version ".tar.xz"))
778 (sha256
779 (base32
780 "1iq1c89y4ggq0dxjlf62jyhh8a9l3x7y914x84w5pby8h3hwagzj"))))
781 (native-inputs
782 `(("glib" ,glib)
783 ("perl" ,perl)
784 ("pkg-config" ,pkg-config)
785 ("qtdeclarative" ,qtdeclarative)))
786 (inputs
787 `(("fontconfig" ,fontconfig)
788 ("freetype" ,freetype)
789 ("libx11" ,libx11)
790 ("libxcomposite" ,libxcomposite)
791 ("libxext" ,libxext)
792 ("libxkbcommon" ,libxkbcommon)
793 ("libxrender" ,libxrender)
794 ("mesa" ,mesa)
795 ("mtdev" ,mtdev)
796 ("qtbase" ,qtbase)
797 ("wayland" ,wayland)))))
798
799 (define-public qtserialport
800 (package (inherit qtsvg)
801 (name "qtserialport")
802 (version "5.7.1")
803 (source (origin
804 (method url-fetch)
805 (uri (string-append "https://download.qt.io/official_releases/qt/"
806 (version-major+minor version) "/" version
807 "/submodules/" name "-opensource-src-"
808 version ".tar.xz"))
809 (sha256
810 (base32
811 "09jsryc0z49cz9783kq48rkn42f10c6krzivp812ddwjsfdy3mbn"))))
812 (native-inputs `(("perl" ,perl)))
813 (inputs
814 `(("qtbase" ,qtbase)
815 ("eudev" ,eudev)))))
816
817 (define-public qtserialbus
818 (package (inherit qtsvg)
819 (name "qtserialbus")
820 (version "5.7.1")
821 (source (origin
822 (method url-fetch)
823 (uri (string-append "https://download.qt.io/official_releases/qt/"
824 (version-major+minor version) "/" version
825 "/submodules/" name "-opensource-src-"
826 version ".tar.xz"))
827 (sha256
828 (base32
829 "0mxi43l2inpbar8rmg21qjg33bv3f1ycxjgvzjf12ncnybhdnzkj"))))
830 (inputs
831 `(("qtbase" ,qtbase)
832 ("qtserialport" ,qtserialport)))))
833
834 (define-public qtwebchannel
835 (package (inherit qtsvg)
836 (name "qtwebchannel")
837 (version "5.7.1")
838 (source (origin
839 (method url-fetch)
840 (uri (string-append "https://download.qt.io/official_releases/qt/"
841 (version-major+minor version) "/" version
842 "/submodules/" name "-opensource-src-"
843 version ".tar.xz"))
844 (sha256
845 (base32
846 "16rij92dxy4k5231l3dpmhy7cnz0cjkn50cpzaf014zrdz3kmav3"))))
847 (native-inputs
848 `(("perl" ,perl)
849 ("qtdeclarative" ,qtdeclarative)
850 ("qtwebsockets" ,qtwebsockets)))
851 (inputs `(("qtbase" ,qtbase)))))
852
853 (define-public qtlocation
854 (package (inherit qtsvg)
855 (name "qtlocation")
856 (version "5.7.1")
857 (source (origin
858 (method url-fetch)
859 (uri (string-append "https://download.qt.io/official_releases/qt/"
860 (version-major+minor version) "/" version
861 "/submodules/" name "-opensource-src-"
862 version ".tar.xz"))
863 (sha256
864 (base32
865 "17zkzffzwbg6aqhsggs23cmwzq4y45m938842lsc423hfm7fdsgr"))))
866 (arguments
867 (substitute-keyword-arguments (package-arguments qtsvg)
868 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
869 (native-inputs
870 `(("perl" ,perl)
871 ("qtdeclarative" ,qtdeclarative)
872 ("qtquickcontrols" ,qtquickcontrols)
873 ("qtserialport" ,qtserialport)))
874 (inputs `(("qtbase" ,qtbase)))))
875
876 (define-public qttools
877 (package (inherit qtsvg)
878 (name "qttools")
879 (version "5.7.1")
880 (source (origin
881 (method url-fetch)
882 (uri (string-append "https://download.qt.io/official_releases/qt/"
883 (version-major+minor version) "/" version
884 "/submodules/" name "-opensource-src-"
885 version ".tar.xz"))
886 (sha256
887 (base32
888 "1b6zqa5690b8lqms7rrhb8rcq0xg5hp117v3m08qngbcd0i706b4"))))
889 (arguments
890 (substitute-keyword-arguments (package-arguments qtsvg)
891 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
892 (native-inputs
893 `(("perl" ,perl)
894 ("qtdeclarative" ,qtdeclarative)))
895 (inputs
896 `(("mesa" ,mesa)
897 ("qtbase" ,qtbase)))))
898
899 (define-public qtscript
900 (package (inherit qtsvg)
901 (name "qtscript")
902 (version "5.7.1")
903 (source (origin
904 (method url-fetch)
905 (uri (string-append "https://download.qt.io/official_releases/qt/"
906 (version-major+minor version) "/" version
907 "/submodules/" name "-opensource-src-"
908 version ".tar.xz"))
909 (sha256
910 (base32
911 "09m41n95448pszr7inlg03ycb66s1a9hzfylaka92382acf1myav"))))
912 (native-inputs
913 `(("perl" ,perl)
914 ("qttools" ,qttools)))
915 (inputs
916 `(("qtbase" ,qtbase)))))
917
918 (define-public qtquickcontrols
919 (package (inherit qtsvg)
920 (name "qtquickcontrols")
921 (version "5.7.1")
922 (source (origin
923 (method url-fetch)
924 (uri (string-append "https://download.qt.io/official_releases/qt/"
925 (version-major+minor version) "/" version
926 "/submodules/" name "-opensource-src-"
927 version ".tar.xz"))
928 (sha256
929 (base32
930 "17cyfyqzjbm9dhq9pjscz36y84y16rmxwk6h826gjfprddrimsvg"))))
931 (arguments
932 (substitute-keyword-arguments (package-arguments qtsvg)
933 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
934 (inputs
935 `(("qtbase" ,qtbase)
936 ("qtdeclarative" ,qtdeclarative)))))
937
938 (define-public qtquickcontrols2
939 (package (inherit qtsvg)
940 (name "qtquickcontrols2")
941 (version "5.7.1")
942 (source (origin
943 (method url-fetch)
944 (uri (string-append "https://download.qt.io/official_releases/qt/"
945 (version-major+minor version) "/" version
946 "/submodules/" name "-opensource-src-"
947 version ".tar.xz"))
948 (sha256
949 (base32
950 "1v77ydy4k15lksp3bi2kgha2h7m79g4n7c2qhbr09xnvpb8ars7j"))))
951 (arguments
952 (substitute-keyword-arguments (package-arguments qtsvg)
953 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
954 (inputs
955 `(("qtbase" ,qtbase)
956 ("qtdeclarative" ,qtdeclarative)))))
957
958 (define-public qtgraphicaleffects
959 (package (inherit qtsvg)
960 (name "qtgraphicaleffects")
961 (version "5.7.1")
962 (source (origin
963 (method url-fetch)
964 (uri (string-append "https://download.qt.io/official_releases/qt/"
965 (version-major+minor version) "/" version
966 "/submodules/" name "-opensource-src-"
967 version ".tar.xz"))
968 (sha256
969 (base32
970 "1j2drnx7zp3w6cgvy7bn00fyk5v7vw1j1hidaqcg78lzb6zgls1c"))))
971 (arguments
972 (substitute-keyword-arguments (package-arguments qtsvg)
973 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
974 (inputs
975 `(("qtbase" ,qtbase)
976 ("qtdeclarative" ,qtdeclarative)))))
977
978 (define-public qtdeclarative-render2d
979 (package (inherit qtsvg)
980 (name "qtdeclarative-render2d")
981 (version "5.7.1")
982 (source (origin
983 (method url-fetch)
984 (uri (string-append "https://download.qt.io/official_releases/qt/"
985 (version-major+minor version) "/" version
986 "/submodules/" name "-opensource-src-"
987 version ".tar.xz"))
988 (sha256
989 (base32
990 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
991 (modules '((guix build utils)))
992 (snippet
993 '(delete-file-recursively "tools/opengldummy/3rdparty"))))
994 (native-inputs `())
995 (inputs
996 `(("qtbase" ,qtbase)
997 ("qtdeclarative" ,qtdeclarative)))))
998
999 (define-public qtgamepad
1000 (package (inherit qtsvg)
1001 (name "qtgamepad")
1002 (version "5.7.1")
1003 (source (origin
1004 (method url-fetch)
1005 (uri (string-append "https://download.qt.io/official_releases/qt/"
1006 (version-major+minor version) "/" version
1007 "/submodules/" name "-opensource-src-"
1008 version ".tar.xz"))
1009 (sha256
1010 (base32
1011 "10lijbsg9xx5ddbbjymdgl41nxz99yn1qgiww2kkggxwwdjj2axv"))))
1012 (native-inputs
1013 `(("perl" ,perl)
1014 ("pkg-config" ,pkg-config)))
1015 (inputs
1016 `(("fontconfig" ,fontconfig)
1017 ("freetype" ,freetype)
1018 ("libxrender" ,libxrender)
1019 ("sdl2" ,sdl2)
1020 ("qtbase" ,qtbase)
1021 ("qtdeclarative" ,qtdeclarative)))))
1022
1023 (define-public qtscxml
1024 (package (inherit qtsvg)
1025 (name "qtscxml")
1026 (version "5.7.1")
1027 (source (origin
1028 (method url-fetch)
1029 (uri (string-append "https://download.qt.io/official_releases/qt/"
1030 (version-major+minor version) "/" version
1031 "/submodules/" name "-opensource-src-"
1032 version ".tar.xz"))
1033 (sha256
1034 (base32
1035 "135kknqdmib2cjryfmvfgv7a2qx9pyba3m7i7nkbc5d742r4mbcx"))
1036 (modules '((guix build utils)))
1037 (snippet
1038 '(begin
1039 (delete-file-recursively "tests/3rdparty")
1040 ;; the scion test refers to the bundled 3rd party test code.
1041 (substitute* "tests/auto/auto.pro"
1042 (("scion") "#"))))))
1043 (inputs
1044 `(("qtbase" ,qtbase)
1045 ("qtdeclarative" ,qtdeclarative)))))
1046
1047 (define-public qtpurchasing
1048 (package (inherit qtsvg)
1049 (name "qtpurchasing")
1050 (version "5.7.1")
1051 (source (origin
1052 (method url-fetch)
1053 (uri (string-append "https://download.qt.io/official_releases/qt/"
1054 (version-major+minor version) "/" version
1055 "/submodules/" name "-opensource-src-"
1056 version ".tar.xz"))
1057 (sha256
1058 (base32
1059 "0hkvrgafz1hx9q4yc3nskv3pd3fszghvvd5a7mj33ynf55wpb57n"))))
1060 (inputs
1061 `(("qtbase" ,qtbase)
1062 ("qtdeclarative" ,qtdeclarative)))))
1063
1064 (define-public qtcanvas3d
1065 (package (inherit qtsvg)
1066 (name "qtcanvas3d")
1067 (version "5.7.1")
1068 (source (origin
1069 (method url-fetch)
1070 (uri (string-append "https://download.qt.io/official_releases/qt/"
1071 (version-major+minor version) "/" version
1072 "/submodules/" name "-opensource-src-"
1073 version ".tar.xz"))
1074 (sha256
1075 (base32
1076 "1d5xpq3mhjg4ipxzap7s2vnlfcd02d3yq720npv10xxp2ww0i1x8"))
1077 (modules '((guix build utils)))
1078 (snippet
1079 '(delete-file-recursively "examples/canvas3d/3rdparty"))))
1080 (arguments
1081 (substitute-keyword-arguments (package-arguments qtsvg)
1082 ;; Building the tests depends on the bundled 3rd party javascript files,
1083 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1084 ;; fail, so we skip building them for now.
1085 ((#:phases phases)
1086 `(modify-phases ,phases
1087 (replace 'configure
1088 (lambda* (#:key outputs #:allow-other-keys)
1089 (let ((out (assoc-ref outputs "out")))
1090 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools"
1091 (string-append "PREFIX=" out))))))))
1092 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1093 (native-inputs `())
1094 (inputs
1095 `(("qtbase" ,qtbase)
1096 ("qtdeclarative" ,qtdeclarative)))))
1097
1098 (define-public qtcharts
1099 (package (inherit qtsvg)
1100 (name "qtcharts")
1101 (version "5.7.1")
1102 (source (origin
1103 (method url-fetch)
1104 (uri (string-append "https://download.qt.io/official_releases/qt/"
1105 (version-major+minor version) "/" version
1106 "/submodules/" name "-opensource-src-"
1107 version ".tar.xz"))
1108 (sha256
1109 (base32
1110 "1qrzcddwff2hxsbxrraff16j4abah2zkra2756s1mvydj9lyxzl5"))))
1111 (arguments
1112 (substitute-keyword-arguments (package-arguments qtsvg)
1113 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1114 (inputs
1115 `(("qtbase" ,qtbase)
1116 ("qtdeclarative" ,qtdeclarative)))))
1117
1118 (define-public qtdatavis3d
1119 (package (inherit qtsvg)
1120 (name "qtdatavis3d")
1121 (version "5.7.1")
1122 (source (origin
1123 (method url-fetch)
1124 (uri (string-append "https://download.qt.io/official_releases/qt/"
1125 (version-major+minor version) "/" version
1126 "/submodules/" name "-opensource-src-"
1127 version ".tar.xz"))
1128 (sha256
1129 (base32
1130 "1y00p0wyj5cw9c2925y537vpmmg9q3kpf7qr1s7sv67dvvf8bzqv"))))
1131 (arguments
1132 (substitute-keyword-arguments (package-arguments qtsvg)
1133 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1134 (inputs
1135 `(("qtbase" ,qtbase)
1136 ("qtdeclarative" ,qtdeclarative)))))
1137
1138 (define-public python-sip
1139 (package
1140 (name "python-sip")
1141 (version "4.18.1")
1142 (source
1143 (origin
1144 (method url-fetch)
1145 (uri
1146 (string-append "mirror://sourceforge/pyqt/sip/"
1147 "sip-" version "/sip-" version ".tar.gz"))
1148 (sha256
1149 (base32
1150 "1452zy3g0qv4fpd9c0y4gq437kn0xf7bbfniibv5n43zpwnpmklv"))))
1151 (build-system gnu-build-system)
1152 (native-inputs
1153 `(("python" ,python-wrapper)))
1154 (arguments
1155 `(#:tests? #f ; no check target
1156 #:modules ((srfi srfi-1)
1157 ,@%gnu-build-system-modules)
1158 #:phases
1159 (modify-phases %standard-phases
1160 (replace 'configure
1161 (lambda* (#:key inputs outputs #:allow-other-keys)
1162 (let* ((out (assoc-ref outputs "out"))
1163 (bin (string-append out "/bin"))
1164 (include (string-append out "/include"))
1165 (python (assoc-ref inputs "python"))
1166 (python-version
1167 (last (string-split python #\-)))
1168 (python-major+minor
1169 (string-join
1170 (take (string-split python-version #\.) 2)
1171 "."))
1172 (lib (string-append out "/lib/python"
1173 python-major+minor
1174 "/site-packages")))
1175 (zero?
1176 (system* "python" "configure.py"
1177 "--bindir" bin
1178 "--destdir" lib
1179 "--incdir" include))))))))
1180 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1181 (synopsis "Python binding creator for C and C++ libraries")
1182 (description
1183 "SIP is a tool to create Python bindings for C and C++ libraries. It
1184 was originally developed to create PyQt, the Python bindings for the Qt
1185 toolkit, but can be used to create bindings for any C or C++ library.
1186
1187 SIP comprises a code generator and a Python module. The code generator
1188 processes a set of specification files and generates C or C++ code, which
1189 is then compiled to create the bindings extension module. The SIP Python
1190 module provides support functions to the automatically generated code.")
1191 ;; There is a choice between a python like license, gpl2 and gpl3.
1192 ;; For compatibility with pyqt, we need gpl3.
1193 (license license:gpl3)))
1194
1195 (define-public python2-sip
1196 (package (inherit python-sip)
1197 (name "python2-sip")
1198 (native-inputs
1199 `(("python" ,python-2)))))
1200
1201 (define-public python-pyqt
1202 (package
1203 (name "python-pyqt")
1204 (version "5.7")
1205 (source
1206 (origin
1207 (method url-fetch)
1208 (uri
1209 (string-append "mirror://sourceforge/pyqt/PyQt5/"
1210 "PyQt-" version "/PyQt5_gpl-"
1211 version ".tar.gz"))
1212 (sha256
1213 (base32
1214 "01avscn1bir0h8zzfh1jvpljgwg6qkax5nk142xrm63rbyx969l9"))
1215 (patches (search-patches "pyqt-configure.patch"))))
1216 (build-system gnu-build-system)
1217 (native-inputs
1218 `(("qtbase" ,qtbase))) ; for qmake
1219 (propagated-inputs
1220 `(("python-sip" ,python-sip)))
1221 (inputs
1222 `(("python" ,python-wrapper)
1223 ("qtbase" ,qtbase)
1224 ("qtconnectivity" ,qtconnectivity)
1225 ("qtdeclarative" ,qtdeclarative)
1226 ("qtlocation" ,qtlocation)
1227 ("qtmultimedia" ,qtmultimedia)
1228 ("qtsensors" ,qtsensors)
1229 ("qtserialport" ,qtserialport)
1230 ("qtsvg" ,qtsvg)
1231 ("qttools" ,qttools)
1232 ("qtwebchannel" ,qtwebchannel)
1233 ("qtwebkit" ,qtwebkit)
1234 ("qtwebsockets" ,qtwebsockets)
1235 ("qtx11extras" ,qtx11extras)
1236 ("qtxmlpatterns" ,qtxmlpatterns)))
1237 (arguments
1238 `(#:modules ((srfi srfi-1)
1239 ,@%gnu-build-system-modules)
1240 #:phases
1241 (modify-phases %standard-phases
1242 (replace 'configure
1243 (lambda* (#:key inputs outputs #:allow-other-keys)
1244 (let* ((out (assoc-ref outputs "out"))
1245 (bin (string-append out "/bin"))
1246 (sip (string-append out "/share/sip"))
1247 (plugins (string-append out "/plugins"))
1248 (designer (string-append plugins "/designer"))
1249 (qml (string-append plugins "/PyQt5"))
1250 (python (assoc-ref inputs "python"))
1251 (python-version
1252 (last (string-split python #\-)))
1253 (python-major+minor
1254 (string-join
1255 (take (string-split python-version #\.) 2)
1256 "."))
1257 (lib (string-append out "/lib/python"
1258 python-major+minor
1259 "/site-packages"))
1260 (stubs (string-append lib "/PyQt5")))
1261 (zero? (system* "python" "configure.py"
1262 "--confirm-license"
1263 "--bindir" bin
1264 "--destdir" lib
1265 "--designer-plugindir" designer
1266 "--qml-plugindir" qml
1267 ; Where to install the PEP 484 Type Hints stub
1268 ; files. Without this the stubs are tried to be
1269 ; installed into the python package's
1270 ; site-package directory, which is read-only.
1271 "--stubsdir" stubs
1272 "--sipdir" sip))))))))
1273 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
1274 (synopsis "Python bindings for Qt")
1275 (description
1276 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1277 framework. The bindings are implemented as a set of Python modules and
1278 contain over 620 classes.")
1279 (license license:gpl3)))
1280
1281 (define-public python2-pyqt
1282 (package (inherit python-pyqt)
1283 (name "python2-pyqt")
1284 (native-inputs
1285 `(("python-sip" ,python2-sip)
1286 ("qtbase" ,qtbase)))
1287 (inputs
1288 `(("python" ,python-2)
1289 ,@(alist-delete "python" (package-inputs python-pyqt))))))
1290
1291 (define-public python-pyqt-4
1292 (package (inherit python-pyqt)
1293 (name "python-pyqt")
1294 (version "4.11.4")
1295 (source
1296 (origin
1297 (method url-fetch)
1298 (uri
1299 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1300 "PyQt-" version "/PyQt-x11-gpl-"
1301 version ".tar.gz"))
1302 (sha256
1303 (base32
1304 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
1305 (native-inputs
1306 `(("python-sip" ,python-sip)
1307 ("qt" ,qt-4)))
1308 (inputs `(("python" ,python-wrapper)))
1309 (arguments
1310 `(#:tests? #f ; no check target
1311 #:modules ((srfi srfi-1)
1312 ,@%gnu-build-system-modules)
1313 #:phases
1314 (modify-phases %standard-phases
1315 (replace 'configure
1316 (lambda* (#:key inputs outputs #:allow-other-keys)
1317 (let* ((out (assoc-ref outputs "out"))
1318 (bin (string-append out "/bin"))
1319 (sip (string-append out "/share/sip"))
1320 (python (assoc-ref inputs "python"))
1321 (python-version
1322 (last (string-split python #\-)))
1323 (python-major+minor
1324 (string-join
1325 (take (string-split python-version #\.) 2)
1326 "."))
1327 (lib (string-append out "/lib/python"
1328 python-major+minor
1329 "/site-packages")))
1330 (zero? (system* "python" "configure.py"
1331 "--confirm-license"
1332 "--bindir" bin
1333 "--destdir" lib
1334 "--sipdir" sip))))))))
1335 (license (list license:gpl2 license:gpl3)))) ; choice of either license
1336
1337 (define-public python2-pyqt-4
1338 (package (inherit python-pyqt-4)
1339 (name "python2-pyqt")
1340 (native-inputs
1341 `(("python-sip" ,python2-sip)
1342 ("qt" ,qt-4)))
1343 (inputs
1344 `(("python" ,python-2)))))
1345
1346 (define-public qtkeychain
1347 (package
1348 (name "qtkeychain")
1349 (version "0.7.0")
1350 (source
1351 (origin
1352 (method url-fetch)
1353 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1354 "archive/v" version ".tar.gz"))
1355 (file-name (string-append name "-" version ".tar.gz"))
1356 (sha256
1357 (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
1358 (build-system cmake-build-system)
1359 (native-inputs
1360 `(("qttools" ,qttools)))
1361 (inputs
1362 `(("qtbase" ,qtbase)))
1363 (arguments
1364 `(#:tests? #f ; No tests included
1365 #:phases
1366 (modify-phases %standard-phases
1367 (add-before
1368 'configure 'set-qt-trans-dir
1369 (lambda _
1370 (substitute* "CMakeLists.txt"
1371 (("\\$\\{qt_translations_dir\\}")
1372 "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
1373 (home-page "https://github.com/frankosterfeld/qtkeychain")
1374 (synopsis "Qt API to store passwords")
1375 (description
1376 "QtKeychain is a Qt library to store passwords and other secret data
1377 securely. It will not store any data unencrypted unless explicitly requested.")
1378 (license license:bsd-3)))
1379
1380 (define-public qwt
1381 (package
1382 (name "qwt")
1383 (version "6.1.3")
1384 (source
1385 (origin
1386 (method url-fetch)
1387 (uri
1388 (string-append "mirror://sourceforge/qwt/qwt/"
1389 version "/qwt-" version ".tar.bz2"))
1390 (sha256
1391 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1392 (build-system gnu-build-system)
1393 (inputs
1394 `(("qtbase" ,qtbase)
1395 ("qtsvg" ,qtsvg)
1396 ("qttools" ,qttools)))
1397 (arguments
1398 `(#:phases
1399 (modify-phases %standard-phases
1400 (replace 'configure
1401 (lambda* (#:key outputs #:allow-other-keys)
1402 (let ((out (assoc-ref outputs "out")))
1403 (substitute* '("qwtconfig.pri")
1404 (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
1405 (zero? (system* "qmake")))))
1406 (add-after 'install 'install-documentation
1407 (lambda* (#:key outputs #:allow-other-keys)
1408 (let* ((out (assoc-ref outputs "out"))
1409 (man (string-append out "/share/man")))
1410 ;; Remove some incomplete manual pages.
1411 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1412 (mkdir-p man)
1413 (copy-recursively "doc/man" man)
1414 #t))))))
1415 (home-page "http://qwt.sourceforge.net")
1416 (synopsis "Qt widgets for plots, scales, dials and other technical software
1417 GUI components")
1418 (description
1419 "The Qwt library contains widgets and components which are primarily useful
1420 for technical and scientific purposes. It includes a 2-D plotting widget,
1421 different kinds of sliders, and much more.")
1422 (license
1423 (list
1424 ;; The Qwt license is LGPL2.1 with some exceptions.
1425 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1426 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1427 license:lgpl2.1 license:gpl3))))
1428
1429 (define-public qtwebkit
1430 (package
1431 (name "qtwebkit")
1432 (version "5.7.1")
1433 (source
1434 (origin
1435 (method url-fetch)
1436 (uri (string-append "http://download.qt.io/community_releases/"
1437 (version-major+minor version)
1438 "/" version "/qtwebkit-opensource-src-" version
1439 ".tar.xz"))
1440 ;; Note: since Qt 5.6, Qt no longer officially supports qtwebkit:
1441 ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>.
1442 (sha256
1443 (base32
1444 "00szgcra6pf2myfjrdbsr1gmrxycpbjqlzkplna5yr1rjg4gfv54"))))
1445 (build-system gnu-build-system)
1446 (native-inputs
1447 `(("perl" ,perl)
1448 ("python" ,python-2.7)
1449 ("ruby" ,ruby)
1450 ("bison" ,bison)
1451 ("flex" ,flex)
1452 ("gperf" ,gperf)
1453 ("pkg-config" ,pkg-config)))
1454 (inputs
1455 `(("icu" ,icu4c)
1456 ("libjpeg" ,libjpeg)
1457 ("libpng" ,libpng)
1458 ("libwebp" ,libwebp)
1459 ("sqlite" ,sqlite)
1460 ("fontconfig" ,fontconfig)
1461 ("libxrender", libxrender)
1462 ("qtbase" ,qtbase)
1463 ("qtdeclarative" ,qtdeclarative)
1464 ("qtmultimedia" ,qtmultimedia)
1465 ("libxml2" ,libxml2)
1466 ("libxslt" ,libxslt)
1467 ("libx11" ,libx11)
1468 ("libxcomposite" ,libxcomposite)))
1469 (arguments
1470 `(#:phases
1471 (modify-phases %standard-phases
1472 (replace 'configure
1473 (lambda* (#:key outputs #:allow-other-keys)
1474 (let ((out (assoc-ref outputs "out")))
1475 (setenv "QMAKEPATH"
1476 (string-append (getcwd) "/Tools/qmake:"
1477 (getenv "QMAKEPATH")))
1478 (system* "qmake"))))
1479 ;; prevent webkit from trying to install into the qtbase store directory,
1480 ;; and replace references to the build directory in linker options:
1481 (add-before 'build 'patch-installpaths
1482 (lambda* (#:key outputs inputs #:allow-other-keys)
1483 (let* ((out (assoc-ref outputs "out"))
1484 (qtbase (assoc-ref inputs "qtbase"))
1485 (builddir (getcwd))
1486 (linkbuild (string-append "-L" builddir))
1487 (linkout (string-append "-L" out))
1488 (makefiles
1489 (map-in-order
1490 (lambda (i)
1491 (let* ((in (car i))
1492 (mf (string-append (dirname in) "/"
1493 (cdr i))))
1494 ;; by default, these Makefiles are
1495 ;; generated during install, but we need
1496 ;; to generate them now
1497 (system* "qmake" in "-o" mf)
1498 mf))
1499 '(("Source/api.pri" . "Makefile.api")
1500 ("Source/widgetsapi.pri"
1501 . "Makefile.widgetsapi")
1502 ("Source/WebKit2/WebProcess.pro"
1503 . "Makefile.WebProcess")
1504 ("Source/WebKit2/PluginProcess.pro"
1505 . "Makefile.PluginProcess")
1506 ("Source/WebKit/qt/declarative/public.pri"
1507 . "Makefile.declarative.public")
1508 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1509 . "Makefile.declarative.experimental")
1510 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
1511 . "Makefile")))))
1512 ;; Order of qmake calls and substitutions matters here.
1513 (system* "qmake" "-prl" "Source/widgetsapi.pri"
1514 "-o" "Source/Makefile")
1515 (substitute* (find-files "lib" "libQt5.*\\.prl")
1516 ((linkbuild) linkout))
1517 (substitute* (find-files "lib"
1518 "libQt5WebKit.*\\.la")
1519 (("libdir='.*'")
1520 (string-append "libdir='" out "/lib'"))
1521 ((linkbuild) linkout))
1522 (substitute* (find-files "lib/pkgconfig"
1523 "Qt5WebKit.*\\.pc")
1524 (((string-append "prefix=" qtbase))
1525 (string-append "prefix=" out))
1526 ((linkbuild) linkout))
1527 ;; Makefiles must be modified after .prl/.la/.pc
1528 ;; files, lest they get rebuilt:
1529 (substitute* makefiles
1530 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
1531 out )
1532 (((string-append "-Wl,-rpath," builddir))
1533 (string-append "-Wl,-rpath," out)))))))))
1534 (home-page "https://www.webkit.org")
1535 (synopsis "Web browser engine and classes to render and interact with web
1536 content")
1537 (description "QtWebKit provides a Web browser engine that makes it easy to
1538 embed content from the World Wide Web into your Qt application. At the same
1539 time Web content can be enhanced with native controls.")
1540
1541 (license license:lgpl2.1+)))
1542
1543 (define-public dotherside
1544 (package
1545 (name "dotherside")
1546 (version "0.5.2")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (string-append "https://github.com/filcuc/DOtherSide/"
1551 "archive/v" version ".tar.gz"))
1552 (file-name (string-append name "-" version ".tar.gz"))
1553 (sha256
1554 (base32
1555 "0pqlrvy4ajjir80ra79ka3n0rjj0ir0f0m91cq86iz3nnw8w148z"))))
1556 (build-system cmake-build-system)
1557 (native-inputs
1558 `(("qttools" ,qttools)))
1559 (inputs
1560 `(("qtbase" ,qtbase)
1561 ("qtdeclarative" ,qtdeclarative)))
1562 (home-page "https://github.com/frankosterfeld/qtkeychain")
1563 (synopsis "C language library for creating bindings for the Qt QML language")
1564 (description
1565 "DOtherSide is a C language library for creating bindings for the
1566 QT QML language. The following features are implementable from
1567 a binding language:
1568 @itemize
1569 @item Creating custom QObject
1570 @item Creating custom QAbstractListModels
1571 @item Creating custom properties, signals and slots
1572 @item Creating from QML QObject defined in the binded language
1573 @item Creating from Singleton QML QObject defined in the binded language
1574 @end itemize\n")
1575 (license license:lgpl3))) ;version 3 only (+ exception)