gnu: Add qtwayland.
[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")
aece7602 305 (version "5.6.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
313 (base32
aece7602 314 "0r3jrqymnnxrig4f11xvs33c26f0kzfakbp3kcbdpv795gpc276h"))
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)
325 (propagated-inputs
326 `(("mesa" ,mesa)))
327 (inputs
328 `(("alsa-lib" ,alsa-lib)
329 ("cups" ,cups)
330 ("dbus" ,dbus)
331 ("expat" ,expat)
332 ("fontconfig" ,fontconfig)
333 ("freetype" ,freetype)
334 ("glib" ,glib)
335 ("harfbuzz" ,harfbuzz)
336 ("icu4c" ,icu4c)
337 ("libjpeg" ,libjpeg)
338 ("libmng" ,libmng)
339 ("libpng" ,libpng)
340 ("libx11" ,libx11)
341 ("libxcomposite" ,libxcomposite)
342 ("libxcursor" ,libxcursor)
343 ("libxfixes" ,libxfixes)
344 ("libxi" ,libxi)
345 ("libxinerama" ,libxinerama)
346 ("libxkbcommon" ,libxkbcommon)
347 ("libxml2" ,libxml2)
348 ("libxrandr" ,libxrandr)
349 ("libxrender" ,libxrender)
350 ("libxslt" ,libxslt)
351 ("libxtst" ,libxtst)
352 ("mtdev" ,mtdev)
353 ("mysql" ,mysql)
354 ("nss" ,nss)
355 ("openssl" ,openssl)
356 ("pcre" ,pcre)
357 ("postgresql" ,postgresql)
358 ("pulseaudio" ,pulseaudio)
359 ("sqlite" ,sqlite)
360 ("unixodbc" ,unixodbc)
361 ("xcb-util" ,xcb-util)
362 ("xcb-util-image" ,xcb-util-image)
363 ("xcb-util-keysyms" ,xcb-util-keysyms)
364 ("xcb-util-renderutil" ,xcb-util-renderutil)
365 ("xcb-util-wm" ,xcb-util-wm)
366 ("zlib" ,zlib)))
367 (native-inputs
368 `(("bison" ,bison)
369 ("flex" ,flex)
370 ("gperf" ,gperf)
371 ("perl" ,perl)
372 ("pkg-config" ,pkg-config)
373 ("python" ,python-2)
374 ("ruby" ,ruby)
375 ("which" ,(@ (gnu packages base) which))))
376 (arguments
377 `(#:phases
378 (modify-phases %standard-phases
379 (add-after 'configure 'patch-bin-sh
380 (lambda _
381 (substitute* '("config.status"
382 "configure"
383 "mkspecs/features/qt_functions.prf"
384 "qmake/library/qmakebuiltins.cpp")
385 (("/bin/sh") (which "sh")))
386 #t))
387 (replace 'configure
388 (lambda* (#:key outputs #:allow-other-keys)
389 (let ((out (assoc-ref outputs "out")))
390 (substitute* "configure"
391 (("/bin/pwd") (which "pwd")))
392 (substitute* "src/corelib/global/global.pri"
393 (("/bin/ls") (which "ls")))
394 ;; do not pass "--enable-fast-install", which makes the
395 ;; configure process fail
396 (zero? (system*
397 "./configure"
398 "-verbose"
399 "-prefix" out
400 "-opensource"
401 "-confirm-license"
402 ;; Do not build examples; if desired, these could go
403 ;; into a separate output, but for the time being, we
404 ;; prefer to save the space and build time.
405 "-nomake" "examples"
406 ;; Most "-system-..." are automatic, but some use
407 ;; the bundled copy by default.
408 "-system-sqlite"
409 "-system-harfbuzz"
410 ;; explicitly link with openssl instead of dlopening it
411 "-openssl-linked"
412 ;; explicitly link with dbus instead of dlopening it
413 "-dbus-linked"
414 ;; drop special machine instructions not supported
415 ;; on all instances of the target
416 ,@(if (string-prefix? "x86_64"
417 (or (%current-target-system)
418 (%current-system)))
419 '()
420 '("-no-sse2"))
421 "-no-sse3"
422 "-no-ssse3"
423 "-no-sse4.1"
424 "-no-sse4.2"
425 "-no-avx"
426 "-no-avx2"
427 "-no-mips_dsp"
428 "-no-mips_dspr2"))))))))
429 (home-page "https://www.qt.io/")
430 (synopsis "Cross-platform GUI library")
431 (description "Qt is a cross-platform application and UI framework for
432developers using C++ or QML, a CSS & JavaScript like language.")
433 (license (list lgpl2.1 lgpl3))))
434
19c17631
EF
435(define-public qtsvg
436 (package (inherit qtbase)
437 (name "qtsvg")
438 (version "5.6.1")
439 (source (origin
440 (method url-fetch)
441 (uri (string-append "https://download.qt.io/official_releases/qt/"
442 (version-major+minor version) "/" version
443 "/submodules/" name "-opensource-src-"
444 version ".tar.xz"))
445 (sha256
446 (base32
447 "08ca5g46g75acy27jfnvnalmcias5hxmjp7491v3y4k9y7a4ybpi"))))
448 (propagated-inputs `())
449 (native-inputs `(("perl" ,perl)))
450 (inputs
451 `(("mesa" ,mesa)
452 ("qtbase" ,qtbase)
453 ("zlib" ,zlib)))
454 (arguments
455 `(#:phases
456 (modify-phases %standard-phases
457 (replace 'configure
458 (lambda* (#:key outputs #:allow-other-keys)
459 (let ((out (assoc-ref outputs "out")))
460 (zero? (system* "qmake" (string-append "PREFIX=" out))))))
461 (add-before 'install 'fix-Makefiles
462 (lambda* (#:key inputs outputs #:allow-other-keys)
463 (let ((out (assoc-ref outputs "out"))
464 (qtbase (assoc-ref inputs "qtbase")))
465 (substitute* (find-files "." "Makefile")
466 (((string-append "INSTALL_ROOT)" qtbase))
467 (string-append "INSTALL_ROOT)" out)))))))))))
468
9b694210
EF
469(define-public qtimageformats
470 (package (inherit qtsvg)
471 (name "qtimageformats")
472 (version "5.6.1")
473 (source (origin
474 (method url-fetch)
475 (uri (string-append "https://download.qt.io/official_releases/qt/"
476 (version-major+minor version) "/" version
477 "/submodules/" name "-opensource-src-"
478 version ".tar.xz"))
479 (sha256
480 (base32
481 "020v1148433zx4g87z2r8fgff32n0laajxqqsja1l3yzz7jbrwvl"))))
482 (native-inputs `())
483 (inputs
484 `(("libmng" ,libmng)
485 ("libtiff" ,libtiff)
486 ("libwebp" ,libwebp)
487 ("mesa" ,mesa)
488 ("qtbase" ,qtbase)
489 ("zlib" ,zlib)))))
490
f6c13613
EF
491(define-public qtx11extras
492 (package (inherit qtsvg)
493 (name "qtx11extras")
494 (version "5.6.1")
495 (source (origin
496 (method url-fetch)
497 (uri (string-append "https://download.qt.io/official_releases/qt/"
498 (version-major+minor version) "/" version
499 "/submodules/" name "-opensource-src-"
500 version ".tar.xz"))
501 (sha256
502 (base32
503 "0l736qiz8adrnh267xz63hv4sph6nhy90h836qfnnmv3p78ipsz8"))))
504 (native-inputs `(("perl" ,perl)))
505 (inputs
506 `(("mesa" ,mesa)
507 ("qtbase" ,qtbase)))))
508
98eec712
EF
509(define-public qtxmlpatterns
510 (package (inherit qtsvg)
511 (name "qtxmlpatterns")
512 (version "5.6.1")
513 (source (origin
514 (method url-fetch)
515 (uri (string-append "https://download.qt.io/official_releases/qt/"
516 (version-major+minor version) "/" version
517 "/submodules/" name "-opensource-src-"
518 version ".tar.xz"))
519 (sha256
520 (base32
521 "0q412jv3xbg7v05b8pbahifwx17gzlp96s90akh6zwhpm8i6xx34"))))
522 (native-inputs `(("perl" ,perl)))
523 (inputs `(("qtbase" ,qtbase)))))
524
e3a2ed81
EF
525(define-public qtdeclarative
526 (package (inherit qtsvg)
527 (name "qtdeclarative")
528 (version "5.6.1")
529 (source (origin
530 (method url-fetch)
531 (uri (string-append "https://download.qt.io/official_releases/qt/"
532 (version-major+minor version) "/" version
533 "/submodules/" name "-opensource-src-"
534 version ".tar.xz"))
535 (sha256
536 (base32
537 "1d2217kxk85kpi7ls08b41hqzy26hvch8m4cgzq6km5sqi5zvz0j"))))
538 (native-inputs
539 `(("perl" ,perl)
540 ("pkg-config" ,pkg-config)
541 ("python" ,python-2)
542 ("qtsvg" ,qtsvg)
543 ("qtxmlpatterns" ,qtxmlpatterns)))
544 (inputs
545 `(("mesa" ,mesa)
546 ("qtbase" ,qtbase)))))
547
e98cb96d
EF
548(define-public qtconnectivity
549 (package (inherit qtsvg)
550 (name "qtconnectivity")
551 (version "5.6.1")
552 (source (origin
553 (method url-fetch)
554 (uri (string-append "https://download.qt.io/official_releases/qt/"
555 (version-major+minor version) "/" version
556 "/submodules/" name "-opensource-src-"
557 version ".tar.xz"))
558 (sha256
559 (base32
560 "06fr9321f52kf0nda9zjjfzp5694hbnx0y0v315iw28mnpvandas"))))
561 (native-inputs
562 `(("perl" ,perl)
563 ("pkg-config" ,pkg-config)
564 ("qtdeclarative" ,qtdeclarative)))
565 (inputs
566 `(("bluez" ,bluez)
567 ("qtbase" ,qtbase)))))
568
cac893ec
EF
569(define-public qtwebsockets
570 (package (inherit qtsvg)
571 (name "qtwebsockets")
572 (version "5.6.1")
573 (source (origin
574 (method url-fetch)
575 (uri (string-append "https://download.qt.io/official_releases/qt/"
576 (version-major+minor version) "/" version
577 "/submodules/" name "-opensource-src-"
578 version ".tar.xz"))
579 (sha256
580 (base32
581 "0fkj52i4yi6gmq4jfjgdij08cspxspac6mbpf0fknnllimmkl7jm"))))
582 (native-inputs
583 `(("perl" ,perl)
584 ("qtdeclarative" ,qtdeclarative)))
585 (inputs `(("qtbase" ,qtbase)))))
586
3474767c
EF
587(define-public qtsensors
588 (package (inherit qtsvg)
589 (name "qtsensors")
590 (version "5.6.1")
591 (source (origin
592 (method url-fetch)
593 (uri (string-append "https://download.qt.io/official_releases/qt/"
594 (version-major+minor version) "/" version
595 "/submodules/" name "-opensource-src-"
596 version ".tar.xz"))
597 (sha256
598 (base32
599 "0bll7ll6s5g8w89knyrc0famjwqyfzwpn512m1f96bf6xwacs967"))))
600 (native-inputs
601 `(("perl" ,perl)
602 ("qtdeclarative" ,qtdeclarative)))
603 (inputs `(("qtbase" ,qtbase)))))
604
15378f93
EF
605(define-public qtmultimedia
606 (package (inherit qtsvg)
607 (name "qtmultimedia")
608 (version "5.6.1")
609 (source (origin
610 (method url-fetch)
611 (uri (string-append "https://download.qt.io/official_releases/qt/"
612 (version-major+minor version) "/" version
613 "/submodules/" name "-opensource-src-"
614 version ".tar.xz"))
615 (sha256
616 (base32
617 "058523c2qra3d8fq46ygcndnkrbwlh316zy28s2cr5pjr5gmnjyj"))))
618 (native-inputs
619 `(("perl" ,perl)
620 ("pkg-config" ,pkg-config)
621 ("python" ,python-2)
622 ("qtdeclarative" ,qtdeclarative)))
623 (inputs
624 `(("alsa-lib" ,alsa-lib)
625 ("mesa" ,mesa)
626 ("pulseaudio" ,pulseaudio)
627 ("qtbase" ,qtbase)))))
628
bc8ede01
EF
629(define-public qtwayland
630 (package (inherit qtsvg)
631 (name "qtwayland")
632 (version "5.6.1")
633 (source (origin
634 (method url-fetch)
635 (uri (string-append "https://download.qt.io/official_releases/qt/"
636 (version-major+minor version) "/" version
637 "/submodules/" name "-opensource-src-"
638 version ".tar.xz"))
639 (sha256
640 (base32
641 "1jgghjfrg0wwyfzfwgwhagwxz9k936ylv3w2l9bwlpql8rgm8d11"))))
642 (native-inputs
643 `(("glib" ,glib)
644 ("perl" ,perl)
645 ("pkg-config" ,pkg-config)
646 ("qtdeclarative" ,qtdeclarative)))
647 (inputs
648 `(("fontconfig" ,fontconfig)
649 ("freetype" ,freetype)
650 ("libx11" ,libx11)
651 ("libxcomposite" ,libxcomposite)
652 ("libxext" ,libxext)
653 ("libxkbcommon" ,libxkbcommon)
654 ("libxrender" ,libxrender)
655 ("mesa" ,mesa)
656 ("mtdev" ,mtdev)
657 ("qtbase" ,qtbase)
658 ("wayland" ,wayland)))))
659
dbbb45dd
AE
660(define-public qjson
661 (package
662 (name "qjson")
663 (version "0.8.1")
664 (source (origin
665 (method url-fetch)
666 (uri (string-append "https://github.com/flavio/qjson/archive/"
667 version ".tar.gz"))
668 (file-name (string-append name "-" version ".tar.gz"))
669 (sha256
670 (base32
671 "163fspi0xc705irv79qw861fmh68pjyla9vx3kqiq6xrdhb9834j"))))
672 (build-system cmake-build-system)
673 (inputs
674 `(("qt" ,qt-4)))
675 (arguments
676 `(#:tests? #f)) ; no test target
677 (home-page "http://qjson.sourceforge.net/")
678 (synopsis "Qt-based library for handling JSON")
679 (description "QJson is a Qt-based library that maps JSON data to QVariant
680objects and vice versa. JSON arrays are mapped to QVariantList instances,
681while JSON objects are mapped to QVariantMap.")
682 (license lgpl2.1+)))
683
84ef83dd
AE
684(define-public python-sip
685 (package
686 (name "python-sip")
8fa7f8d9 687 (version "4.18")
84ef83dd
AE
688 (source
689 (origin
690 (method url-fetch)
691 (uri
692 (string-append "mirror://sourceforge/pyqt/sip/"
8fa7f8d9 693 "sip-" version "/sip-" version ".tar.gz"))
84ef83dd
AE
694 (sha256
695 (base32
8fa7f8d9 696 "1dlw4kyiwd9bzmd1djm79c121r219abaz86lvizdk6ksq20mrp7i"))))
84ef83dd
AE
697 (build-system gnu-build-system)
698 (native-inputs
699 `(("python" ,python-wrapper)))
700 (arguments
701 `(#:tests? #f ; no check target
e8bdd73a
AE
702 #:modules ((srfi srfi-1)
703 ,@%gnu-build-system-modules)
84ef83dd 704 #:phases
39766868
EF
705 (modify-phases %standard-phases
706 (replace 'configure
707 (lambda* (#:key inputs outputs #:allow-other-keys)
708 (let* ((out (assoc-ref outputs "out"))
709 (bin (string-append out "/bin"))
710 (include (string-append out "/include"))
711 (python (assoc-ref inputs "python"))
712 (python-version
713 (last (string-split python #\-)))
714 (python-major+minor
715 (string-join
716 (take (string-split python-version #\.) 2)
717 "."))
718 (lib (string-append out "/lib/python"
719 python-major+minor
720 "/site-packages")))
721 (zero?
722 (system* "python" "configure.py"
723 "--bindir" bin
724 "--destdir" lib
725 "--incdir" include))))))))
726 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
84ef83dd
AE
727 (synopsis "Python binding creator for C and C++ libraries")
728 (description
729 "SIP is a tool to create Python bindings for C and C++ libraries. It
730was originally developed to create PyQt, the Python bindings for the Qt
731toolkit, but can be used to create bindings for any C or C++ library.
732
733SIP comprises a code generator and a Python module. The code generator
734processes a set of specification files and generates C or C++ code, which
735is then compiled to create the bindings extension module. The SIP Python
736module provides support functions to the automatically generated code.")
737 ;; There is a choice between a python like license, gpl2 and gpl3.
738 ;; For compatibility with pyqt, we need gpl3.
739 (license gpl3)))
740
741(define-public python2-sip
742 (package (inherit python-sip)
743 (name "python2-sip")
744 (native-inputs
745 `(("python" ,python-2)))))
014e7dd8
AE
746
747(define-public python-pyqt
748 (package
749 (name "python-pyqt")
2be06813 750 (version "5.6")
014e7dd8
AE
751 (source
752 (origin
753 (method url-fetch)
754 (uri
755 (string-append "mirror://sourceforge/pyqt/PyQt5/"
2be06813 756 "PyQt-" version "/PyQt5_gpl-"
014e7dd8
AE
757 version ".tar.gz"))
758 (sha256
759 (base32
2be06813 760 "1qgh42zsr9jppl9k7fcdbhxcd1wrb7wyaj9lng9nxfa19in1lj1f"))
fc1adab1 761 (patches (search-patches "pyqt-configure.patch"))))
014e7dd8
AE
762 (build-system gnu-build-system)
763 (native-inputs
764 `(("python-sip" ,python-sip)
2be06813 765 ("qtbase" ,qtbase))) ; for qmake
014e7dd8
AE
766 (inputs
767 `(("python" ,python-wrapper)))
768 (arguments
e8bdd73a
AE
769 `(#:modules ((srfi srfi-1)
770 ,@%gnu-build-system-modules)
771 #:phases
eef988c8
EF
772 (modify-phases %standard-phases
773 (replace 'configure
774 (lambda* (#:key inputs outputs #:allow-other-keys)
775 (let* ((out (assoc-ref outputs "out"))
776 (bin (string-append out "/bin"))
777 (sip (string-append out "/share/sip"))
778 (plugins (string-append out "/plugins"))
779 (designer (string-append plugins "/designer"))
780 (qml (string-append plugins "/PyQt5"))
781 (python (assoc-ref inputs "python"))
782 (python-version
783 (last (string-split python #\-)))
784 (python-major+minor
785 (string-join
786 (take (string-split python-version #\.) 2)
787 "."))
788 (lib (string-append out "/lib/python"
789 python-major+minor
790 "/site-packages")))
791 (zero? (system* "python" "configure.py"
792 "--confirm-license"
793 "--bindir" bin
794 "--destdir" lib
795 "--designer-plugindir" designer
796 "--qml-plugindir" qml
797 "--sipdir" sip))))))))
798 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
014e7dd8
AE
799 (synopsis "Python bindings for Qt")
800 (description
801 "PyQt is a set of Python v2 and v3 bindings for the Qt application
802framework. The bindings are implemented as a set of Python modules and
803contain over 620 classes.")
804 (license gpl3)))
805
806(define-public python2-pyqt
807 (package (inherit python-pyqt)
808 (name "python2-pyqt")
809 (native-inputs
810 `(("python-sip" ,python2-sip)
2be06813 811 ("qtbase" ,qtbase)))
014e7dd8
AE
812 (inputs
813 `(("python" ,python-2)))))
3e291958
AE
814
815(define-public python-pyqt-4
816 (package (inherit python-pyqt)
817 (name "python-pyqt")
99755491 818 (version "4.11.4")
3e291958
AE
819 (source
820 (origin
821 (method url-fetch)
822 (uri
823 (string-append "mirror://sourceforge/pyqt/PyQt4/"
824 "PyQt-" version "/PyQt-x11-gpl-"
825 version ".tar.gz"))
826 (sha256
827 (base32
99755491 828 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
3e291958
AE
829 (native-inputs
830 `(("python-sip" ,python-sip)
831 ("qt" ,qt-4)))
832 (arguments
833 `(#:tests? #f ; no check target
e8bdd73a
AE
834 #:modules ((srfi srfi-1)
835 ,@%gnu-build-system-modules)
3e291958
AE
836 #:phases
837 (alist-replace
838 'configure
839 (lambda* (#:key inputs outputs #:allow-other-keys)
840 (let* ((out (assoc-ref outputs "out"))
841 (bin (string-append out "/bin"))
842 (sip (string-append out "/share/sip"))
e8bdd73a 843 (python (assoc-ref inputs "python"))
3e291958 844 (python-version
e8bdd73a
AE
845 (last (string-split python #\-)))
846 (python-major+minor
847 (string-join
848 (take (string-split python-version #\.) 2)
849 "."))
3e291958 850 (lib (string-append out "/lib/python"
e8bdd73a 851 python-major+minor
3e291958
AE
852 "/site-packages")))
853 (zero? (system* "python" "configure.py"
854 "--confirm-license"
855 "--bindir" bin
856 "--destdir" lib
857 "--sipdir" sip))))
858 %standard-phases)))
859 (license (list gpl2 gpl3)))) ; choice of either license
860
9e81af9e
EF
861(define-public qtkeychain
862 (package
863 (name "qtkeychain")
6e8dee98 864 (version "0.7.0")
9e81af9e
EF
865 (source
866 (origin
867 (method url-fetch)
868 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
869 "archive/v" version ".tar.gz"))
870 (file-name (string-append name "-" version ".tar.gz"))
871 (sha256
6e8dee98 872 (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
9e81af9e
EF
873 (build-system cmake-build-system)
874 (inputs
b3546174 875 `(("qt" ,qt)))
9e81af9e
EF
876 (arguments
877 `(#:tests? #f ; No tests included
878 #:phases
879 (modify-phases %standard-phases
880 (add-before
881 'configure 'set-qt-trans-dir
882 (lambda _
883 (substitute* "CMakeLists.txt"
884 (("\\$\\{qt_translations_dir\\}")
885 "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
886 (home-page "https://github.com/frankosterfeld/qtkeychain")
887 (synopsis "Qt API to store passwords")
888 (description
889 "QtKeychain is a Qt library to store passwords and other secret data
890securely. It will not store any data unencrypted unless explicitly requested.")
891 (license bsd-3)))