gnu: python-pyqt: Update to 5.8.2.
[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>
843bdfb7 5;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
f048f12b 6;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
fc381a33 7;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
bd677c2d
AE
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages qt)
225941b0 25 #:use-module ((guix licenses) #:prefix license:)
bd677c2d
AE
26 #:use-module (guix packages)
27 #:use-module (guix download)
f198ffd0 28 #:use-module (guix build utils)
9e81af9e 29 #:use-module (guix build-system cmake)
bd677c2d 30 #:use-module (guix build-system gnu)
84ef83dd
AE
31 #:use-module (guix packages)
32 #:use-module (guix utils)
1e9ed0e3 33 #:use-module (gnu packages)
b332e366
AE
34 #:use-module (gnu packages bison)
35 #:use-module (gnu packages compression)
2cba3d6f
SB
36 #:use-module (gnu packages cups)
37 #:use-module (gnu packages databases)
aa8c0ada 38 #:use-module (gnu packages documentation)
b332e366 39 #:use-module (gnu packages fontutils)
0009ed71 40 #:use-module (gnu packages flex)
bc8ede01 41 #:use-module (gnu packages freedesktop)
8b6a5e0f 42 #:use-module (gnu packages gl)
b332e366 43 #:use-module (gnu packages glib)
0009ed71
SB
44 #:use-module (gnu packages gnuzilla)
45 #:use-module (gnu packages gperf)
f7fb0ccb 46 #:use-module (gnu packages gtk)
b332e366 47 #:use-module (gnu packages icu4c)
e55354b8 48 #:use-module (gnu packages image)
b332e366 49 #:use-module (gnu packages linux)
04f8decf 50 #:use-module (gnu packages maths)
0009ed71
SB
51 #:use-module (gnu packages pciutils)
52 #:use-module (gnu packages pcre)
b332e366
AE
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages pkg-config)
39fa8f6c 55 #:use-module (gnu packages pulseaudio)
b332e366 56 #:use-module (gnu packages python)
8b6a5e0f 57 #:use-module (gnu packages ruby)
51519fd3 58 #:use-module (gnu packages sdl)
cc2b77df 59 #:use-module (gnu packages tls)
0009ed71
SB
60 #:use-module (gnu packages xdisorg)
61 #:use-module (gnu packages xorg)
62 #:use-module (gnu packages xml))
bd677c2d 63
aa8c0ada
TD
64(define-public grantlee
65 (package
66 (name "grantlee")
67 (version "5.1.0")
68 (source
69 (origin
70 (method url-fetch)
71 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
72 version ".tar.gz"))
73 (file-name (string-append name "-" version ".tar.gz"))
74 (sha256
75 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
76 (native-inputs
77 `(("doxygen" ,doxygen)))
78 (inputs
79 `(("qtbase" ,qtbase)
80 ("qtscript" ,qtscript)))
81 (build-system cmake-build-system)
82 (arguments
83 `(#:phases
84 (modify-phases %standard-phases
85 (replace 'check
86 (lambda _
87 (zero? (system* "ctest" ;; exclude 2 tests which require a display
88 "-E" "htmlbuildertest|plainmarkupbuildertest")))))))
89 (home-page "https://github.com/steveire/grantlee")
90 (synopsis "Libraries for text templating with Qt")
91 (description "Grantlee Templates can be used for theming and generation of
92other text such as code. The syntax uses the syntax of the Django template
93system, and the core design of Django is reused in Grantlee.")
94 (license license:lgpl2.0+)))
95
b332e366
AE
96(define-public qt
97 (package
98 (name "qt")
2e36f7e6 99 (version "5.6.2")
b332e366
AE
100 (source (origin
101 (method url-fetch)
f7fb0ccb
AE
102 (uri
103 (string-append
104 "http://download.qt.io/official_releases/qt/"
105 (version-major+minor version)
106 "/" version
107 "/single/qt-everywhere-opensource-src-"
108 version ".tar.xz"))
b332e366 109 (sha256
f7fb0ccb 110 (base32
2e36f7e6 111 "1cw93mrlkqbwndfqyjpsvjzkpzi39px2is040xvk18mvg3y1prl3"))
14bcc1e1
AE
112 (modules '((guix build utils)))
113 (snippet
bc554b43
AE
114 '(begin
115 ;; Remove qtwebengine, which relies on a bundled copy of
116 ;; chromium. Not only does it fail compilation in qt 5.5:
117 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
118 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
119 ;; it might also pose security problems.
120 ;; Alternatively, we could use the "-skip qtwebengine"
121 ;; configuration option.
122 (delete-file-recursively "qtwebengine")
123 ;; Remove one of the two bundled harfbuzz copies in addition
124 ;; to passing "-system-harfbuzz".
9c32e1fe
AE
125 (delete-file-recursively "qtbase/src/3rdparty/harfbuzz-ng")
126 ;; Remove the bundled sqlite copy in addition to
127 ;; passing "-system-sqlite".
128 (delete-file-recursively "qtbase/src/3rdparty/sqlite")))))
b332e366 129 (build-system gnu-build-system)
ef0cf53e
AE
130 (propagated-inputs
131 `(("mesa" ,mesa)))
b332e366 132 (inputs
b332e366
AE
133 `(("alsa-lib" ,alsa-lib)
134 ("dbus" ,dbus)
2cba3d6f 135 ("cups" ,cups)
0009ed71 136 ("expat" ,expat)
b332e366
AE
137 ("fontconfig" ,fontconfig)
138 ("freetype" ,freetype)
139 ("glib" ,glib)
f7fb0ccb 140 ("harfbuzz" ,harfbuzz)
b332e366 141 ("icu4c" ,icu4c)
f198ffd0 142 ("libjpeg" ,libjpeg)
2cba3d6f 143 ("libmng" ,libmng)
0009ed71 144 ("libpci" ,pciutils)
b332e366
AE
145 ("libpng" ,libpng)
146 ("libx11" ,libx11)
0009ed71
SB
147 ("libxcomposite" ,libxcomposite)
148 ("libxcursor" ,libxcursor)
149 ("libxfixes" ,libxfixes)
b332e366 150 ("libxi" ,libxi)
0009ed71 151 ("libxinerama" ,libxinerama)
b332e366 152 ("libxkbcommon" ,libxkbcommon)
0009ed71
SB
153 ("libxml2" ,libxml2)
154 ("libxrandr" ,libxrandr)
b332e366 155 ("libxrender" ,libxrender)
0009ed71
SB
156 ("libxslt" ,libxslt)
157 ("libxtst" ,libxtst)
158 ("mtdev" ,mtdev)
b332e366 159 ("mysql" ,mysql)
0009ed71 160 ("nss" ,nss)
b332e366 161 ("openssl" ,openssl)
2cba3d6f 162 ("postgresql" ,postgresql)
39fa8f6c 163 ("pulseaudio" ,pulseaudio)
0009ed71
SB
164 ("pcre" ,pcre)
165 ("sqlite" ,sqlite)
166 ("udev" ,eudev)
2cba3d6f 167 ("unixodbc" ,unixodbc)
b332e366
AE
168 ("xcb-util" ,xcb-util)
169 ("xcb-util-image" ,xcb-util-image)
170 ("xcb-util-keysyms" ,xcb-util-keysyms)
171 ("xcb-util-renderutil" ,xcb-util-renderutil)
172 ("xcb-util-wm" ,xcb-util-wm)
173 ("zlib" ,zlib)))
c4c4cc05 174 (native-inputs
0009ed71
SB
175 `(("bison" ,bison)
176 ("flex" ,flex)
177 ("gperf" ,gperf)
0009ed71
SB
178 ("perl" ,perl)
179 ("pkg-config" ,pkg-config)
180 ("python" ,python-2)
181 ("ruby" ,ruby)
ce0614dd 182 ("which" ,(@ (gnu packages base) which))))
b332e366 183 (arguments
46854e99
AE
184 `(;; FIXME: Disabling parallel building is a quick hack to avoid the
185 ;; failure described in
186 ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
187 ;; A more structural fix is needed.
188 #:parallel-build? #f
189 #:phases
cce28b0c 190 (modify-phases %standard-phases
2470d779
AE
191 (add-after 'configure 'patch-bin-sh
192 (lambda _
193 (substitute* '("qtbase/config.status"
194 "qtbase/configure"
195 "qtbase/mkspecs/features/qt_functions.prf"
196 "qtbase/qmake/library/qmakebuiltins.cpp")
197 (("/bin/sh") (which "sh")))
198 #t))
cce28b0c
AE
199 (replace 'configure
200 (lambda* (#:key outputs #:allow-other-keys)
201 (let ((out (assoc-ref outputs "out")))
202 (substitute* '("configure" "qtbase/configure")
203 (("/bin/pwd") (which "pwd")))
204 (substitute* "qtbase/src/corelib/global/global.pri"
205 (("/bin/ls") (which "ls")))
206 ;; do not pass "--enable-fast-install", which makes the
207 ;; configure process fail
208 (zero? (system*
209 "./configure"
210 "-verbose"
211 "-prefix" out
212 "-opensource"
213 "-confirm-license"
4dd0a8b6
EF
214 ;; Do not build examples; if desired, these could go
215 ;; into a separate output, but for the time being, we
216 ;; prefer to save the space and build time.
217 "-nomake" "examples"
cce28b0c
AE
218 ;; Most "-system-..." are automatic, but some use
219 ;; the bundled copy by default.
220 "-system-sqlite"
221 "-system-harfbuzz"
222 ;; explicitly link with openssl instead of dlopening it
223 "-openssl-linked"
224 ;; explicitly link with dbus instead of dlopening it
225 "-dbus-linked"
226 ;; drop special machine instructions not supported
227 ;; on all instances of the target
228 ,@(if (string-prefix? "x86_64"
229 (or (%current-target-system)
230 (%current-system)))
231 '()
232 '("-no-sse2"))
233 "-no-sse3"
234 "-no-ssse3"
235 "-no-sse4.1"
236 "-no-sse4.2"
237 "-no-avx"
238 "-no-avx2"
239 "-no-mips_dsp"
240 "-no-mips_dspr2"))))))))
2e36f7e6 241 (home-page "https://www.qt.io/")
b332e366
AE
242 (synopsis "Cross-platform GUI library")
243 (description "Qt is a cross-platform application and UI framework for
244developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 245 (license license:lgpl2.1)
f47638a3
LC
246
247 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
248 ;; see <http://hydra.gnu.org/build/112828>.
249 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
250 (supported-systems (delete "mips64el-linux" %supported-systems))))
1e9ed0e3
AE
251
252(define-public qt-4
253 (package (inherit qt)
d22b9397 254 (version "4.8.7")
1e9ed0e3
AE
255 (source (origin
256 (method url-fetch)
257 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
258 (string-copy version 0 (string-rindex version #\.))
259 "/" version
89059aa1 260 "/qt-everywhere-opensource-src-"
1e9ed0e3
AE
261 version ".tar.gz"))
262 (sha256
263 (base32
d22b9397 264 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
fc1adab1 265 (patches (search-patches "qt4-ldflags.patch"))
7431edea
AE
266 (modules '((guix build utils)))
267 (snippet
268 ;; Remove webkit module, which is not built.
269 '(delete-file-recursively "src/3rdparty/webkit"))))
f7fb0ccb
AE
270 (inputs `(,@(alist-delete "harfbuzz"
271 (alist-delete "libjpeg" (package-inputs qt)))
e7e5a4f8
AE
272 ("libjepg" ,libjpeg-8)
273 ("libsm" ,libsm)))
31580979
LC
274
275 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
276 ;; but we can't make them a separate output because "out" and "examples"
277 ;; would refer to each other.
278 (outputs '("out" ;112MiB core + 37MiB examples
279 "doc")) ;280MiB of HTML + code
1e9ed0e3
AE
280 (arguments
281 `(#:phases
cba632c4
LC
282 (modify-phases %standard-phases
283 (replace
1e9ed0e3
AE
284 'configure
285 (lambda* (#:key outputs #:allow-other-keys)
31580979
LC
286 (let ((out (assoc-ref outputs "out"))
287 (doc (assoc-ref outputs "doc")))
1e9ed0e3 288 (substitute* '("configure")
d2984346
LC
289 (("/bin/pwd") (which "pwd")))
290
206a5208
AE
291 (zero? (system*
292 "./configure"
293 "-verbose"
294 "-prefix" out
4b0f2ef7
LC
295 ;; Note: Don't pass '-docdir' since 'qmake' and
296 ;; libQtCore would record its value, thereby defeating
297 ;; the whole point of having a separate output.
ff1989a5
LC
298 "-datadir" (string-append out "/share/qt-" ,version
299 "/data")
300 "-importdir" (string-append out "/lib/qt-4"
301 "/imports")
302 "-plugindir" (string-append out "/lib/qt-4"
303 "/plugins")
304 "-translationdir" (string-append out "/share/qt-" ,version
305 "/translations")
31580979
LC
306 "-demosdir" (string-append out "/share/qt-" ,version
307 "/demos")
308 "-examplesdir" (string-append out "/share/qt-" ,version
309 "/examples")
206a5208
AE
310 "-opensource"
311 "-confirm-license"
ff0a8c59
AE
312 ;; explicitly link with dbus instead of dlopening it
313 "-dbus-linked"
7431edea
AE
314 ;; Skip the webkit module; it fails to build on armhf
315 ;; and, apart from that, may pose security risks.
316 "-no-webkit"
206a5208
AE
317 ;; drop special machine instructions not supported
318 ;; on all instances of the target
319 ,@(if (string-prefix? "x86_64"
320 (or (%current-target-system)
321 (%current-system)))
322 '()
323 '("-no-mmx"
1e9ed0e3
AE
324 "-no-3dnow"
325 "-no-sse"
206a5208
AE
326 "-no-sse2"))
327 "-no-sse3"
328 "-no-ssse3"
329 "-no-sse4.1"
330 "-no-sse4.2"
84811c22 331 "-no-avx")))))
4b0f2ef7
LC
332 (add-after
333 'install 'move-doc
334 (lambda* (#:key outputs #:allow-other-keys)
335 ;; Because of qt4-documentation-path.patch, documentation ends up
336 ;; being installed in OUT. Move it to the right place.
337 (let* ((out (assoc-ref outputs "out"))
338 (doc (assoc-ref outputs "doc"))
339 (olddoc (string-append out "/doc"))
340 (docdir (string-append doc "/share/doc/qt-" ,version)))
341 (mkdir-p (dirname docdir))
342
343 ;; Note: We can't use 'rename-file' here because OUT and DOC are
344 ;; different "devices" due to bind-mounts.
345 (copy-recursively olddoc docdir)
346 (delete-file-recursively olddoc)
347 #t))))))))
84ef83dd 348
7868000f
AE
349(define-public qtbase
350 (package
351 (name "qtbase")
a20e00dd 352 (version "5.8.0")
7868000f
AE
353 (source (origin
354 (method url-fetch)
355 (uri (string-append "https://download.qt.io/official_releases/qt/"
356 (version-major+minor version) "/" version
357 "/submodules/" name "-opensource-src-"
358 version ".tar.xz"))
359 (sha256
c7386f4e 360 (base32
a20e00dd 361 "01f07yjly7y24njl2h4hyknmi7pf8yd9gky23szcfkd40ap12wf1"))
7868000f
AE
362 (modules '((guix build utils)))
363 (snippet
364 '(begin
365 ;; Remove one of the two bundled harfbuzz copies in addition
366 ;; to passing "-system-harfbuzz".
367 (delete-file-recursively "src/3rdparty/harfbuzz-ng")
368 ;; Remove the bundled sqlite copy in addition to
369 ;; passing "-system-sqlite".
370 (delete-file-recursively "src/3rdparty/sqlite")))))
371 (build-system gnu-build-system)
48d4ce6e
EF
372 (propagated-inputs
373 `(("mesa" ,mesa)))
7868000f
AE
374 (inputs
375 `(("alsa-lib" ,alsa-lib)
376 ("cups" ,cups)
377 ("dbus" ,dbus)
04f8decf 378 ("double-conversion" ,double-conversion)
f66970a7 379 ("eudev" ,eudev)
7868000f
AE
380 ("expat" ,expat)
381 ("fontconfig" ,fontconfig)
382 ("freetype" ,freetype)
383 ("glib" ,glib)
384 ("harfbuzz" ,harfbuzz)
385 ("icu4c" ,icu4c)
f66970a7 386 ("libinput" ,libinput)
7868000f
AE
387 ("libjpeg" ,libjpeg)
388 ("libmng" ,libmng)
389 ("libpng" ,libpng)
390 ("libx11" ,libx11)
391 ("libxcomposite" ,libxcomposite)
392 ("libxcursor" ,libxcursor)
393 ("libxfixes" ,libxfixes)
394 ("libxi" ,libxi)
395 ("libxinerama" ,libxinerama)
396 ("libxkbcommon" ,libxkbcommon)
397 ("libxml2" ,libxml2)
398 ("libxrandr" ,libxrandr)
399 ("libxrender" ,libxrender)
400 ("libxslt" ,libxslt)
401 ("libxtst" ,libxtst)
402 ("mtdev" ,mtdev)
403 ("mysql" ,mysql)
404 ("nss" ,nss)
405 ("openssl" ,openssl)
406 ("pcre" ,pcre)
407 ("postgresql" ,postgresql)
408 ("pulseaudio" ,pulseaudio)
409 ("sqlite" ,sqlite)
410 ("unixodbc" ,unixodbc)
411 ("xcb-util" ,xcb-util)
412 ("xcb-util-image" ,xcb-util-image)
413 ("xcb-util-keysyms" ,xcb-util-keysyms)
414 ("xcb-util-renderutil" ,xcb-util-renderutil)
415 ("xcb-util-wm" ,xcb-util-wm)
416 ("zlib" ,zlib)))
417 (native-inputs
418 `(("bison" ,bison)
419 ("flex" ,flex)
420 ("gperf" ,gperf)
421 ("perl" ,perl)
422 ("pkg-config" ,pkg-config)
423 ("python" ,python-2)
424 ("ruby" ,ruby)
425 ("which" ,(@ (gnu packages base) which))))
426 (arguments
427 `(#:phases
428 (modify-phases %standard-phases
429 (add-after 'configure 'patch-bin-sh
430 (lambda _
431 (substitute* '("config.status"
432 "configure"
433 "mkspecs/features/qt_functions.prf"
434 "qmake/library/qmakebuiltins.cpp")
435 (("/bin/sh") (which "sh")))
436 #t))
437 (replace 'configure
438 (lambda* (#:key outputs #:allow-other-keys)
439 (let ((out (assoc-ref outputs "out")))
440 (substitute* "configure"
441 (("/bin/pwd") (which "pwd")))
442 (substitute* "src/corelib/global/global.pri"
443 (("/bin/ls") (which "ls")))
7972d8a2
AE
444 ;; The configuration files for other Qt5 packages are searched
445 ;; through a call to "find_package" in Qt5Config.cmake, which
446 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
447 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
448 ;; components can be installed in different places.
449 (substitute* (find-files "." ".*\\.cmake")
450 (("NO_DEFAULT_PATH") ""))
7868000f
AE
451 ;; do not pass "--enable-fast-install", which makes the
452 ;; configure process fail
453 (zero? (system*
454 "./configure"
455 "-verbose"
456 "-prefix" out
457 "-opensource"
458 "-confirm-license"
459 ;; Do not build examples; if desired, these could go
460 ;; into a separate output, but for the time being, we
461 ;; prefer to save the space and build time.
462 "-nomake" "examples"
463 ;; Most "-system-..." are automatic, but some use
464 ;; the bundled copy by default.
465 "-system-sqlite"
466 "-system-harfbuzz"
467 ;; explicitly link with openssl instead of dlopening it
468 "-openssl-linked"
469 ;; explicitly link with dbus instead of dlopening it
470 "-dbus-linked"
4e825e2d
EF
471 ;; don't use the precompiled headers
472 "-no-pch"
473 ;; drop special machine instructions that do not have
474 ;; runtime detection
7868000f
AE
475 ,@(if (string-prefix? "x86_64"
476 (or (%current-target-system)
477 (%current-system)))
478 '()
479 '("-no-sse2"))
7868000f 480 "-no-mips_dsp"
5ca6ef95
SB
481 "-no-mips_dspr2")))))
482 (add-after 'install 'patch-qt_config.prf
483 (lambda* (#:key outputs #:allow-other-keys)
484 (let* ((out (assoc-ref outputs "out"))
485 (qt_config.prf (string-append
486 out "/mkspecs/features/qt_config.prf")))
487 ;; For each Qt module, let `qmake' uses search paths in the
488 ;; module directory instead of all in QT_INSTALL_PREFIX.
489 (substitute* qt_config.prf
490 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
491 "$$replace(dir, mkspecs/modules, include)")
492 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
493 "$$replace(dir, mkspecs/modules, lib)")
494 (("\\$\\$\\[QT_HOST_LIBS\\]")
495 "$$replace(dir, mkspecs/modules, lib)")
496 (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
497 "$$replace(dir, mkspecs/modules, plugins)")
498 (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
499 "$$replace(dir, mkspecs/modules, libexec)")
500 (("\\$\\$\\[QT_INSTALL_BINS\\]")
501 "$$replace(dir, mkspecs/modules, bin)")
502 (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
503 "$$replace(dir, mkspecs/modules, imports)")
504 (("\\$\\$\\[QT_INSTALL_QML\\]")
505 "$$replace(dir, mkspecs/modules, qml)"))
506 #t))))))
507 (native-search-paths
508 (list (search-path-specification
509 (variable "QMAKEPATH")
ed02e1fe
DC
510 (files '("")))
511 (search-path-specification
512 (variable "QML2_IMPORT_PATH")
513 (files '("qml")))
514 (search-path-specification
515 (variable "QT_PLUGIN_PATH")
516 (files '("plugins")))
517 (search-path-specification
518 (variable "XDG_DATA_DIRS")
519 (files '("share")))
520 (search-path-specification
521 (variable "XDG_CONFIG_DIRS")
522 (files '("etc/xdg")))))
7868000f
AE
523 (home-page "https://www.qt.io/")
524 (synopsis "Cross-platform GUI library")
525 (description "Qt is a cross-platform application and UI framework for
526developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 527 (license (list license:lgpl2.1 license:lgpl3))))
7868000f 528
19c17631
EF
529(define-public qtsvg
530 (package (inherit qtbase)
531 (name "qtsvg")
a20e00dd 532 (version "5.8.0")
19c17631
EF
533 (source (origin
534 (method url-fetch)
535 (uri (string-append "https://download.qt.io/official_releases/qt/"
536 (version-major+minor version) "/" version
537 "/submodules/" name "-opensource-src-"
538 version ".tar.xz"))
539 (sha256
540 (base32
a20e00dd 541 "12fwzbp28szqw1sk3flb8i6xnxgl94siwyy41ffdmd0s44f1jwwq"))))
48d4ce6e 542 (propagated-inputs `())
19c17631
EF
543 (native-inputs `(("perl" ,perl)))
544 (inputs
545 `(("mesa" ,mesa)
546 ("qtbase" ,qtbase)
547 ("zlib" ,zlib)))
548 (arguments
549 `(#:phases
550 (modify-phases %standard-phases
551 (replace 'configure
552 (lambda* (#:key outputs #:allow-other-keys)
553 (let ((out (assoc-ref outputs "out")))
c195b5ba
EF
554 ;; Valid QT_BUILD_PARTS variables are:
555 ;; libs tools tests examples demos docs translations
556 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
557 (string-append "PREFIX=" out))))))
19c17631
EF
558 (add-before 'install 'fix-Makefiles
559 (lambda* (#:key inputs outputs #:allow-other-keys)
560 (let ((out (assoc-ref outputs "out"))
561 (qtbase (assoc-ref inputs "qtbase")))
562 (substitute* (find-files "." "Makefile")
563 (((string-append "INSTALL_ROOT)" qtbase))
c195b5ba
EF
564 (string-append "INSTALL_ROOT)" out)))
565 #t)))
566 (add-before 'check 'set-display
567 (lambda _
94e24d81 568 ;; make Qt render "offscreen", required for tests
c195b5ba
EF
569 (setenv "QT_QPA_PLATFORM" "offscreen")
570 #t)))))))
19c17631 571
9b694210
EF
572(define-public qtimageformats
573 (package (inherit qtsvg)
574 (name "qtimageformats")
a20e00dd 575 (version "5.8.0")
9b694210
EF
576 (source (origin
577 (method url-fetch)
578 (uri (string-append "https://download.qt.io/official_releases/qt/"
579 (version-major+minor version) "/" version
580 "/submodules/" name "-opensource-src-"
581 version ".tar.xz"))
582 (sha256
583 (base32
a20e00dd 584 "0vv0wh5q5sih294x661djzwvgdwy7r6xpnxsc111k5hwq7m5w13m"))
c04854da
EF
585 (modules '((guix build utils)))
586 (snippet
a20e00dd 587 '(delete-file-recursively "src/3rdparty"))))
9b694210
EF
588 (native-inputs `())
589 (inputs
a532a671
EF
590 `(("jasper" ,jasper)
591 ("libmng" ,libmng)
9b694210
EF
592 ("libtiff" ,libtiff)
593 ("libwebp" ,libwebp)
594 ("mesa" ,mesa)
595 ("qtbase" ,qtbase)
596 ("zlib" ,zlib)))))
597
f6c13613
EF
598(define-public qtx11extras
599 (package (inherit qtsvg)
600 (name "qtx11extras")
a20e00dd 601 (version "5.8.0")
f6c13613
EF
602 (source (origin
603 (method url-fetch)
604 (uri (string-append "https://download.qt.io/official_releases/qt/"
605 (version-major+minor version) "/" version
606 "/submodules/" name "-opensource-src-"
607 version ".tar.xz"))
608 (sha256
609 (base32
a20e00dd 610 "03i8lk9qcdf8h2k4f3rkqqkzbrlnyaspv9mgjkn4k61s2asz5mxy"))))
c195b5ba
EF
611 (arguments
612 (substitute-keyword-arguments (package-arguments qtsvg)
613 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
f6c13613
EF
614 (native-inputs `(("perl" ,perl)))
615 (inputs
616 `(("mesa" ,mesa)
617 ("qtbase" ,qtbase)))))
618
98eec712
EF
619(define-public qtxmlpatterns
620 (package (inherit qtsvg)
621 (name "qtxmlpatterns")
a20e00dd 622 (version "5.8.0")
98eec712
EF
623 (source (origin
624 (method url-fetch)
625 (uri (string-append "https://download.qt.io/official_releases/qt/"
626 (version-major+minor version) "/" version
627 "/submodules/" name "-opensource-src-"
628 version ".tar.xz"))
629 (sha256
630 (base32
a20e00dd 631 "016s75j2cml7kc8scdm9a6pmxm8jhs424lml2h9znm1flmgadzvv"))))
c195b5ba
EF
632 (arguments
633 (substitute-keyword-arguments (package-arguments qtsvg)
f66b3e15
EF
634 ((#:phases phases)
635 `(modify-phases ,phases
636 (add-after 'unpack 'disable-network-tests
637 (lambda _ (substitute* "tests/auto/auto.pro"
638 (("qxmlquery") "# qxmlquery")
a20e00dd 639 (("xmlpatterns ") "# xmlpatterns"))
f66b3e15 640 #t))))))
98eec712
EF
641 (native-inputs `(("perl" ,perl)))
642 (inputs `(("qtbase" ,qtbase)))))
643
e3a2ed81
EF
644(define-public qtdeclarative
645 (package (inherit qtsvg)
646 (name "qtdeclarative")
a20e00dd 647 (version "5.8.0")
e3a2ed81
EF
648 (source (origin
649 (method url-fetch)
650 (uri (string-append "https://download.qt.io/official_releases/qt/"
651 (version-major+minor version) "/" version
652 "/submodules/" name "-opensource-src-"
653 version ".tar.xz"))
654 (sha256
655 (base32
a20e00dd 656 "0ilaf2sprpk9fg2j3905hxnhm0xbnm88ppk4zifp7n0jmnwix51j"))))
c195b5ba
EF
657 (arguments
658 (substitute-keyword-arguments (package-arguments qtsvg)
659 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
e3a2ed81
EF
660 (native-inputs
661 `(("perl" ,perl)
662 ("pkg-config" ,pkg-config)
663 ("python" ,python-2)
664 ("qtsvg" ,qtsvg)
665 ("qtxmlpatterns" ,qtxmlpatterns)))
666 (inputs
667 `(("mesa" ,mesa)
668 ("qtbase" ,qtbase)))))
669
e98cb96d
EF
670(define-public qtconnectivity
671 (package (inherit qtsvg)
672 (name "qtconnectivity")
a20e00dd 673 (version "5.8.0")
e98cb96d
EF
674 (source (origin
675 (method url-fetch)
676 (uri (string-append "https://download.qt.io/official_releases/qt/"
677 (version-major+minor version) "/" version
678 "/submodules/" name "-opensource-src-"
679 version ".tar.xz"))
680 (sha256
681 (base32
a20e00dd 682 "1w97na5s420y08dcydqinbqb0rd9h4pfdnjbwslr0qvzsvlh2bbv"))))
45f5bc0e
EF
683 (arguments
684 (substitute-keyword-arguments (package-arguments qtsvg)
685 ((#:phases phases)
686 `(modify-phases ,phases
687 (add-after 'unpack 'disable-failing-tests
688 ;; this test fails on armhf and aarch64
689 (lambda _
690 (substitute* "tests/auto/qndefnfcsmartposterrecord/tst_qndefnfcsmartposterrecord.cpp"
691 (("QCOMPARE\\(record.action\\(\\), QNdefNfcSmartPosterRecord::UnspecifiedAction")
692 "//QCOMPARE(record.action(), QNdefNfcSmartPosterRecord::UnspecifiedAction"))
693 #t))))))
e98cb96d
EF
694 (native-inputs
695 `(("perl" ,perl)
696 ("pkg-config" ,pkg-config)
697 ("qtdeclarative" ,qtdeclarative)))
698 (inputs
699 `(("bluez" ,bluez)
700 ("qtbase" ,qtbase)))))
701
cac893ec
EF
702(define-public qtwebsockets
703 (package (inherit qtsvg)
704 (name "qtwebsockets")
a20e00dd 705 (version "5.8.0")
cac893ec
EF
706 (source (origin
707 (method url-fetch)
708 (uri (string-append "https://download.qt.io/official_releases/qt/"
709 (version-major+minor version) "/" version
710 "/submodules/" name "-opensource-src-"
711 version ".tar.xz"))
712 (sha256
713 (base32
a20e00dd 714 "1xa5p36grqxz3fa08amn7r3dy6k28g6y0gkc6jgj7lyhjzr0l4da"))))
c195b5ba
EF
715 (arguments
716 (substitute-keyword-arguments (package-arguments qtsvg)
717 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
cac893ec
EF
718 (native-inputs
719 `(("perl" ,perl)
720 ("qtdeclarative" ,qtdeclarative)))
721 (inputs `(("qtbase" ,qtbase)))))
722
3474767c
EF
723(define-public qtsensors
724 (package (inherit qtsvg)
725 (name "qtsensors")
a20e00dd 726 (version "5.8.0")
3474767c
EF
727 (source (origin
728 (method url-fetch)
729 (uri (string-append "https://download.qt.io/official_releases/qt/"
730 (version-major+minor version) "/" version
731 "/submodules/" name "-opensource-src-"
732 version ".tar.xz"))
733 (sha256
734 (base32
a20e00dd 735 "15p7bp21yj4cdl5yfc9qnn4lhhiwiwx3b71lrb431kgqxhwhcp9s"))))
3474767c
EF
736 (native-inputs
737 `(("perl" ,perl)
738 ("qtdeclarative" ,qtdeclarative)))
739 (inputs `(("qtbase" ,qtbase)))))
740
15378f93
EF
741(define-public qtmultimedia
742 (package (inherit qtsvg)
743 (name "qtmultimedia")
a20e00dd 744 (version "5.8.0")
15378f93
EF
745 (source (origin
746 (method url-fetch)
747 (uri (string-append "https://download.qt.io/official_releases/qt/"
748 (version-major+minor version) "/" version
749 "/submodules/" name "-opensource-src-"
750 version ".tar.xz"))
751 (sha256
752 (base32
a20e00dd 753 "01sakngvsqr90qhrxyghfqdpddpxwbjyzzhm34k0hlpr6i409g58"))
63d8f08f
EF
754 (modules '((guix build utils)))
755 (snippet
756 '(begin
757 (delete-file-recursively
c195b5ba
EF
758 "examples/multimedia/spectrum/3rdparty")
759 ;; We also prevent the spectrum example from being built.
760 (substitute* "examples/multimedia/multimedia.pro"
761 (("spectrum") "#"))))))
762 (arguments
763 (substitute-keyword-arguments (package-arguments qtsvg)
764 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
15378f93
EF
765 (native-inputs
766 `(("perl" ,perl)
767 ("pkg-config" ,pkg-config)
768 ("python" ,python-2)
769 ("qtdeclarative" ,qtdeclarative)))
770 (inputs
771 `(("alsa-lib" ,alsa-lib)
772 ("mesa" ,mesa)
773 ("pulseaudio" ,pulseaudio)
774 ("qtbase" ,qtbase)))))
775
bc8ede01
EF
776(define-public qtwayland
777 (package (inherit qtsvg)
778 (name "qtwayland")
a20e00dd 779 (version "5.8.0")
bc8ede01
EF
780 (source (origin
781 (method url-fetch)
782 (uri (string-append "https://download.qt.io/official_releases/qt/"
783 (version-major+minor version) "/" version
784 "/submodules/" name "-opensource-src-"
785 version ".tar.xz"))
786 (sha256
787 (base32
a20e00dd 788 "06ilh55vaxbkyv7irw0n11gxgc34ypx2qhqawxzy7kllzg9zcl7z"))))
bc8ede01
EF
789 (native-inputs
790 `(("glib" ,glib)
791 ("perl" ,perl)
792 ("pkg-config" ,pkg-config)
793 ("qtdeclarative" ,qtdeclarative)))
794 (inputs
795 `(("fontconfig" ,fontconfig)
796 ("freetype" ,freetype)
797 ("libx11" ,libx11)
798 ("libxcomposite" ,libxcomposite)
799 ("libxext" ,libxext)
800 ("libxkbcommon" ,libxkbcommon)
801 ("libxrender" ,libxrender)
802 ("mesa" ,mesa)
803 ("mtdev" ,mtdev)
804 ("qtbase" ,qtbase)
805 ("wayland" ,wayland)))))
806
00806f2b
EF
807(define-public qtserialport
808 (package (inherit qtsvg)
809 (name "qtserialport")
a20e00dd 810 (version "5.8.0")
00806f2b
EF
811 (source (origin
812 (method url-fetch)
813 (uri (string-append "https://download.qt.io/official_releases/qt/"
814 (version-major+minor version) "/" version
815 "/submodules/" name "-opensource-src-"
816 version ".tar.xz"))
817 (sha256
818 (base32
a20e00dd 819 "1b86al3zn1pxyk0n59vh8bqxrpz2m0j33ygclaqbxl1sszg7ycaj"))))
00806f2b 820 (native-inputs `(("perl" ,perl)))
33741e16
EF
821 (inputs
822 `(("qtbase" ,qtbase)
823 ("eudev" ,eudev)))))
00806f2b 824
a98ffab5
EF
825(define-public qtserialbus
826 (package (inherit qtsvg)
827 (name "qtserialbus")
a20e00dd 828 (version "5.8.0")
a98ffab5
EF
829 (source (origin
830 (method url-fetch)
831 (uri (string-append "https://download.qt.io/official_releases/qt/"
832 (version-major+minor version) "/" version
833 "/submodules/" name "-opensource-src-"
834 version ".tar.xz"))
835 (sha256
836 (base32
a20e00dd 837 "02n1b1wrvfg6c7z15c5c5gv9r5gd4pp58jrd1a8d8fg3ybcksd2q"))))
a98ffab5
EF
838 (inputs
839 `(("qtbase" ,qtbase)
840 ("qtserialport" ,qtserialport)))))
841
f5377013
EF
842(define-public qtwebchannel
843 (package (inherit qtsvg)
844 (name "qtwebchannel")
a20e00dd 845 (version "5.8.0")
f5377013
EF
846 (source (origin
847 (method url-fetch)
848 (uri (string-append "https://download.qt.io/official_releases/qt/"
849 (version-major+minor version) "/" version
850 "/submodules/" name "-opensource-src-"
851 version ".tar.xz"))
852 (sha256
853 (base32
a20e00dd 854 "0jhbgp9rdp5lpwjrykxmg4lb60wk7gm3dldz5kp3b8ms2dab3xav"))))
f5377013
EF
855 (native-inputs
856 `(("perl" ,perl)
857 ("qtdeclarative" ,qtdeclarative)
858 ("qtwebsockets" ,qtwebsockets)))
859 (inputs `(("qtbase" ,qtbase)))))
860
d5ca54ce
EF
861(define-public qtlocation
862 (package (inherit qtsvg)
863 (name "qtlocation")
a20e00dd 864 (version "5.8.0")
d5ca54ce
EF
865 (source (origin
866 (method url-fetch)
867 (uri (string-append "https://download.qt.io/official_releases/qt/"
868 (version-major+minor version) "/" version
869 "/submodules/" name "-opensource-src-"
870 version ".tar.xz"))
871 (sha256
872 (base32
a20e00dd 873 "1fqssa8rhq83lnxjcdh4ijqck3lmqglpk8yax8x17w49v6gf78a8"))))
c195b5ba
EF
874 (arguments
875 (substitute-keyword-arguments (package-arguments qtsvg)
876 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d5ca54ce
EF
877 (native-inputs
878 `(("perl" ,perl)
879 ("qtdeclarative" ,qtdeclarative)
9a935ef2 880 ("qtquickcontrols" ,qtquickcontrols)
d5ca54ce
EF
881 ("qtserialport" ,qtserialport)))
882 (inputs `(("qtbase" ,qtbase)))))
883
d438c968
EF
884(define-public qttools
885 (package (inherit qtsvg)
886 (name "qttools")
a20e00dd 887 (version "5.8.0")
d438c968
EF
888 (source (origin
889 (method url-fetch)
890 (uri (string-append "https://download.qt.io/official_releases/qt/"
891 (version-major+minor version) "/" version
892 "/submodules/" name "-opensource-src-"
893 version ".tar.xz"))
894 (sha256
895 (base32
a20e00dd 896 "10wx4vydj91yag30457c7azx4ihrwky42l7zzwkbmdlksdv8xv4m"))))
c195b5ba
EF
897 (arguments
898 (substitute-keyword-arguments (package-arguments qtsvg)
899 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d438c968
EF
900 (native-inputs
901 `(("perl" ,perl)
902 ("qtdeclarative" ,qtdeclarative)))
903 (inputs
904 `(("mesa" ,mesa)
905 ("qtbase" ,qtbase)))))
906
4742c4de
EF
907(define-public qtscript
908 (package (inherit qtsvg)
909 (name "qtscript")
a20e00dd 910 (version "5.8.0")
4742c4de
EF
911 (source (origin
912 (method url-fetch)
913 (uri (string-append "https://download.qt.io/official_releases/qt/"
914 (version-major+minor version) "/" version
915 "/submodules/" name "-opensource-src-"
916 version ".tar.xz"))
917 (sha256
918 (base32
a20e00dd 919 "1lssbsjf2p2ag02fjq6k6vk7vywhj4jsl286r2fqi78q5lfvjfi9"))
7c5cf7a2 920 (patches (search-patches "qtscript-disable-tests.patch"))))
4742c4de
EF
921 (native-inputs
922 `(("perl" ,perl)
923 ("qttools" ,qttools)))
924 (inputs
925 `(("qtbase" ,qtbase)))))
926
ae0e5133
DC
927(define-public qtquickcontrols
928 (package (inherit qtsvg)
929 (name "qtquickcontrols")
a20e00dd 930 (version "5.8.0")
ae0e5133
DC
931 (source (origin
932 (method url-fetch)
933 (uri (string-append "https://download.qt.io/official_releases/qt/"
934 (version-major+minor version) "/" version
935 "/submodules/" name "-opensource-src-"
936 version ".tar.xz"))
937 (sha256
938 (base32
a20e00dd 939 "09mkswxw7wa2l8xz9fbblxr1pbi86hggis55j4k8ifnrrw60vrq4"))))
c195b5ba
EF
940 (arguments
941 (substitute-keyword-arguments (package-arguments qtsvg)
942 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
ae0e5133
DC
943 (inputs
944 `(("qtbase" ,qtbase)
945 ("qtdeclarative" ,qtdeclarative)))))
946
42da1492
DC
947(define-public qtquickcontrols2
948 (package (inherit qtsvg)
949 (name "qtquickcontrols2")
a20e00dd 950 (version "5.8.0")
42da1492
DC
951 (source (origin
952 (method url-fetch)
953 (uri (string-append "https://download.qt.io/official_releases/qt/"
954 (version-major+minor version) "/" version
955 "/submodules/" name "-opensource-src-"
956 version ".tar.xz"))
957 (sha256
958 (base32
a20e00dd 959 "06yy98x4vic2yrlpp83gf4kvl7kd93q62k178w0cy4sgqxp8d6dh"))))
c195b5ba
EF
960 (arguments
961 (substitute-keyword-arguments (package-arguments qtsvg)
962 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
42da1492
DC
963 (inputs
964 `(("qtbase" ,qtbase)
965 ("qtdeclarative" ,qtdeclarative)))))
966
4e4ed0ee
DC
967(define-public qtgraphicaleffects
968 (package (inherit qtsvg)
969 (name "qtgraphicaleffects")
a20e00dd 970 (version "5.8.0")
4e4ed0ee
DC
971 (source (origin
972 (method url-fetch)
973 (uri (string-append "https://download.qt.io/official_releases/qt/"
974 (version-major+minor version) "/" version
975 "/submodules/" name "-opensource-src-"
976 version ".tar.xz"))
977 (sha256
978 (base32
a20e00dd 979 "06frknb7m8bgg55rs7jjm61iziisy2ykzrrc5dy3vj0aad89najz"))))
c195b5ba
EF
980 (arguments
981 (substitute-keyword-arguments (package-arguments qtsvg)
982 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
4e4ed0ee
DC
983 (inputs
984 `(("qtbase" ,qtbase)
985 ("qtdeclarative" ,qtdeclarative)))))
986
843bdfb7 987(define-public qtdeclarative-render2d
a20e00dd 988 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
843bdfb7
EF
989 (package (inherit qtsvg)
990 (name "qtdeclarative-render2d")
991 (version "5.7.1")
992 (source (origin
993 (method url-fetch)
994 (uri (string-append "https://download.qt.io/official_releases/qt/"
995 (version-major+minor version) "/" version
996 "/submodules/" name "-opensource-src-"
997 version ".tar.xz"))
998 (sha256
999 (base32
1000 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1001 (modules '((guix build utils)))
1002 (snippet
1003 '(delete-file-recursively "tools/opengldummy/3rdparty"))))
1004 (native-inputs `())
1005 (inputs
1006 `(("qtbase" ,qtbase)
a20e00dd
EF
1007 ("qtdeclarative" ,qtdeclarative)))
1008 (properties `((superseded . ,qtdeclarative)))))
843bdfb7 1009
51519fd3
EF
1010(define-public qtgamepad
1011 (package (inherit qtsvg)
1012 (name "qtgamepad")
a20e00dd 1013 (version "5.8.0")
51519fd3
EF
1014 (source (origin
1015 (method url-fetch)
1016 (uri (string-append "https://download.qt.io/official_releases/qt/"
1017 (version-major+minor version) "/" version
1018 "/submodules/" name "-opensource-src-"
1019 version ".tar.xz"))
1020 (sha256
1021 (base32
a20e00dd 1022 "0dwcrq60h802z694h4108figlr3yvp8fpzhwjzbjm503v8yaxw5j"))))
51519fd3
EF
1023 (native-inputs
1024 `(("perl" ,perl)
1025 ("pkg-config" ,pkg-config)))
1026 (inputs
1027 `(("fontconfig" ,fontconfig)
1028 ("freetype" ,freetype)
1029 ("libxrender" ,libxrender)
1030 ("sdl2" ,sdl2)
1031 ("qtbase" ,qtbase)
1032 ("qtdeclarative" ,qtdeclarative)))))
1033
56cd88fd
EF
1034(define-public qtscxml
1035 (package (inherit qtsvg)
1036 (name "qtscxml")
a20e00dd 1037 (version "5.8.0")
56cd88fd
EF
1038 (source (origin
1039 (method url-fetch)
1040 (uri (string-append "https://download.qt.io/official_releases/qt/"
1041 (version-major+minor version) "/" version
1042 "/submodules/" name "-opensource-src-"
1043 version ".tar.xz"))
1044 (sha256
1045 (base32
a20e00dd 1046 "1i4xl24q4i32mbhyndrwaz0xj79d9n84s320gmkf5rwnfcwrvfxn"))
56cd88fd
EF
1047 (modules '((guix build utils)))
1048 (snippet
c195b5ba
EF
1049 '(begin
1050 (delete-file-recursively "tests/3rdparty")
1051 ;; the scion test refers to the bundled 3rd party test code.
1052 (substitute* "tests/auto/auto.pro"
1053 (("scion") "#"))))))
56cd88fd
EF
1054 (inputs
1055 `(("qtbase" ,qtbase)
1056 ("qtdeclarative" ,qtdeclarative)))))
1057
de5e0180
EF
1058(define-public qtpurchasing
1059 (package (inherit qtsvg)
1060 (name "qtpurchasing")
a20e00dd 1061 (version "5.8.0")
de5e0180
EF
1062 (source (origin
1063 (method url-fetch)
1064 (uri (string-append "https://download.qt.io/official_releases/qt/"
1065 (version-major+minor version) "/" version
1066 "/submodules/" name "-opensource-src-"
1067 version ".tar.xz"))
1068 (sha256
1069 (base32
a20e00dd 1070 "0mdkw73yx1csz9mf3wl0w1x1b8cv9j5px4nvakrknkjzaa9qgzdk"))))
de5e0180
EF
1071 (inputs
1072 `(("qtbase" ,qtbase)
1073 ("qtdeclarative" ,qtdeclarative)))))
1074
173b54b9
EF
1075(define-public qtcanvas3d
1076 (package (inherit qtsvg)
1077 (name "qtcanvas3d")
a20e00dd 1078 (version "5.8.0")
173b54b9
EF
1079 (source (origin
1080 (method url-fetch)
1081 (uri (string-append "https://download.qt.io/official_releases/qt/"
1082 (version-major+minor version) "/" version
1083 "/submodules/" name "-opensource-src-"
1084 version ".tar.xz"))
1085 (sha256
1086 (base32
a20e00dd 1087 "18yaikbwk4d7sh09psi3kjn1mxjp4d2f3qchfzgq5x96yn8gfijl"))
173b54b9
EF
1088 (modules '((guix build utils)))
1089 (snippet
1090 '(delete-file-recursively "examples/canvas3d/3rdparty"))))
c195b5ba
EF
1091 (arguments
1092 (substitute-keyword-arguments (package-arguments qtsvg)
1093 ;; Building the tests depends on the bundled 3rd party javascript files,
1094 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1095 ;; fail, so we skip building them for now.
1096 ((#:phases phases)
1097 `(modify-phases ,phases
1098 (replace 'configure
1099 (lambda* (#:key outputs #:allow-other-keys)
1100 (let ((out (assoc-ref outputs "out")))
1101 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools"
1102 (string-append "PREFIX=" out))))))))
1103 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
173b54b9
EF
1104 (native-inputs `())
1105 (inputs
1106 `(("qtbase" ,qtbase)
1107 ("qtdeclarative" ,qtdeclarative)))))
1108
68bbe14b
EF
1109(define-public qtcharts
1110 (package (inherit qtsvg)
1111 (name "qtcharts")
a20e00dd 1112 (version "5.8.0")
68bbe14b
EF
1113 (source (origin
1114 (method url-fetch)
1115 (uri (string-append "https://download.qt.io/official_releases/qt/"
1116 (version-major+minor version) "/" version
1117 "/submodules/" name "-opensource-src-"
1118 version ".tar.xz"))
1119 (sha256
1120 (base32
a20e00dd 1121 "11m5g1fxip6z2xk1z6g6h4rq7v282qbkxflan8hs87hadnzars03"))))
c195b5ba
EF
1122 (arguments
1123 (substitute-keyword-arguments (package-arguments qtsvg)
1124 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
68bbe14b
EF
1125 (inputs
1126 `(("qtbase" ,qtbase)
1127 ("qtdeclarative" ,qtdeclarative)))))
1128
a69945a7
EF
1129(define-public qtdatavis3d
1130 (package (inherit qtsvg)
1131 (name "qtdatavis3d")
a20e00dd 1132 (version "5.8.0")
a69945a7
EF
1133 (source (origin
1134 (method url-fetch)
1135 (uri (string-append "https://download.qt.io/official_releases/qt/"
1136 (version-major+minor version) "/" version
1137 "/submodules/" name "-opensource-src-"
1138 version ".tar.xz"))
1139 (sha256
1140 (base32
a20e00dd 1141 "1n2vdf6n7pr9xrjwbvbar899q74shx6cy19x32adxfn2iilygwbp"))))
c195b5ba
EF
1142 (arguments
1143 (substitute-keyword-arguments (package-arguments qtsvg)
1144 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
a69945a7
EF
1145 (inputs
1146 `(("qtbase" ,qtbase)
1147 ("qtdeclarative" ,qtdeclarative)))))
1148
84ef83dd
AE
1149(define-public python-sip
1150 (package
1151 (name "python-sip")
f6da41b5 1152 (version "4.19.2")
84ef83dd
AE
1153 (source
1154 (origin
1155 (method url-fetch)
1156 (uri
1157 (string-append "mirror://sourceforge/pyqt/sip/"
8fa7f8d9 1158 "sip-" version "/sip-" version ".tar.gz"))
84ef83dd
AE
1159 (sha256
1160 (base32
f6da41b5 1161 "0cq5r21fmjyw5v7a6l4sfbaj3zgm7k5b2cryj6bnjki54nnllas3"))))
84ef83dd
AE
1162 (build-system gnu-build-system)
1163 (native-inputs
1164 `(("python" ,python-wrapper)))
1165 (arguments
1166 `(#:tests? #f ; no check target
e8bdd73a
AE
1167 #:modules ((srfi srfi-1)
1168 ,@%gnu-build-system-modules)
84ef83dd 1169 #:phases
39766868
EF
1170 (modify-phases %standard-phases
1171 (replace 'configure
1172 (lambda* (#:key inputs outputs #:allow-other-keys)
1173 (let* ((out (assoc-ref outputs "out"))
1174 (bin (string-append out "/bin"))
1175 (include (string-append out "/include"))
1176 (python (assoc-ref inputs "python"))
1177 (python-version
1178 (last (string-split python #\-)))
1179 (python-major+minor
1180 (string-join
1181 (take (string-split python-version #\.) 2)
1182 "."))
1183 (lib (string-append out "/lib/python"
1184 python-major+minor
1185 "/site-packages")))
1186 (zero?
1187 (system* "python" "configure.py"
1188 "--bindir" bin
1189 "--destdir" lib
1190 "--incdir" include))))))))
1191 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
84ef83dd
AE
1192 (synopsis "Python binding creator for C and C++ libraries")
1193 (description
1194 "SIP is a tool to create Python bindings for C and C++ libraries. It
1195was originally developed to create PyQt, the Python bindings for the Qt
1196toolkit, but can be used to create bindings for any C or C++ library.
1197
1198SIP comprises a code generator and a Python module. The code generator
1199processes a set of specification files and generates C or C++ code, which
1200is then compiled to create the bindings extension module. The SIP Python
1201module provides support functions to the automatically generated code.")
1202 ;; There is a choice between a python like license, gpl2 and gpl3.
1203 ;; For compatibility with pyqt, we need gpl3.
225941b0 1204 (license license:gpl3)))
84ef83dd
AE
1205
1206(define-public python2-sip
1207 (package (inherit python-sip)
1208 (name "python2-sip")
1209 (native-inputs
1210 `(("python" ,python-2)))))
014e7dd8
AE
1211
1212(define-public python-pyqt
1213 (package
1214 (name "python-pyqt")
5ac3a671 1215 (version "5.8.2")
014e7dd8
AE
1216 (source
1217 (origin
1218 (method url-fetch)
1219 (uri
1220 (string-append "mirror://sourceforge/pyqt/PyQt5/"
2be06813 1221 "PyQt-" version "/PyQt5_gpl-"
014e7dd8
AE
1222 version ".tar.gz"))
1223 (sha256
1224 (base32
5ac3a671 1225 "1s1nalcspam9dc7f63jkqn1i2sv9lrqn57p2zsc61g8bncahbmzb"))
fc1adab1 1226 (patches (search-patches "pyqt-configure.patch"))))
014e7dd8
AE
1227 (build-system gnu-build-system)
1228 (native-inputs
499991cf
EB
1229 `(("qtbase" ,qtbase))) ; for qmake
1230 (propagated-inputs
1231 `(("python-sip" ,python-sip)))
014e7dd8 1232 (inputs
e9adcd81
EF
1233 `(("python" ,python-wrapper)
1234 ("qtbase" ,qtbase)
1235 ("qtconnectivity" ,qtconnectivity)
1236 ("qtdeclarative" ,qtdeclarative)
1237 ("qtlocation" ,qtlocation)
1238 ("qtmultimedia" ,qtmultimedia)
1239 ("qtsensors" ,qtsensors)
1240 ("qtserialport" ,qtserialport)
1241 ("qtsvg" ,qtsvg)
1242 ("qttools" ,qttools)
1243 ("qtwebchannel" ,qtwebchannel)
1244 ("qtwebkit" ,qtwebkit)
1245 ("qtwebsockets" ,qtwebsockets)
1246 ("qtx11extras" ,qtx11extras)
1247 ("qtxmlpatterns" ,qtxmlpatterns)))
014e7dd8 1248 (arguments
e8bdd73a
AE
1249 `(#:modules ((srfi srfi-1)
1250 ,@%gnu-build-system-modules)
1251 #:phases
eef988c8
EF
1252 (modify-phases %standard-phases
1253 (replace 'configure
1254 (lambda* (#:key inputs outputs #:allow-other-keys)
1255 (let* ((out (assoc-ref outputs "out"))
1256 (bin (string-append out "/bin"))
1257 (sip (string-append out "/share/sip"))
1258 (plugins (string-append out "/plugins"))
1259 (designer (string-append plugins "/designer"))
1260 (qml (string-append plugins "/PyQt5"))
1261 (python (assoc-ref inputs "python"))
1262 (python-version
1263 (last (string-split python #\-)))
1264 (python-major+minor
1265 (string-join
1266 (take (string-split python-version #\.) 2)
1267 "."))
1268 (lib (string-append out "/lib/python"
1269 python-major+minor
43e8824d
HG
1270 "/site-packages"))
1271 (stubs (string-append lib "/PyQt5")))
eef988c8
EF
1272 (zero? (system* "python" "configure.py"
1273 "--confirm-license"
1274 "--bindir" bin
1275 "--destdir" lib
1276 "--designer-plugindir" designer
1277 "--qml-plugindir" qml
43e8824d
HG
1278 ; Where to install the PEP 484 Type Hints stub
1279 ; files. Without this the stubs are tried to be
1280 ; installed into the python package's
1281 ; site-package directory, which is read-only.
1282 "--stubsdir" stubs
eef988c8
EF
1283 "--sipdir" sip))))))))
1284 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
014e7dd8
AE
1285 (synopsis "Python bindings for Qt")
1286 (description
1287 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1288framework. The bindings are implemented as a set of Python modules and
1289contain over 620 classes.")
225941b0 1290 (license license:gpl3)))
014e7dd8
AE
1291
1292(define-public python2-pyqt
1293 (package (inherit python-pyqt)
1294 (name "python2-pyqt")
1295 (native-inputs
1296 `(("python-sip" ,python2-sip)
2be06813 1297 ("qtbase" ,qtbase)))
014e7dd8 1298 (inputs
e9adcd81
EF
1299 `(("python" ,python-2)
1300 ,@(alist-delete "python" (package-inputs python-pyqt))))))
3e291958
AE
1301
1302(define-public python-pyqt-4
1303 (package (inherit python-pyqt)
1304 (name "python-pyqt")
99755491 1305 (version "4.11.4")
3e291958
AE
1306 (source
1307 (origin
1308 (method url-fetch)
1309 (uri
1310 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1311 "PyQt-" version "/PyQt-x11-gpl-"
1312 version ".tar.gz"))
1313 (sha256
1314 (base32
99755491 1315 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
3e291958
AE
1316 (native-inputs
1317 `(("python-sip" ,python-sip)
1318 ("qt" ,qt-4)))
e9adcd81 1319 (inputs `(("python" ,python-wrapper)))
3e291958
AE
1320 (arguments
1321 `(#:tests? #f ; no check target
e8bdd73a
AE
1322 #:modules ((srfi srfi-1)
1323 ,@%gnu-build-system-modules)
3e291958 1324 #:phases
f9513086
EF
1325 (modify-phases %standard-phases
1326 (replace 'configure
1327 (lambda* (#:key inputs outputs #:allow-other-keys)
1328 (let* ((out (assoc-ref outputs "out"))
1329 (bin (string-append out "/bin"))
1330 (sip (string-append out "/share/sip"))
1331 (python (assoc-ref inputs "python"))
1332 (python-version
1333 (last (string-split python #\-)))
1334 (python-major+minor
1335 (string-join
1336 (take (string-split python-version #\.) 2)
1337 "."))
1338 (lib (string-append out "/lib/python"
1339 python-major+minor
1340 "/site-packages")))
1341 (zero? (system* "python" "configure.py"
1342 "--confirm-license"
1343 "--bindir" bin
1344 "--destdir" lib
1345 "--sipdir" sip))))))))
225941b0 1346 (license (list license:gpl2 license:gpl3)))) ; choice of either license
3e291958 1347
6d8e14d0 1348(define-public python2-pyqt-4
1349 (package (inherit python-pyqt-4)
9fde8778 1350 (name "python2-pyqt")
6d8e14d0 1351 (native-inputs
1352 `(("python-sip" ,python2-sip)
1353 ("qt" ,qt-4)))
1354 (inputs
1355 `(("python" ,python-2)))))
1356
9e81af9e
EF
1357(define-public qtkeychain
1358 (package
1359 (name "qtkeychain")
4ad70ad8 1360 (version "0.8.0")
9e81af9e
EF
1361 (source
1362 (origin
1363 (method url-fetch)
1364 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1365 "archive/v" version ".tar.gz"))
1366 (file-name (string-append name "-" version ".tar.gz"))
1367 (sha256
4ad70ad8 1368 (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
9e81af9e 1369 (build-system cmake-build-system)
18174d8a
DC
1370 (native-inputs
1371 `(("qttools" ,qttools)))
9e81af9e 1372 (inputs
18174d8a 1373 `(("qtbase" ,qtbase)))
9e81af9e
EF
1374 (arguments
1375 `(#:tests? #f ; No tests included
1376 #:phases
1377 (modify-phases %standard-phases
1378 (add-before
1379 'configure 'set-qt-trans-dir
1380 (lambda _
1381 (substitute* "CMakeLists.txt"
1382 (("\\$\\{qt_translations_dir\\}")
4ad70ad8
EF
1383 "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
1384 #t)))))
9e81af9e
EF
1385 (home-page "https://github.com/frankosterfeld/qtkeychain")
1386 (synopsis "Qt API to store passwords")
1387 (description
1388 "QtKeychain is a Qt library to store passwords and other secret data
1389securely. It will not store any data unencrypted unless explicitly requested.")
225941b0 1390 (license license:bsd-3)))
fc381a33
TD
1391
1392(define-public qwt
1393 (package
1394 (name "qwt")
1395 (version "6.1.3")
1396 (source
1397 (origin
1398 (method url-fetch)
1399 (uri
1400 (string-append "mirror://sourceforge/qwt/qwt/"
1401 version "/qwt-" version ".tar.bz2"))
1402 (sha256
1403 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1404 (build-system gnu-build-system)
1405 (inputs
1406 `(("qtbase" ,qtbase)
1407 ("qtsvg" ,qtsvg)
1408 ("qttools" ,qttools)))
1409 (arguments
1410 `(#:phases
1411 (modify-phases %standard-phases
1412 (replace 'configure
1413 (lambda* (#:key outputs #:allow-other-keys)
1414 (let ((out (assoc-ref outputs "out")))
1415 (substitute* '("qwtconfig.pri")
1416 (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
1417 (zero? (system* "qmake")))))
1418 (add-after 'install 'install-documentation
1419 (lambda* (#:key outputs #:allow-other-keys)
1420 (let* ((out (assoc-ref outputs "out"))
1421 (man (string-append out "/share/man")))
1422 ;; Remove some incomplete manual pages.
1423 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1424 (mkdir-p man)
1425 (copy-recursively "doc/man" man)
1426 #t))))))
1427 (home-page "http://qwt.sourceforge.net")
1428 (synopsis "Qt widgets for plots, scales, dials and other technical software
1429GUI components")
1430 (description
1431 "The Qwt library contains widgets and components which are primarily useful
1432for technical and scientific purposes. It includes a 2-D plotting widget,
1433different kinds of sliders, and much more.")
1434 (license
1435 (list
1436 ;; The Qwt license is LGPL2.1 with some exceptions.
1437 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1438 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1439 license:lgpl2.1 license:gpl3))))
47e1d280
TD
1440
1441(define-public qtwebkit
1442 (package
1443 (name "qtwebkit")
a20e00dd 1444 (version "5.8.0")
47e1d280
TD
1445 (source
1446 (origin
1447 (method url-fetch)
1448 (uri (string-append "http://download.qt.io/community_releases/"
1449 (version-major+minor version)
a20e00dd
EF
1450 "/" version "-final/qtwebkit-opensource-src-"
1451 version ".tar.xz"))
47e1d280
TD
1452 ;; Note: since Qt 5.6, Qt no longer officially supports qtwebkit:
1453 ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>.
1454 (sha256
1455 (base32
a20e00dd 1456 "1v0vj6slyh19mjrrpbqdzb47fr0f4xk7bc8803xjzybb11h8dbkr"))))
47e1d280
TD
1457 (build-system gnu-build-system)
1458 (native-inputs
1459 `(("perl" ,perl)
1460 ("python" ,python-2.7)
1461 ("ruby" ,ruby)
1462 ("bison" ,bison)
1463 ("flex" ,flex)
1464 ("gperf" ,gperf)
1465 ("pkg-config" ,pkg-config)))
1466 (inputs
1467 `(("icu" ,icu4c)
1468 ("libjpeg" ,libjpeg)
1469 ("libpng" ,libpng)
1470 ("libwebp" ,libwebp)
1471 ("sqlite" ,sqlite)
1472 ("fontconfig" ,fontconfig)
1473 ("libxrender", libxrender)
1474 ("qtbase" ,qtbase)
1475 ("qtdeclarative" ,qtdeclarative)
1476 ("qtmultimedia" ,qtmultimedia)
1477 ("libxml2" ,libxml2)
1478 ("libxslt" ,libxslt)
1479 ("libx11" ,libx11)
1480 ("libxcomposite" ,libxcomposite)))
1481 (arguments
1482 `(#:phases
1483 (modify-phases %standard-phases
1484 (replace 'configure
1485 (lambda* (#:key outputs #:allow-other-keys)
1486 (let ((out (assoc-ref outputs "out")))
1487 (setenv "QMAKEPATH"
1488 (string-append (getcwd) "/Tools/qmake:"
1489 (getenv "QMAKEPATH")))
1490 (system* "qmake"))))
1491 ;; prevent webkit from trying to install into the qtbase store directory,
1492 ;; and replace references to the build directory in linker options:
1493 (add-before 'build 'patch-installpaths
1494 (lambda* (#:key outputs inputs #:allow-other-keys)
1495 (let* ((out (assoc-ref outputs "out"))
1496 (qtbase (assoc-ref inputs "qtbase"))
1497 (builddir (getcwd))
1498 (linkbuild (string-append "-L" builddir))
1499 (linkout (string-append "-L" out))
1500 (makefiles
1501 (map-in-order
1502 (lambda (i)
1503 (let* ((in (car i))
1504 (mf (string-append (dirname in) "/"
1505 (cdr i))))
1506 ;; by default, these Makefiles are
1507 ;; generated during install, but we need
1508 ;; to generate them now
1509 (system* "qmake" in "-o" mf)
1510 mf))
1511 '(("Source/api.pri" . "Makefile.api")
1512 ("Source/widgetsapi.pri"
1513 . "Makefile.widgetsapi")
1514 ("Source/WebKit2/WebProcess.pro"
1515 . "Makefile.WebProcess")
1516 ("Source/WebKit2/PluginProcess.pro"
1517 . "Makefile.PluginProcess")
1518 ("Source/WebKit/qt/declarative/public.pri"
1519 . "Makefile.declarative.public")
1520 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1521 . "Makefile.declarative.experimental")
1522 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
1523 . "Makefile")))))
1524 ;; Order of qmake calls and substitutions matters here.
1525 (system* "qmake" "-prl" "Source/widgetsapi.pri"
1526 "-o" "Source/Makefile")
1527 (substitute* (find-files "lib" "libQt5.*\\.prl")
1528 ((linkbuild) linkout))
1529 (substitute* (find-files "lib"
1530 "libQt5WebKit.*\\.la")
1531 (("libdir='.*'")
1532 (string-append "libdir='" out "/lib'"))
1533 ((linkbuild) linkout))
1534 (substitute* (find-files "lib/pkgconfig"
1535 "Qt5WebKit.*\\.pc")
1536 (((string-append "prefix=" qtbase))
1537 (string-append "prefix=" out))
1538 ((linkbuild) linkout))
1539 ;; Makefiles must be modified after .prl/.la/.pc
1540 ;; files, lest they get rebuilt:
1541 (substitute* makefiles
1542 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
1543 out )
1544 (((string-append "-Wl,-rpath," builddir))
1545 (string-append "-Wl,-rpath," out)))))))))
1546 (home-page "https://www.webkit.org")
1547 (synopsis "Web browser engine and classes to render and interact with web
1548content")
1549 (description "QtWebKit provides a Web browser engine that makes it easy to
1550embed content from the World Wide Web into your Qt application. At the same
1551time Web content can be enhanced with native controls.")
1552
1553 (license license:lgpl2.1+)))
f048f12b 1554
1555(define-public dotherside
1556 (package
1557 (name "dotherside")
1558 (version "0.5.2")
1559 (source
1560 (origin
1561 (method url-fetch)
1562 (uri (string-append "https://github.com/filcuc/DOtherSide/"
1563 "archive/v" version ".tar.gz"))
1564 (file-name (string-append name "-" version ".tar.gz"))
1565 (sha256
1566 (base32
1567 "0pqlrvy4ajjir80ra79ka3n0rjj0ir0f0m91cq86iz3nnw8w148z"))))
1568 (build-system cmake-build-system)
1569 (native-inputs
1570 `(("qttools" ,qttools)))
1571 (inputs
1572 `(("qtbase" ,qtbase)
1573 ("qtdeclarative" ,qtdeclarative)))
1574 (home-page "https://github.com/frankosterfeld/qtkeychain")
1575 (synopsis "C language library for creating bindings for the Qt QML language")
1576 (description
1577 "DOtherSide is a C language library for creating bindings for the
1578QT QML language. The following features are implementable from
1579a binding language:
1580@itemize
1581@item Creating custom QObject
1582@item Creating custom QAbstractListModels
1583@item Creating custom properties, signals and slots
1584@item Creating from QML QObject defined in the binded language
1585@item Creating from Singleton QML QObject defined in the binded language
1586@end itemize\n")
1587 (license license:lgpl3))) ;version 3 only (+ exception)