gnu: metabat: Update to 0.26.3.
[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)
7868000f
AE
325 (inputs
326 `(("alsa-lib" ,alsa-lib)
327 ("cups" ,cups)
328 ("dbus" ,dbus)
f66970a7 329 ("eudev" ,eudev)
7868000f
AE
330 ("expat" ,expat)
331 ("fontconfig" ,fontconfig)
332 ("freetype" ,freetype)
333 ("glib" ,glib)
334 ("harfbuzz" ,harfbuzz)
335 ("icu4c" ,icu4c)
f66970a7 336 ("libinput" ,libinput)
7868000f
AE
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)
763a8e6e 352 ("mesa" ,mesa)
7868000f
AE
353 ("mtdev" ,mtdev)
354 ("mysql" ,mysql)
355 ("nss" ,nss)
356 ("openssl" ,openssl)
357 ("pcre" ,pcre)
358 ("postgresql" ,postgresql)
359 ("pulseaudio" ,pulseaudio)
360 ("sqlite" ,sqlite)
361 ("unixodbc" ,unixodbc)
362 ("xcb-util" ,xcb-util)
363 ("xcb-util-image" ,xcb-util-image)
364 ("xcb-util-keysyms" ,xcb-util-keysyms)
365 ("xcb-util-renderutil" ,xcb-util-renderutil)
366 ("xcb-util-wm" ,xcb-util-wm)
367 ("zlib" ,zlib)))
368 (native-inputs
369 `(("bison" ,bison)
370 ("flex" ,flex)
371 ("gperf" ,gperf)
372 ("perl" ,perl)
373 ("pkg-config" ,pkg-config)
374 ("python" ,python-2)
375 ("ruby" ,ruby)
376 ("which" ,(@ (gnu packages base) which))))
377 (arguments
378 `(#:phases
379 (modify-phases %standard-phases
380 (add-after 'configure 'patch-bin-sh
381 (lambda _
382 (substitute* '("config.status"
383 "configure"
384 "mkspecs/features/qt_functions.prf"
385 "qmake/library/qmakebuiltins.cpp")
386 (("/bin/sh") (which "sh")))
387 #t))
388 (replace 'configure
389 (lambda* (#:key outputs #:allow-other-keys)
390 (let ((out (assoc-ref outputs "out")))
391 (substitute* "configure"
392 (("/bin/pwd") (which "pwd")))
393 (substitute* "src/corelib/global/global.pri"
394 (("/bin/ls") (which "ls")))
395 ;; do not pass "--enable-fast-install", which makes the
396 ;; configure process fail
397 (zero? (system*
398 "./configure"
399 "-verbose"
400 "-prefix" out
401 "-opensource"
402 "-confirm-license"
403 ;; Do not build examples; if desired, these could go
404 ;; into a separate output, but for the time being, we
405 ;; prefer to save the space and build time.
406 "-nomake" "examples"
407 ;; Most "-system-..." are automatic, but some use
408 ;; the bundled copy by default.
409 "-system-sqlite"
410 "-system-harfbuzz"
411 ;; explicitly link with openssl instead of dlopening it
412 "-openssl-linked"
413 ;; explicitly link with dbus instead of dlopening it
414 "-dbus-linked"
415 ;; drop special machine instructions not supported
416 ;; on all instances of the target
417 ,@(if (string-prefix? "x86_64"
418 (or (%current-target-system)
419 (%current-system)))
420 '()
421 '("-no-sse2"))
422 "-no-sse3"
423 "-no-ssse3"
424 "-no-sse4.1"
425 "-no-sse4.2"
426 "-no-avx"
427 "-no-avx2"
428 "-no-mips_dsp"
429 "-no-mips_dspr2"))))))))
430 (home-page "https://www.qt.io/")
431 (synopsis "Cross-platform GUI library")
432 (description "Qt is a cross-platform application and UI framework for
433developers using C++ or QML, a CSS & JavaScript like language.")
434 (license (list lgpl2.1 lgpl3))))
435
19c17631
EF
436(define-public qtsvg
437 (package (inherit qtbase)
438 (name "qtsvg")
7de7d8a6 439 (version "5.6.1-1")
19c17631
EF
440 (source (origin
441 (method url-fetch)
442 (uri (string-append "https://download.qt.io/official_releases/qt/"
443 (version-major+minor version) "/" version
444 "/submodules/" name "-opensource-src-"
445 version ".tar.xz"))
446 (sha256
447 (base32
7de7d8a6 448 "1w0jvhgaiddafcms2nv8wl1klg07lncmjwm1zhdw3l6rxi9071sw"))))
19c17631
EF
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")
1c16029b 472 (version "5.6.1-1")
9b694210
EF
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
1c16029b 481 "1p98acvsm3azka2by1ph4gdb31qbnndrr5k5wns4xk2d760y8ifc"))))
9b694210
EF
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")
0835e228 494 (version "5.6.1-1")
f6c13613
EF
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
0835e228 503 "0yj5yg2dqkrwbgbicmk2rpqsagmi8dsffkrprpsj0fmkx4awhv5y"))))
f6c13613
EF
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")
d547a197 512 (version "5.6.1-1")
98eec712
EF
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
d547a197 521 "1966rrk7f6c55k57j33rffdjs77kk4mawrnnl8yv1ckcirxc3np1"))))
98eec712
EF
522 (native-inputs `(("perl" ,perl)))
523 (inputs `(("qtbase" ,qtbase)))))
524
e3a2ed81
EF
525(define-public qtdeclarative
526 (package (inherit qtsvg)
527 (name "qtdeclarative")
f3a3210c 528 (version "5.6.1-1")
e3a2ed81
EF
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
f3a3210c 537 "094gx5mzqzcga97y7ihf052b6i5iv512lh7m0702m5q94nsn1pqw"))))
e3a2ed81
EF
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")
4254b206 551 (version "5.6.1-1")
e98cb96d
EF
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
4254b206 560 "0sr6sxp0q45pacs25knr28139xdrphcjgrwlksdhdpsryfw19mzi"))))
e98cb96d
EF
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")
fb767deb 572 (version "5.6.1-1")
cac893ec
EF
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
fb767deb 581 "1fz0x8570zxc00a22skd848svma3p2g3xyxj14jq10559jihqqil"))))
cac893ec
EF
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")
2743daff 590 (version "5.6.1-1")
3474767c
EF
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
2743daff 599 "0kcrvf6vzn6g2v2m70f9r3raalzmfp48rwjlqhss3w84jfz3y04r"))))
3474767c
EF
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")
99f6f56f 608 (version "5.6.1-1")
15378f93
EF
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
99f6f56f 617 "0paffx0614ivjbf87lr9klpbqik6r1pzbc14l41np6d9jv3dqa2f"))))
15378f93
EF
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")
66f26a35 632 (version "5.6.1-1")
bc8ede01
EF
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
66f26a35 641 "1fnvgpi49ilds3ah9iizxj9qhhb5rnwqd9h03bhkwf0ydywv52c4"))))
bc8ede01
EF
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
00806f2b
EF
660(define-public qtserialport
661 (package (inherit qtsvg)
662 (name "qtserialport")
33741e16 663 (version "5.6.1-1")
00806f2b
EF
664 (source (origin
665 (method url-fetch)
666 (uri (string-append "https://download.qt.io/official_releases/qt/"
667 (version-major+minor version) "/" version
668 "/submodules/" name "-opensource-src-"
669 version ".tar.xz"))
670 (sha256
671 (base32
33741e16 672 "135cbgghxk0c6dblmyyrw6znfb9m8sac9hhyc2dm6vq7vzy8id52"))))
00806f2b 673 (native-inputs `(("perl" ,perl)))
33741e16
EF
674 (inputs
675 `(("qtbase" ,qtbase)
676 ("eudev" ,eudev)))))
00806f2b 677
f5377013
EF
678(define-public qtwebchannel
679 (package (inherit qtsvg)
680 (name "qtwebchannel")
a2a25656 681 (version "5.6.1-1")
f5377013
EF
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
a2a25656 690 "10kys3ppjkj60fs1s335fdcpdsbxsjn6ibvm6zph9gqbncabd2l7"))))
f5377013
EF
691 (native-inputs
692 `(("perl" ,perl)
693 ("qtdeclarative" ,qtdeclarative)
694 ("qtwebsockets" ,qtwebsockets)))
695 (inputs `(("qtbase" ,qtbase)))))
696
d5ca54ce
EF
697(define-public qtlocation
698 (package (inherit qtsvg)
699 (name "qtlocation")
677b98ae 700 (version "5.6.1-1")
d5ca54ce
EF
701 (source (origin
702 (method url-fetch)
703 (uri (string-append "https://download.qt.io/official_releases/qt/"
704 (version-major+minor version) "/" version
705 "/submodules/" name "-opensource-src-"
706 version ".tar.xz"))
707 (sha256
708 (base32
677b98ae 709 "0my4pbcxa58yzvdh65l5qx99ln03chjr5c3ml5v37wfk7nx23k69"))))
d5ca54ce
EF
710 (native-inputs
711 `(("perl" ,perl)
712 ("qtdeclarative" ,qtdeclarative)
713 ;("qtquickcontrols" ,qtquickcontrols)
714 ("qtserialport" ,qtserialport)))
715 (inputs `(("qtbase" ,qtbase)))))
716
d438c968
EF
717(define-public qttools
718 (package (inherit qtsvg)
719 (name "qttools")
095b7fea 720 (version "5.6.1-1")
d438c968
EF
721 (source (origin
722 (method url-fetch)
723 (uri (string-append "https://download.qt.io/official_releases/qt/"
724 (version-major+minor version) "/" version
725 "/submodules/" name "-opensource-src-"
726 version ".tar.xz"))
727 (sha256
728 (base32
095b7fea 729 "0haic027a2d7p7k8xz83fbvci4a4dln34360rlwgy7hlyy5m4nip"))))
d438c968
EF
730 (native-inputs
731 `(("perl" ,perl)
732 ("qtdeclarative" ,qtdeclarative)))
733 (inputs
734 `(("mesa" ,mesa)
735 ("qtbase" ,qtbase)))))
736
dbbb45dd
AE
737(define-public qjson
738 (package
739 (name "qjson")
740 (version "0.8.1")
741 (source (origin
742 (method url-fetch)
743 (uri (string-append "https://github.com/flavio/qjson/archive/"
744 version ".tar.gz"))
745 (file-name (string-append name "-" version ".tar.gz"))
746 (sha256
747 (base32
748 "163fspi0xc705irv79qw861fmh68pjyla9vx3kqiq6xrdhb9834j"))))
749 (build-system cmake-build-system)
750 (inputs
751 `(("qt" ,qt-4)))
752 (arguments
753 `(#:tests? #f)) ; no test target
754 (home-page "http://qjson.sourceforge.net/")
755 (synopsis "Qt-based library for handling JSON")
756 (description "QJson is a Qt-based library that maps JSON data to QVariant
757objects and vice versa. JSON arrays are mapped to QVariantList instances,
758while JSON objects are mapped to QVariantMap.")
759 (license lgpl2.1+)))
760
84ef83dd
AE
761(define-public python-sip
762 (package
763 (name "python-sip")
8fa7f8d9 764 (version "4.18")
84ef83dd
AE
765 (source
766 (origin
767 (method url-fetch)
768 (uri
769 (string-append "mirror://sourceforge/pyqt/sip/"
8fa7f8d9 770 "sip-" version "/sip-" version ".tar.gz"))
84ef83dd
AE
771 (sha256
772 (base32
8fa7f8d9 773 "1dlw4kyiwd9bzmd1djm79c121r219abaz86lvizdk6ksq20mrp7i"))))
84ef83dd
AE
774 (build-system gnu-build-system)
775 (native-inputs
776 `(("python" ,python-wrapper)))
777 (arguments
778 `(#:tests? #f ; no check target
e8bdd73a
AE
779 #:modules ((srfi srfi-1)
780 ,@%gnu-build-system-modules)
84ef83dd 781 #:phases
39766868
EF
782 (modify-phases %standard-phases
783 (replace 'configure
784 (lambda* (#:key inputs outputs #:allow-other-keys)
785 (let* ((out (assoc-ref outputs "out"))
786 (bin (string-append out "/bin"))
787 (include (string-append out "/include"))
788 (python (assoc-ref inputs "python"))
789 (python-version
790 (last (string-split python #\-)))
791 (python-major+minor
792 (string-join
793 (take (string-split python-version #\.) 2)
794 "."))
795 (lib (string-append out "/lib/python"
796 python-major+minor
797 "/site-packages")))
798 (zero?
799 (system* "python" "configure.py"
800 "--bindir" bin
801 "--destdir" lib
802 "--incdir" include))))))))
803 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
84ef83dd
AE
804 (synopsis "Python binding creator for C and C++ libraries")
805 (description
806 "SIP is a tool to create Python bindings for C and C++ libraries. It
807was originally developed to create PyQt, the Python bindings for the Qt
808toolkit, but can be used to create bindings for any C or C++ library.
809
810SIP comprises a code generator and a Python module. The code generator
811processes a set of specification files and generates C or C++ code, which
812is then compiled to create the bindings extension module. The SIP Python
813module provides support functions to the automatically generated code.")
814 ;; There is a choice between a python like license, gpl2 and gpl3.
815 ;; For compatibility with pyqt, we need gpl3.
816 (license gpl3)))
817
818(define-public python2-sip
819 (package (inherit python-sip)
820 (name "python2-sip")
821 (native-inputs
822 `(("python" ,python-2)))))
014e7dd8
AE
823
824(define-public python-pyqt
825 (package
826 (name "python-pyqt")
2be06813 827 (version "5.6")
014e7dd8
AE
828 (source
829 (origin
830 (method url-fetch)
831 (uri
832 (string-append "mirror://sourceforge/pyqt/PyQt5/"
2be06813 833 "PyQt-" version "/PyQt5_gpl-"
014e7dd8
AE
834 version ".tar.gz"))
835 (sha256
836 (base32
2be06813 837 "1qgh42zsr9jppl9k7fcdbhxcd1wrb7wyaj9lng9nxfa19in1lj1f"))
fc1adab1 838 (patches (search-patches "pyqt-configure.patch"))))
014e7dd8
AE
839 (build-system gnu-build-system)
840 (native-inputs
841 `(("python-sip" ,python-sip)
2be06813 842 ("qtbase" ,qtbase))) ; for qmake
014e7dd8
AE
843 (inputs
844 `(("python" ,python-wrapper)))
845 (arguments
e8bdd73a
AE
846 `(#:modules ((srfi srfi-1)
847 ,@%gnu-build-system-modules)
848 #:phases
eef988c8
EF
849 (modify-phases %standard-phases
850 (replace 'configure
851 (lambda* (#:key inputs outputs #:allow-other-keys)
852 (let* ((out (assoc-ref outputs "out"))
853 (bin (string-append out "/bin"))
854 (sip (string-append out "/share/sip"))
855 (plugins (string-append out "/plugins"))
856 (designer (string-append plugins "/designer"))
857 (qml (string-append plugins "/PyQt5"))
858 (python (assoc-ref inputs "python"))
859 (python-version
860 (last (string-split python #\-)))
861 (python-major+minor
862 (string-join
863 (take (string-split python-version #\.) 2)
864 "."))
865 (lib (string-append out "/lib/python"
866 python-major+minor
867 "/site-packages")))
868 (zero? (system* "python" "configure.py"
869 "--confirm-license"
870 "--bindir" bin
871 "--destdir" lib
872 "--designer-plugindir" designer
873 "--qml-plugindir" qml
874 "--sipdir" sip))))))))
875 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
014e7dd8
AE
876 (synopsis "Python bindings for Qt")
877 (description
878 "PyQt is a set of Python v2 and v3 bindings for the Qt application
879framework. The bindings are implemented as a set of Python modules and
880contain over 620 classes.")
881 (license gpl3)))
882
883(define-public python2-pyqt
884 (package (inherit python-pyqt)
885 (name "python2-pyqt")
886 (native-inputs
887 `(("python-sip" ,python2-sip)
2be06813 888 ("qtbase" ,qtbase)))
014e7dd8
AE
889 (inputs
890 `(("python" ,python-2)))))
3e291958
AE
891
892(define-public python-pyqt-4
893 (package (inherit python-pyqt)
894 (name "python-pyqt")
99755491 895 (version "4.11.4")
3e291958
AE
896 (source
897 (origin
898 (method url-fetch)
899 (uri
900 (string-append "mirror://sourceforge/pyqt/PyQt4/"
901 "PyQt-" version "/PyQt-x11-gpl-"
902 version ".tar.gz"))
903 (sha256
904 (base32
99755491 905 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
3e291958
AE
906 (native-inputs
907 `(("python-sip" ,python-sip)
908 ("qt" ,qt-4)))
909 (arguments
910 `(#:tests? #f ; no check target
e8bdd73a
AE
911 #:modules ((srfi srfi-1)
912 ,@%gnu-build-system-modules)
3e291958
AE
913 #:phases
914 (alist-replace
915 'configure
916 (lambda* (#:key inputs outputs #:allow-other-keys)
917 (let* ((out (assoc-ref outputs "out"))
918 (bin (string-append out "/bin"))
919 (sip (string-append out "/share/sip"))
e8bdd73a 920 (python (assoc-ref inputs "python"))
3e291958 921 (python-version
e8bdd73a
AE
922 (last (string-split python #\-)))
923 (python-major+minor
924 (string-join
925 (take (string-split python-version #\.) 2)
926 "."))
3e291958 927 (lib (string-append out "/lib/python"
e8bdd73a 928 python-major+minor
3e291958
AE
929 "/site-packages")))
930 (zero? (system* "python" "configure.py"
931 "--confirm-license"
932 "--bindir" bin
933 "--destdir" lib
934 "--sipdir" sip))))
935 %standard-phases)))
936 (license (list gpl2 gpl3)))) ; choice of either license
937
9e81af9e
EF
938(define-public qtkeychain
939 (package
940 (name "qtkeychain")
6e8dee98 941 (version "0.7.0")
9e81af9e
EF
942 (source
943 (origin
944 (method url-fetch)
945 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
946 "archive/v" version ".tar.gz"))
947 (file-name (string-append name "-" version ".tar.gz"))
948 (sha256
6e8dee98 949 (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
9e81af9e
EF
950 (build-system cmake-build-system)
951 (inputs
b3546174 952 `(("qt" ,qt)))
9e81af9e
EF
953 (arguments
954 `(#:tests? #f ; No tests included
955 #:phases
956 (modify-phases %standard-phases
957 (add-before
958 'configure 'set-qt-trans-dir
959 (lambda _
960 (substitute* "CMakeLists.txt"
961 (("\\$\\{qt_translations_dir\\}")
962 "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
963 (home-page "https://github.com/frankosterfeld/qtkeychain")
964 (synopsis "Qt API to store passwords")
965 (description
966 "QtKeychain is a Qt library to store passwords and other secret data
967securely. It will not store any data unencrypted unless explicitly requested.")
968 (license bsd-3)))