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