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