gnu: Add plink-ng.
[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>
3befd0a9
RW
8;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
9;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
bd677c2d
AE
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages qt)
225941b0 27 #:use-module ((guix licenses) #:prefix license:)
bd677c2d
AE
28 #:use-module (guix packages)
29 #:use-module (guix download)
f198ffd0 30 #:use-module (guix build utils)
9e81af9e 31 #:use-module (guix build-system cmake)
bd677c2d 32 #:use-module (guix build-system gnu)
2456153a 33 #:use-module (guix build-system trivial)
84ef83dd
AE
34 #:use-module (guix packages)
35 #:use-module (guix utils)
1e9ed0e3 36 #:use-module (gnu packages)
b332e366
AE
37 #:use-module (gnu packages bison)
38 #:use-module (gnu packages compression)
2cba3d6f
SB
39 #:use-module (gnu packages cups)
40 #:use-module (gnu packages databases)
aa8c0ada 41 #:use-module (gnu packages documentation)
b332e366 42 #:use-module (gnu packages fontutils)
0009ed71 43 #:use-module (gnu packages flex)
bc8ede01 44 #:use-module (gnu packages freedesktop)
8b6a5e0f 45 #:use-module (gnu packages gl)
b332e366 46 #:use-module (gnu packages glib)
0009ed71
SB
47 #:use-module (gnu packages gnuzilla)
48 #:use-module (gnu packages gperf)
04231311 49 #:use-module (gnu packages gstreamer)
f7fb0ccb 50 #:use-module (gnu packages gtk)
b332e366 51 #:use-module (gnu packages icu4c)
e55354b8 52 #:use-module (gnu packages image)
b332e366 53 #:use-module (gnu packages linux)
04f8decf 54 #:use-module (gnu packages maths)
0009ed71
SB
55 #:use-module (gnu packages pciutils)
56 #:use-module (gnu packages pcre)
b332e366
AE
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
39fa8f6c 59 #:use-module (gnu packages pulseaudio)
b332e366 60 #:use-module (gnu packages python)
8b6a5e0f 61 #:use-module (gnu packages ruby)
51519fd3 62 #:use-module (gnu packages sdl)
cc2b77df 63 #:use-module (gnu packages tls)
0009ed71
SB
64 #:use-module (gnu packages xdisorg)
65 #:use-module (gnu packages xorg)
66 #:use-module (gnu packages xml))
bd677c2d 67
aa8c0ada
TD
68(define-public grantlee
69 (package
70 (name "grantlee")
71 (version "5.1.0")
72 (source
73 (origin
74 (method url-fetch)
75 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
76 version ".tar.gz"))
77 (file-name (string-append name "-" version ".tar.gz"))
78 (sha256
79 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
80 (native-inputs
81 `(("doxygen" ,doxygen)))
82 (inputs
83 `(("qtbase" ,qtbase)
84 ("qtscript" ,qtscript)))
85 (build-system cmake-build-system)
86 (arguments
87 `(#:phases
88 (modify-phases %standard-phases
89 (replace 'check
90 (lambda _
91 (zero? (system* "ctest" ;; exclude 2 tests which require a display
92 "-E" "htmlbuildertest|plainmarkupbuildertest")))))))
93 (home-page "https://github.com/steveire/grantlee")
94 (synopsis "Libraries for text templating with Qt")
95 (description "Grantlee Templates can be used for theming and generation of
96other text such as code. The syntax uses the syntax of the Django template
97system, and the core design of Django is reused in Grantlee.")
98 (license license:lgpl2.0+)))
99
b332e366
AE
100(define-public qt
101 (package
102 (name "qt")
5acd59ee
EF
103 (version "5.9.2")
104 (outputs '("out" "examples"))
b332e366
AE
105 (source (origin
106 (method url-fetch)
f7fb0ccb
AE
107 (uri
108 (string-append
109 "http://download.qt.io/official_releases/qt/"
110 (version-major+minor version)
111 "/" version
112 "/single/qt-everywhere-opensource-src-"
113 version ".tar.xz"))
b332e366 114 (sha256
f7fb0ccb 115 (base32
5acd59ee 116 "1zr0hvhryn2ada53ln7cycymh602cncli86n291bsgzas6j72qbc"))
14bcc1e1
AE
117 (modules '((guix build utils)))
118 (snippet
bc554b43
AE
119 '(begin
120 ;; Remove qtwebengine, which relies on a bundled copy of
121 ;; chromium. Not only does it fail compilation in qt 5.5:
122 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
123 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
124 ;; it might also pose security problems.
125 ;; Alternatively, we could use the "-skip qtwebengine"
126 ;; configuration option.
127 (delete-file-recursively "qtwebengine")
5acd59ee
EF
128 ;; The following snippets are copied from their mondular-qt counterparts.
129 (for-each
130 (lambda (dir)
131 (delete-file-recursively (string-append "qtbase/src/3rdparty/" dir)))
132 (list "double-conversion" "freetype" "harfbuzz-ng"
133 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
134 "xkbcommon" "zlib"))
135 (for-each
136 (lambda (dir)
137 (delete-file-recursively dir))
138 (list "qtimageformats/src/3rdparty"
139 "qtmultimedia/examples/multimedia/spectrum/3rdparty"
140 "qtwayland/examples"
141 "qtcanvas3d/examples/canvas3d/3rdparty"))
142 ;; Tests depend on this example, which depends on the 3rd party code.
143 (substitute* "qtmultimedia/examples/multimedia/multimedia.pro"
144 (("spectrum") "#"))))))
b332e366 145 (build-system gnu-build-system)
ef0cf53e
AE
146 (propagated-inputs
147 `(("mesa" ,mesa)))
b332e366 148 (inputs
b332e366 149 `(("alsa-lib" ,alsa-lib)
5acd59ee 150 ("bluez" ,bluez)
2cba3d6f 151 ("cups" ,cups)
5acd59ee
EF
152 ("dbus" ,dbus)
153 ("double-conversion" ,double-conversion)
0009ed71 154 ("expat" ,expat)
b332e366
AE
155 ("fontconfig" ,fontconfig)
156 ("freetype" ,freetype)
157 ("glib" ,glib)
5acd59ee
EF
158 ("gstreamer" ,gstreamer)
159 ("gst-plugins-base" ,gst-plugins-base)
f7fb0ccb 160 ("harfbuzz" ,harfbuzz)
b332e366 161 ("icu4c" ,icu4c)
5acd59ee
EF
162 ("jasper" ,jasper)
163 ("libinput" ,libinput-minimal)
f198ffd0 164 ("libjpeg" ,libjpeg)
2cba3d6f 165 ("libmng" ,libmng)
0009ed71 166 ("libpci" ,pciutils)
b332e366 167 ("libpng" ,libpng)
5acd59ee
EF
168 ("libtiff" ,libtiff)
169 ("libwebp" ,libwebp)
b332e366 170 ("libx11" ,libx11)
0009ed71
SB
171 ("libxcomposite" ,libxcomposite)
172 ("libxcursor" ,libxcursor)
5acd59ee 173 ("libxext" ,libxext)
0009ed71 174 ("libxfixes" ,libxfixes)
b332e366 175 ("libxi" ,libxi)
0009ed71 176 ("libxinerama" ,libxinerama)
b332e366 177 ("libxkbcommon" ,libxkbcommon)
0009ed71
SB
178 ("libxml2" ,libxml2)
179 ("libxrandr" ,libxrandr)
b332e366 180 ("libxrender" ,libxrender)
0009ed71
SB
181 ("libxslt" ,libxslt)
182 ("libxtst" ,libxtst)
183 ("mtdev" ,mtdev)
b332e366 184 ("mysql" ,mysql)
0009ed71 185 ("nss" ,nss)
b332e366 186 ("openssl" ,openssl)
2cba3d6f 187 ("postgresql" ,postgresql)
39fa8f6c 188 ("pulseaudio" ,pulseaudio)
5acd59ee 189 ("pcre2" ,pcre2)
0009ed71
SB
190 ("sqlite" ,sqlite)
191 ("udev" ,eudev)
2cba3d6f 192 ("unixodbc" ,unixodbc)
5acd59ee 193 ("wayland" ,wayland)
b332e366
AE
194 ("xcb-util" ,xcb-util)
195 ("xcb-util-image" ,xcb-util-image)
196 ("xcb-util-keysyms" ,xcb-util-keysyms)
197 ("xcb-util-renderutil" ,xcb-util-renderutil)
198 ("xcb-util-wm" ,xcb-util-wm)
199 ("zlib" ,zlib)))
c4c4cc05 200 (native-inputs
0009ed71
SB
201 `(("bison" ,bison)
202 ("flex" ,flex)
203 ("gperf" ,gperf)
0009ed71
SB
204 ("perl" ,perl)
205 ("pkg-config" ,pkg-config)
206 ("python" ,python-2)
207 ("ruby" ,ruby)
ce0614dd 208 ("which" ,(@ (gnu packages base) which))))
b332e366 209 (arguments
5acd59ee 210 `(#:phases
cce28b0c 211 (modify-phases %standard-phases
2470d779
AE
212 (add-after 'configure 'patch-bin-sh
213 (lambda _
5acd59ee 214 (substitute* '("qtbase/configure"
2470d779
AE
215 "qtbase/mkspecs/features/qt_functions.prf"
216 "qtbase/qmake/library/qmakebuiltins.cpp")
217 (("/bin/sh") (which "sh")))
218 #t))
cce28b0c
AE
219 (replace 'configure
220 (lambda* (#:key outputs #:allow-other-keys)
5acd59ee
EF
221 (let ((out (assoc-ref outputs "out"))
222 (examples (assoc-ref outputs "examples")))
cce28b0c
AE
223 (substitute* '("configure" "qtbase/configure")
224 (("/bin/pwd") (which "pwd")))
225 (substitute* "qtbase/src/corelib/global/global.pri"
226 (("/bin/ls") (which "ls")))
227 ;; do not pass "--enable-fast-install", which makes the
228 ;; configure process fail
229 (zero? (system*
230 "./configure"
231 "-verbose"
232 "-prefix" out
5acd59ee 233 "-examplesdir" examples ; 89MiB
cce28b0c
AE
234 "-opensource"
235 "-confirm-license"
5acd59ee 236 ;; Do not build examples; for the time being, we
4dd0a8b6 237 ;; prefer to save the space and build time.
5acd59ee 238 "-no-compile-examples"
cce28b0c
AE
239 ;; Most "-system-..." are automatic, but some use
240 ;; the bundled copy by default.
241 "-system-sqlite"
242 "-system-harfbuzz"
243 ;; explicitly link with openssl instead of dlopening it
244 "-openssl-linked"
245 ;; explicitly link with dbus instead of dlopening it
246 "-dbus-linked"
5acd59ee
EF
247 ;; don't use the precompiled headers
248 "-no-pch"
cce28b0c
AE
249 ;; drop special machine instructions not supported
250 ;; on all instances of the target
251 ,@(if (string-prefix? "x86_64"
252 (or (%current-target-system)
253 (%current-system)))
254 '()
255 '("-no-sse2"))
cce28b0c
AE
256 "-no-mips_dsp"
257 "-no-mips_dspr2"))))))))
2e36f7e6 258 (home-page "https://www.qt.io/")
b332e366
AE
259 (synopsis "Cross-platform GUI library")
260 (description "Qt is a cross-platform application and UI framework for
261developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 262 (license license:lgpl2.1)
f47638a3
LC
263
264 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
265 ;; see <http://hydra.gnu.org/build/112828>.
266 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
267 (supported-systems (delete "mips64el-linux" %supported-systems))))
1e9ed0e3
AE
268
269(define-public qt-4
270 (package (inherit qt)
d22b9397 271 (version "4.8.7")
1e9ed0e3
AE
272 (source (origin
273 (method url-fetch)
274 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
275 (string-copy version 0 (string-rindex version #\.))
276 "/" version
89059aa1 277 "/qt-everywhere-opensource-src-"
1e9ed0e3
AE
278 version ".tar.gz"))
279 (sha256
280 (base32
d22b9397 281 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
fc1adab1 282 (patches (search-patches "qt4-ldflags.patch"))
7431edea
AE
283 (modules '((guix build utils)))
284 (snippet
285 ;; Remove webkit module, which is not built.
286 '(delete-file-recursively "src/3rdparty/webkit"))))
f7fb0ccb
AE
287 (inputs `(,@(alist-delete "harfbuzz"
288 (alist-delete "libjpeg" (package-inputs qt)))
e7e5a4f8
AE
289 ("libjepg" ,libjpeg-8)
290 ("libsm" ,libsm)))
31580979
LC
291
292 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
293 ;; but we can't make them a separate output because "out" and "examples"
294 ;; would refer to each other.
295 (outputs '("out" ;112MiB core + 37MiB examples
296 "doc")) ;280MiB of HTML + code
1e9ed0e3
AE
297 (arguments
298 `(#:phases
cba632c4
LC
299 (modify-phases %standard-phases
300 (replace
1e9ed0e3
AE
301 'configure
302 (lambda* (#:key outputs #:allow-other-keys)
31580979
LC
303 (let ((out (assoc-ref outputs "out"))
304 (doc (assoc-ref outputs "doc")))
1e9ed0e3 305 (substitute* '("configure")
d2984346
LC
306 (("/bin/pwd") (which "pwd")))
307
206a5208
AE
308 (zero? (system*
309 "./configure"
310 "-verbose"
311 "-prefix" out
4b0f2ef7
LC
312 ;; Note: Don't pass '-docdir' since 'qmake' and
313 ;; libQtCore would record its value, thereby defeating
314 ;; the whole point of having a separate output.
ff1989a5
LC
315 "-datadir" (string-append out "/share/qt-" ,version
316 "/data")
317 "-importdir" (string-append out "/lib/qt-4"
318 "/imports")
319 "-plugindir" (string-append out "/lib/qt-4"
320 "/plugins")
321 "-translationdir" (string-append out "/share/qt-" ,version
322 "/translations")
31580979
LC
323 "-demosdir" (string-append out "/share/qt-" ,version
324 "/demos")
325 "-examplesdir" (string-append out "/share/qt-" ,version
326 "/examples")
206a5208
AE
327 "-opensource"
328 "-confirm-license"
ff0a8c59
AE
329 ;; explicitly link with dbus instead of dlopening it
330 "-dbus-linked"
7431edea
AE
331 ;; Skip the webkit module; it fails to build on armhf
332 ;; and, apart from that, may pose security risks.
333 "-no-webkit"
206a5208
AE
334 ;; drop special machine instructions not supported
335 ;; on all instances of the target
336 ,@(if (string-prefix? "x86_64"
337 (or (%current-target-system)
338 (%current-system)))
339 '()
340 '("-no-mmx"
1e9ed0e3
AE
341 "-no-3dnow"
342 "-no-sse"
206a5208
AE
343 "-no-sse2"))
344 "-no-sse3"
345 "-no-ssse3"
346 "-no-sse4.1"
347 "-no-sse4.2"
84811c22 348 "-no-avx")))))
4b0f2ef7
LC
349 (add-after
350 'install 'move-doc
351 (lambda* (#:key outputs #:allow-other-keys)
352 ;; Because of qt4-documentation-path.patch, documentation ends up
353 ;; being installed in OUT. Move it to the right place.
354 (let* ((out (assoc-ref outputs "out"))
355 (doc (assoc-ref outputs "doc"))
356 (olddoc (string-append out "/doc"))
357 (docdir (string-append doc "/share/doc/qt-" ,version)))
358 (mkdir-p (dirname docdir))
359
360 ;; Note: We can't use 'rename-file' here because OUT and DOC are
361 ;; different "devices" due to bind-mounts.
362 (copy-recursively olddoc docdir)
363 (delete-file-recursively olddoc)
364 #t))))))))
84ef83dd 365
7868000f
AE
366(define-public qtbase
367 (package
368 (name "qtbase")
f18c9470 369 (version "5.9.2")
7868000f
AE
370 (source (origin
371 (method url-fetch)
372 (uri (string-append "https://download.qt.io/official_releases/qt/"
373 (version-major+minor version) "/" version
374 "/submodules/" name "-opensource-src-"
375 version ".tar.xz"))
376 (sha256
c7386f4e 377 (base32
f18c9470 378 "16v0dny4rcyd5p8qsnsfg89w98k8kqk3rp9x3g3k7xjmi53bpqkz"))
7868000f
AE
379 (modules '((guix build utils)))
380 (snippet
924e6ddf 381 ;; corelib uses bundled harfbuzz, md4, md5, sha3
7868000f 382 '(begin
924e6ddf
EF
383 (for-each
384 (lambda (dir)
385 (delete-file-recursively (string-append "src/3rdparty/" dir)))
386 (list "double-conversion" "freetype" "harfbuzz-ng"
387 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
388 "xkbcommon" "zlib"))
389 #t))))
7868000f 390 (build-system gnu-build-system)
48d4ce6e
EF
391 (propagated-inputs
392 `(("mesa" ,mesa)))
7868000f
AE
393 (inputs
394 `(("alsa-lib" ,alsa-lib)
395 ("cups" ,cups)
396 ("dbus" ,dbus)
04f8decf 397 ("double-conversion" ,double-conversion)
f66970a7 398 ("eudev" ,eudev)
7868000f
AE
399 ("expat" ,expat)
400 ("fontconfig" ,fontconfig)
401 ("freetype" ,freetype)
402 ("glib" ,glib)
403 ("harfbuzz" ,harfbuzz)
404 ("icu4c" ,icu4c)
9ed9b44e 405 ("libinput" ,libinput-minimal)
7868000f
AE
406 ("libjpeg" ,libjpeg)
407 ("libmng" ,libmng)
408 ("libpng" ,libpng)
409 ("libx11" ,libx11)
410 ("libxcomposite" ,libxcomposite)
411 ("libxcursor" ,libxcursor)
412 ("libxfixes" ,libxfixes)
413 ("libxi" ,libxi)
414 ("libxinerama" ,libxinerama)
415 ("libxkbcommon" ,libxkbcommon)
416 ("libxml2" ,libxml2)
417 ("libxrandr" ,libxrandr)
418 ("libxrender" ,libxrender)
419 ("libxslt" ,libxslt)
420 ("libxtst" ,libxtst)
421 ("mtdev" ,mtdev)
422 ("mysql" ,mysql)
423 ("nss" ,nss)
424 ("openssl" ,openssl)
924e6ddf 425 ("pcre2" ,pcre2)
7868000f
AE
426 ("postgresql" ,postgresql)
427 ("pulseaudio" ,pulseaudio)
428 ("sqlite" ,sqlite)
429 ("unixodbc" ,unixodbc)
430 ("xcb-util" ,xcb-util)
431 ("xcb-util-image" ,xcb-util-image)
432 ("xcb-util-keysyms" ,xcb-util-keysyms)
433 ("xcb-util-renderutil" ,xcb-util-renderutil)
434 ("xcb-util-wm" ,xcb-util-wm)
435 ("zlib" ,zlib)))
436 (native-inputs
437 `(("bison" ,bison)
438 ("flex" ,flex)
439 ("gperf" ,gperf)
440 ("perl" ,perl)
441 ("pkg-config" ,pkg-config)
442 ("python" ,python-2)
443 ("ruby" ,ruby)
444 ("which" ,(@ (gnu packages base) which))))
445 (arguments
446 `(#:phases
447 (modify-phases %standard-phases
448 (add-after 'configure 'patch-bin-sh
449 (lambda _
450 (substitute* '("config.status"
451 "configure"
452 "mkspecs/features/qt_functions.prf"
453 "qmake/library/qmakebuiltins.cpp")
454 (("/bin/sh") (which "sh")))
455 #t))
456 (replace 'configure
457 (lambda* (#:key outputs #:allow-other-keys)
458 (let ((out (assoc-ref outputs "out")))
459 (substitute* "configure"
460 (("/bin/pwd") (which "pwd")))
461 (substitute* "src/corelib/global/global.pri"
462 (("/bin/ls") (which "ls")))
7972d8a2
AE
463 ;; The configuration files for other Qt5 packages are searched
464 ;; through a call to "find_package" in Qt5Config.cmake, which
465 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
466 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
467 ;; components can be installed in different places.
468 (substitute* (find-files "." ".*\\.cmake")
469 (("NO_DEFAULT_PATH") ""))
7868000f
AE
470 ;; do not pass "--enable-fast-install", which makes the
471 ;; configure process fail
472 (zero? (system*
473 "./configure"
474 "-verbose"
475 "-prefix" out
476 "-opensource"
477 "-confirm-license"
478 ;; Do not build examples; if desired, these could go
479 ;; into a separate output, but for the time being, we
480 ;; prefer to save the space and build time.
924e6ddf 481 "-no-compile-examples"
7868000f
AE
482 ;; Most "-system-..." are automatic, but some use
483 ;; the bundled copy by default.
484 "-system-sqlite"
485 "-system-harfbuzz"
924e6ddf 486 "-system-pcre"
7868000f
AE
487 ;; explicitly link with openssl instead of dlopening it
488 "-openssl-linked"
489 ;; explicitly link with dbus instead of dlopening it
490 "-dbus-linked"
4e825e2d
EF
491 ;; don't use the precompiled headers
492 "-no-pch"
493 ;; drop special machine instructions that do not have
494 ;; runtime detection
7868000f
AE
495 ,@(if (string-prefix? "x86_64"
496 (or (%current-target-system)
497 (%current-system)))
498 '()
499 '("-no-sse2"))
7868000f 500 "-no-mips_dsp"
5ca6ef95
SB
501 "-no-mips_dspr2")))))
502 (add-after 'install 'patch-qt_config.prf
503 (lambda* (#:key outputs #:allow-other-keys)
504 (let* ((out (assoc-ref outputs "out"))
505 (qt_config.prf (string-append
506 out "/mkspecs/features/qt_config.prf")))
507 ;; For each Qt module, let `qmake' uses search paths in the
508 ;; module directory instead of all in QT_INSTALL_PREFIX.
509 (substitute* qt_config.prf
510 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
511 "$$replace(dir, mkspecs/modules, include)")
512 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
513 "$$replace(dir, mkspecs/modules, lib)")
514 (("\\$\\$\\[QT_HOST_LIBS\\]")
515 "$$replace(dir, mkspecs/modules, lib)")
516 (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
517 "$$replace(dir, mkspecs/modules, plugins)")
518 (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
519 "$$replace(dir, mkspecs/modules, libexec)")
520 (("\\$\\$\\[QT_INSTALL_BINS\\]")
521 "$$replace(dir, mkspecs/modules, bin)")
522 (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
523 "$$replace(dir, mkspecs/modules, imports)")
524 (("\\$\\$\\[QT_INSTALL_QML\\]")
525 "$$replace(dir, mkspecs/modules, qml)"))
526 #t))))))
527 (native-search-paths
528 (list (search-path-specification
529 (variable "QMAKEPATH")
ed02e1fe
DC
530 (files '("")))
531 (search-path-specification
532 (variable "QML2_IMPORT_PATH")
533 (files '("qml")))
534 (search-path-specification
535 (variable "QT_PLUGIN_PATH")
536 (files '("plugins")))
537 (search-path-specification
538 (variable "XDG_DATA_DIRS")
539 (files '("share")))
540 (search-path-specification
541 (variable "XDG_CONFIG_DIRS")
542 (files '("etc/xdg")))))
7868000f
AE
543 (home-page "https://www.qt.io/")
544 (synopsis "Cross-platform GUI library")
545 (description "Qt is a cross-platform application and UI framework for
546developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 547 (license (list license:lgpl2.1 license:lgpl3))))
7868000f 548
19c17631
EF
549(define-public qtsvg
550 (package (inherit qtbase)
551 (name "qtsvg")
f18c9470 552 (version "5.9.2")
19c17631
EF
553 (source (origin
554 (method url-fetch)
555 (uri (string-append "https://download.qt.io/official_releases/qt/"
556 (version-major+minor version) "/" version
557 "/submodules/" name "-opensource-src-"
558 version ".tar.xz"))
559 (sha256
560 (base32
f18c9470 561 "020icrl9vi8jh8ygsssqrx2bl8bx28m15dwmf9a969qdnvxyp5ms"))))
48d4ce6e 562 (propagated-inputs `())
19c17631
EF
563 (native-inputs `(("perl" ,perl)))
564 (inputs
565 `(("mesa" ,mesa)
566 ("qtbase" ,qtbase)
567 ("zlib" ,zlib)))
568 (arguments
569 `(#:phases
570 (modify-phases %standard-phases
571 (replace 'configure
572 (lambda* (#:key outputs #:allow-other-keys)
573 (let ((out (assoc-ref outputs "out")))
c195b5ba
EF
574 ;; Valid QT_BUILD_PARTS variables are:
575 ;; libs tools tests examples demos docs translations
576 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
577 (string-append "PREFIX=" out))))))
19c17631
EF
578 (add-before 'install 'fix-Makefiles
579 (lambda* (#:key inputs outputs #:allow-other-keys)
580 (let ((out (assoc-ref outputs "out"))
581 (qtbase (assoc-ref inputs "qtbase")))
582 (substitute* (find-files "." "Makefile")
583 (((string-append "INSTALL_ROOT)" qtbase))
c195b5ba
EF
584 (string-append "INSTALL_ROOT)" out)))
585 #t)))
586 (add-before 'check 'set-display
587 (lambda _
94e24d81 588 ;; make Qt render "offscreen", required for tests
c195b5ba 589 (setenv "QT_QPA_PLATFORM" "offscreen")
96412f34
EF
590 #t)))))
591 (synopsis "Qt module for displaying SVGs")
592 (description "The QtSvg module provides classes for displaying the
593 contents of SVG files.")))
19c17631 594
9b694210
EF
595(define-public qtimageformats
596 (package (inherit qtsvg)
597 (name "qtimageformats")
f18c9470 598 (version "5.9.2")
9b694210
EF
599 (source (origin
600 (method url-fetch)
601 (uri (string-append "https://download.qt.io/official_releases/qt/"
602 (version-major+minor version) "/" version
603 "/submodules/" name "-opensource-src-"
604 version ".tar.xz"))
605 (sha256
606 (base32
f18c9470 607 "1wwxxcl24mk1p4w6knyfai09axmwqsm6cgsbkjsmdz3zmjh6qqis"))
c04854da
EF
608 (modules '((guix build utils)))
609 (snippet
a20e00dd 610 '(delete-file-recursively "src/3rdparty"))))
9b694210
EF
611 (native-inputs `())
612 (inputs
a532a671
EF
613 `(("jasper" ,jasper)
614 ("libmng" ,libmng)
9b694210
EF
615 ("libtiff" ,libtiff)
616 ("libwebp" ,libwebp)
617 ("mesa" ,mesa)
618 ("qtbase" ,qtbase)
96412f34
EF
619 ("zlib" ,zlib)))
620 (synopsis "Additional Image Format plugins for Qt")
621 (description "The QtImageFormats module contains plugins for adding
622support for MNG, TGA, TIFF and WBMP image formats.")))
9b694210 623
f6c13613
EF
624(define-public qtx11extras
625 (package (inherit qtsvg)
626 (name "qtx11extras")
f18c9470 627 (version "5.9.2")
f6c13613
EF
628 (source (origin
629 (method url-fetch)
630 (uri (string-append "https://download.qt.io/official_releases/qt/"
631 (version-major+minor version) "/" version
632 "/submodules/" name "-opensource-src-"
633 version ".tar.xz"))
634 (sha256
635 (base32
f18c9470 636 "1ias745j5lfnrfkgyk0pr8n8zlkqs08gq7yyzaj1c645sh54b1fv"))))
c195b5ba
EF
637 (arguments
638 (substitute-keyword-arguments (package-arguments qtsvg)
639 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
f6c13613
EF
640 (native-inputs `(("perl" ,perl)))
641 (inputs
642 `(("mesa" ,mesa)
96412f34
EF
643 ("qtbase" ,qtbase)))
644 (synopsis "Qt Extras for X11")
645 (description "The QtX11Extras module includes the library to access X11
646from within Qt 5.")))
f6c13613 647
98eec712
EF
648(define-public qtxmlpatterns
649 (package (inherit qtsvg)
650 (name "qtxmlpatterns")
f18c9470 651 (version "5.9.2")
98eec712
EF
652 (source (origin
653 (method url-fetch)
654 (uri (string-append "https://download.qt.io/official_releases/qt/"
655 (version-major+minor version) "/" version
656 "/submodules/" name "-opensource-src-"
657 version ".tar.xz"))
658 (sha256
659 (base32
f18c9470 660 "0knk4bplqhvsxar1wv16bzfw57q0aja12gdaxz7m8mvx121sm9ha"))))
c195b5ba
EF
661 (arguments
662 (substitute-keyword-arguments (package-arguments qtsvg)
f66b3e15
EF
663 ((#:phases phases)
664 `(modify-phases ,phases
665 (add-after 'unpack 'disable-network-tests
666 (lambda _ (substitute* "tests/auto/auto.pro"
667 (("qxmlquery") "# qxmlquery")
a20e00dd 668 (("xmlpatterns ") "# xmlpatterns"))
f66b3e15 669 #t))))))
98eec712 670 (native-inputs `(("perl" ,perl)))
96412f34
EF
671 (inputs `(("qtbase" ,qtbase)))
672 (synopsis "Qt XML patterns module")
673 (description "The QtXmlPatterns module is a XQuery and XPath engine for
674XML and custom data models. It contains programs such as xmlpatterns and
675xmlpatternsvalidator.")))
98eec712 676
e3a2ed81
EF
677(define-public qtdeclarative
678 (package (inherit qtsvg)
679 (name "qtdeclarative")
f18c9470 680 (version "5.9.2")
e3a2ed81
EF
681 (source (origin
682 (method url-fetch)
683 (uri (string-append "https://download.qt.io/official_releases/qt/"
684 (version-major+minor version) "/" version
685 "/submodules/" name "-opensource-src-"
686 version ".tar.xz"))
687 (sha256
688 (base32
f18c9470 689 "020bha6q8byxc8cj5zw7gms5rgsjg71hv31hv1rr2fy7x56zsh0d"))))
c195b5ba
EF
690 (arguments
691 (substitute-keyword-arguments (package-arguments qtsvg)
692 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
e3a2ed81
EF
693 (native-inputs
694 `(("perl" ,perl)
695 ("pkg-config" ,pkg-config)
696 ("python" ,python-2)
697 ("qtsvg" ,qtsvg)
698 ("qtxmlpatterns" ,qtxmlpatterns)))
699 (inputs
700 `(("mesa" ,mesa)
96412f34
EF
701 ("qtbase" ,qtbase)))
702 (synopsis "Qt QML module (Quick 2)")
703 (description "The Qt QML module provides a framework for developing
704applications and libraries with the QML language. It defines and implements the
705language and engine infrastructure, and provides an API to enable application
706developers to extend the QML language with custom types and integrate QML code
707with JavaScript and C++.")))
e3a2ed81 708
e98cb96d
EF
709(define-public qtconnectivity
710 (package (inherit qtsvg)
711 (name "qtconnectivity")
f18c9470 712 (version "5.9.2")
e98cb96d
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
f18c9470 721 "1k7kjmlny0ykm40qx796wbsg3310v6b8hqizkbr597cmxjbrax9c"))))
45f5bc0e
EF
722 (arguments
723 (substitute-keyword-arguments (package-arguments qtsvg)
724 ((#:phases phases)
725 `(modify-phases ,phases
726 (add-after 'unpack 'disable-failing-tests
727 ;; this test fails on armhf and aarch64
728 (lambda _
729 (substitute* "tests/auto/qndefnfcsmartposterrecord/tst_qndefnfcsmartposterrecord.cpp"
730 (("QCOMPARE\\(record.action\\(\\), QNdefNfcSmartPosterRecord::UnspecifiedAction")
731 "//QCOMPARE(record.action(), QNdefNfcSmartPosterRecord::UnspecifiedAction"))
732 #t))))))
e98cb96d
EF
733 (native-inputs
734 `(("perl" ,perl)
735 ("pkg-config" ,pkg-config)
736 ("qtdeclarative" ,qtdeclarative)))
737 (inputs
738 `(("bluez" ,bluez)
96412f34
EF
739 ("qtbase" ,qtbase)))
740 (synopsis "Qt Connectivity module")
741 (description "The Qt Connectivity modules provides modules for interacting
742with Bluetooth and NFC.")))
e98cb96d 743
cac893ec
EF
744(define-public qtwebsockets
745 (package (inherit qtsvg)
746 (name "qtwebsockets")
f18c9470 747 (version "5.9.2")
cac893ec
EF
748 (source (origin
749 (method url-fetch)
750 (uri (string-append "https://download.qt.io/official_releases/qt/"
751 (version-major+minor version) "/" version
752 "/submodules/" name "-opensource-src-"
753 version ".tar.xz"))
754 (sha256
755 (base32
f18c9470 756 "0x0nx1ampqsgj9qlc3l32z3ham1a5vq7m2lnxk5pr92yj6yw3pdg"))))
c195b5ba
EF
757 (arguments
758 (substitute-keyword-arguments (package-arguments qtsvg)
759 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
cac893ec
EF
760 (native-inputs
761 `(("perl" ,perl)
762 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
763 (inputs `(("qtbase" ,qtbase)))
764 (synopsis "Qt Web Sockets module")
765 (description "WebSocket is a web-based protocol designed to enable two-way
766communication between a client application and a remote host. The Qt
767WebSockets module provides C++ and QML interfaces that enable Qt applications
768to act as a server that can process WebSocket requests, or a client that can
769consume data received from the server, or both.")))
cac893ec 770
3474767c
EF
771(define-public qtsensors
772 (package (inherit qtsvg)
773 (name "qtsensors")
f18c9470 774 (version "5.9.2")
3474767c
EF
775 (source (origin
776 (method url-fetch)
777 (uri (string-append "https://download.qt.io/official_releases/qt/"
778 (version-major+minor version) "/" version
779 "/submodules/" name "-opensource-src-"
780 version ".tar.xz"))
781 (sha256
782 (base32
f18c9470 783 "1lxmhi19dbb8vjhpjph0l0ss6zh72hb4908lp4s1pgf8r641ai3r"))))
202afee2
EF
784 (arguments
785 (substitute-keyword-arguments (package-arguments qtsvg)
786 ((#:phases phases)
787 `(modify-phases ,phases
788 (add-after 'unpack 'lengthen-test-timeout
789 (lambda _
790 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
791 (("2000") "5000"))
792 #t))))))
3474767c
EF
793 (native-inputs
794 `(("perl" ,perl)
795 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
796 (inputs `(("qtbase" ,qtbase)))
797 (synopsis "Qt Sensors module")
798 (description "The Qt Sensors API provides access to sensor hardware via QML
799and C++ interfaces. The Qt Sensors API also provides a motion gesture
800recognition API for devices.")))
3474767c 801
15378f93
EF
802(define-public qtmultimedia
803 (package (inherit qtsvg)
804 (name "qtmultimedia")
f18c9470 805 (version "5.9.2")
15378f93
EF
806 (source (origin
807 (method url-fetch)
808 (uri (string-append "https://download.qt.io/official_releases/qt/"
809 (version-major+minor version) "/" version
810 "/submodules/" name "-opensource-src-"
811 version ".tar.xz"))
812 (sha256
813 (base32
f18c9470 814 "0815hi3cxy5zy6yc5fkdpx2xd6rk7968j1ziwl2g4wa80802g9n9"))
63d8f08f
EF
815 (modules '((guix build utils)))
816 (snippet
817 '(begin
818 (delete-file-recursively
c195b5ba
EF
819 "examples/multimedia/spectrum/3rdparty")
820 ;; We also prevent the spectrum example from being built.
821 (substitute* "examples/multimedia/multimedia.pro"
822 (("spectrum") "#"))))))
823 (arguments
824 (substitute-keyword-arguments (package-arguments qtsvg)
04231311
RW
825 ((#:phases phases)
826 `(modify-phases ,phases
827 (replace 'configure
828 (lambda* (#:key outputs #:allow-other-keys)
829 (let ((out (assoc-ref outputs "out")))
830 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools tests"
831 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
832 (string-append "PREFIX=" out))))))))
833 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
15378f93
EF
834 (native-inputs
835 `(("perl" ,perl)
836 ("pkg-config" ,pkg-config)
837 ("python" ,python-2)
838 ("qtdeclarative" ,qtdeclarative)))
839 (inputs
840 `(("alsa-lib" ,alsa-lib)
841 ("mesa" ,mesa)
842 ("pulseaudio" ,pulseaudio)
04231311
RW
843 ("qtbase" ,qtbase)
844 ;; Gstreamer is needed for the mediaplayer plugin
845 ("gstreamer" ,gstreamer)
96412f34
EF
846 ("gst-plugins-base" ,gst-plugins-base)))
847 (synopsis "Qt Multimedia module")
848 (description "The Qt Multimedia module provides set of APIs to play and
849record media, and manage a collection of media content. It also contains a
850set of plugins for interacting with pulseaudio and GStreamer.")))
15378f93 851
bc8ede01
EF
852(define-public qtwayland
853 (package (inherit qtsvg)
854 (name "qtwayland")
f18c9470 855 (version "5.9.2")
bc8ede01
EF
856 (source (origin
857 (method url-fetch)
858 (uri (string-append "https://download.qt.io/official_releases/qt/"
859 (version-major+minor version) "/" version
860 "/submodules/" name "-opensource-src-"
861 version ".tar.xz"))
862 (sha256
863 (base32
f18c9470 864 "1ipn4xh0dj1kjg5i4vfl4gpx3hg2377w5gls47xpv1ikz41lshzn"))
924e6ddf
EF
865 (modules '((guix build utils)))
866 (snippet
867 ;; The examples try to build and cause the build to fail
868 '(delete-file-recursively "examples"))))
bc8ede01
EF
869 (native-inputs
870 `(("glib" ,glib)
871 ("perl" ,perl)
872 ("pkg-config" ,pkg-config)
873 ("qtdeclarative" ,qtdeclarative)))
874 (inputs
875 `(("fontconfig" ,fontconfig)
876 ("freetype" ,freetype)
877 ("libx11" ,libx11)
878 ("libxcomposite" ,libxcomposite)
879 ("libxext" ,libxext)
880 ("libxkbcommon" ,libxkbcommon)
881 ("libxrender" ,libxrender)
882 ("mesa" ,mesa)
883 ("mtdev" ,mtdev)
884 ("qtbase" ,qtbase)
96412f34
EF
885 ("wayland" ,wayland)))
886 (synopsis "Qt Wayland module")
887 (description "The Qt Wayland module provides the QtWayland client and
888compositor libraries.")))
bc8ede01 889
00806f2b
EF
890(define-public qtserialport
891 (package (inherit qtsvg)
892 (name "qtserialport")
f18c9470 893 (version "5.9.2")
00806f2b
EF
894 (source (origin
895 (method url-fetch)
896 (uri (string-append "https://download.qt.io/official_releases/qt/"
897 (version-major+minor version) "/" version
898 "/submodules/" name "-opensource-src-"
899 version ".tar.xz"))
900 (sha256
901 (base32
f18c9470 902 "0hndc9z7qzxazzjvc6k5yd58afw13444plk70b05nqdi5p19rvah"))))
00806f2b 903 (native-inputs `(("perl" ,perl)))
33741e16
EF
904 (inputs
905 `(("qtbase" ,qtbase)
96412f34
EF
906 ("eudev" ,eudev)))
907 (synopsis "Qt Serial Port module")
908 (description "The Qt Serial Port module provides the library for
909interacting with serial ports from within Qt.")))
00806f2b 910
a98ffab5
EF
911(define-public qtserialbus
912 (package (inherit qtsvg)
913 (name "qtserialbus")
f18c9470 914 (version "5.9.2")
a98ffab5
EF
915 (source (origin
916 (method url-fetch)
917 (uri (string-append "https://download.qt.io/official_releases/qt/"
918 (version-major+minor version) "/" version
919 "/submodules/" name "-opensource-src-"
920 version ".tar.xz"))
921 (sha256
922 (base32
f18c9470 923 "025yv7zajz5scrmkjkmgkyvxpgkliqvrzc88is0gr481zpd4phmv"))))
a98ffab5
EF
924 (inputs
925 `(("qtbase" ,qtbase)
96412f34
EF
926 ("qtserialport" ,qtserialport)))
927 (synopsis "Qt Serial Bus module")
928 (description "The Qt Serial Bus API provides classes and functions to
929access the various industrial serial buses and protocols, such as CAN, ModBus,
930and others.")))
a98ffab5 931
f5377013
EF
932(define-public qtwebchannel
933 (package (inherit qtsvg)
934 (name "qtwebchannel")
f18c9470 935 (version "5.9.2")
f5377013
EF
936 (source (origin
937 (method url-fetch)
938 (uri (string-append "https://download.qt.io/official_releases/qt/"
939 (version-major+minor version) "/" version
940 "/submodules/" name "-opensource-src-"
941 version ".tar.xz"))
942 (sha256
943 (base32
f18c9470 944 "09iss70c1iqgf8qpik35qlgrdw5y9935v0fm2ppgkmxdxkpls6ww"))))
f5377013
EF
945 (native-inputs
946 `(("perl" ,perl)
947 ("qtdeclarative" ,qtdeclarative)
948 ("qtwebsockets" ,qtwebsockets)))
96412f34
EF
949 (inputs `(("qtbase" ,qtbase)))
950 (synopsis "Web communication library for Qt")
951 (description "The Qt WebChannel module enables peer-to-peer communication
952between the host (QML/C++ application) and the client (HTML/JavaScript
953application). The transport mechanism is supported out of the box by the two
954popular web engines, Qt WebKit 2 and Qt WebEngine.")))
f5377013 955
d5ca54ce
EF
956(define-public qtlocation
957 (package (inherit qtsvg)
958 (name "qtlocation")
f18c9470 959 (version "5.9.2")
d5ca54ce
EF
960 (source (origin
961 (method url-fetch)
962 (uri (string-append "https://download.qt.io/official_releases/qt/"
963 (version-major+minor version) "/" version
964 "/submodules/" name "-opensource-src-"
965 version ".tar.xz"))
966 (sha256
967 (base32
f18c9470 968 "033b6l6jbvmc0k5qvbgh5vkzvfga7npqcphrywrrqkmx9vj446n8"))))
c195b5ba
EF
969 (arguments
970 (substitute-keyword-arguments (package-arguments qtsvg)
971 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d5ca54ce
EF
972 (native-inputs
973 `(("perl" ,perl)
974 ("qtdeclarative" ,qtdeclarative)
9a935ef2 975 ("qtquickcontrols" ,qtquickcontrols)
d5ca54ce 976 ("qtserialport" ,qtserialport)))
924e6ddf
EF
977 (inputs
978 `(("icu4c" ,icu4c)
979 ("openssl" ,openssl)
980 ("qtbase" ,qtbase)
96412f34
EF
981 ("zlib" ,zlib)))
982 (synopsis "Qt Location and Positioning modules")
983 (description "The Qt Location module provides an interface for location,
984positioning and geolocation plugins.")))
d5ca54ce 985
d438c968
EF
986(define-public qttools
987 (package (inherit qtsvg)
988 (name "qttools")
f18c9470 989 (version "5.9.2")
d438c968
EF
990 (source (origin
991 (method url-fetch)
992 (uri (string-append "https://download.qt.io/official_releases/qt/"
993 (version-major+minor version) "/" version
994 "/submodules/" name "-opensource-src-"
995 version ".tar.xz"))
996 (sha256
997 (base32
f18c9470 998 "06nqsa5mj0mc9w9xbm7mgdkb66x4wlvkhnas32f97sb8ic8rdf9b"))))
c195b5ba
EF
999 (arguments
1000 (substitute-keyword-arguments (package-arguments qtsvg)
1001 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d438c968
EF
1002 (native-inputs
1003 `(("perl" ,perl)
1004 ("qtdeclarative" ,qtdeclarative)))
1005 (inputs
1006 `(("mesa" ,mesa)
96412f34
EF
1007 ("qtbase" ,qtbase)))
1008 (synopsis "Qt Tools and Designer modules")
1009 (description "The Qt Tools module provides a set of applications to browse
1010the documentation, translate applications, generate help files and other stuff
1011that helps in Qt development.")))
d438c968 1012
4742c4de
EF
1013(define-public qtscript
1014 (package (inherit qtsvg)
1015 (name "qtscript")
f18c9470 1016 (version "5.9.2")
4742c4de
EF
1017 (source (origin
1018 (method url-fetch)
1019 (uri (string-append "https://download.qt.io/official_releases/qt/"
1020 (version-major+minor version) "/" version
1021 "/submodules/" name "-opensource-src-"
1022 version ".tar.xz"))
1023 (sha256
1024 (base32
f18c9470 1025 "1wa0rnbphkhgydnwkf5bjwn0llskl6hgs0964nh0jik8qaspv027"))
7c5cf7a2 1026 (patches (search-patches "qtscript-disable-tests.patch"))))
4742c4de
EF
1027 (native-inputs
1028 `(("perl" ,perl)
1029 ("qttools" ,qttools)))
1030 (inputs
96412f34
EF
1031 `(("qtbase" ,qtbase)))
1032 (synopsis "Qt Script module")
1033 (description "Qt provides support for application scripting with ECMAScript.
1034The following guides and references cover aspects of programming with
1035ECMAScript and Qt.")))
4742c4de 1036
ae0e5133
DC
1037(define-public qtquickcontrols
1038 (package (inherit qtsvg)
1039 (name "qtquickcontrols")
f18c9470 1040 (version "5.9.2")
ae0e5133
DC
1041 (source (origin
1042 (method url-fetch)
1043 (uri (string-append "https://download.qt.io/official_releases/qt/"
1044 (version-major+minor version) "/" version
1045 "/submodules/" name "-opensource-src-"
1046 version ".tar.xz"))
1047 (sha256
1048 (base32
f18c9470 1049 "07xxhkfsljwdwlp9jfp88pwkrig02y2pnwhdsaz8mkcackwfq2az"))))
c195b5ba
EF
1050 (arguments
1051 (substitute-keyword-arguments (package-arguments qtsvg)
1052 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
ae0e5133
DC
1053 (inputs
1054 `(("qtbase" ,qtbase)
96412f34
EF
1055 ("qtdeclarative" ,qtdeclarative)))
1056 (synopsis "Qt Quick Controls and other Quick modules")
1057 (description "The QtScript module provides classes for making Qt
1058applications scriptable. This module provides a set of extra components that
1059can be used to build complete interfaces in Qt Quick.")))
ae0e5133 1060
42da1492
DC
1061(define-public qtquickcontrols2
1062 (package (inherit qtsvg)
1063 (name "qtquickcontrols2")
f18c9470 1064 (version "5.9.2")
42da1492
DC
1065 (source (origin
1066 (method url-fetch)
1067 (uri (string-append "https://download.qt.io/official_releases/qt/"
1068 (version-major+minor version) "/" version
1069 "/submodules/" name "-opensource-src-"
1070 version ".tar.xz"))
1071 (sha256
1072 (base32
f18c9470 1073 "1ln83afxyp5dmvdnq6n7as82xrd5k3xvfx7b1jxnljivslyxsm9b"))))
c195b5ba
EF
1074 (arguments
1075 (substitute-keyword-arguments (package-arguments qtsvg)
1076 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
42da1492
DC
1077 (inputs
1078 `(("qtbase" ,qtbase)
96412f34
EF
1079 ("qtdeclarative" ,qtdeclarative)))
1080 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1081 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1082module that provides platform integration: native dialogs, menus and menu bars,
1083and tray icons. It falls back to Qt Widgets when a native implementation is
1084not available.")))
42da1492 1085
4e4ed0ee
DC
1086(define-public qtgraphicaleffects
1087 (package (inherit qtsvg)
1088 (name "qtgraphicaleffects")
f18c9470 1089 (version "5.9.2")
4e4ed0ee
DC
1090 (source (origin
1091 (method url-fetch)
1092 (uri (string-append "https://download.qt.io/official_releases/qt/"
1093 (version-major+minor version) "/" version
1094 "/submodules/" name "-opensource-src-"
1095 version ".tar.xz"))
1096 (sha256
1097 (base32
f18c9470 1098 "0xpvigfiqfqvf05ywj8x69y57rp8dwq2hs1kpxlxs15pniz4wn8l"))))
c195b5ba
EF
1099 (arguments
1100 (substitute-keyword-arguments (package-arguments qtsvg)
1101 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
4e4ed0ee
DC
1102 (inputs
1103 `(("qtbase" ,qtbase)
96412f34
EF
1104 ("qtdeclarative" ,qtdeclarative)))
1105 (synopsis "Qt Graphical Effects module")
1106 (description "The Qt Graphical Effects module provides a set of QML types
1107for adding visually impressive and configurable effects to user interfaces.
1108Effects are visual items that can be added to Qt Quick user interface as UI
1109components. The API consists of over 20 effects provided as separate QML
1110types. The effects cover functional areas such as blending, masking, blurring,
1111coloring, and many more.")))
4e4ed0ee 1112
843bdfb7 1113(define-public qtdeclarative-render2d
a20e00dd 1114 ;; As of Qt-5.8.0 this module has been merged into qtdeclarative
843bdfb7
EF
1115 (package (inherit qtsvg)
1116 (name "qtdeclarative-render2d")
1117 (version "5.7.1")
1118 (source (origin
1119 (method url-fetch)
1120 (uri (string-append "https://download.qt.io/official_releases/qt/"
1121 (version-major+minor version) "/" version
1122 "/submodules/" name "-opensource-src-"
1123 version ".tar.xz"))
1124 (sha256
1125 (base32
1126 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
1127 (modules '((guix build utils)))
1128 (snippet
1129 '(delete-file-recursively "tools/opengldummy/3rdparty"))))
1130 (native-inputs `())
1131 (inputs
1132 `(("qtbase" ,qtbase)
a20e00dd 1133 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
1134 (synopsis "Qt Declarative Render module")
1135 (description "The Qt Declarative Render 2D module provides a Raster
1136backend for QtQuick scene graph.")
a20e00dd 1137 (properties `((superseded . ,qtdeclarative)))))
843bdfb7 1138
51519fd3
EF
1139(define-public qtgamepad
1140 (package (inherit qtsvg)
1141 (name "qtgamepad")
f18c9470 1142 (version "5.9.2")
51519fd3
EF
1143 (source (origin
1144 (method url-fetch)
1145 (uri (string-append "https://download.qt.io/official_releases/qt/"
1146 (version-major+minor version) "/" version
1147 "/submodules/" name "-opensource-src-"
1148 version ".tar.xz"))
1149 (sha256
1150 (base32
f18c9470 1151 "0lm5v43psf7r8zc79dcjdmmdnz4jm30ylgkvsyv8k88mj06yklbn"))))
51519fd3
EF
1152 (native-inputs
1153 `(("perl" ,perl)
1154 ("pkg-config" ,pkg-config)))
1155 (inputs
1156 `(("fontconfig" ,fontconfig)
1157 ("freetype" ,freetype)
1158 ("libxrender" ,libxrender)
1159 ("sdl2" ,sdl2)
1160 ("qtbase" ,qtbase)
96412f34
EF
1161 ("qtdeclarative" ,qtdeclarative)))
1162 (synopsis "Qt Gamepad module")
1163 (description "The Qt Gamepad module is an add-on library that enables Qt
1164applications to support the use of gamepad hardware and in some cases remote
1165control equipment. The module provides both QML and C++ interfaces. The
1166primary target audience are embedded devices with fullscreen user interfaces,
1167and mobile applications targeting TV-like form factors.")))
51519fd3 1168
56cd88fd
EF
1169(define-public qtscxml
1170 (package (inherit qtsvg)
1171 (name "qtscxml")
f18c9470 1172 (version "5.9.2")
56cd88fd
EF
1173 (source (origin
1174 (method url-fetch)
1175 (uri (string-append "https://download.qt.io/official_releases/qt/"
1176 (version-major+minor version) "/" version
1177 "/submodules/" name "-opensource-src-"
1178 version ".tar.xz"))
1179 (sha256
1180 (base32
f18c9470 1181 "0pdimqwdrj8hckm81lwy1z58ji4bdv0bzgv336m0a8v3pj914awx"))
56cd88fd
EF
1182 (modules '((guix build utils)))
1183 (snippet
c195b5ba
EF
1184 '(begin
1185 (delete-file-recursively "tests/3rdparty")
1186 ;; the scion test refers to the bundled 3rd party test code.
1187 (substitute* "tests/auto/auto.pro"
1188 (("scion") "#"))))))
56cd88fd
EF
1189 (inputs
1190 `(("qtbase" ,qtbase)
96412f34
EF
1191 ("qtdeclarative" ,qtdeclarative)))
1192 (synopsis "Qt SCXML module")
1193 (description "The Qt SCXML module provides functionality to create state
1194machines from SCXML files. This includes both dynamically creating state
1195machines (loading the SCXML file and instantiating states and transitions) and
1196generating a C++ file that has a class implementing the state machine. It
1197also contains functionality to support data models and executable content.")))
56cd88fd 1198
de5e0180
EF
1199(define-public qtpurchasing
1200 (package (inherit qtsvg)
1201 (name "qtpurchasing")
f18c9470 1202 (version "5.9.2")
de5e0180
EF
1203 (source (origin
1204 (method url-fetch)
1205 (uri (string-append "https://download.qt.io/official_releases/qt/"
1206 (version-major+minor version) "/" version
1207 "/submodules/" name "-opensource-src-"
1208 version ".tar.xz"))
1209 (sha256
1210 (base32
f18c9470 1211 "04f28y7qcr4kd0pw26mm515qj7haxr0i8lijn1q47wkikxyhawca"))))
de5e0180
EF
1212 (inputs
1213 `(("qtbase" ,qtbase)
96412f34
EF
1214 ("qtdeclarative" ,qtdeclarative)))
1215 (synopsis "Qt Purchasing module")
1216 (description "The Qt Purchasing module provides and in-app API for
1217purchasing goods and services.")))
de5e0180 1218
173b54b9
EF
1219(define-public qtcanvas3d
1220 (package (inherit qtsvg)
1221 (name "qtcanvas3d")
f18c9470 1222 (version "5.9.2")
173b54b9
EF
1223 (source (origin
1224 (method url-fetch)
1225 (uri (string-append "https://download.qt.io/official_releases/qt/"
1226 (version-major+minor version) "/" version
1227 "/submodules/" name "-opensource-src-"
1228 version ".tar.xz"))
1229 (sha256
1230 (base32
f18c9470 1231 "1siyzgm1mjx90rwyzzq9vw2s2xzyf6n7q0vn8gw7mdim5indda44"))
173b54b9
EF
1232 (modules '((guix build utils)))
1233 (snippet
1234 '(delete-file-recursively "examples/canvas3d/3rdparty"))))
c195b5ba
EF
1235 (arguments
1236 (substitute-keyword-arguments (package-arguments qtsvg)
1237 ;; Building the tests depends on the bundled 3rd party javascript files,
1238 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1239 ;; fail, so we skip building them for now.
1240 ((#:phases phases)
1241 `(modify-phases ,phases
1242 (replace 'configure
1243 (lambda* (#:key outputs #:allow-other-keys)
1244 (let ((out (assoc-ref outputs "out")))
1245 (zero? (system* "qmake" "QT_BUILD_PARTS = libs tools"
1246 (string-append "PREFIX=" out))))))))
1247 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
173b54b9
EF
1248 (native-inputs `())
1249 (inputs
1250 `(("qtbase" ,qtbase)
96412f34
EF
1251 ("qtdeclarative" ,qtdeclarative)))
1252 (synopsis "Qt Canvas 3D module")
1253 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1254drawing calls from Qt Quick JavaScript.")))
173b54b9 1255
68bbe14b
EF
1256(define-public qtcharts
1257 (package (inherit qtsvg)
1258 (name "qtcharts")
f18c9470 1259 (version "5.9.2")
68bbe14b
EF
1260 (source (origin
1261 (method url-fetch)
1262 (uri (string-append "https://download.qt.io/official_releases/qt/"
1263 (version-major+minor version) "/" version
1264 "/submodules/" name "-opensource-src-"
1265 version ".tar.xz"))
1266 (sha256
1267 (base32
f18c9470 1268 "193a3imkgryw42s0gbwaj9gpqd673h3jrg86jvmy33l2fc5gfyjf"))))
c195b5ba
EF
1269 (arguments
1270 (substitute-keyword-arguments (package-arguments qtsvg)
1271 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
68bbe14b
EF
1272 (inputs
1273 `(("qtbase" ,qtbase)
96412f34
EF
1274 ("qtdeclarative" ,qtdeclarative)))
1275 (synopsis "Qt Charts module")
1276 (description "The Qt Charts module provides a set of easy to use chart
1277components. It uses the Qt Graphics View Framework, therefore charts can be
1278easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1279QGraphicsWidget, or QML types. Users can easily create impressive graphs by
9c2c524d
EF
1280selecting one of the charts themes.")
1281 (license license:gpl3)))
68bbe14b 1282
a69945a7
EF
1283(define-public qtdatavis3d
1284 (package (inherit qtsvg)
1285 (name "qtdatavis3d")
f18c9470 1286 (version "5.9.2")
a69945a7
EF
1287 (source (origin
1288 (method url-fetch)
1289 (uri (string-append "https://download.qt.io/official_releases/qt/"
1290 (version-major+minor version) "/" version
1291 "/submodules/" name "-opensource-src-"
1292 version ".tar.xz"))
1293 (sha256
1294 (base32
f18c9470 1295 "1cmjjbbmdqdix1f8b7qyc2vwhj9pvchc8r4lp65qw11dhycmdbh6"))))
c195b5ba
EF
1296 (arguments
1297 (substitute-keyword-arguments (package-arguments qtsvg)
1298 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
a69945a7
EF
1299 (inputs
1300 `(("qtbase" ,qtbase)
96412f34
EF
1301 ("qtdeclarative" ,qtdeclarative)))
1302 (synopsis "Qt Data Visualization module")
1303 (description "The Qt Data Visualization module provides a way to visualize
1304data in 3D as bar, scatter, and surface graphs. It is especially useful for
1305visualizing depth maps and large quantities of rapidly changing data, such as
1306data received from multiple sensors. The look and feel of graphs can be
9c2c524d
EF
1307customized by using themes or by adding custom items and labels to them.")
1308 (license license:gpl3)))
f47d2793
EF
1309
1310(define-public qtnetworkauth
1311 (package (inherit qtsvg)
1312 (name "qtnetworkauth")
f18c9470 1313 (version "5.9.2")
f47d2793
EF
1314 (source (origin
1315 (method url-fetch)
1316 (uri (string-append "https://download.qt.io/official_releases/qt/"
1317 (version-major+minor version) "/" version
1318 "/submodules/" name "-opensource-src-"
1319 version ".tar.xz"))
1320 (sha256
1321 (base32
f18c9470
EF
1322 "16i33m8x5yii22ciq97bpfmnw0lwhvgv84i2az30a1ikm9dg00x0"))))
1323 (arguments
1324 (substitute-keyword-arguments (package-arguments qtsvg)
1325 ((#:phases phases)
1326 `(modify-phases ,phases
1327 (add-after 'unpack 'remove-failing-test
1328 (lambda _
1329 ;; These tests can't find their test data.
1330 (substitute* "tests/auto/auto.pro"
1331 (("oauth1 ") "# oauth1 "))
1332 #t))))))
f47d2793 1333 (inputs
96412f34
EF
1334 `(("qtbase" ,qtbase)))
1335 (synopsis "Qt Network Authorization module")
1336 (description "The Qt Network Authorization module provides an
1337implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
213238d9
EF
1338
1339(define-public qtremoteobjects
1340 (package (inherit qtsvg)
1341 (name "qtremoteobjects")
f18c9470 1342 (version "5.9.2")
213238d9
EF
1343 (source (origin
1344 (method url-fetch)
1345 (uri (string-append "https://download.qt.io/official_releases/qt/"
1346 (version-major+minor version) "/" version
1347 "/submodules/" name "-opensource-src-"
1348 version ".tar.xz"))
1349 (sha256
1350 (base32
f18c9470 1351 "1ylphdwis34y4pm9xiwh2xqfd0hh2gp8kkawlps2q5mh2bm11376"))))
213238d9
EF
1352 (inputs
1353 `(("qtbase" ,qtbase)
96412f34
EF
1354 ("qtdeclarative" ,qtdeclarative)))
1355 (synopsis "Qt Remote Objects module")
1356 (description "The Qt Remote Objects module is an @dfn{inter-process
1357communication} (IPC) module developed for Qt. The idea is to extend existing
1358Qt's functionalities to enable an easy exchange of information between
1359processes or computers.")))
b84cc89a
EF
1360
1361(define-public qtspeech
1362 (package (inherit qtsvg)
1363 (name "qtspeech")
f18c9470 1364 (version "5.9.2")
b84cc89a
EF
1365 (source (origin
1366 (method url-fetch)
1367 (uri (string-append "https://download.qt.io/official_releases/qt/"
1368 (version-major+minor version) "/" version
1369 "/submodules/" name "-opensource-src-"
1370 version ".tar.xz"))
1371 (sha256
1372 (base32
f18c9470 1373 "0cq33dffi7q7dnvzhdivky5prakb8xnwap0b76fwgirhbbn88ypg"))))
b84cc89a
EF
1374 (inputs
1375 `(("qtbase" ,qtbase)))
1376 (native-inputs
1377 `(("perl" ,perl)
1378 ("qtdeclarative" ,qtdeclarative)
1379 ("qtmultimedia" ,qtmultimedia)
96412f34
EF
1380 ("qtxmlpatterns" ,qtxmlpatterns)))
1381 (synopsis "Qt Speech module")
1382 (description "The Qt Speech module enables a Qt application to support
1383accessibility features such as text-to-speech, which is useful for end-users
1384who are visually challenged or cannot access the application for whatever
1385reason. The most common use case where text-to-speech comes in handy is when
1386the end-user is driving and cannot attend the incoming messages on the phone.
1387In such a scenario, the messaging application can read out the incoming
1388message.")))
a69945a7 1389
84ef83dd
AE
1390(define-public python-sip
1391 (package
1392 (name "python-sip")
f6da41b5 1393 (version "4.19.2")
84ef83dd
AE
1394 (source
1395 (origin
1396 (method url-fetch)
1397 (uri
1398 (string-append "mirror://sourceforge/pyqt/sip/"
8fa7f8d9 1399 "sip-" version "/sip-" version ".tar.gz"))
84ef83dd
AE
1400 (sha256
1401 (base32
f6da41b5 1402 "0cq5r21fmjyw5v7a6l4sfbaj3zgm7k5b2cryj6bnjki54nnllas3"))))
84ef83dd
AE
1403 (build-system gnu-build-system)
1404 (native-inputs
1405 `(("python" ,python-wrapper)))
1406 (arguments
1407 `(#:tests? #f ; no check target
e8bdd73a
AE
1408 #:modules ((srfi srfi-1)
1409 ,@%gnu-build-system-modules)
84ef83dd 1410 #:phases
39766868
EF
1411 (modify-phases %standard-phases
1412 (replace 'configure
1413 (lambda* (#:key inputs outputs #:allow-other-keys)
1414 (let* ((out (assoc-ref outputs "out"))
1415 (bin (string-append out "/bin"))
1416 (include (string-append out "/include"))
1417 (python (assoc-ref inputs "python"))
1418 (python-version
1419 (last (string-split python #\-)))
1420 (python-major+minor
1421 (string-join
1422 (take (string-split python-version #\.) 2)
1423 "."))
1424 (lib (string-append out "/lib/python"
1425 python-major+minor
1426 "/site-packages")))
1427 (zero?
1428 (system* "python" "configure.py"
1429 "--bindir" bin
1430 "--destdir" lib
1431 "--incdir" include))))))))
1432 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
84ef83dd
AE
1433 (synopsis "Python binding creator for C and C++ libraries")
1434 (description
1435 "SIP is a tool to create Python bindings for C and C++ libraries. It
1436was originally developed to create PyQt, the Python bindings for the Qt
1437toolkit, but can be used to create bindings for any C or C++ library.
1438
1439SIP comprises a code generator and a Python module. The code generator
1440processes a set of specification files and generates C or C++ code, which
1441is then compiled to create the bindings extension module. The SIP Python
1442module provides support functions to the automatically generated code.")
1443 ;; There is a choice between a python like license, gpl2 and gpl3.
1444 ;; For compatibility with pyqt, we need gpl3.
225941b0 1445 (license license:gpl3)))
84ef83dd
AE
1446
1447(define-public python2-sip
1448 (package (inherit python-sip)
1449 (name "python2-sip")
1450 (native-inputs
1451 `(("python" ,python-2)))))
014e7dd8
AE
1452
1453(define-public python-pyqt
1454 (package
1455 (name "python-pyqt")
5ac3a671 1456 (version "5.8.2")
014e7dd8
AE
1457 (source
1458 (origin
1459 (method url-fetch)
1460 (uri
1461 (string-append "mirror://sourceforge/pyqt/PyQt5/"
2be06813 1462 "PyQt-" version "/PyQt5_gpl-"
014e7dd8
AE
1463 version ".tar.gz"))
1464 (sha256
1465 (base32
5ac3a671 1466 "1s1nalcspam9dc7f63jkqn1i2sv9lrqn57p2zsc61g8bncahbmzb"))
fc1adab1 1467 (patches (search-patches "pyqt-configure.patch"))))
014e7dd8
AE
1468 (build-system gnu-build-system)
1469 (native-inputs
499991cf
EB
1470 `(("qtbase" ,qtbase))) ; for qmake
1471 (propagated-inputs
1472 `(("python-sip" ,python-sip)))
014e7dd8 1473 (inputs
e9adcd81
EF
1474 `(("python" ,python-wrapper)
1475 ("qtbase" ,qtbase)
1476 ("qtconnectivity" ,qtconnectivity)
1477 ("qtdeclarative" ,qtdeclarative)
1478 ("qtlocation" ,qtlocation)
1479 ("qtmultimedia" ,qtmultimedia)
1480 ("qtsensors" ,qtsensors)
1481 ("qtserialport" ,qtserialport)
1482 ("qtsvg" ,qtsvg)
1483 ("qttools" ,qttools)
1484 ("qtwebchannel" ,qtwebchannel)
1485 ("qtwebkit" ,qtwebkit)
1486 ("qtwebsockets" ,qtwebsockets)
1487 ("qtx11extras" ,qtx11extras)
1488 ("qtxmlpatterns" ,qtxmlpatterns)))
014e7dd8 1489 (arguments
e8bdd73a
AE
1490 `(#:modules ((srfi srfi-1)
1491 ,@%gnu-build-system-modules)
1492 #:phases
eef988c8
EF
1493 (modify-phases %standard-phases
1494 (replace 'configure
1495 (lambda* (#:key inputs outputs #:allow-other-keys)
1496 (let* ((out (assoc-ref outputs "out"))
1497 (bin (string-append out "/bin"))
1498 (sip (string-append out "/share/sip"))
1499 (plugins (string-append out "/plugins"))
1500 (designer (string-append plugins "/designer"))
1501 (qml (string-append plugins "/PyQt5"))
1502 (python (assoc-ref inputs "python"))
1503 (python-version
1504 (last (string-split python #\-)))
1505 (python-major+minor
1506 (string-join
1507 (take (string-split python-version #\.) 2)
1508 "."))
1509 (lib (string-append out "/lib/python"
1510 python-major+minor
43e8824d
HG
1511 "/site-packages"))
1512 (stubs (string-append lib "/PyQt5")))
eef988c8
EF
1513 (zero? (system* "python" "configure.py"
1514 "--confirm-license"
1515 "--bindir" bin
1516 "--destdir" lib
1517 "--designer-plugindir" designer
1518 "--qml-plugindir" qml
43e8824d
HG
1519 ; Where to install the PEP 484 Type Hints stub
1520 ; files. Without this the stubs are tried to be
1521 ; installed into the python package's
1522 ; site-package directory, which is read-only.
1523 "--stubsdir" stubs
eef988c8
EF
1524 "--sipdir" sip))))))))
1525 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
014e7dd8
AE
1526 (synopsis "Python bindings for Qt")
1527 (description
1528 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1529framework. The bindings are implemented as a set of Python modules and
1530contain over 620 classes.")
225941b0 1531 (license license:gpl3)))
014e7dd8
AE
1532
1533(define-public python2-pyqt
1534 (package (inherit python-pyqt)
1535 (name "python2-pyqt")
1536 (native-inputs
1537 `(("python-sip" ,python2-sip)
2be06813 1538 ("qtbase" ,qtbase)))
014e7dd8 1539 (inputs
e9adcd81
EF
1540 `(("python" ,python-2)
1541 ,@(alist-delete "python" (package-inputs python-pyqt))))))
3e291958
AE
1542
1543(define-public python-pyqt-4
1544 (package (inherit python-pyqt)
1545 (name "python-pyqt")
41fa164a 1546 (version "4.12")
3e291958
AE
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri
1551 (string-append "mirror://sourceforge/pyqt/PyQt4/"
41fa164a 1552 "PyQt-" version "/PyQt4_gpl_x11-"
3e291958
AE
1553 version ".tar.gz"))
1554 (sha256
1555 (base32
41fa164a 1556 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
3e291958
AE
1557 (native-inputs
1558 `(("python-sip" ,python-sip)
1559 ("qt" ,qt-4)))
e9adcd81 1560 (inputs `(("python" ,python-wrapper)))
3e291958
AE
1561 (arguments
1562 `(#:tests? #f ; no check target
e8bdd73a
AE
1563 #:modules ((srfi srfi-1)
1564 ,@%gnu-build-system-modules)
3e291958 1565 #:phases
f9513086
EF
1566 (modify-phases %standard-phases
1567 (replace 'configure
1568 (lambda* (#:key inputs outputs #:allow-other-keys)
1569 (let* ((out (assoc-ref outputs "out"))
1570 (bin (string-append out "/bin"))
1571 (sip (string-append out "/share/sip"))
1572 (python (assoc-ref inputs "python"))
1573 (python-version
1574 (last (string-split python #\-)))
1575 (python-major+minor
1576 (string-join
1577 (take (string-split python-version #\.) 2)
1578 "."))
1579 (lib (string-append out "/lib/python"
1580 python-major+minor
1581 "/site-packages")))
1582 (zero? (system* "python" "configure.py"
1583 "--confirm-license"
1584 "--bindir" bin
1585 "--destdir" lib
1586 "--sipdir" sip))))))))
225941b0 1587 (license (list license:gpl2 license:gpl3)))) ; choice of either license
3e291958 1588
6d8e14d0 1589(define-public python2-pyqt-4
1590 (package (inherit python-pyqt-4)
9fde8778 1591 (name "python2-pyqt")
6d8e14d0 1592 (native-inputs
1593 `(("python-sip" ,python2-sip)
1594 ("qt" ,qt-4)))
1595 (inputs
1596 `(("python" ,python-2)))))
1597
3befd0a9
RW
1598(define-public qscintilla
1599 (package
1600 (name "qscintilla")
1601 (version "2.10.1")
1602 (source (origin
1603 (method url-fetch)
1604 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1605 "QScintilla-" version "/QScintilla_gpl-"
1606 version ".tar.gz"))
1607 (sha256
1608 (base32
1609 "0r7s7ndblv3jc0xig1y4l64b6mfr879cdv3zwdndn27rj6fqmycp"))))
1610 (build-system gnu-build-system)
1611 (arguments
1612 `(#:phases
1613 (modify-phases %standard-phases
1614 (replace 'configure
1615 (lambda* (#:key outputs #:allow-other-keys)
1616 (let ((out (assoc-ref outputs "out")))
1617 (chdir "Qt4Qt5")
1618 (substitute* "qscintilla.pro"
1619 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1620 (string-append out "/lib"))
1621 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1622 (string-append out "/include"))
1623 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1624 (string-append out "/translations"))
1625 (("\\$\\$\\[QT_INSTALL_DATA\\]") out)
1626 (("\\$\\$\\[QT_HOST_DATA\\]") out))
1627 (zero? (system* "qmake"))))))))
1628 (native-inputs `(("qtbase" ,qtbase)))
1629 (home-page "http://www.riverbankcomputing.co.uk/software/qscintilla/intro")
1630 (synopsis "Qt port of the Scintilla C++ editor control")
1631 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1632editor control. QScintilla includes features especially useful when editing
1633and debugging source code. These include support for syntax styling, error
1634indicators, code completion and call tips.")
1635 (license license:gpl3+)))
1636
06d04dbc
RW
1637(define-public python-qscintilla
1638 (package (inherit qscintilla)
1639 (name "python-qscintilla")
1640 (arguments
1641 `(#:configure-flags
1642 (list "--pyqt=PyQt5"
1643 (string-append "--pyqt-sipdir="
1644 (assoc-ref %build-inputs "python-pyqt")
1645 "/share/sip")
1646 (string-append "--qsci-incdir="
1647 (assoc-ref %build-inputs "qscintilla")
1648 "/include")
1649 (string-append "--qsci-libdir="
1650 (assoc-ref %build-inputs "qscintilla")
1651 "/lib"))
1652 #:phases
1653 (modify-phases %standard-phases
1654 (replace 'configure
1655 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1656 (chdir "Python")
1657 (and (zero? (apply system* "python3" "configure.py"
1658 configure-flags))
1659 ;; Install to the right directory
1660 (begin
1661 (substitute* '("Makefile"
1662 "Qsci/Makefile")
1663 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
1664 (assoc-ref outputs "out")))
1665 #t)))))))
1666 (inputs
1667 `(("qscintilla" ,qscintilla)
1668 ("python" ,python)
1669 ("python-pyqt" ,python-pyqt)))
1670 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1671editor control. QScintilla includes features especially useful when editing
1672and debugging source code. These include support for syntax styling, error
1673indicators, code completion and call tips.
1674
1675This package provides the Python bindings.")))
1676
2456153a
RW
1677;; PyQt only looks for modules in its own directory. It ignores environment
1678;; variables such as PYTHONPATH, so we need to build a union package to make
1679;; it work.
1680(define-public python-pyqt+qscintilla
1681 (package (inherit python-pyqt)
1682 (name "python-pyqt+qscintilla")
1683 (source #f)
1684 (build-system trivial-build-system)
1685 (arguments
1686 '(#:modules ((guix build union))
1687 #:builder (begin
1688 (use-modules (ice-9 match)
1689 (guix build union))
1690 (match %build-inputs
1691 (((names . directories) ...)
1692 (union-build (assoc-ref %outputs "out")
1693 directories))))))
1694 (inputs
1695 `(("python-pyqt" ,python-pyqt)
1696 ("python-qscintilla" ,python-qscintilla)))
1697 (synopsis "Union of PyQt and the Qscintilla extension")
1698 (description
1699 "This package contains the union of PyQt and the Qscintilla extension.")))
1700
9e81af9e
EF
1701(define-public qtkeychain
1702 (package
1703 (name "qtkeychain")
4ad70ad8 1704 (version "0.8.0")
9e81af9e
EF
1705 (source
1706 (origin
1707 (method url-fetch)
1708 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1709 "archive/v" version ".tar.gz"))
1710 (file-name (string-append name "-" version ".tar.gz"))
1711 (sha256
4ad70ad8 1712 (base32 "0bxi5pfhxdvwk8yxa06lk2d7lcibmfqhahbin82bqf3m341zd4ml"))))
9e81af9e 1713 (build-system cmake-build-system)
18174d8a
DC
1714 (native-inputs
1715 `(("qttools" ,qttools)))
9e81af9e 1716 (inputs
18174d8a 1717 `(("qtbase" ,qtbase)))
9e81af9e
EF
1718 (arguments
1719 `(#:tests? #f ; No tests included
1720 #:phases
1721 (modify-phases %standard-phases
1722 (add-before
1723 'configure 'set-qt-trans-dir
1724 (lambda _
1725 (substitute* "CMakeLists.txt"
1726 (("\\$\\{qt_translations_dir\\}")
4ad70ad8
EF
1727 "${CMAKE_INSTALL_PREFIX}/share/qt/translations"))
1728 #t)))))
9e81af9e
EF
1729 (home-page "https://github.com/frankosterfeld/qtkeychain")
1730 (synopsis "Qt API to store passwords")
1731 (description
1732 "QtKeychain is a Qt library to store passwords and other secret data
1733securely. It will not store any data unencrypted unless explicitly requested.")
225941b0 1734 (license license:bsd-3)))
fc381a33
TD
1735
1736(define-public qwt
1737 (package
1738 (name "qwt")
1739 (version "6.1.3")
1740 (source
1741 (origin
1742 (method url-fetch)
1743 (uri
1744 (string-append "mirror://sourceforge/qwt/qwt/"
1745 version "/qwt-" version ".tar.bz2"))
1746 (sha256
1747 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1748 (build-system gnu-build-system)
1749 (inputs
1750 `(("qtbase" ,qtbase)
1751 ("qtsvg" ,qtsvg)
1752 ("qttools" ,qttools)))
1753 (arguments
1754 `(#:phases
1755 (modify-phases %standard-phases
1756 (replace 'configure
1757 (lambda* (#:key outputs #:allow-other-keys)
1758 (let ((out (assoc-ref outputs "out")))
1759 (substitute* '("qwtconfig.pri")
1760 (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
1761 (zero? (system* "qmake")))))
1762 (add-after 'install 'install-documentation
1763 (lambda* (#:key outputs #:allow-other-keys)
1764 (let* ((out (assoc-ref outputs "out"))
1765 (man (string-append out "/share/man")))
1766 ;; Remove some incomplete manual pages.
1767 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1768 (mkdir-p man)
1769 (copy-recursively "doc/man" man)
1770 #t))))))
1771 (home-page "http://qwt.sourceforge.net")
1772 (synopsis "Qt widgets for plots, scales, dials and other technical software
1773GUI components")
1774 (description
1775 "The Qwt library contains widgets and components which are primarily useful
1776for technical and scientific purposes. It includes a 2-D plotting widget,
1777different kinds of sliders, and much more.")
1778 (license
1779 (list
1780 ;; The Qwt license is LGPL2.1 with some exceptions.
1781 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1782 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1783 license:lgpl2.1 license:gpl3))))
47e1d280
TD
1784
1785(define-public qtwebkit
1786 (package
1787 (name "qtwebkit")
fdaf6cd3 1788 (version "5.9.1")
47e1d280
TD
1789 (source
1790 (origin
1791 (method url-fetch)
fdaf6cd3
EF
1792 (uri (string-append "https://download.qt.io/official_releases/qt/"
1793 (version-major+minor version) "/" version
1794 "/submodules/" name "-opensource-src-"
a20e00dd 1795 version ".tar.xz"))
47e1d280
TD
1796 (sha256
1797 (base32
fdaf6cd3 1798 "1ksjn1vjbfhdm4y4rg08ag4krk87ahp7qcdcpwll42l0rnz61998"))))
47e1d280
TD
1799 (build-system gnu-build-system)
1800 (native-inputs
1801 `(("perl" ,perl)
1802 ("python" ,python-2.7)
1803 ("ruby" ,ruby)
1804 ("bison" ,bison)
1805 ("flex" ,flex)
1806 ("gperf" ,gperf)
1807 ("pkg-config" ,pkg-config)))
1808 (inputs
1809 `(("icu" ,icu4c)
1810 ("libjpeg" ,libjpeg)
1811 ("libpng" ,libpng)
1812 ("libwebp" ,libwebp)
1813 ("sqlite" ,sqlite)
1814 ("fontconfig" ,fontconfig)
1815 ("libxrender", libxrender)
1816 ("qtbase" ,qtbase)
1817 ("qtdeclarative" ,qtdeclarative)
1818 ("qtmultimedia" ,qtmultimedia)
1819 ("libxml2" ,libxml2)
1820 ("libxslt" ,libxslt)
1821 ("libx11" ,libx11)
1822 ("libxcomposite" ,libxcomposite)))
1823 (arguments
1824 `(#:phases
1825 (modify-phases %standard-phases
1826 (replace 'configure
1827 (lambda* (#:key outputs #:allow-other-keys)
1828 (let ((out (assoc-ref outputs "out")))
1829 (setenv "QMAKEPATH"
1830 (string-append (getcwd) "/Tools/qmake:"
1831 (getenv "QMAKEPATH")))
1832 (system* "qmake"))))
1833 ;; prevent webkit from trying to install into the qtbase store directory,
1834 ;; and replace references to the build directory in linker options:
1835 (add-before 'build 'patch-installpaths
1836 (lambda* (#:key outputs inputs #:allow-other-keys)
1837 (let* ((out (assoc-ref outputs "out"))
1838 (qtbase (assoc-ref inputs "qtbase"))
1839 (builddir (getcwd))
1840 (linkbuild (string-append "-L" builddir))
1841 (linkout (string-append "-L" out))
1842 (makefiles
1843 (map-in-order
1844 (lambda (i)
1845 (let* ((in (car i))
1846 (mf (string-append (dirname in) "/"
1847 (cdr i))))
1848 ;; by default, these Makefiles are
1849 ;; generated during install, but we need
1850 ;; to generate them now
1851 (system* "qmake" in "-o" mf)
1852 mf))
1853 '(("Source/api.pri" . "Makefile.api")
1854 ("Source/widgetsapi.pri"
1855 . "Makefile.widgetsapi")
1856 ("Source/WebKit2/WebProcess.pro"
1857 . "Makefile.WebProcess")
1858 ("Source/WebKit2/PluginProcess.pro"
1859 . "Makefile.PluginProcess")
1860 ("Source/WebKit/qt/declarative/public.pri"
1861 . "Makefile.declarative.public")
1862 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1863 . "Makefile.declarative.experimental")
1864 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
1865 . "Makefile")))))
1866 ;; Order of qmake calls and substitutions matters here.
1867 (system* "qmake" "-prl" "Source/widgetsapi.pri"
1868 "-o" "Source/Makefile")
1869 (substitute* (find-files "lib" "libQt5.*\\.prl")
1870 ((linkbuild) linkout))
1871 (substitute* (find-files "lib"
1872 "libQt5WebKit.*\\.la")
1873 (("libdir='.*'")
1874 (string-append "libdir='" out "/lib'"))
1875 ((linkbuild) linkout))
1876 (substitute* (find-files "lib/pkgconfig"
1877 "Qt5WebKit.*\\.pc")
1878 (((string-append "prefix=" qtbase))
1879 (string-append "prefix=" out))
1880 ((linkbuild) linkout))
1881 ;; Makefiles must be modified after .prl/.la/.pc
1882 ;; files, lest they get rebuilt:
1883 (substitute* makefiles
1884 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
1885 out )
1886 (((string-append "-Wl,-rpath," builddir))
1887 (string-append "-Wl,-rpath," out)))))))))
1888 (home-page "https://www.webkit.org")
1889 (synopsis "Web browser engine and classes to render and interact with web
1890content")
1891 (description "QtWebKit provides a Web browser engine that makes it easy to
1892embed content from the World Wide Web into your Qt application. At the same
1893time Web content can be enhanced with native controls.")
1894
1895 (license license:lgpl2.1+)))
f048f12b 1896
1897(define-public dotherside
1898 (package
1899 (name "dotherside")
1900 (version "0.5.2")
1901 (source
1902 (origin
1903 (method url-fetch)
1904 (uri (string-append "https://github.com/filcuc/DOtherSide/"
1905 "archive/v" version ".tar.gz"))
1906 (file-name (string-append name "-" version ".tar.gz"))
1907 (sha256
1908 (base32
1909 "0pqlrvy4ajjir80ra79ka3n0rjj0ir0f0m91cq86iz3nnw8w148z"))))
1910 (build-system cmake-build-system)
1911 (native-inputs
1912 `(("qttools" ,qttools)))
1913 (inputs
1914 `(("qtbase" ,qtbase)
1915 ("qtdeclarative" ,qtdeclarative)))
1916 (home-page "https://github.com/frankosterfeld/qtkeychain")
1917 (synopsis "C language library for creating bindings for the Qt QML language")
1918 (description
1919 "DOtherSide is a C language library for creating bindings for the
1920QT QML language. The following features are implementable from
1921a binding language:
1922@itemize
1923@item Creating custom QObject
1924@item Creating custom QAbstractListModels
1925@item Creating custom properties, signals and slots
1926@item Creating from QML QObject defined in the binded language
1927@item Creating from Singleton QML QObject defined in the binded language
1928@end itemize\n")
1929 (license license:lgpl3))) ;version 3 only (+ exception)