gnu: poppler-qt5: Use modular qt.
[jackhill/guix/guix.git] / gnu / packages / qt.scm
... / ...
CommitLineData
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
5;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages qt)
23 #:use-module ((guix licenses) #:select (bsd-3 gpl2 gpl3 lgpl2.1 lgpl2.1+ lgpl3 x11-style))
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build utils)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix packages)
30 #:use-module (guix utils)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages bison)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages cups)
35 #:use-module (gnu packages databases)
36 #:use-module (gnu packages fontutils)
37 #:use-module (gnu packages flex)
38 #:use-module (gnu packages freedesktop)
39 #:use-module (gnu packages gl)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnuzilla)
42 #:use-module (gnu packages gperf)
43 #:use-module (gnu packages gtk)
44 #:use-module (gnu packages icu4c)
45 #:use-module (gnu packages image)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages databases)
48 #:use-module (gnu packages pciutils)
49 #:use-module (gnu packages pcre)
50 #:use-module (gnu packages perl)
51 #:use-module (gnu packages pkg-config)
52 #:use-module (gnu packages pulseaudio)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages ruby)
55 #:use-module (gnu packages tls)
56 #:use-module (gnu packages xdisorg)
57 #:use-module (gnu packages xorg)
58 #:use-module (gnu packages xml))
59
60(define-public qt
61 (package
62 (name "qt")
63 (version "5.6.1-1")
64 (source (origin
65 (method url-fetch)
66 (uri
67 (string-append
68 "http://download.qt.io/official_releases/qt/"
69 (version-major+minor version)
70 "/" version
71 "/single/qt-everywhere-opensource-src-"
72 version ".tar.xz"))
73 (sha256
74 (base32
75 "1nrn2wivjwdxc9q03gpsi336gcl9l2axi0xjbzsha5v6akmsf26f"))
76 (modules '((guix build utils)))
77 (snippet
78 '(begin
79 ;; Remove qtwebengine, which relies on a bundled copy of
80 ;; chromium. Not only does it fail compilation in qt 5.5:
81 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
82 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
83 ;; it might also pose security problems.
84 ;; Alternatively, we could use the "-skip qtwebengine"
85 ;; configuration option.
86 (delete-file-recursively "qtwebengine")
87 ;; Remove one of the two bundled harfbuzz copies in addition
88 ;; to passing "-system-harfbuzz".
89 (delete-file-recursively "qtbase/src/3rdparty/harfbuzz-ng")
90 ;; Remove the bundled sqlite copy in addition to
91 ;; passing "-system-sqlite".
92 (delete-file-recursively "qtbase/src/3rdparty/sqlite")))))
93 (build-system gnu-build-system)
94 (propagated-inputs
95 `(("mesa" ,mesa)))
96 (inputs
97 `(("alsa-lib" ,alsa-lib)
98 ("dbus" ,dbus)
99 ("cups" ,cups)
100 ("expat" ,expat)
101 ("fontconfig" ,fontconfig)
102 ("freetype" ,freetype)
103 ("glib" ,glib)
104 ("harfbuzz" ,harfbuzz)
105 ("icu4c" ,icu4c)
106 ("libjpeg" ,libjpeg)
107 ("libmng" ,libmng)
108 ("libpci" ,pciutils)
109 ("libpng" ,libpng)
110 ("libx11" ,libx11)
111 ("libxcomposite" ,libxcomposite)
112 ("libxcursor" ,libxcursor)
113 ("libxfixes" ,libxfixes)
114 ("libxi" ,libxi)
115 ("libxinerama" ,libxinerama)
116 ("libxkbcommon" ,libxkbcommon)
117 ("libxml2" ,libxml2)
118 ("libxrandr" ,libxrandr)
119 ("libxrender" ,libxrender)
120 ("libxslt" ,libxslt)
121 ("libxtst" ,libxtst)
122 ("mtdev" ,mtdev)
123 ("mysql" ,mysql)
124 ("nss" ,nss)
125 ("openssl" ,openssl)
126 ("postgresql" ,postgresql)
127 ("pulseaudio" ,pulseaudio)
128 ("pcre" ,pcre)
129 ("sqlite" ,sqlite)
130 ("udev" ,eudev)
131 ("unixodbc" ,unixodbc)
132 ("xcb-util" ,xcb-util)
133 ("xcb-util-image" ,xcb-util-image)
134 ("xcb-util-keysyms" ,xcb-util-keysyms)
135 ("xcb-util-renderutil" ,xcb-util-renderutil)
136 ("xcb-util-wm" ,xcb-util-wm)
137 ("zlib" ,zlib)))
138 (native-inputs
139 `(("bison" ,bison)
140 ("flex" ,flex)
141 ("gperf" ,gperf)
142 ("perl" ,perl)
143 ("pkg-config" ,pkg-config)
144 ("python" ,python-2)
145 ("ruby" ,ruby)
146 ("which" ,(@ (gnu packages base) which))))
147 (arguments
148 `(;; FIXME: Disabling parallel building is a quick hack to avoid the
149 ;; failure described in
150 ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
151 ;; A more structural fix is needed.
152 #:parallel-build? #f
153 #:phases
154 (modify-phases %standard-phases
155 (add-after 'configure 'patch-bin-sh
156 (lambda _
157 (substitute* '("qtbase/config.status"
158 "qtbase/configure"
159 "qtbase/mkspecs/features/qt_functions.prf"
160 "qtbase/qmake/library/qmakebuiltins.cpp")
161 (("/bin/sh") (which "sh")))
162 #t))
163 (replace 'configure
164 (lambda* (#:key outputs #:allow-other-keys)
165 (let ((out (assoc-ref outputs "out")))
166 (substitute* '("configure" "qtbase/configure")
167 (("/bin/pwd") (which "pwd")))
168 (substitute* "qtbase/src/corelib/global/global.pri"
169 (("/bin/ls") (which "ls")))
170 ;; do not pass "--enable-fast-install", which makes the
171 ;; configure process fail
172 (zero? (system*
173 "./configure"
174 "-verbose"
175 "-prefix" out
176 "-opensource"
177 "-confirm-license"
178 ;; Do not build examples; if desired, these could go
179 ;; into a separate output, but for the time being, we
180 ;; prefer to save the space and build time.
181 "-nomake" "examples"
182 ;; Most "-system-..." are automatic, but some use
183 ;; the bundled copy by default.
184 "-system-sqlite"
185 "-system-harfbuzz"
186 ;; explicitly link with openssl instead of dlopening it
187 "-openssl-linked"
188 ;; explicitly link with dbus instead of dlopening it
189 "-dbus-linked"
190 ;; drop special machine instructions not supported
191 ;; on all instances of the target
192 ,@(if (string-prefix? "x86_64"
193 (or (%current-target-system)
194 (%current-system)))
195 '()
196 '("-no-sse2"))
197 "-no-sse3"
198 "-no-ssse3"
199 "-no-sse4.1"
200 "-no-sse4.2"
201 "-no-avx"
202 "-no-avx2"
203 "-no-mips_dsp"
204 "-no-mips_dspr2"))))))))
205 (home-page "http://qt-project.org/")
206 (synopsis "Cross-platform GUI library")
207 (description "Qt is a cross-platform application and UI framework for
208developers using C++ or QML, a CSS & JavaScript like language.")
209 (license lgpl2.1)
210
211 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
212 ;; see <http://hydra.gnu.org/build/112828>.
213 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
214 (supported-systems (delete "mips64el-linux" %supported-systems))))
215
216(define-public qt-4
217 (package (inherit qt)
218 (version "4.8.7")
219 (source (origin
220 (method url-fetch)
221 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
222 (string-copy version 0 (string-rindex version #\.))
223 "/" version
224 "/qt-everywhere-opensource-src-"
225 version ".tar.gz"))
226 (sha256
227 (base32
228 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
229 (patches (search-patches "qt4-ldflags.patch"))
230 (modules '((guix build utils)))
231 (snippet
232 ;; Remove webkit module, which is not built.
233 '(delete-file-recursively "src/3rdparty/webkit"))))
234 (inputs `(,@(alist-delete "harfbuzz"
235 (alist-delete "libjpeg" (package-inputs qt)))
236 ("libjepg" ,libjpeg-8)
237 ("libsm" ,libsm)))
238
239 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
240 ;; but we can't make them a separate output because "out" and "examples"
241 ;; would refer to each other.
242 (outputs '("out" ;112MiB core + 37MiB examples
243 "doc")) ;280MiB of HTML + code
244 (arguments
245 `(#:phases
246 (modify-phases %standard-phases
247 (replace
248 'configure
249 (lambda* (#:key outputs #:allow-other-keys)
250 (let ((out (assoc-ref outputs "out"))
251 (doc (assoc-ref outputs "doc")))
252 (substitute* '("configure")
253 (("/bin/pwd") (which "pwd")))
254
255 (zero? (system*
256 "./configure"
257 "-verbose"
258 "-prefix" out
259 ;; Note: Don't pass '-docdir' since 'qmake' and
260 ;; libQtCore would record its value, thereby defeating
261 ;; the whole point of having a separate output.
262 "-datadir" (string-append out "/share/qt-" ,version
263 "/data")
264 "-importdir" (string-append out "/lib/qt-4"
265 "/imports")
266 "-plugindir" (string-append out "/lib/qt-4"
267 "/plugins")
268 "-translationdir" (string-append out "/share/qt-" ,version
269 "/translations")
270 "-demosdir" (string-append out "/share/qt-" ,version
271 "/demos")
272 "-examplesdir" (string-append out "/share/qt-" ,version
273 "/examples")
274 "-opensource"
275 "-confirm-license"
276 ;; explicitly link with dbus instead of dlopening it
277 "-dbus-linked"
278 ;; Skip the webkit module; it fails to build on armhf
279 ;; and, apart from that, may pose security risks.
280 "-no-webkit"
281 ;; drop special machine instructions not supported
282 ;; on all instances of the target
283 ,@(if (string-prefix? "x86_64"
284 (or (%current-target-system)
285 (%current-system)))
286 '()
287 '("-no-mmx"
288 "-no-3dnow"
289 "-no-sse"
290 "-no-sse2"))
291 "-no-sse3"
292 "-no-ssse3"
293 "-no-sse4.1"
294 "-no-sse4.2"
295 "-no-avx")))))
296 (add-after
297 'install 'move-doc
298 (lambda* (#:key outputs #:allow-other-keys)
299 ;; Because of qt4-documentation-path.patch, documentation ends up
300 ;; being installed in OUT. Move it to the right place.
301 (let* ((out (assoc-ref outputs "out"))
302 (doc (assoc-ref outputs "doc"))
303 (olddoc (string-append out "/doc"))
304 (docdir (string-append doc "/share/doc/qt-" ,version)))
305 (mkdir-p (dirname docdir))
306
307 ;; Note: We can't use 'rename-file' here because OUT and DOC are
308 ;; different "devices" due to bind-mounts.
309 (copy-recursively olddoc docdir)
310 (delete-file-recursively olddoc)
311 #t))))))))
312
313(define-public qtbase
314 (package
315 (name "qtbase")
316 (version "5.6.1-1")
317 (source (origin
318 (method url-fetch)
319 (uri (string-append "https://download.qt.io/official_releases/qt/"
320 (version-major+minor version) "/" version
321 "/submodules/" name "-opensource-src-"
322 version ".tar.xz"))
323 (sha256
324 (base32
325 "0fbwprlhqmdyhh2wb9122fcpq7pbil530iak482b9sy5gqs7i5ij"))
326 (modules '((guix build utils)))
327 (snippet
328 '(begin
329 ;; Remove one of the two bundled harfbuzz copies in addition
330 ;; to passing "-system-harfbuzz".
331 (delete-file-recursively "src/3rdparty/harfbuzz-ng")
332 ;; Remove the bundled sqlite copy in addition to
333 ;; passing "-system-sqlite".
334 (delete-file-recursively "src/3rdparty/sqlite")))))
335 (build-system gnu-build-system)
336 (propagated-inputs
337 `(("mesa" ,mesa)))
338 (inputs
339 `(("alsa-lib" ,alsa-lib)
340 ("cups" ,cups)
341 ("dbus" ,dbus)
342 ("eudev" ,eudev)
343 ("expat" ,expat)
344 ("fontconfig" ,fontconfig)
345 ("freetype" ,freetype)
346 ("glib" ,glib)
347 ("harfbuzz" ,harfbuzz)
348 ("icu4c" ,icu4c)
349 ("libinput" ,libinput)
350 ("libjpeg" ,libjpeg)
351 ("libmng" ,libmng)
352 ("libpng" ,libpng)
353 ("libx11" ,libx11)
354 ("libxcomposite" ,libxcomposite)
355 ("libxcursor" ,libxcursor)
356 ("libxfixes" ,libxfixes)
357 ("libxi" ,libxi)
358 ("libxinerama" ,libxinerama)
359 ("libxkbcommon" ,libxkbcommon)
360 ("libxml2" ,libxml2)
361 ("libxrandr" ,libxrandr)
362 ("libxrender" ,libxrender)
363 ("libxslt" ,libxslt)
364 ("libxtst" ,libxtst)
365 ("mtdev" ,mtdev)
366 ("mysql" ,mysql)
367 ("nss" ,nss)
368 ("openssl" ,openssl)
369 ("pcre" ,pcre)
370 ("postgresql" ,postgresql)
371 ("pulseaudio" ,pulseaudio)
372 ("sqlite" ,sqlite)
373 ("unixodbc" ,unixodbc)
374 ("xcb-util" ,xcb-util)
375 ("xcb-util-image" ,xcb-util-image)
376 ("xcb-util-keysyms" ,xcb-util-keysyms)
377 ("xcb-util-renderutil" ,xcb-util-renderutil)
378 ("xcb-util-wm" ,xcb-util-wm)
379 ("zlib" ,zlib)))
380 (native-inputs
381 `(("bison" ,bison)
382 ("flex" ,flex)
383 ("gperf" ,gperf)
384 ("perl" ,perl)
385 ("pkg-config" ,pkg-config)
386 ("python" ,python-2)
387 ("ruby" ,ruby)
388 ("which" ,(@ (gnu packages base) which))))
389 (arguments
390 `(#:phases
391 (modify-phases %standard-phases
392 (add-after 'configure 'patch-bin-sh
393 (lambda _
394 (substitute* '("config.status"
395 "configure"
396 "mkspecs/features/qt_functions.prf"
397 "qmake/library/qmakebuiltins.cpp")
398 (("/bin/sh") (which "sh")))
399 #t))
400 (replace 'configure
401 (lambda* (#:key outputs #:allow-other-keys)
402 (let ((out (assoc-ref outputs "out")))
403 (substitute* "configure"
404 (("/bin/pwd") (which "pwd")))
405 (substitute* "src/corelib/global/global.pri"
406 (("/bin/ls") (which "ls")))
407 ;; The configuration files for other Qt5 packages are searched
408 ;; through a call to "find_package" in Qt5Config.cmake, which
409 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
410 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
411 ;; components can be installed in different places.
412 (substitute* (find-files "." ".*\\.cmake")
413 (("NO_DEFAULT_PATH") ""))
414 ;; do not pass "--enable-fast-install", which makes the
415 ;; configure process fail
416 (zero? (system*
417 "./configure"
418 "-verbose"
419 "-prefix" out
420 "-opensource"
421 "-confirm-license"
422 ;; Do not build examples; if desired, these could go
423 ;; into a separate output, but for the time being, we
424 ;; prefer to save the space and build time.
425 "-nomake" "examples"
426 ;; Most "-system-..." are automatic, but some use
427 ;; the bundled copy by default.
428 "-system-sqlite"
429 "-system-harfbuzz"
430 ;; explicitly link with openssl instead of dlopening it
431 "-openssl-linked"
432 ;; explicitly link with dbus instead of dlopening it
433 "-dbus-linked"
434 ;; drop special machine instructions not supported
435 ;; on all instances of the target
436 ,@(if (string-prefix? "x86_64"
437 (or (%current-target-system)
438 (%current-system)))
439 '()
440 '("-no-sse2"))
441 "-no-sse3"
442 "-no-ssse3"
443 "-no-sse4.1"
444 "-no-sse4.2"
445 "-no-avx"
446 "-no-avx2"
447 "-no-mips_dsp"
448 "-no-mips_dspr2")))))
449 (add-after 'install 'patch-qt_config.prf
450 (lambda* (#:key outputs #:allow-other-keys)
451 (let* ((out (assoc-ref outputs "out"))
452 (qt_config.prf (string-append
453 out "/mkspecs/features/qt_config.prf")))
454 ;; For each Qt module, let `qmake' uses search paths in the
455 ;; module directory instead of all in QT_INSTALL_PREFIX.
456 (substitute* qt_config.prf
457 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
458 "$$replace(dir, mkspecs/modules, include)")
459 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
460 "$$replace(dir, mkspecs/modules, lib)")
461 (("\\$\\$\\[QT_HOST_LIBS\\]")
462 "$$replace(dir, mkspecs/modules, lib)")
463 (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
464 "$$replace(dir, mkspecs/modules, plugins)")
465 (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
466 "$$replace(dir, mkspecs/modules, libexec)")
467 (("\\$\\$\\[QT_INSTALL_BINS\\]")
468 "$$replace(dir, mkspecs/modules, bin)")
469 (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
470 "$$replace(dir, mkspecs/modules, imports)")
471 (("\\$\\$\\[QT_INSTALL_QML\\]")
472 "$$replace(dir, mkspecs/modules, qml)"))
473 #t))))))
474 (native-search-paths
475 (list (search-path-specification
476 (variable "QMAKEPATH")
477 (files '("")))))
478 (home-page "https://www.qt.io/")
479 (synopsis "Cross-platform GUI library")
480 (description "Qt is a cross-platform application and UI framework for
481developers using C++ or QML, a CSS & JavaScript like language.")
482 (license (list lgpl2.1 lgpl3))))
483
484(define-public qtsvg
485 (package (inherit qtbase)
486 (name "qtsvg")
487 (version "5.6.1-1")
488 (source (origin
489 (method url-fetch)
490 (uri (string-append "https://download.qt.io/official_releases/qt/"
491 (version-major+minor version) "/" version
492 "/submodules/" name "-opensource-src-"
493 version ".tar.xz"))
494 (sha256
495 (base32
496 "1w0jvhgaiddafcms2nv8wl1klg07lncmjwm1zhdw3l6rxi9071sw"))))
497 (propagated-inputs `())
498 (native-inputs `(("perl" ,perl)))
499 (inputs
500 `(("mesa" ,mesa)
501 ("qtbase" ,qtbase)
502 ("zlib" ,zlib)))
503 (arguments
504 `(#:phases
505 (modify-phases %standard-phases
506 (replace 'configure
507 (lambda* (#:key outputs #:allow-other-keys)
508 (let ((out (assoc-ref outputs "out")))
509 (zero? (system* "qmake" (string-append "PREFIX=" out))))))
510 (add-before 'install 'fix-Makefiles
511 (lambda* (#:key inputs outputs #:allow-other-keys)
512 (let ((out (assoc-ref outputs "out"))
513 (qtbase (assoc-ref inputs "qtbase")))
514 (substitute* (find-files "." "Makefile")
515 (((string-append "INSTALL_ROOT)" qtbase))
516 (string-append "INSTALL_ROOT)" out)))))))))))
517
518(define-public qtimageformats
519 (package (inherit qtsvg)
520 (name "qtimageformats")
521 (version "5.6.1-1")
522 (source (origin
523 (method url-fetch)
524 (uri (string-append "https://download.qt.io/official_releases/qt/"
525 (version-major+minor version) "/" version
526 "/submodules/" name "-opensource-src-"
527 version ".tar.xz"))
528 (sha256
529 (base32
530 "1p98acvsm3azka2by1ph4gdb31qbnndrr5k5wns4xk2d760y8ifc"))))
531 (native-inputs `())
532 (inputs
533 `(("libmng" ,libmng)
534 ("libtiff" ,libtiff)
535 ("libwebp" ,libwebp)
536 ("mesa" ,mesa)
537 ("qtbase" ,qtbase)
538 ("zlib" ,zlib)))))
539
540(define-public qtx11extras
541 (package (inherit qtsvg)
542 (name "qtx11extras")
543 (version "5.6.1-1")
544 (source (origin
545 (method url-fetch)
546 (uri (string-append "https://download.qt.io/official_releases/qt/"
547 (version-major+minor version) "/" version
548 "/submodules/" name "-opensource-src-"
549 version ".tar.xz"))
550 (sha256
551 (base32
552 "0yj5yg2dqkrwbgbicmk2rpqsagmi8dsffkrprpsj0fmkx4awhv5y"))))
553 (native-inputs `(("perl" ,perl)))
554 (inputs
555 `(("mesa" ,mesa)
556 ("qtbase" ,qtbase)))))
557
558(define-public qtxmlpatterns
559 (package (inherit qtsvg)
560 (name "qtxmlpatterns")
561 (version "5.6.1-1")
562 (source (origin
563 (method url-fetch)
564 (uri (string-append "https://download.qt.io/official_releases/qt/"
565 (version-major+minor version) "/" version
566 "/submodules/" name "-opensource-src-"
567 version ".tar.xz"))
568 (sha256
569 (base32
570 "1966rrk7f6c55k57j33rffdjs77kk4mawrnnl8yv1ckcirxc3np1"))))
571 (native-inputs `(("perl" ,perl)))
572 (inputs `(("qtbase" ,qtbase)))))
573
574(define-public qtdeclarative
575 (package (inherit qtsvg)
576 (name "qtdeclarative")
577 (version "5.6.1-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 "094gx5mzqzcga97y7ihf052b6i5iv512lh7m0702m5q94nsn1pqw"))))
587 (native-inputs
588 `(("perl" ,perl)
589 ("pkg-config" ,pkg-config)
590 ("python" ,python-2)
591 ("qtsvg" ,qtsvg)
592 ("qtxmlpatterns" ,qtxmlpatterns)))
593 (inputs
594 `(("mesa" ,mesa)
595 ("qtbase" ,qtbase)))))
596
597(define-public qtconnectivity
598 (package (inherit qtsvg)
599 (name "qtconnectivity")
600 (version "5.6.1-1")
601 (source (origin
602 (method url-fetch)
603 (uri (string-append "https://download.qt.io/official_releases/qt/"
604 (version-major+minor version) "/" version
605 "/submodules/" name "-opensource-src-"
606 version ".tar.xz"))
607 (sha256
608 (base32
609 "0sr6sxp0q45pacs25knr28139xdrphcjgrwlksdhdpsryfw19mzi"))))
610 (native-inputs
611 `(("perl" ,perl)
612 ("pkg-config" ,pkg-config)
613 ("qtdeclarative" ,qtdeclarative)))
614 (inputs
615 `(("bluez" ,bluez)
616 ("qtbase" ,qtbase)))))
617
618(define-public qtwebsockets
619 (package (inherit qtsvg)
620 (name "qtwebsockets")
621 (version "5.6.1-1")
622 (source (origin
623 (method url-fetch)
624 (uri (string-append "https://download.qt.io/official_releases/qt/"
625 (version-major+minor version) "/" version
626 "/submodules/" name "-opensource-src-"
627 version ".tar.xz"))
628 (sha256
629 (base32
630 "1fz0x8570zxc00a22skd848svma3p2g3xyxj14jq10559jihqqil"))))
631 (native-inputs
632 `(("perl" ,perl)
633 ("qtdeclarative" ,qtdeclarative)))
634 (inputs `(("qtbase" ,qtbase)))))
635
636(define-public qtsensors
637 (package (inherit qtsvg)
638 (name "qtsensors")
639 (version "5.6.1-1")
640 (source (origin
641 (method url-fetch)
642 (uri (string-append "https://download.qt.io/official_releases/qt/"
643 (version-major+minor version) "/" version
644 "/submodules/" name "-opensource-src-"
645 version ".tar.xz"))
646 (sha256
647 (base32
648 "0kcrvf6vzn6g2v2m70f9r3raalzmfp48rwjlqhss3w84jfz3y04r"))))
649 (native-inputs
650 `(("perl" ,perl)
651 ("qtdeclarative" ,qtdeclarative)))
652 (inputs `(("qtbase" ,qtbase)))))
653
654(define-public qtmultimedia
655 (package (inherit qtsvg)
656 (name "qtmultimedia")
657 (version "5.6.1-1")
658 (source (origin
659 (method url-fetch)
660 (uri (string-append "https://download.qt.io/official_releases/qt/"
661 (version-major+minor version) "/" version
662 "/submodules/" name "-opensource-src-"
663 version ".tar.xz"))
664 (sha256
665 (base32
666 "0paffx0614ivjbf87lr9klpbqik6r1pzbc14l41np6d9jv3dqa2f"))))
667 (native-inputs
668 `(("perl" ,perl)
669 ("pkg-config" ,pkg-config)
670 ("python" ,python-2)
671 ("qtdeclarative" ,qtdeclarative)))
672 (inputs
673 `(("alsa-lib" ,alsa-lib)
674 ("mesa" ,mesa)
675 ("pulseaudio" ,pulseaudio)
676 ("qtbase" ,qtbase)))))
677
678(define-public qtwayland
679 (package (inherit qtsvg)
680 (name "qtwayland")
681 (version "5.6.1-1")
682 (source (origin
683 (method url-fetch)
684 (uri (string-append "https://download.qt.io/official_releases/qt/"
685 (version-major+minor version) "/" version
686 "/submodules/" name "-opensource-src-"
687 version ".tar.xz"))
688 (sha256
689 (base32
690 "1fnvgpi49ilds3ah9iizxj9qhhb5rnwqd9h03bhkwf0ydywv52c4"))))
691 (native-inputs
692 `(("glib" ,glib)
693 ("perl" ,perl)
694 ("pkg-config" ,pkg-config)
695 ("qtdeclarative" ,qtdeclarative)))
696 (inputs
697 `(("fontconfig" ,fontconfig)
698 ("freetype" ,freetype)
699 ("libx11" ,libx11)
700 ("libxcomposite" ,libxcomposite)
701 ("libxext" ,libxext)
702 ("libxkbcommon" ,libxkbcommon)
703 ("libxrender" ,libxrender)
704 ("mesa" ,mesa)
705 ("mtdev" ,mtdev)
706 ("qtbase" ,qtbase)
707 ("wayland" ,wayland)))))
708
709(define-public qtserialport
710 (package (inherit qtsvg)
711 (name "qtserialport")
712 (version "5.6.1-1")
713 (source (origin
714 (method url-fetch)
715 (uri (string-append "https://download.qt.io/official_releases/qt/"
716 (version-major+minor version) "/" version
717 "/submodules/" name "-opensource-src-"
718 version ".tar.xz"))
719 (sha256
720 (base32
721 "135cbgghxk0c6dblmyyrw6znfb9m8sac9hhyc2dm6vq7vzy8id52"))))
722 (native-inputs `(("perl" ,perl)))
723 (inputs
724 `(("qtbase" ,qtbase)
725 ("eudev" ,eudev)))))
726
727(define-public qtwebchannel
728 (package (inherit qtsvg)
729 (name "qtwebchannel")
730 (version "5.6.1-1")
731 (source (origin
732 (method url-fetch)
733 (uri (string-append "https://download.qt.io/official_releases/qt/"
734 (version-major+minor version) "/" version
735 "/submodules/" name "-opensource-src-"
736 version ".tar.xz"))
737 (sha256
738 (base32
739 "10kys3ppjkj60fs1s335fdcpdsbxsjn6ibvm6zph9gqbncabd2l7"))))
740 (native-inputs
741 `(("perl" ,perl)
742 ("qtdeclarative" ,qtdeclarative)
743 ("qtwebsockets" ,qtwebsockets)))
744 (inputs `(("qtbase" ,qtbase)))))
745
746(define-public qtlocation
747 (package (inherit qtsvg)
748 (name "qtlocation")
749 (version "5.6.1-1")
750 (source (origin
751 (method url-fetch)
752 (uri (string-append "https://download.qt.io/official_releases/qt/"
753 (version-major+minor version) "/" version
754 "/submodules/" name "-opensource-src-"
755 version ".tar.xz"))
756 (sha256
757 (base32
758 "0my4pbcxa58yzvdh65l5qx99ln03chjr5c3ml5v37wfk7nx23k69"))))
759 (native-inputs
760 `(("perl" ,perl)
761 ("qtdeclarative" ,qtdeclarative)
762 ;("qtquickcontrols" ,qtquickcontrols)
763 ("qtserialport" ,qtserialport)))
764 (inputs `(("qtbase" ,qtbase)))))
765
766(define-public qttools
767 (package (inherit qtsvg)
768 (name "qttools")
769 (version "5.6.1-1")
770 (source (origin
771 (method url-fetch)
772 (uri (string-append "https://download.qt.io/official_releases/qt/"
773 (version-major+minor version) "/" version
774 "/submodules/" name "-opensource-src-"
775 version ".tar.xz"))
776 (sha256
777 (base32
778 "0haic027a2d7p7k8xz83fbvci4a4dln34360rlwgy7hlyy5m4nip"))))
779 (native-inputs
780 `(("perl" ,perl)
781 ("qtdeclarative" ,qtdeclarative)))
782 (inputs
783 `(("mesa" ,mesa)
784 ("qtbase" ,qtbase)))))
785
786(define-public qtscript
787 (package (inherit qtsvg)
788 (name "qtscript")
789 (version "5.6.1-1")
790 (source (origin
791 (method url-fetch)
792 (uri (string-append "https://download.qt.io/official_releases/qt/"
793 (version-major+minor version) "/" version
794 "/submodules/" name "-opensource-src-"
795 version ".tar.xz"))
796 (sha256
797 (base32
798 "1gini9483flqa9q4a4bl81bh7g5s408bycqykqhgbklmfd29y5lx"))))
799 (native-inputs
800 `(("perl" ,perl)
801 ("qttools" ,qttools)))
802 (inputs
803 `(("qtbase" ,qtbase)))))
804
805(define-public qtquickcontrols
806 (package (inherit qtsvg)
807 (name "qtquickcontrols")
808 (version "5.6.1-1")
809 (source (origin
810 (method url-fetch)
811 (uri (string-append "https://download.qt.io/official_releases/qt/"
812 (version-major+minor version) "/" version
813 "/submodules/" name "-opensource-src-"
814 version ".tar.xz"))
815 (sha256
816 (base32
817 "0cjzf844r7wi32ssc9vbw1a2m9hnr8c0i1p7yyljy962ifplf401"))))
818 (inputs
819 `(("qtbase" ,qtbase)
820 ("qtdeclarative" ,qtdeclarative)))))
821
822(define-public qtquickcontrols2
823 (package (inherit qtsvg)
824 (name "qtquickcontrols2")
825 (version "5.6.1-1")
826 (source (origin
827 (method url-fetch)
828 (uri (string-append "https://download.qt.io/official_releases/qt/"
829 (version-major+minor version) "/" version
830 "/submodules/" name "-opensource-src-"
831 version ".tar.xz"))
832 (sha256
833 (base32
834 "0wfa2xcqsvx3zihd5nb9f9qhq0xn14c03sw1qdymzfsryqwmk4ac"))))
835 (inputs
836 `(("qtbase" ,qtbase)
837 ("qtdeclarative" ,qtdeclarative)))))
838
839(define-public qtgraphicaleffects
840 (package (inherit qtsvg)
841 (name "qtgraphicaleffects")
842 (version "5.6.1-1")
843 (source (origin
844 (method url-fetch)
845 (uri (string-append "https://download.qt.io/official_releases/qt/"
846 (version-major+minor version) "/" version
847 "/submodules/" name "-opensource-src-"
848 version ".tar.xz"))
849 (sha256
850 (base32
851 "0560800fa9sd6dw1vk0ia9vq8ywdrwch2cpsi1vmh4iyxgwfr71b"))))
852 (inputs
853 `(("qtbase" ,qtbase)
854 ("qtdeclarative" ,qtdeclarative)))))
855
856(define-public python-sip
857 (package
858 (name "python-sip")
859 (version "4.18")
860 (source
861 (origin
862 (method url-fetch)
863 (uri
864 (string-append "mirror://sourceforge/pyqt/sip/"
865 "sip-" version "/sip-" version ".tar.gz"))
866 (sha256
867 (base32
868 "1dlw4kyiwd9bzmd1djm79c121r219abaz86lvizdk6ksq20mrp7i"))))
869 (build-system gnu-build-system)
870 (native-inputs
871 `(("python" ,python-wrapper)))
872 (arguments
873 `(#:tests? #f ; no check target
874 #:modules ((srfi srfi-1)
875 ,@%gnu-build-system-modules)
876 #:phases
877 (modify-phases %standard-phases
878 (replace 'configure
879 (lambda* (#:key inputs outputs #:allow-other-keys)
880 (let* ((out (assoc-ref outputs "out"))
881 (bin (string-append out "/bin"))
882 (include (string-append out "/include"))
883 (python (assoc-ref inputs "python"))
884 (python-version
885 (last (string-split python #\-)))
886 (python-major+minor
887 (string-join
888 (take (string-split python-version #\.) 2)
889 "."))
890 (lib (string-append out "/lib/python"
891 python-major+minor
892 "/site-packages")))
893 (zero?
894 (system* "python" "configure.py"
895 "--bindir" bin
896 "--destdir" lib
897 "--incdir" include))))))))
898 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
899 (synopsis "Python binding creator for C and C++ libraries")
900 (description
901 "SIP is a tool to create Python bindings for C and C++ libraries. It
902was originally developed to create PyQt, the Python bindings for the Qt
903toolkit, but can be used to create bindings for any C or C++ library.
904
905SIP comprises a code generator and a Python module. The code generator
906processes a set of specification files and generates C or C++ code, which
907is then compiled to create the bindings extension module. The SIP Python
908module provides support functions to the automatically generated code.")
909 ;; There is a choice between a python like license, gpl2 and gpl3.
910 ;; For compatibility with pyqt, we need gpl3.
911 (license gpl3)))
912
913(define-public python2-sip
914 (package (inherit python-sip)
915 (name "python2-sip")
916 (native-inputs
917 `(("python" ,python-2)))))
918
919(define-public python-pyqt
920 (package
921 (name "python-pyqt")
922 (version "5.6")
923 (source
924 (origin
925 (method url-fetch)
926 (uri
927 (string-append "mirror://sourceforge/pyqt/PyQt5/"
928 "PyQt-" version "/PyQt5_gpl-"
929 version ".tar.gz"))
930 (sha256
931 (base32
932 "1qgh42zsr9jppl9k7fcdbhxcd1wrb7wyaj9lng9nxfa19in1lj1f"))
933 (patches (search-patches "pyqt-configure.patch"))))
934 (build-system gnu-build-system)
935 (native-inputs
936 `(("python-sip" ,python-sip)
937 ("qtbase" ,qtbase))) ; for qmake
938 (inputs
939 `(("python" ,python-wrapper)))
940 (arguments
941 `(#:modules ((srfi srfi-1)
942 ,@%gnu-build-system-modules)
943 #:phases
944 (modify-phases %standard-phases
945 (replace 'configure
946 (lambda* (#:key inputs outputs #:allow-other-keys)
947 (let* ((out (assoc-ref outputs "out"))
948 (bin (string-append out "/bin"))
949 (sip (string-append out "/share/sip"))
950 (plugins (string-append out "/plugins"))
951 (designer (string-append plugins "/designer"))
952 (qml (string-append plugins "/PyQt5"))
953 (python (assoc-ref inputs "python"))
954 (python-version
955 (last (string-split python #\-)))
956 (python-major+minor
957 (string-join
958 (take (string-split python-version #\.) 2)
959 "."))
960 (lib (string-append out "/lib/python"
961 python-major+minor
962 "/site-packages")))
963 (zero? (system* "python" "configure.py"
964 "--confirm-license"
965 "--bindir" bin
966 "--destdir" lib
967 "--designer-plugindir" designer
968 "--qml-plugindir" qml
969 "--sipdir" sip))))))))
970 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
971 (synopsis "Python bindings for Qt")
972 (description
973 "PyQt is a set of Python v2 and v3 bindings for the Qt application
974framework. The bindings are implemented as a set of Python modules and
975contain over 620 classes.")
976 (license gpl3)))
977
978(define-public python2-pyqt
979 (package (inherit python-pyqt)
980 (name "python2-pyqt")
981 (native-inputs
982 `(("python-sip" ,python2-sip)
983 ("qtbase" ,qtbase)))
984 (inputs
985 `(("python" ,python-2)))))
986
987(define-public python-pyqt-5.5
988 (package (inherit python-pyqt)
989 (version "5.5")
990 (source
991 (origin
992 (method url-fetch)
993 (uri
994 (string-append "mirror://sourceforge/pyqt/PyQt5/"
995 "PyQt-" version "/PyQt-gpl-"
996 version ".tar.gz"))
997 (sha256
998 (base32
999 "056qmkv02wdcfblqdaxiswrgn4wa88sz22i1x58dpb1iniavplfd"))
1000 (patches (search-patches "pyqt-configure.patch"))))
1001 (native-inputs
1002 `(("python-sip" ,python-sip)
1003 ("qt" ,qt)))))
1004
1005(define-public python2-pyqt-5.5
1006 (package (inherit python-pyqt-5.5)
1007 (name "python2-pyqt")
1008 (native-inputs
1009 `(("python-sip" ,python2-sip)
1010 ("qt" ,qt)))
1011 (inputs
1012 `(("python" ,python-2)))))
1013
1014(define-public python-pyqt-4
1015 (package (inherit python-pyqt)
1016 (name "python-pyqt")
1017 (version "4.11.4")
1018 (source
1019 (origin
1020 (method url-fetch)
1021 (uri
1022 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1023 "PyQt-" version "/PyQt-x11-gpl-"
1024 version ".tar.gz"))
1025 (sha256
1026 (base32
1027 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
1028 (native-inputs
1029 `(("python-sip" ,python-sip)
1030 ("qt" ,qt-4)))
1031 (arguments
1032 `(#:tests? #f ; no check target
1033 #:modules ((srfi srfi-1)
1034 ,@%gnu-build-system-modules)
1035 #:phases
1036 (alist-replace
1037 'configure
1038 (lambda* (#:key inputs outputs #:allow-other-keys)
1039 (let* ((out (assoc-ref outputs "out"))
1040 (bin (string-append out "/bin"))
1041 (sip (string-append out "/share/sip"))
1042 (python (assoc-ref inputs "python"))
1043 (python-version
1044 (last (string-split python #\-)))
1045 (python-major+minor
1046 (string-join
1047 (take (string-split python-version #\.) 2)
1048 "."))
1049 (lib (string-append out "/lib/python"
1050 python-major+minor
1051 "/site-packages")))
1052 (zero? (system* "python" "configure.py"
1053 "--confirm-license"
1054 "--bindir" bin
1055 "--destdir" lib
1056 "--sipdir" sip))))
1057 %standard-phases)))
1058 (license (list gpl2 gpl3)))) ; choice of either license
1059
1060(define-public qtkeychain
1061 (package
1062 (name "qtkeychain")
1063 (version "0.7.0")
1064 (source
1065 (origin
1066 (method url-fetch)
1067 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1068 "archive/v" version ".tar.gz"))
1069 (file-name (string-append name "-" version ".tar.gz"))
1070 (sha256
1071 (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
1072 (build-system cmake-build-system)
1073 (inputs
1074 `(("qt" ,qt)))
1075 (arguments
1076 `(#:tests? #f ; No tests included
1077 #:phases
1078 (modify-phases %standard-phases
1079 (add-before
1080 'configure 'set-qt-trans-dir
1081 (lambda _
1082 (substitute* "CMakeLists.txt"
1083 (("\\$\\{qt_translations_dir\\}")
1084 "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
1085 (home-page "https://github.com/frankosterfeld/qtkeychain")
1086 (synopsis "Qt API to store passwords")
1087 (description
1088 "QtKeychain is a Qt library to store passwords and other secret data
1089securely. It will not store any data unencrypted unless explicitly requested.")
1090 (license bsd-3)))