gnu: Fix python-shiboken-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>
6fd5a80d 4;;; Copyright © 2015, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
2879e605 5;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
47956fa0 6;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
fc381a33 7;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
6feb86f4 8;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
3befd0a9 9;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
506cbdb3 10;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
04162e83 11;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
359e30c9 12;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
0995a569 13;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
86b995dc 14;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
37a3abb1 15;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
bd677c2d
AE
16;;;
17;;; This file is part of GNU Guix.
18;;;
19;;; GNU Guix is free software; you can redistribute it and/or modify it
20;;; under the terms of the GNU General Public License as published by
21;;; the Free Software Foundation; either version 3 of the License, or (at
22;;; your option) any later version.
23;;;
24;;; GNU Guix is distributed in the hope that it will be useful, but
25;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27;;; GNU General Public License for more details.
28;;;
29;;; You should have received a copy of the GNU General Public License
30;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32(define-module (gnu packages qt)
225941b0 33 #:use-module ((guix licenses) #:prefix license:)
bd677c2d
AE
34 #:use-module (guix packages)
35 #:use-module (guix download)
2879e605 36 #:use-module (guix git-download)
9e81af9e 37 #:use-module (guix build-system cmake)
bd677c2d 38 #:use-module (guix build-system gnu)
2456153a 39 #:use-module (guix build-system trivial)
84ef83dd 40 #:use-module (guix packages)
02511196 41 #:use-module (guix deprecation)
84ef83dd 42 #:use-module (guix utils)
1e9ed0e3 43 #:use-module (gnu packages)
37a3abb1 44 #:use-module (gnu packages base)
b332e366 45 #:use-module (gnu packages bison)
37a3abb1 46 #:use-module (gnu packages cmake)
b332e366 47 #:use-module (gnu packages compression)
2cba3d6f
SB
48 #:use-module (gnu packages cups)
49 #:use-module (gnu packages databases)
aa8c0ada 50 #:use-module (gnu packages documentation)
b332e366 51 #:use-module (gnu packages fontutils)
0009ed71 52 #:use-module (gnu packages flex)
bc8ede01 53 #:use-module (gnu packages freedesktop)
86b995dc 54 #:use-module (gnu packages gcc)
8b6a5e0f 55 #:use-module (gnu packages gl)
b332e366 56 #:use-module (gnu packages glib)
0009ed71 57 #:use-module (gnu packages gperf)
04231311 58 #:use-module (gnu packages gstreamer)
f7fb0ccb 59 #:use-module (gnu packages gtk)
b332e366 60 #:use-module (gnu packages icu4c)
e55354b8 61 #:use-module (gnu packages image)
b332e366 62 #:use-module (gnu packages linux)
37a3abb1 63 #:use-module (gnu packages llvm)
04f8decf 64 #:use-module (gnu packages maths)
aff0cce9 65 #:use-module (gnu packages nss)
0009ed71
SB
66 #:use-module (gnu packages pciutils)
67 #:use-module (gnu packages pcre)
b332e366
AE
68 #:use-module (gnu packages perl)
69 #:use-module (gnu packages pkg-config)
39fa8f6c 70 #:use-module (gnu packages pulseaudio)
b332e366 71 #:use-module (gnu packages python)
44d10b1f 72 #:use-module (gnu packages python-xyz)
8b6a5e0f 73 #:use-module (gnu packages ruby)
51519fd3 74 #:use-module (gnu packages sdl)
cd0322a3 75 #:use-module (gnu packages sqlite)
cc2b77df 76 #:use-module (gnu packages tls)
124351ef 77 #:use-module (gnu packages vulkan)
0009ed71
SB
78 #:use-module (gnu packages xdisorg)
79 #:use-module (gnu packages xorg)
124351ef
EF
80 #:use-module (gnu packages xml)
81 #:use-module (srfi srfi-1))
bd677c2d 82
aa8c0ada
TD
83(define-public grantlee
84 (package
85 (name "grantlee")
86 (version "5.1.0")
87 (source
88 (origin
6feb86f4
RW
89 (method git-fetch)
90 (uri (git-reference
91 (url "https://github.com/steveire/grantlee.git")
92 (commit (string-append "v" version))))
93 (file-name (git-file-name name version))
aa8c0ada 94 (sha256
6feb86f4 95 (base32 "1dmah2gd6zd4fgz2f4ir11dazqg067hjz8xshhywhfsmavchi626"))))
aa8c0ada 96 (native-inputs
868b1a02 97 ;; Optional: lcov and cccc, both are for code coverage
aa8c0ada
TD
98 `(("doxygen" ,doxygen)))
99 (inputs
100 `(("qtbase" ,qtbase)
101 ("qtscript" ,qtscript)))
102 (build-system cmake-build-system)
103 (arguments
ea57bb89
HG
104 `(#:configure-flags '("-DCMAKE_CXX_STANDARD=11")
105 #:phases
aa8c0ada 106 (modify-phases %standard-phases
fc64504f
RW
107 (add-after 'unpack 'delete-broken-tests
108 (lambda _
109 ;; TODO: Two date tests (for date01 and date02) fail for unknown
110 ;; reasons.
111 ;; Actual (result): ""
112 ;; Expected (output): "01"
113 ;; Actual (result): ""
114 ;; Expected (output): "Jan. 1, 2008"
115 (delete-file "templates/tests/testfilters.cpp")
116 (substitute* "templates/tests/CMakeLists.txt"
117 (("testfilters") ""))
118 #t))
868b1a02
HG
119 (add-before 'check 'check-setup
120 (lambda _
121 ;; make Qt render "offscreen", required for tests
122 (setenv "QT_QPA_PLATFORM" "offscreen")
123 #t)))))
aa8c0ada
TD
124 (home-page "https://github.com/steveire/grantlee")
125 (synopsis "Libraries for text templating with Qt")
126 (description "Grantlee Templates can be used for theming and generation of
127other text such as code. The syntax uses the syntax of the Django template
128system, and the core design of Django is reused in Grantlee.")
129 (license license:lgpl2.0+)))
130
02511196 131(define-public qt-4
b332e366
AE
132 (package
133 (name "qt")
02511196 134 (version "4.8.7")
b332e366
AE
135 (source (origin
136 (method url-fetch)
02511196
HG
137 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
138 (string-copy version 0 (string-rindex version #\.))
139 "/" version
140 "/qt-everywhere-opensource-src-"
141 version ".tar.gz"))
b332e366 142 (sha256
418c62ff 143 (base32
02511196
HG
144 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
145 (patches (search-patches "qt4-ldflags.patch"))
14bcc1e1
AE
146 (modules '((guix build utils)))
147 (snippet
02511196
HG
148 ;; Remove webkit module, which is not built.
149 '(begin (delete-file-recursively "src/3rdparty/webkit")
150 #t))))
b332e366 151 (build-system gnu-build-system)
ef0cf53e
AE
152 (propagated-inputs
153 `(("mesa" ,mesa)))
b332e366 154 (inputs
b332e366 155 `(("alsa-lib" ,alsa-lib)
5acd59ee 156 ("bluez" ,bluez)
2cba3d6f 157 ("cups" ,cups)
5acd59ee
EF
158 ("dbus" ,dbus)
159 ("double-conversion" ,double-conversion)
0009ed71 160 ("expat" ,expat)
b332e366
AE
161 ("fontconfig" ,fontconfig)
162 ("freetype" ,freetype)
163 ("glib" ,glib)
5acd59ee
EF
164 ("gstreamer" ,gstreamer)
165 ("gst-plugins-base" ,gst-plugins-base)
b332e366 166 ("icu4c" ,icu4c)
5acd59ee
EF
167 ("jasper" ,jasper)
168 ("libinput" ,libinput-minimal)
2cba3d6f 169 ("libmng" ,libmng)
0009ed71 170 ("libpci" ,pciutils)
b332e366 171 ("libpng" ,libpng)
5acd59ee
EF
172 ("libtiff" ,libtiff)
173 ("libwebp" ,libwebp)
b332e366 174 ("libx11" ,libx11)
0009ed71
SB
175 ("libxcomposite" ,libxcomposite)
176 ("libxcursor" ,libxcursor)
5acd59ee 177 ("libxext" ,libxext)
0009ed71 178 ("libxfixes" ,libxfixes)
b332e366 179 ("libxi" ,libxi)
0009ed71 180 ("libxinerama" ,libxinerama)
b332e366 181 ("libxkbcommon" ,libxkbcommon)
0009ed71
SB
182 ("libxml2" ,libxml2)
183 ("libxrandr" ,libxrandr)
b332e366 184 ("libxrender" ,libxrender)
0009ed71
SB
185 ("libxslt" ,libxslt)
186 ("libxtst" ,libxtst)
187 ("mtdev" ,mtdev)
2b8491fb
JL
188 ("mariadb" ,mariadb "lib")
189 ("mariadb-dev" ,mariadb "dev")
0009ed71 190 ("nss" ,nss)
2cba3d6f 191 ("postgresql" ,postgresql)
39fa8f6c 192 ("pulseaudio" ,pulseaudio)
5acd59ee 193 ("pcre2" ,pcre2)
d28af199 194 ("sqlite" ,sqlite-with-column-metadata)
0009ed71 195 ("udev" ,eudev)
2cba3d6f 196 ("unixodbc" ,unixodbc)
5acd59ee 197 ("wayland" ,wayland)
b332e366
AE
198 ("xcb-util" ,xcb-util)
199 ("xcb-util-image" ,xcb-util-image)
200 ("xcb-util-keysyms" ,xcb-util-keysyms)
201 ("xcb-util-renderutil" ,xcb-util-renderutil)
202 ("xcb-util-wm" ,xcb-util-wm)
02511196 203 ("zlib" ,zlib)
124351ef 204 ("libjpeg" ,libjpeg-8)
86b995dc
MB
205 ("libsm" ,libsm)
206 ("openssl" ,openssl-1.0)))
124351ef 207 (native-inputs
86b995dc
MB
208 `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard.
209 ;; We could build it with -std=gnu++98, but then we'll get in trouble with
210 ;; ICU later. Just keep using GCC 5 for now.
211 ("gcc" ,gcc-5)
02511196
HG
212 ("bison" ,bison)
213 ("flex" ,flex)
214 ("gperf" ,gperf)
215 ("perl" ,perl)
216 ("pkg-config" ,pkg-config)
217 ("python" ,python-2)
218 ("ruby" ,ruby)
219 ("which" ,(@ (gnu packages base) which))))
31580979
LC
220 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
221 ;; but we can't make them a separate output because "out" and "examples"
222 ;; would refer to each other.
223 (outputs '("out" ;112MiB core + 37MiB examples
224 "doc")) ;280MiB of HTML + code
1e9ed0e3
AE
225 (arguments
226 `(#:phases
cba632c4
LC
227 (modify-phases %standard-phases
228 (replace
1e9ed0e3
AE
229 'configure
230 (lambda* (#:key outputs #:allow-other-keys)
31580979
LC
231 (let ((out (assoc-ref outputs "out"))
232 (doc (assoc-ref outputs "doc")))
1e9ed0e3 233 (substitute* '("configure")
d2984346 234 (("/bin/pwd") (which "pwd")))
1f71daf4
EF
235 (substitute* "src/corelib/global/global.pri"
236 (("/bin/ls") (which "ls")))
d2984346 237
852a5692
EF
238 (invoke
239 "./configure"
240 "-verbose"
241 "-prefix" out
242 "-nomake" "examples demos"
243 ;; Note: Don't pass '-docdir' since 'qmake' and
244 ;; libQtCore would record its value, thereby defeating
245 ;; the whole point of having a separate output.
246 "-datadir" (string-append out "/share/qt-" ,version
247 "/data")
248 "-importdir" (string-append out "/lib/qt-4"
249 "/imports")
250 "-plugindir" (string-append out "/lib/qt-4"
251 "/plugins")
252 "-translationdir" (string-append out "/share/qt-" ,version
253 "/translations")
254 "-demosdir" (string-append out "/share/qt-" ,version
255 "/demos")
256 "-examplesdir" (string-append out "/share/qt-" ,version
257 "/examples")
258 "-opensource"
259 "-confirm-license"
260 ;; explicitly link with dbus instead of dlopening it
261 "-dbus-linked"
262 ;; Skip the webkit module; it fails to build on armhf
263 ;; and, apart from that, may pose security risks.
264 "-no-webkit"
265 ;; don't use the precompiled headers
266 "-no-pch"
267 ;; drop special machine instructions not supported
268 ;; on all instances of the target
269 ,@(if (string-prefix? "x86_64"
270 (or (%current-target-system)
271 (%current-system)))
272 '()
273 '("-no-mmx"
274 "-no-3dnow"
275 "-no-sse"
276 "-no-sse2"))
277 "-no-sse3"
278 "-no-ssse3"
279 "-no-sse4.1"
280 "-no-sse4.2"
281 "-no-avx"))))
4b0f2ef7
LC
282 (add-after
283 'install 'move-doc
284 (lambda* (#:key outputs #:allow-other-keys)
285 ;; Because of qt4-documentation-path.patch, documentation ends up
286 ;; being installed in OUT. Move it to the right place.
287 (let* ((out (assoc-ref outputs "out"))
288 (doc (assoc-ref outputs "doc"))
289 (olddoc (string-append out "/doc"))
290 (docdir (string-append doc "/share/doc/qt-" ,version)))
291 (mkdir-p (dirname docdir))
292
293 ;; Note: We can't use 'rename-file' here because OUT and DOC are
294 ;; different "devices" due to bind-mounts.
295 (copy-recursively olddoc docdir)
296 (delete-file-recursively olddoc)
02511196
HG
297 #t))))))
298 (native-search-paths
299 (list (search-path-specification
300 (variable "QMAKEPATH")
301 (files '("lib/qt5")))
302 (search-path-specification
303 (variable "QML2_IMPORT_PATH")
304 (files '("lib/qt5/qml")))
305 (search-path-specification
306 (variable "QT_PLUGIN_PATH")
307 (files '("lib/qt5/plugins")))
308 (search-path-specification
309 (variable "XDG_DATA_DIRS")
310 (files '("share")))
311 (search-path-specification
312 (variable "XDG_CONFIG_DIRS")
313 (files '("etc/xdg")))))
314 (home-page "https://www.qt.io/")
315 (synopsis "Cross-platform GUI library")
316 (description "Qt is a cross-platform application and UI framework for
317developers using C++ or QML, a CSS & JavaScript like language.")
318 (license (list license:lgpl2.1 license:lgpl3))
319
320 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
321 ;; see <http://hydra.gnu.org/build/112828>.
322 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
323 (supported-systems (delete "mips64el-linux" %supported-systems))))
84ef83dd 324
7868000f
AE
325(define-public qtbase
326 (package
327 (name "qtbase")
6d460e80 328 (version "5.12.6")
7868000f
AE
329 (source (origin
330 (method url-fetch)
331 (uri (string-append "https://download.qt.io/official_releases/qt/"
332 (version-major+minor version) "/" version
1f52eb7b 333 "/submodules/" name "-everywhere-src-"
7868000f
AE
334 version ".tar.xz"))
335 (sha256
c7386f4e 336 (base32
6d460e80 337 "09wz7zs1x5mpgs2y4xnl2zv3naqls4sz6v2arwl1fz2dsx4jddba"))
64f390a4 338 ;; Use TZDIR to avoid depending on package "tzdata".
3e93b2bd 339 (patches (search-patches "qtbase-use-TZDIR.patch"))
7868000f
AE
340 (modules '((guix build utils)))
341 (snippet
924e6ddf 342 ;; corelib uses bundled harfbuzz, md4, md5, sha3
7868000f 343 '(begin
c82cd3a7
EF
344 (with-directory-excursion "src/3rdparty"
345 (for-each delete-file-recursively
346 (list "double-conversion" "freetype" "harfbuzz-ng"
347 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
3e93b2bd 348 "zlib"))
c82cd3a7 349 #t)))))
7868000f 350 (build-system gnu-build-system)
48d4ce6e 351 (propagated-inputs
8075b623
SB
352 `(("mesa" ,mesa)
353 ("which" ,(@ (gnu packages base) which))))
7868000f
AE
354 (inputs
355 `(("alsa-lib" ,alsa-lib)
356 ("cups" ,cups)
357 ("dbus" ,dbus)
04f8decf 358 ("double-conversion" ,double-conversion)
f66970a7 359 ("eudev" ,eudev)
7868000f
AE
360 ("expat" ,expat)
361 ("fontconfig" ,fontconfig)
362 ("freetype" ,freetype)
363 ("glib" ,glib)
364 ("harfbuzz" ,harfbuzz)
365 ("icu4c" ,icu4c)
9ed9b44e 366 ("libinput" ,libinput-minimal)
7868000f
AE
367 ("libjpeg" ,libjpeg)
368 ("libmng" ,libmng)
369 ("libpng" ,libpng)
370 ("libx11" ,libx11)
371 ("libxcomposite" ,libxcomposite)
372 ("libxcursor" ,libxcursor)
373 ("libxfixes" ,libxfixes)
374 ("libxi" ,libxi)
375 ("libxinerama" ,libxinerama)
376 ("libxkbcommon" ,libxkbcommon)
377 ("libxml2" ,libxml2)
378 ("libxrandr" ,libxrandr)
379 ("libxrender" ,libxrender)
380 ("libxslt" ,libxslt)
381 ("libxtst" ,libxtst)
382 ("mtdev" ,mtdev)
2b8491fb
JL
383 ("mariadb" ,mariadb "lib")
384 ("mariadb-dev" ,mariadb "dev")
7868000f
AE
385 ("nss" ,nss)
386 ("openssl" ,openssl)
924e6ddf 387 ("pcre2" ,pcre2)
7868000f
AE
388 ("postgresql" ,postgresql)
389 ("pulseaudio" ,pulseaudio)
d28af199 390 ("sqlite" ,sqlite-with-column-metadata)
7868000f
AE
391 ("unixodbc" ,unixodbc)
392 ("xcb-util" ,xcb-util)
393 ("xcb-util-image" ,xcb-util-image)
394 ("xcb-util-keysyms" ,xcb-util-keysyms)
395 ("xcb-util-renderutil" ,xcb-util-renderutil)
396 ("xcb-util-wm" ,xcb-util-wm)
397 ("zlib" ,zlib)))
398 (native-inputs
399 `(("bison" ,bison)
400 ("flex" ,flex)
401 ("gperf" ,gperf)
402 ("perl" ,perl)
403 ("pkg-config" ,pkg-config)
d733a469 404 ("python" ,python)
124351ef 405 ("vulkan-headers" ,vulkan-headers)
8075b623 406 ("ruby" ,ruby)))
7868000f
AE
407 (arguments
408 `(#:phases
409 (modify-phases %standard-phases
410 (add-after 'configure 'patch-bin-sh
411 (lambda _
412 (substitute* '("config.status"
413 "configure"
414 "mkspecs/features/qt_functions.prf"
415 "qmake/library/qmakebuiltins.cpp")
416 (("/bin/sh") (which "sh")))
417 #t))
418 (replace 'configure
419 (lambda* (#:key outputs #:allow-other-keys)
420 (let ((out (assoc-ref outputs "out")))
421 (substitute* "configure"
422 (("/bin/pwd") (which "pwd")))
423 (substitute* "src/corelib/global/global.pri"
424 (("/bin/ls") (which "ls")))
7972d8a2
AE
425 ;; The configuration files for other Qt5 packages are searched
426 ;; through a call to "find_package" in Qt5Config.cmake, which
427 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
428 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
429 ;; components can be installed in different places.
430 (substitute* (find-files "." ".*\\.cmake")
431 (("NO_DEFAULT_PATH") ""))
7868000f
AE
432 ;; do not pass "--enable-fast-install", which makes the
433 ;; configure process fail
1f52eb7b
EF
434 (invoke
435 "./configure"
436 "-verbose"
437 "-prefix" out
438 "-docdir" (string-append out "/share/doc/qt5")
439 "-headerdir" (string-append out "/include/qt5")
440 "-archdatadir" (string-append out "/lib/qt5")
441 "-datadir" (string-append out "/share/qt5")
442 "-examplesdir" (string-append
443 out "/share/doc/qt5/examples")
444 "-opensource"
445 "-confirm-license"
65a9f6b6
RW
446
447 ;; These features require higher versions of Linux than the
448 ;; minimum version of the glibc. See
449 ;; src/corelib/global/minimum-linux_p.h. By disabling these
450 ;; features Qt5 applications can be used on the oldest
451 ;; kernels that the glibc supports, including the RHEL6
452 ;; (2.6.32) and RHEL7 (3.10) kernels.
453 "-no-feature-getentropy" ; requires Linux 3.17
f0de36cb 454 "-no-feature-renameat2" ; requires Linux 3.16
65a9f6b6 455
1f52eb7b
EF
456 ;; Do not build examples; if desired, these could go
457 ;; into a separate output, but for the time being, we
458 ;; prefer to save the space and build time.
459 "-no-compile-examples"
460 ;; Most "-system-..." are automatic, but some use
461 ;; the bundled copy by default.
d28af199 462 "-system-sqlite"
1f52eb7b
EF
463 "-system-harfbuzz"
464 "-system-pcre"
465 ;; explicitly link with openssl instead of dlopening it
466 "-openssl-linked"
467 ;; explicitly link with dbus instead of dlopening it
468 "-dbus-linked"
469 ;; don't use the precompiled headers
470 "-no-pch"
471 ;; drop special machine instructions that do not have
472 ;; runtime detection
473 ,@(if (string-prefix? "x86_64"
474 (or (%current-target-system)
475 (%current-system)))
476 '()
477 '("-no-sse2"))
478 "-no-mips_dsp"
479 "-no-mips_dspr2"))))
8075b623 480 (add-after 'install 'patch-mkspecs
5ca6ef95
SB
481 (lambda* (#:key outputs #:allow-other-keys)
482 (let* ((out (assoc-ref outputs "out"))
8075b623
SB
483 (archdata (string-append out "/lib/qt5"))
484 (mkspecs (string-append archdata "/mkspecs"))
5ca6ef95 485 (qt_config.prf (string-append
6fc0e157 486 mkspecs "/features/qt_config.prf")))
5ca6ef95
SB
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\\]")
6fc0e157 491 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
5ca6ef95 492 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
6fc0e157 493 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
5ca6ef95 494 (("\\$\\$\\[QT_HOST_LIBS\\]")
6fc0e157 495 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
5ca6ef95 496 (("\\$\\$\\[QT_INSTALL_BINS\\]")
6fc0e157 497 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
8075b623
SB
498
499 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
500 (substitute* (string-append mkspecs "/features/qt_functions.prf")
501 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
502 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
503
504 ;; Resolve qmake spec files within qtbase by absolute paths.
505 (substitute*
506 (map (lambda (file)
507 (string-append mkspecs "/features/" file))
508 '("device_config.prf" "moc.prf" "qt_build_config.prf"
509 "qt_config.prf" "winrt/package_manifest.prf"))
510 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
511 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
64f390a4 512 #t)))
a59e2dd8
MB
513 (add-after 'patch-mkspecs 'patch-prl-files
514 (lambda* (#:key outputs #:allow-other-keys)
515 (let ((out (assoc-ref outputs "out")))
516 ;; Insert absolute references to the qtbase libraries because
517 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
518 ;; on context. See <https://bugs.gnu.org/38405>
519 (substitute* (find-files (string-append out "/lib") "\\.prl$")
520 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
521 (string-append out "/lib")))
522 #t)))
64f390a4
HG
523 (add-after 'unpack 'patch-paths
524 ;; Use the absolute paths for dynamically loaded libs, otherwise
525 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
526 ;; not set in guix.
527 (lambda* (#:key inputs #:allow-other-keys)
528 ;; libresolve
529 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
530 "cross-libc" "libc"))))
531 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
532 "src/network/kernel/qhostinfo_unix.cpp")
533 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
534 (string-append a glibc "/lib/lib" b))))
535 ;; X11/locale (compose path)
536 (substitute* "src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp"
537 ;; Don't search in /usr/…/X11/locale, …
538 (("^\\s*m_possibleLocations.append\\(QStringLiteral\\(\"/usr/.*/X11/locale\"\\)\\);" line)
539 (string-append "// " line))
540 ;; … but use libx11's path
541 (("^\\s*(m_possibleLocations.append\\(QStringLiteral\\()X11_PREFIX \"(/.*/X11/locale\"\\)\\);)" _ a b)
542 (string-append a "\"" (assoc-ref inputs "libx11") b)))
543 ;; libGL
544 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
545 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
546 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
547 ;; libXcursor
548 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
549 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
550 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
551 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
552 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
553 #t)))))
5ca6ef95
SB
554 (native-search-paths
555 (list (search-path-specification
556 (variable "QMAKEPATH")
6fc0e157 557 (files '("lib/qt5")))
ed02e1fe
DC
558 (search-path-specification
559 (variable "QML2_IMPORT_PATH")
6fc0e157 560 (files '("lib/qt5/qml")))
ed02e1fe
DC
561 (search-path-specification
562 (variable "QT_PLUGIN_PATH")
6fc0e157 563 (files '("lib/qt5/plugins")))
ed02e1fe
DC
564 (search-path-specification
565 (variable "XDG_DATA_DIRS")
566 (files '("share")))
567 (search-path-specification
568 (variable "XDG_CONFIG_DIRS")
569 (files '("etc/xdg")))))
7868000f
AE
570 (home-page "https://www.qt.io/")
571 (synopsis "Cross-platform GUI library")
572 (description "Qt is a cross-platform application and UI framework for
573developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 574 (license (list license:lgpl2.1 license:lgpl3))))
7868000f 575
02511196
HG
576
577;; qt used to refer to the monolithic Qt 5.x package
41ee2097 578(define-deprecated qt qtbase qtbase)
02511196
HG
579
580
19c17631
EF
581(define-public qtsvg
582 (package (inherit qtbase)
583 (name "qtsvg")
6d460e80 584 (version "5.12.6")
19c17631
EF
585 (source (origin
586 (method url-fetch)
587 (uri (string-append "https://download.qt.io/official_releases/qt/"
588 (version-major+minor version) "/" version
1f52eb7b 589 "/submodules/" name "-everywhere-src-"
19c17631
EF
590 version ".tar.xz"))
591 (sha256
592 (base32
6d460e80 593 "13zg5095ffm88dsrybyi075i9zw3yrkibqzvj57an9sq89n3w926"))))
48d4ce6e 594 (propagated-inputs `())
19c17631
EF
595 (native-inputs `(("perl" ,perl)))
596 (inputs
597 `(("mesa" ,mesa)
598 ("qtbase" ,qtbase)
599 ("zlib" ,zlib)))
600 (arguments
601 `(#:phases
602 (modify-phases %standard-phases
8075b623 603 (add-before 'configure 'configure-qmake
19c17631 604 (lambda* (#:key inputs outputs #:allow-other-keys)
8075b623
SB
605 (let* ((out (assoc-ref outputs "out"))
606 (qtbase (assoc-ref inputs "qtbase"))
607 (tmpdir (string-append (getenv "TMPDIR")))
608 (qmake (string-append tmpdir "/qmake"))
609 (qt.conf (string-append tmpdir "/qt.conf")))
610 ;; Use qmake with a customized qt.conf to override install
611 ;; paths to $out.
612 (symlink (which "qmake") qmake)
613 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
614 (with-output-to-file qt.conf
615 (lambda ()
616 (format #t "[Paths]
617Prefix=~a
618ArchData=lib/qt5
619Data=share/qt5
620Documentation=share/doc/qt5
621Headers=include/qt5
622Libraries=lib
623LibraryExecutables=lib/qt5/libexec
624Binaries=bin
625Tests=tests
626Plugins=lib/qt5/plugins
627Imports=lib/qt5/imports
628Qml2Imports=lib/qt5/qml
629Translations=share/qt5/translations
630Settings=etc/xdg
631Examples=share/doc/qt5/examples
632HostPrefix=~a
633HostData=lib/qt5
634HostBinaries=bin
635HostLibraries=lib
b000294e
SB
636
637[EffectiveSourcePaths]
638HostPrefix=~a
639HostData=lib/qt5
640" out out qtbase)))
c195b5ba 641 #t)))
8075b623
SB
642 (replace 'configure
643 (lambda* (#:key inputs outputs #:allow-other-keys)
644 ;; Valid QT_BUILD_PARTS variables are:
645 ;; libs tools tests examples demos docs translations
1f52eb7b 646 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
8075b623
SB
647 (add-before 'check 'set-display
648 (lambda _
649 ;; make Qt render "offscreen", required for tests
650 (setenv "QT_QPA_PLATFORM" "offscreen")
651 #t)))))
96412f34
EF
652 (synopsis "Qt module for displaying SVGs")
653 (description "The QtSvg module provides classes for displaying the
654 contents of SVG files.")))
19c17631 655
9b694210
EF
656(define-public qtimageformats
657 (package (inherit qtsvg)
658 (name "qtimageformats")
6d460e80 659 (version "5.12.6")
9b694210
EF
660 (source (origin
661 (method url-fetch)
662 (uri (string-append "https://download.qt.io/official_releases/qt/"
663 (version-major+minor version) "/" version
1f52eb7b 664 "/submodules/" name "-everywhere-src-"
9b694210
EF
665 version ".tar.xz"))
666 (sha256
667 (base32
6d460e80 668 "0n3qc5rx7kzb4csmcxaxdm2bqpciz2j2pz2zdfrlpi1ml4liq39k"))
c04854da
EF
669 (modules '((guix build utils)))
670 (snippet
1f52eb7b
EF
671 '(begin
672 (delete-file-recursively "src/3rdparty")
673 #t))))
9b694210
EF
674 (native-inputs `())
675 (inputs
a532a671
EF
676 `(("jasper" ,jasper)
677 ("libmng" ,libmng)
9b694210
EF
678 ("libtiff" ,libtiff)
679 ("libwebp" ,libwebp)
680 ("mesa" ,mesa)
681 ("qtbase" ,qtbase)
96412f34
EF
682 ("zlib" ,zlib)))
683 (synopsis "Additional Image Format plugins for Qt")
684 (description "The QtImageFormats module contains plugins for adding
685support for MNG, TGA, TIFF and WBMP image formats.")))
9b694210 686
f6c13613
EF
687(define-public qtx11extras
688 (package (inherit qtsvg)
689 (name "qtx11extras")
6d460e80 690 (version "5.12.6")
f6c13613
EF
691 (source (origin
692 (method url-fetch)
693 (uri (string-append "https://download.qt.io/official_releases/qt/"
694 (version-major+minor version) "/" version
1f52eb7b 695 "/submodules/" name "-everywhere-src-"
f6c13613
EF
696 version ".tar.xz"))
697 (sha256
698 (base32
6d460e80 699 "0sqx785kb4kfxfl3cmg848dlxlxmfdg8jnfh3rrk8q0iazsr2faz"))))
c195b5ba
EF
700 (arguments
701 (substitute-keyword-arguments (package-arguments qtsvg)
702 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
f6c13613
EF
703 (native-inputs `(("perl" ,perl)))
704 (inputs
705 `(("mesa" ,mesa)
96412f34
EF
706 ("qtbase" ,qtbase)))
707 (synopsis "Qt Extras for X11")
708 (description "The QtX11Extras module includes the library to access X11
709from within Qt 5.")))
f6c13613 710
98eec712
EF
711(define-public qtxmlpatterns
712 (package (inherit qtsvg)
713 (name "qtxmlpatterns")
6d460e80 714 (version "5.12.6")
98eec712
EF
715 (source (origin
716 (method url-fetch)
717 (uri (string-append "https://download.qt.io/official_releases/qt/"
718 (version-major+minor version) "/" version
1f52eb7b 719 "/submodules/" name "-everywhere-src-"
98eec712
EF
720 version ".tar.xz"))
721 (sha256
722 (base32
6d460e80 723 "1l44476ibb8rv4rf80vbjdc3712lmrl1xcxswa513ip66k47p5vn"))))
c195b5ba
EF
724 (arguments
725 (substitute-keyword-arguments (package-arguments qtsvg)
f66b3e15
EF
726 ((#:phases phases)
727 `(modify-phases ,phases
728 (add-after 'unpack 'disable-network-tests
729 (lambda _ (substitute* "tests/auto/auto.pro"
730 (("qxmlquery") "# qxmlquery")
a20e00dd 731 (("xmlpatterns ") "# xmlpatterns"))
f66b3e15 732 #t))))))
98eec712 733 (native-inputs `(("perl" ,perl)))
96412f34
EF
734 (inputs `(("qtbase" ,qtbase)))
735 (synopsis "Qt XML patterns module")
736 (description "The QtXmlPatterns module is a XQuery and XPath engine for
737XML and custom data models. It contains programs such as xmlpatterns and
738xmlpatternsvalidator.")))
98eec712 739
e3a2ed81
EF
740(define-public qtdeclarative
741 (package (inherit qtsvg)
742 (name "qtdeclarative")
6d460e80 743 (version "5.12.6")
e3a2ed81
EF
744 (source (origin
745 (method url-fetch)
746 (uri (string-append "https://download.qt.io/official_releases/qt/"
747 (version-major+minor version) "/" version
1f52eb7b 748 "/submodules/" name "-everywhere-src-"
e3a2ed81
EF
749 version ".tar.xz"))
750 (sha256
751 (base32
6d460e80 752 "1lw6nr26cjdrshin3gq5xwqb0bvslg0ml99cw8rx9wb2anpd3c9l"))))
c195b5ba
EF
753 (arguments
754 (substitute-keyword-arguments (package-arguments qtsvg)
755 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
e3a2ed81
EF
756 (native-inputs
757 `(("perl" ,perl)
758 ("pkg-config" ,pkg-config)
d733a469
HG
759 ("python" ,python)
760 ("python-wrapper" ,python-wrapper)
e3a2ed81
EF
761 ("qtsvg" ,qtsvg)
762 ("qtxmlpatterns" ,qtxmlpatterns)))
763 (inputs
764 `(("mesa" ,mesa)
96412f34
EF
765 ("qtbase" ,qtbase)))
766 (synopsis "Qt QML module (Quick 2)")
767 (description "The Qt QML module provides a framework for developing
768applications and libraries with the QML language. It defines and implements the
769language and engine infrastructure, and provides an API to enable application
770developers to extend the QML language with custom types and integrate QML code
771with JavaScript and C++.")))
e3a2ed81 772
e98cb96d
EF
773(define-public qtconnectivity
774 (package (inherit qtsvg)
775 (name "qtconnectivity")
6d460e80 776 (version "5.12.6")
e98cb96d
EF
777 (source (origin
778 (method url-fetch)
779 (uri (string-append "https://download.qt.io/official_releases/qt/"
780 (version-major+minor version) "/" version
1f52eb7b 781 "/submodules/" name "-everywhere-src-"
e98cb96d
EF
782 version ".tar.xz"))
783 (sha256
784 (base32
6d460e80 785 "1ni2x848dxf0c7ilk461vz0z46qis8zv6jxbpyhpbhzdg9rcdw8h"))))
e98cb96d
EF
786 (native-inputs
787 `(("perl" ,perl)
788 ("pkg-config" ,pkg-config)
789 ("qtdeclarative" ,qtdeclarative)))
790 (inputs
791 `(("bluez" ,bluez)
96412f34
EF
792 ("qtbase" ,qtbase)))
793 (synopsis "Qt Connectivity module")
794 (description "The Qt Connectivity modules provides modules for interacting
795with Bluetooth and NFC.")))
e98cb96d 796
cac893ec
EF
797(define-public qtwebsockets
798 (package (inherit qtsvg)
799 (name "qtwebsockets")
6d460e80 800 (version "5.12.6")
cac893ec
EF
801 (source (origin
802 (method url-fetch)
803 (uri (string-append "https://download.qt.io/official_releases/qt/"
804 (version-major+minor version) "/" version
1f52eb7b 805 "/submodules/" name "-everywhere-src-"
cac893ec
EF
806 version ".tar.xz"))
807 (sha256
808 (base32
6d460e80 809 "07nnzqhsnb4q8pbka9dk5nxmqinbg9yicag7f4rlq2p6ffmgn2zh"))))
c195b5ba
EF
810 (arguments
811 (substitute-keyword-arguments (package-arguments qtsvg)
812 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
cac893ec
EF
813 (native-inputs
814 `(("perl" ,perl)
815 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
816 (inputs `(("qtbase" ,qtbase)))
817 (synopsis "Qt Web Sockets module")
818 (description "WebSocket is a web-based protocol designed to enable two-way
819communication between a client application and a remote host. The Qt
820WebSockets module provides C++ and QML interfaces that enable Qt applications
821to act as a server that can process WebSocket requests, or a client that can
822consume data received from the server, or both.")))
cac893ec 823
3474767c
EF
824(define-public qtsensors
825 (package (inherit qtsvg)
826 (name "qtsensors")
6d460e80 827 (version "5.12.6")
3474767c
EF
828 (source (origin
829 (method url-fetch)
830 (uri (string-append "https://download.qt.io/official_releases/qt/"
831 (version-major+minor version) "/" version
1f52eb7b 832 "/submodules/" name "-everywhere-src-"
3474767c
EF
833 version ".tar.xz"))
834 (sha256
835 (base32
6d460e80 836 "1x8f55qyix5bsd0hl9rzi56ndyv4h16z2qh8is9nv13jpk0a9nsr"))))
202afee2
EF
837 (arguments
838 (substitute-keyword-arguments (package-arguments qtsvg)
5ea35b42 839 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
202afee2
EF
840 ((#:phases phases)
841 `(modify-phases ,phases
04162e83 842 (add-after 'unpack 'fix-tests
202afee2
EF
843 (lambda _
844 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
04162e83
NG
845 (("2000") "5000") ;lengthen test timeout
846 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
202afee2 847 #t))))))
3474767c
EF
848 (native-inputs
849 `(("perl" ,perl)
850 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
851 (inputs `(("qtbase" ,qtbase)))
852 (synopsis "Qt Sensors module")
853 (description "The Qt Sensors API provides access to sensor hardware via QML
854and C++ interfaces. The Qt Sensors API also provides a motion gesture
855recognition API for devices.")))
3474767c 856
15378f93
EF
857(define-public qtmultimedia
858 (package (inherit qtsvg)
859 (name "qtmultimedia")
6d460e80 860 (version "5.12.6")
15378f93
EF
861 (source (origin
862 (method url-fetch)
863 (uri (string-append "https://download.qt.io/official_releases/qt/"
864 (version-major+minor version) "/" version
1f52eb7b 865 "/submodules/" name "-everywhere-src-"
15378f93
EF
866 version ".tar.xz"))
867 (sha256
868 (base32
6d460e80 869 "0w4mcxmj41b9phwirppn9ws1vxy3sww7prvhhmh0jsnaca4hwn4z"))
63d8f08f
EF
870 (modules '((guix build utils)))
871 (snippet
872 '(begin
873 (delete-file-recursively
c195b5ba
EF
874 "examples/multimedia/spectrum/3rdparty")
875 ;; We also prevent the spectrum example from being built.
876 (substitute* "examples/multimedia/multimedia.pro"
6cbee49d
MW
877 (("spectrum") "#"))
878 #t))))
c195b5ba
EF
879 (arguments
880 (substitute-keyword-arguments (package-arguments qtsvg)
04231311
RW
881 ((#:phases phases)
882 `(modify-phases ,phases
883 (replace 'configure
884 (lambda* (#:key outputs #:allow-other-keys)
885 (let ((out (assoc-ref outputs "out")))
1f52eb7b
EF
886 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
887 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
888 (string-append "PREFIX=" out)))))))
04231311 889 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
15378f93
EF
890 (native-inputs
891 `(("perl" ,perl)
892 ("pkg-config" ,pkg-config)
d733a469 893 ("python" ,python)
15378f93
EF
894 ("qtdeclarative" ,qtdeclarative)))
895 (inputs
896 `(("alsa-lib" ,alsa-lib)
897 ("mesa" ,mesa)
898 ("pulseaudio" ,pulseaudio)
04231311
RW
899 ("qtbase" ,qtbase)
900 ;; Gstreamer is needed for the mediaplayer plugin
901 ("gstreamer" ,gstreamer)
96412f34
EF
902 ("gst-plugins-base" ,gst-plugins-base)))
903 (synopsis "Qt Multimedia module")
904 (description "The Qt Multimedia module provides set of APIs to play and
905record media, and manage a collection of media content. It also contains a
906set of plugins for interacting with pulseaudio and GStreamer.")))
15378f93 907
bc8ede01
EF
908(define-public qtwayland
909 (package (inherit qtsvg)
910 (name "qtwayland")
6d460e80 911 (version "5.12.6")
bc8ede01
EF
912 (source (origin
913 (method url-fetch)
914 (uri (string-append "https://download.qt.io/official_releases/qt/"
915 (version-major+minor version) "/" version
1f52eb7b 916 "/submodules/" name "-everywhere-src-"
bc8ede01
EF
917 version ".tar.xz"))
918 (sha256
919 (base32
6d460e80 920 "1i2i4d6qa512njm6gvd1ygcyb5p4d6axciqg9ys380yw9nl6m77s"))
924e6ddf
EF
921 (modules '((guix build utils)))
922 (snippet
923 ;; The examples try to build and cause the build to fail
1f52eb7b
EF
924 '(begin
925 (delete-file-recursively "examples")
926 #t))))
6fc0e157
SB
927 (arguments
928 (substitute-keyword-arguments (package-arguments qtsvg)
929 ((#:phases phases)
930 `(modify-phases ,phases
931 (add-before 'check 'set-ld-library-path
932 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
933 ;;
934 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
935 ;; wayland platform plugin.
936 (lambda _
937 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
938 #t))))))
bc8ede01
EF
939 (native-inputs
940 `(("glib" ,glib)
941 ("perl" ,perl)
942 ("pkg-config" ,pkg-config)
943 ("qtdeclarative" ,qtdeclarative)))
944 (inputs
945 `(("fontconfig" ,fontconfig)
946 ("freetype" ,freetype)
947 ("libx11" ,libx11)
948 ("libxcomposite" ,libxcomposite)
949 ("libxext" ,libxext)
950 ("libxkbcommon" ,libxkbcommon)
951 ("libxrender" ,libxrender)
952 ("mesa" ,mesa)
953 ("mtdev" ,mtdev)
954 ("qtbase" ,qtbase)
96412f34
EF
955 ("wayland" ,wayland)))
956 (synopsis "Qt Wayland module")
957 (description "The Qt Wayland module provides the QtWayland client and
958compositor libraries.")))
bc8ede01 959
00806f2b
EF
960(define-public qtserialport
961 (package (inherit qtsvg)
962 (name "qtserialport")
8df9249d 963 (version "5.12.5")
00806f2b
EF
964 (source (origin
965 (method url-fetch)
966 (uri (string-append "https://download.qt.io/official_releases/qt/"
967 (version-major+minor version) "/" version
1f52eb7b 968 "/submodules/" name "-everywhere-src-"
00806f2b
EF
969 version ".tar.xz"))
970 (sha256
971 (base32
8df9249d 972 "0qmq3yppc54vf7xrwyrwk91h6x04w0hf4bnw5b3y5kwyllhh7vzq"))))
00806f2b 973 (native-inputs `(("perl" ,perl)))
33741e16
EF
974 (inputs
975 `(("qtbase" ,qtbase)
96412f34 976 ("eudev" ,eudev)))
042f7c26
HG
977 (arguments
978 (substitute-keyword-arguments (package-arguments qtsvg)
979 ((#:phases phases)
980 `(modify-phases ,phases
981 (add-after 'unpack 'patch-dlopen-paths
982 (lambda* (#:key inputs #:allow-other-keys)
983 (substitute* "src/serialport/qtudev_p.h"
984 ;; Use the absolute paths for dynamically loaded libs,
985 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
986 ;; typically is not set in guix.
987 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
988 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
989 #t))))))
96412f34
EF
990 (synopsis "Qt Serial Port module")
991 (description "The Qt Serial Port module provides the library for
992interacting with serial ports from within Qt.")))
00806f2b 993
a98ffab5
EF
994(define-public qtserialbus
995 (package (inherit qtsvg)
996 (name "qtserialbus")
6d460e80 997 (version "5.12.6")
a98ffab5
EF
998 (source (origin
999 (method url-fetch)
1000 (uri (string-append "https://download.qt.io/official_releases/qt/"
1001 (version-major+minor version) "/" version
1f52eb7b 1002 "/submodules/" name "-everywhere-src-"
a98ffab5
EF
1003 version ".tar.xz"))
1004 (sha256
1005 (base32
6d460e80 1006 "1ppmrwshj42lpx21m2gxblrlbigjf10fwg3fk5x5130ih89446q7"))))
a98ffab5
EF
1007 (inputs
1008 `(("qtbase" ,qtbase)
96412f34
EF
1009 ("qtserialport" ,qtserialport)))
1010 (synopsis "Qt Serial Bus module")
1011 (description "The Qt Serial Bus API provides classes and functions to
1012access the various industrial serial buses and protocols, such as CAN, ModBus,
1013and others.")))
a98ffab5 1014
f5377013
EF
1015(define-public qtwebchannel
1016 (package (inherit qtsvg)
1017 (name "qtwebchannel")
6d460e80 1018 (version "5.12.6")
f5377013
EF
1019 (source (origin
1020 (method url-fetch)
1021 (uri (string-append "https://download.qt.io/official_releases/qt/"
1022 (version-major+minor version) "/" version
1f52eb7b 1023 "/submodules/" name "-everywhere-src-"
f5377013
EF
1024 version ".tar.xz"))
1025 (sha256
1026 (base32
6d460e80 1027 "1my8vcsidx9r5wpd1iax8skhp5ac3234g9r7ax04k9z17mqd2i97"))))
f5377013
EF
1028 (native-inputs
1029 `(("perl" ,perl)
1030 ("qtdeclarative" ,qtdeclarative)
1031 ("qtwebsockets" ,qtwebsockets)))
96412f34
EF
1032 (inputs `(("qtbase" ,qtbase)))
1033 (synopsis "Web communication library for Qt")
1034 (description "The Qt WebChannel module enables peer-to-peer communication
1035between the host (QML/C++ application) and the client (HTML/JavaScript
1036application). The transport mechanism is supported out of the box by the two
1037popular web engines, Qt WebKit 2 and Qt WebEngine.")))
f5377013 1038
b5792b9c
HG
1039(define-public qtwebglplugin
1040 (package (inherit qtsvg)
1041 (name "qtwebglplugin")
6d460e80 1042 (version "5.12.6")
b5792b9c
HG
1043 (source (origin
1044 (method url-fetch)
1045 (uri (string-append "https://download.qt.io/official_releases/qt/"
1046 (version-major+minor version) "/" version
1047 "/submodules/" name "-everywhere-src-"
1048 version ".tar.xz"))
1049 (sha256
1050 (base32
6d460e80 1051 "1pahdyhinhq1xhsc7lsfprjjpz6fn9vgwqcyi72hc3wzyr98in11"))))
b6476ecc
EF
1052 (arguments
1053 (substitute-keyword-arguments (package-arguments qtsvg)
1054 ((#:phases phases)
1055 `(modify-phases ,phases
1056 (add-after 'unpack 'disable-network-tests
1057 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1058 (("webgl") "# webgl"))
1059 #t))))))
b5792b9c
HG
1060 (native-inputs '())
1061 (inputs
1062 `(("mesa" ,mesa)
1063 ("qtbase" ,qtbase)
b6476ecc 1064 ("qtdeclarative" ,qtdeclarative)
b5792b9c
HG
1065 ("qtwebsockets" ,qtwebsockets)))
1066 (synopsis "QPA plugin for running an application via a browser using
1067streamed WebGL commands")
1068 (description "Qt back end that uses WebGL for rendering. It allows Qt
1069applications (with some limitations) to run in a web browser that supports
1070WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1071compatible web browser without the use of plug-ins. The API is similar to
1072OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1073
359e30c9
HG
1074(define-public qtwebview
1075 (package (inherit qtsvg)
1076 (name "qtwebview")
6d460e80 1077 (version "5.12.6")
359e30c9
HG
1078 (source (origin
1079 (method url-fetch)
1080 (uri (string-append "https://download.qt.io/official_releases/qt/"
1081 (version-major+minor version) "/" version
1082 "/submodules/" name "-everywhere-src-"
1083 version ".tar.xz"))
1084 (sha256
1085 (base32
6d460e80 1086 "0ykjwz3cwv718gvgvnlhq7wia8gllnj3cdzw3amj0rh63hy65h22"))))
359e30c9
HG
1087 (native-inputs
1088 `(("perl" ,perl)))
1089 (inputs
1090 `(("qtbase" ,qtbase)
1091 ("qtdeclarative" ,qtdeclarative)))
1092 (synopsis "Display web content in a QML application")
1093 (description "Qt WebView provides a way to display web content in a QML
1094application without necessarily including a full web browser stack by using
1095native APIs where it makes sense.")))
1096
d5ca54ce
EF
1097(define-public qtlocation
1098 (package (inherit qtsvg)
1099 (name "qtlocation")
6d460e80 1100 (version "5.12.6")
d5ca54ce
EF
1101 (source (origin
1102 (method url-fetch)
1103 (uri (string-append "https://download.qt.io/official_releases/qt/"
1104 (version-major+minor version) "/" version
1f52eb7b 1105 "/submodules/" name "-everywhere-src-"
d5ca54ce
EF
1106 version ".tar.xz"))
1107 (sha256
1108 (base32
6d460e80 1109 "0y12vs6jwiwljdn57jqs1dwi6wfw1l5l95dvj9g93h739p533qks"))))
c195b5ba
EF
1110 (arguments
1111 (substitute-keyword-arguments (package-arguments qtsvg)
1112 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d5ca54ce
EF
1113 (native-inputs
1114 `(("perl" ,perl)
1115 ("qtdeclarative" ,qtdeclarative)
9a935ef2 1116 ("qtquickcontrols" ,qtquickcontrols)
d5ca54ce 1117 ("qtserialport" ,qtserialport)))
924e6ddf
EF
1118 (inputs
1119 `(("icu4c" ,icu4c)
1120 ("openssl" ,openssl)
1121 ("qtbase" ,qtbase)
96412f34
EF
1122 ("zlib" ,zlib)))
1123 (synopsis "Qt Location and Positioning modules")
1124 (description "The Qt Location module provides an interface for location,
1125positioning and geolocation plugins.")))
d5ca54ce 1126
d438c968
EF
1127(define-public qttools
1128 (package (inherit qtsvg)
1129 (name "qttools")
6d460e80 1130 (version "5.12.6")
d438c968
EF
1131 (source (origin
1132 (method url-fetch)
1133 (uri (string-append "https://download.qt.io/official_releases/qt/"
1134 (version-major+minor version) "/" version
1f52eb7b 1135 "/submodules/" name "-everywhere-src-"
d438c968
EF
1136 version ".tar.xz"))
1137 (sha256
1138 (base32
6d460e80 1139 "0xy7sf8w2lln1l59lhrf0kb687avwirrh63izp7509jwi33r2jg9"))))
c195b5ba
EF
1140 (arguments
1141 (substitute-keyword-arguments (package-arguments qtsvg)
1142 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d438c968
EF
1143 (native-inputs
1144 `(("perl" ,perl)
124351ef
EF
1145 ("qtdeclarative" ,qtdeclarative)
1146 ("vulkan-headers" ,vulkan-headers)))
d438c968
EF
1147 (inputs
1148 `(("mesa" ,mesa)
96412f34
EF
1149 ("qtbase" ,qtbase)))
1150 (synopsis "Qt Tools and Designer modules")
1151 (description "The Qt Tools module provides a set of applications to browse
1152the documentation, translate applications, generate help files and other stuff
1153that helps in Qt development.")))
d438c968 1154
4742c4de
EF
1155(define-public qtscript
1156 (package (inherit qtsvg)
1157 (name "qtscript")
6d460e80 1158 (version "5.12.6")
4742c4de
EF
1159 (source (origin
1160 (method url-fetch)
1161 (uri (string-append "https://download.qt.io/official_releases/qt/"
1162 (version-major+minor version) "/" version
1f52eb7b 1163 "/submodules/" name "-everywhere-src-"
4742c4de
EF
1164 version ".tar.xz"))
1165 (sha256
1166 (base32
6d460e80 1167 "0z3p4bb2ddylb7y2xvagjbn7fc5d0ic08cmrrb67h8wf6fnq5051"))
7c5cf7a2 1168 (patches (search-patches "qtscript-disable-tests.patch"))))
4742c4de
EF
1169 (native-inputs
1170 `(("perl" ,perl)
1171 ("qttools" ,qttools)))
1172 (inputs
96412f34
EF
1173 `(("qtbase" ,qtbase)))
1174 (synopsis "Qt Script module")
1175 (description "Qt provides support for application scripting with ECMAScript.
1176The following guides and references cover aspects of programming with
1177ECMAScript and Qt.")))
4742c4de 1178
ae0e5133
DC
1179(define-public qtquickcontrols
1180 (package (inherit qtsvg)
1181 (name "qtquickcontrols")
6d460e80 1182 (version "5.12.6")
ae0e5133
DC
1183 (source (origin
1184 (method url-fetch)
1185 (uri (string-append "https://download.qt.io/official_releases/qt/"
1186 (version-major+minor version) "/" version
1f52eb7b 1187 "/submodules/" name "-everywhere-src-"
ae0e5133
DC
1188 version ".tar.xz"))
1189 (sha256
1190 (base32
6d460e80 1191 "169cvwiav5d538cw81rbdimb1pis0z6fkaxlwhd4z4pzhyhrd3f4"))))
c195b5ba
EF
1192 (arguments
1193 (substitute-keyword-arguments (package-arguments qtsvg)
1194 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
ae0e5133
DC
1195 (inputs
1196 `(("qtbase" ,qtbase)
96412f34
EF
1197 ("qtdeclarative" ,qtdeclarative)))
1198 (synopsis "Qt Quick Controls and other Quick modules")
1199 (description "The QtScript module provides classes for making Qt
1200applications scriptable. This module provides a set of extra components that
1201can be used to build complete interfaces in Qt Quick.")))
ae0e5133 1202
42da1492
DC
1203(define-public qtquickcontrols2
1204 (package (inherit qtsvg)
1205 (name "qtquickcontrols2")
6d460e80 1206 (version "5.12.6")
42da1492
DC
1207 (source (origin
1208 (method url-fetch)
1209 (uri (string-append "https://download.qt.io/official_releases/qt/"
1210 (version-major+minor version) "/" version
1f52eb7b 1211 "/submodules/" name "-everywhere-src-"
42da1492
DC
1212 version ".tar.xz"))
1213 (sha256
1214 (base32
6d460e80 1215 "0w5910wblzc7q2llyb7fyfcbmy1fl369c6w5d6r5sh26z490gasw"))))
c195b5ba
EF
1216 (arguments
1217 (substitute-keyword-arguments (package-arguments qtsvg)
1218 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
42da1492
DC
1219 (inputs
1220 `(("qtbase" ,qtbase)
96412f34
EF
1221 ("qtdeclarative" ,qtdeclarative)))
1222 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1223 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1224module that provides platform integration: native dialogs, menus and menu bars,
1225and tray icons. It falls back to Qt Widgets when a native implementation is
1226not available.")))
42da1492 1227
4e4ed0ee
DC
1228(define-public qtgraphicaleffects
1229 (package (inherit qtsvg)
1230 (name "qtgraphicaleffects")
6d460e80 1231 (version "5.12.6")
4e4ed0ee
DC
1232 (source (origin
1233 (method url-fetch)
1234 (uri (string-append "https://download.qt.io/official_releases/qt/"
1235 (version-major+minor version) "/" version
1f52eb7b 1236 "/submodules/" name "-everywhere-src-"
4e4ed0ee
DC
1237 version ".tar.xz"))
1238 (sha256
1239 (base32
6d460e80 1240 "1vvpq34433j94n9yyhh4if4yv51i8xiffpvyn3xgffx14iv35l6y"))))
c195b5ba
EF
1241 (arguments
1242 (substitute-keyword-arguments (package-arguments qtsvg)
1243 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
4e4ed0ee
DC
1244 (inputs
1245 `(("qtbase" ,qtbase)
96412f34
EF
1246 ("qtdeclarative" ,qtdeclarative)))
1247 (synopsis "Qt Graphical Effects module")
1248 (description "The Qt Graphical Effects module provides a set of QML types
1249for adding visually impressive and configurable effects to user interfaces.
1250Effects are visual items that can be added to Qt Quick user interface as UI
1251components. The API consists of over 20 effects provided as separate QML
1252types. The effects cover functional areas such as blending, masking, blurring,
1253coloring, and many more.")))
4e4ed0ee 1254
51519fd3
EF
1255(define-public qtgamepad
1256 (package (inherit qtsvg)
1257 (name "qtgamepad")
6d460e80 1258 (version "5.12.6")
51519fd3
EF
1259 (source (origin
1260 (method url-fetch)
1261 (uri (string-append "https://download.qt.io/official_releases/qt/"
1262 (version-major+minor version) "/" version
1f52eb7b 1263 "/submodules/" name "-everywhere-src-"
51519fd3
EF
1264 version ".tar.xz"))
1265 (sha256
1266 (base32
6d460e80 1267 "1cxkqnhx0baxh3csjl7ar151v0zizf86f4338rr38liwb7rwbsz1"))))
51519fd3
EF
1268 (native-inputs
1269 `(("perl" ,perl)
1270 ("pkg-config" ,pkg-config)))
1271 (inputs
1272 `(("fontconfig" ,fontconfig)
1273 ("freetype" ,freetype)
1274 ("libxrender" ,libxrender)
1275 ("sdl2" ,sdl2)
1276 ("qtbase" ,qtbase)
96412f34
EF
1277 ("qtdeclarative" ,qtdeclarative)))
1278 (synopsis "Qt Gamepad module")
1279 (description "The Qt Gamepad module is an add-on library that enables Qt
1280applications to support the use of gamepad hardware and in some cases remote
1281control equipment. The module provides both QML and C++ interfaces. The
1282primary target audience are embedded devices with fullscreen user interfaces,
1283and mobile applications targeting TV-like form factors.")))
51519fd3 1284
56cd88fd
EF
1285(define-public qtscxml
1286 (package (inherit qtsvg)
1287 (name "qtscxml")
6d460e80 1288 (version "5.12.6")
56cd88fd
EF
1289 (source (origin
1290 (method url-fetch)
1291 (uri (string-append "https://download.qt.io/official_releases/qt/"
1292 (version-major+minor version) "/" version
1f52eb7b 1293 "/submodules/" name "-everywhere-src-"
56cd88fd
EF
1294 version ".tar.xz"))
1295 (sha256
1296 (base32
6d460e80 1297 "12y6ga7j6xby9rz1c9h17r9ih4i16i1ylr6b4vmrn7svidy87msk"))
56cd88fd
EF
1298 (modules '((guix build utils)))
1299 (snippet
c195b5ba
EF
1300 '(begin
1301 (delete-file-recursively "tests/3rdparty")
1302 ;; the scion test refers to the bundled 3rd party test code.
1303 (substitute* "tests/auto/auto.pro"
6cbee49d
MW
1304 (("scion") "#"))
1305 #t))))
56cd88fd
EF
1306 (inputs
1307 `(("qtbase" ,qtbase)
96412f34
EF
1308 ("qtdeclarative" ,qtdeclarative)))
1309 (synopsis "Qt SCXML module")
1310 (description "The Qt SCXML module provides functionality to create state
1311machines from SCXML files. This includes both dynamically creating state
1312machines (loading the SCXML file and instantiating states and transitions) and
1313generating a C++ file that has a class implementing the state machine. It
1314also contains functionality to support data models and executable content.")))
56cd88fd 1315
de5e0180
EF
1316(define-public qtpurchasing
1317 (package (inherit qtsvg)
1318 (name "qtpurchasing")
6d460e80 1319 (version "5.12.6")
de5e0180
EF
1320 (source (origin
1321 (method url-fetch)
1322 (uri (string-append "https://download.qt.io/official_releases/qt/"
1323 (version-major+minor version) "/" version
1f52eb7b 1324 "/submodules/" name "-everywhere-src-"
de5e0180
EF
1325 version ".tar.xz"))
1326 (sha256
1327 (base32
6d460e80 1328 "1kbhmzrw612yb4brxi3fwslil31j31vm0zqpb52vcma7vbivg80z"))))
de5e0180
EF
1329 (inputs
1330 `(("qtbase" ,qtbase)
96412f34
EF
1331 ("qtdeclarative" ,qtdeclarative)))
1332 (synopsis "Qt Purchasing module")
1333 (description "The Qt Purchasing module provides and in-app API for
1334purchasing goods and services.")))
de5e0180 1335
173b54b9
EF
1336(define-public qtcanvas3d
1337 (package (inherit qtsvg)
1338 (name "qtcanvas3d")
6d460e80 1339 (version "5.12.6")
173b54b9
EF
1340 (source (origin
1341 (method url-fetch)
1342 (uri (string-append "https://download.qt.io/official_releases/qt/"
1343 (version-major+minor version) "/" version
1f52eb7b 1344 "/submodules/" name "-everywhere-src-"
173b54b9
EF
1345 version ".tar.xz"))
1346 (sha256
1347 (base32
6d460e80 1348 "024xglrb321rp3wb3fhprw7pl6zvmpgfkpwgabbyx8p58k4yccrd"))
173b54b9
EF
1349 (modules '((guix build utils)))
1350 (snippet
1f52eb7b
EF
1351 '(begin
1352 (delete-file-recursively "examples/canvas3d/3rdparty")
1353 #t))))
c195b5ba
EF
1354 (arguments
1355 (substitute-keyword-arguments (package-arguments qtsvg)
1356 ;; Building the tests depends on the bundled 3rd party javascript files,
1357 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1358 ;; fail, so we skip building them for now.
1359 ((#:phases phases)
1360 `(modify-phases ,phases
1361 (replace 'configure
1362 (lambda* (#:key outputs #:allow-other-keys)
1363 (let ((out (assoc-ref outputs "out")))
1f52eb7b
EF
1364 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1365 (string-append "PREFIX=" out)))))))
c195b5ba 1366 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
173b54b9
EF
1367 (native-inputs `())
1368 (inputs
1369 `(("qtbase" ,qtbase)
96412f34
EF
1370 ("qtdeclarative" ,qtdeclarative)))
1371 (synopsis "Qt Canvas 3D module")
1372 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1373drawing calls from Qt Quick JavaScript.")))
173b54b9 1374
68bbe14b
EF
1375(define-public qtcharts
1376 (package (inherit qtsvg)
1377 (name "qtcharts")
6d460e80 1378 (version "5.12.6")
68bbe14b
EF
1379 (source (origin
1380 (method url-fetch)
1381 (uri (string-append "https://download.qt.io/official_releases/qt/"
1382 (version-major+minor version) "/" version
1f52eb7b 1383 "/submodules/" name "-everywhere-src-"
68bbe14b
EF
1384 version ".tar.xz"))
1385 (sha256
1386 (base32
6d460e80 1387 "0gdark4z2g8j0kzjg1aqq91ap04h6hzjl163g8xlwxwdn5dxpnql"))))
c195b5ba
EF
1388 (arguments
1389 (substitute-keyword-arguments (package-arguments qtsvg)
1390 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
68bbe14b
EF
1391 (inputs
1392 `(("qtbase" ,qtbase)
96412f34
EF
1393 ("qtdeclarative" ,qtdeclarative)))
1394 (synopsis "Qt Charts module")
1395 (description "The Qt Charts module provides a set of easy to use chart
1396components. It uses the Qt Graphics View Framework, therefore charts can be
1397easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1398QGraphicsWidget, or QML types. Users can easily create impressive graphs by
9c2c524d
EF
1399selecting one of the charts themes.")
1400 (license license:gpl3)))
68bbe14b 1401
a69945a7
EF
1402(define-public qtdatavis3d
1403 (package (inherit qtsvg)
1404 (name "qtdatavis3d")
6d460e80 1405 (version "5.12.6")
a69945a7
EF
1406 (source (origin
1407 (method url-fetch)
1408 (uri (string-append "https://download.qt.io/official_releases/qt/"
1409 (version-major+minor version) "/" version
1f52eb7b 1410 "/submodules/" name "-everywhere-src-"
a69945a7
EF
1411 version ".tar.xz"))
1412 (sha256
1413 (base32
6d460e80 1414 "1zm4xfi2ijqr3n3g0lfs3yzil6w7c54r8vsj1d541lz7wnm92ka1"))))
c195b5ba
EF
1415 (arguments
1416 (substitute-keyword-arguments (package-arguments qtsvg)
1417 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
a69945a7
EF
1418 (inputs
1419 `(("qtbase" ,qtbase)
96412f34
EF
1420 ("qtdeclarative" ,qtdeclarative)))
1421 (synopsis "Qt Data Visualization module")
1422 (description "The Qt Data Visualization module provides a way to visualize
1423data in 3D as bar, scatter, and surface graphs. It is especially useful for
1424visualizing depth maps and large quantities of rapidly changing data, such as
1425data received from multiple sensors. The look and feel of graphs can be
9c2c524d
EF
1426customized by using themes or by adding custom items and labels to them.")
1427 (license license:gpl3)))
f47d2793
EF
1428
1429(define-public qtnetworkauth
1430 (package (inherit qtsvg)
1431 (name "qtnetworkauth")
6d460e80 1432 (version "5.12.6")
f47d2793
EF
1433 (source (origin
1434 (method url-fetch)
1435 (uri (string-append "https://download.qt.io/official_releases/qt/"
1436 (version-major+minor version) "/" version
1f52eb7b 1437 "/submodules/" name "-everywhere-src-"
f47d2793
EF
1438 version ".tar.xz"))
1439 (sha256
1440 (base32
6d460e80 1441 "1gba6rdhcvljc4dnzhnkxrdlaxm3y095ljqg1sz3p1k0m632s4pa"))))
f18c9470
EF
1442 (arguments
1443 (substitute-keyword-arguments (package-arguments qtsvg)
1444 ((#:phases phases)
1445 `(modify-phases ,phases
1446 (add-after 'unpack 'remove-failing-test
1447 (lambda _
1448 ;; These tests can't find their test data.
1449 (substitute* "tests/auto/auto.pro"
1450 (("oauth1 ") "# oauth1 "))
1451 #t))))))
f47d2793 1452 (inputs
96412f34
EF
1453 `(("qtbase" ,qtbase)))
1454 (synopsis "Qt Network Authorization module")
1455 (description "The Qt Network Authorization module provides an
1456implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
213238d9
EF
1457
1458(define-public qtremoteobjects
1459 (package (inherit qtsvg)
1460 (name "qtremoteobjects")
6d460e80 1461 (version "5.12.6")
213238d9
EF
1462 (source (origin
1463 (method url-fetch)
1464 (uri (string-append "https://download.qt.io/official_releases/qt/"
1465 (version-major+minor version) "/" version
1f52eb7b 1466 "/submodules/" name "-everywhere-src-"
213238d9
EF
1467 version ".tar.xz"))
1468 (sha256
1469 (base32
6d460e80 1470 "16fna70pljn45yj6hv3g4qvb1imcnfj43jchvydspdhg08ykbda9"))))
1f52eb7b
EF
1471 (arguments
1472 (substitute-keyword-arguments (package-arguments qtsvg)
1473 ((#:phases phases)
1474 `(modify-phases ,phases
1475 (add-after 'unpack 'remove-failing-test
1476 (lambda _
1477 ;; This test can't find its imports.
1478 (substitute* "tests/auto/qml/qml.pro"
b6476ecc
EF
1479 (("integration") "# integration")
1480 (("usertypes") "# usertypes"))
1f52eb7b 1481 #t))))))
213238d9
EF
1482 (inputs
1483 `(("qtbase" ,qtbase)
96412f34
EF
1484 ("qtdeclarative" ,qtdeclarative)))
1485 (synopsis "Qt Remote Objects module")
1486 (description "The Qt Remote Objects module is an @dfn{inter-process
1487communication} (IPC) module developed for Qt. The idea is to extend existing
1488Qt's functionalities to enable an easy exchange of information between
1489processes or computers.")))
b84cc89a
EF
1490
1491(define-public qtspeech
1492 (package (inherit qtsvg)
1493 (name "qtspeech")
6d460e80 1494 (version "5.12.6")
b84cc89a
EF
1495 (source (origin
1496 (method url-fetch)
1497 (uri (string-append "https://download.qt.io/official_releases/qt/"
1498 (version-major+minor version) "/" version
1f52eb7b 1499 "/submodules/" name "-everywhere-src-"
b84cc89a
EF
1500 version ".tar.xz"))
1501 (sha256
1502 (base32
6d460e80 1503 "12l7rycjfa6d9gnnjd6i097pf1qqzjnz9c1jgxhpldvkf0n7pbi7"))))
b6476ecc
EF
1504 (arguments
1505 (substitute-keyword-arguments (package-arguments qtsvg)
1506 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
b84cc89a
EF
1507 (inputs
1508 `(("qtbase" ,qtbase)))
1509 (native-inputs
1510 `(("perl" ,perl)
1511 ("qtdeclarative" ,qtdeclarative)
1512 ("qtmultimedia" ,qtmultimedia)
96412f34
EF
1513 ("qtxmlpatterns" ,qtxmlpatterns)))
1514 (synopsis "Qt Speech module")
1515 (description "The Qt Speech module enables a Qt application to support
1516accessibility features such as text-to-speech, which is useful for end-users
1517who are visually challenged or cannot access the application for whatever
1518reason. The most common use case where text-to-speech comes in handy is when
1519the end-user is driving and cannot attend the incoming messages on the phone.
1520In such a scenario, the messaging application can read out the incoming
1521message.")))
a69945a7 1522
84ef83dd
AE
1523(define-public python-sip
1524 (package
1525 (name "python-sip")
3e93b2bd 1526 (version "4.19.18")
84ef83dd
AE
1527 (source
1528 (origin
1529 (method url-fetch)
3e93b2bd
EF
1530 (uri (string-append "https://www.riverbankcomputing.com/static/"
1531 "Downloads/sip/" version "/sip-" version ".tar.gz"))
84ef83dd
AE
1532 (sha256
1533 (base32
3e93b2bd 1534 "07kyd56xgbb40ljb022rq82shgxprlbl0z27mpf1b6zd00w8dgf0"))))
84ef83dd
AE
1535 (build-system gnu-build-system)
1536 (native-inputs
1537 `(("python" ,python-wrapper)))
1538 (arguments
1539 `(#:tests? #f ; no check target
e8bdd73a
AE
1540 #:modules ((srfi srfi-1)
1541 ,@%gnu-build-system-modules)
84ef83dd 1542 #:phases
39766868
EF
1543 (modify-phases %standard-phases
1544 (replace 'configure
1545 (lambda* (#:key inputs outputs #:allow-other-keys)
1546 (let* ((out (assoc-ref outputs "out"))
1547 (bin (string-append out "/bin"))
1548 (include (string-append out "/include"))
1549 (python (assoc-ref inputs "python"))
1550 (python-version
1551 (last (string-split python #\-)))
1552 (python-major+minor
1553 (string-join
1554 (take (string-split python-version #\.) 2)
1555 "."))
1556 (lib (string-append out "/lib/python"
1557 python-major+minor
1558 "/site-packages")))
e3232b26 1559 (invoke "python" "configure.py"
e3232b26
EF
1560 "--bindir" bin
1561 "--destdir" lib
1562 "--incdir" include)))))))
39766868 1563 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
84ef83dd
AE
1564 (synopsis "Python binding creator for C and C++ libraries")
1565 (description
1566 "SIP is a tool to create Python bindings for C and C++ libraries. It
1567was originally developed to create PyQt, the Python bindings for the Qt
1568toolkit, but can be used to create bindings for any C or C++ library.
1569
1570SIP comprises a code generator and a Python module. The code generator
1571processes a set of specification files and generates C or C++ code, which
1572is then compiled to create the bindings extension module. The SIP Python
1573module provides support functions to the automatically generated code.")
1574 ;; There is a choice between a python like license, gpl2 and gpl3.
1575 ;; For compatibility with pyqt, we need gpl3.
225941b0 1576 (license license:gpl3)))
84ef83dd
AE
1577
1578(define-public python2-sip
1579 (package (inherit python-sip)
1580 (name "python2-sip")
1581 (native-inputs
1582 `(("python" ,python-2)))))
014e7dd8
AE
1583
1584(define-public python-pyqt
1585 (package
1586 (name "python-pyqt")
3e93b2bd 1587 (version "5.12.3")
014e7dd8
AE
1588 (source
1589 (origin
1590 (method url-fetch)
3e93b2bd
EF
1591 (uri (string-append "https://www.riverbankcomputing.com/static/"
1592 "Downloads/PyQt5/" version "/PyQt5_gpl-"
1593 version ".tar.gz"))
014e7dd8
AE
1594 (sha256
1595 (base32
3e93b2bd 1596 "041155bdzp57jy747p5d59740c55yy3241cy1x2lgcdsvqvzmc0d"))
2338755a 1597 (patches (search-patches "pyqt-configure.patch"
e8062974 1598 "pyqt-unbundled-qt.patch"
2338755a 1599 "pyqt-public-sip.patch"))))
014e7dd8
AE
1600 (build-system gnu-build-system)
1601 (native-inputs
499991cf
EB
1602 `(("qtbase" ,qtbase))) ; for qmake
1603 (propagated-inputs
1604 `(("python-sip" ,python-sip)))
014e7dd8 1605 (inputs
e9adcd81
EF
1606 `(("python" ,python-wrapper)
1607 ("qtbase" ,qtbase)
1608 ("qtconnectivity" ,qtconnectivity)
1609 ("qtdeclarative" ,qtdeclarative)
1610 ("qtlocation" ,qtlocation)
1611 ("qtmultimedia" ,qtmultimedia)
1612 ("qtsensors" ,qtsensors)
1613 ("qtserialport" ,qtserialport)
1614 ("qtsvg" ,qtsvg)
1615 ("qttools" ,qttools)
1616 ("qtwebchannel" ,qtwebchannel)
52404022 1617 ("qtwebkit" ,qtwebkit)
e9adcd81
EF
1618 ("qtwebsockets" ,qtwebsockets)
1619 ("qtx11extras" ,qtx11extras)
1620 ("qtxmlpatterns" ,qtxmlpatterns)))
014e7dd8 1621 (arguments
e8bdd73a
AE
1622 `(#:modules ((srfi srfi-1)
1623 ,@%gnu-build-system-modules)
1624 #:phases
eef988c8
EF
1625 (modify-phases %standard-phases
1626 (replace 'configure
1627 (lambda* (#:key inputs outputs #:allow-other-keys)
1628 (let* ((out (assoc-ref outputs "out"))
1629 (bin (string-append out "/bin"))
1630 (sip (string-append out "/share/sip"))
4ae8180c 1631 (plugins (string-append out "/lib/qt5/plugins"))
eef988c8
EF
1632 (designer (string-append plugins "/designer"))
1633 (qml (string-append plugins "/PyQt5"))
1634 (python (assoc-ref inputs "python"))
1635 (python-version
1636 (last (string-split python #\-)))
1637 (python-major+minor
1638 (string-join
1639 (take (string-split python-version #\.) 2)
1640 "."))
1641 (lib (string-append out "/lib/python"
1642 python-major+minor
43e8824d
HG
1643 "/site-packages"))
1644 (stubs (string-append lib "/PyQt5")))
a01a3763
EF
1645 (invoke "python" "configure.py"
1646 "--confirm-license"
1647 "--bindir" bin
1648 "--destdir" lib
1649 "--designer-plugindir" designer
1650 "--qml-plugindir" qml
1651 ; Where to install the PEP 484 Type Hints stub
1652 ; files. Without this the stubs are tried to be
1653 ; installed into the python package's
1654 ; site-package directory, which is read-only.
1655 "--stubsdir" stubs
1656 "--sipdir" sip)))))))
eef988c8 1657 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
014e7dd8
AE
1658 (synopsis "Python bindings for Qt")
1659 (description
1660 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1661framework. The bindings are implemented as a set of Python modules and
1662contain over 620 classes.")
225941b0 1663 (license license:gpl3)))
014e7dd8 1664
0e2d6d26
RW
1665;; XXX: This is useful because qtwebkit does not build reliably at this time.
1666;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
1667;; packages that could be used together.
1668(define-public python-pyqt-without-qtwebkit
1669 (package (inherit python-pyqt)
1670 (name "python-pyqt-without-qtwebkit")
1671 (inputs
1672 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
1673
014e7dd8
AE
1674(define-public python2-pyqt
1675 (package (inherit python-pyqt)
1676 (name "python2-pyqt")
1677 (native-inputs
1678 `(("python-sip" ,python2-sip)
2be06813 1679 ("qtbase" ,qtbase)))
014e7dd8 1680 (inputs
e9adcd81 1681 `(("python" ,python-2)
a01a3763 1682 ("python2-enum34" ,python2-enum34)
e9adcd81 1683 ,@(alist-delete "python" (package-inputs python-pyqt))))))
3e291958 1684
bba60697 1685(define-public python2-pyqt-4
3e291958 1686 (package (inherit python-pyqt)
bba60697 1687 (name "python2-pyqt")
41fa164a 1688 (version "4.12")
3e291958
AE
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri
1693 (string-append "mirror://sourceforge/pyqt/PyQt4/"
41fa164a 1694 "PyQt-" version "/PyQt4_gpl_x11-"
3e291958
AE
1695 version ".tar.gz"))
1696 (sha256
1697 (base32
41fa164a 1698 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
3e291958 1699 (native-inputs
bba60697 1700 `(("python-sip" ,python2-sip)
3e291958 1701 ("qt" ,qt-4)))
bba60697 1702 (inputs `(("python" ,python-2)))
3e291958
AE
1703 (arguments
1704 `(#:tests? #f ; no check target
e8bdd73a
AE
1705 #:modules ((srfi srfi-1)
1706 ,@%gnu-build-system-modules)
3e291958 1707 #:phases
f9513086
EF
1708 (modify-phases %standard-phases
1709 (replace 'configure
1710 (lambda* (#:key inputs outputs #:allow-other-keys)
1711 (let* ((out (assoc-ref outputs "out"))
1712 (bin (string-append out "/bin"))
1713 (sip (string-append out "/share/sip"))
1714 (python (assoc-ref inputs "python"))
1715 (python-version
1716 (last (string-split python #\-)))
1717 (python-major+minor
1718 (string-join
1719 (take (string-split python-version #\.) 2)
1720 "."))
1721 (lib (string-append out "/lib/python"
1722 python-major+minor
1723 "/site-packages")))
39df4d19
RW
1724 (invoke "python" "configure.py"
1725 "--confirm-license"
1726 "--bindir" bin
1727 "--destdir" lib
1728 "--sipdir" sip)))))))
225941b0 1729 (license (list license:gpl2 license:gpl3)))) ; choice of either license
3e291958 1730
3befd0a9
RW
1731(define-public qscintilla
1732 (package
1733 (name "qscintilla")
9f8fee50 1734 (version "2.10.8")
3befd0a9
RW
1735 (source (origin
1736 (method url-fetch)
1737 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1738 "QScintilla-" version "/QScintilla_gpl-"
1739 version ".tar.gz"))
1740 (sha256
1741 (base32
9f8fee50 1742 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
3befd0a9
RW
1743 (build-system gnu-build-system)
1744 (arguments
1745 `(#:phases
1746 (modify-phases %standard-phases
1747 (replace 'configure
1748 (lambda* (#:key outputs #:allow-other-keys)
1749 (let ((out (assoc-ref outputs "out")))
1750 (chdir "Qt4Qt5")
1751 (substitute* "qscintilla.pro"
1752 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1753 (string-append out "/lib"))
1754 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1755 (string-append out "/include"))
1756 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1757 (string-append out "/translations"))
5430732b
HG
1758 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1759 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1760 (("\\$\\$\\[QT_HOST_DATA\\]")
1761 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
0af6ffdd 1762 (invoke "qmake")))))))
3befd0a9 1763 (native-inputs `(("qtbase" ,qtbase)))
d338321d 1764 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
3befd0a9
RW
1765 (synopsis "Qt port of the Scintilla C++ editor control")
1766 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1767editor control. QScintilla includes features especially useful when editing
1768and debugging source code. These include support for syntax styling, error
1769indicators, code completion and call tips.")
1770 (license license:gpl3+)))
1771
06d04dbc
RW
1772(define-public python-qscintilla
1773 (package (inherit qscintilla)
1774 (name "python-qscintilla")
1775 (arguments
1776 `(#:configure-flags
1777 (list "--pyqt=PyQt5"
1778 (string-append "--pyqt-sipdir="
1779 (assoc-ref %build-inputs "python-pyqt")
1780 "/share/sip")
1781 (string-append "--qsci-incdir="
1782 (assoc-ref %build-inputs "qscintilla")
1783 "/include")
1784 (string-append "--qsci-libdir="
1785 (assoc-ref %build-inputs "qscintilla")
1786 "/lib"))
1787 #:phases
1788 (modify-phases %standard-phases
1789 (replace 'configure
9f8fee50
EF
1790 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
1791 (let ((out (assoc-ref outputs "out"))
1792 (python (assoc-ref inputs "python")))
1793 (chdir "Python")
1794 (apply invoke "python3" "configure.py"
1795 configure-flags)
1796 ;; Install to the right directory
1797 (substitute* '("Makefile"
1798 "Qsci/Makefile")
1799 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
1800 (((string-append python "/lib"))
1801 (string-append out "/lib")))
1802 ;; And fix the installed.txt file
1803 (substitute* "installed.txt"
1804 (("/gnu/store/[^/]+") out)))
76c7fc43 1805 #t)))))
06d04dbc
RW
1806 (inputs
1807 `(("qscintilla" ,qscintilla)
1808 ("python" ,python)
1809 ("python-pyqt" ,python-pyqt)))
1810 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1811editor control. QScintilla includes features especially useful when editing
1812and debugging source code. These include support for syntax styling, error
1813indicators, code completion and call tips.
1814
1815This package provides the Python bindings.")))
1816
2456153a
RW
1817;; PyQt only looks for modules in its own directory. It ignores environment
1818;; variables such as PYTHONPATH, so we need to build a union package to make
1819;; it work.
1820(define-public python-pyqt+qscintilla
1821 (package (inherit python-pyqt)
1822 (name "python-pyqt+qscintilla")
1823 (source #f)
1824 (build-system trivial-build-system)
1825 (arguments
1826 '(#:modules ((guix build union))
1827 #:builder (begin
1828 (use-modules (ice-9 match)
1829 (guix build union))
1830 (match %build-inputs
1831 (((names . directories) ...)
1832 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
1833 directories)
1834 #t)))))
2456153a
RW
1835 (inputs
1836 `(("python-pyqt" ,python-pyqt)
1837 ("python-qscintilla" ,python-qscintilla)))
1838 (synopsis "Union of PyQt and the Qscintilla extension")
1839 (description
1840 "This package contains the union of PyQt and the Qscintilla extension.")))
1841
9e81af9e
EF
1842(define-public qtkeychain
1843 (package
1844 (name "qtkeychain")
2879e605 1845 (version "0.9.1")
9e81af9e
EF
1846 (source
1847 (origin
2879e605
EF
1848 (method git-fetch)
1849 (uri (git-reference
1850 (url "https://github.com/frankosterfeld/qtkeychain/")
1851 (commit (string-append "v" version))))
1852 (file-name (git-file-name name version))
9e81af9e 1853 (sha256
2879e605
EF
1854 (base32
1855 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
9e81af9e 1856 (build-system cmake-build-system)
18174d8a 1857 (native-inputs
f8127d26
HG
1858 `(("pkg-config" ,pkg-config)
1859 ("qttools" ,qttools)))
9e81af9e 1860 (inputs
18174d8a 1861 `(("qtbase" ,qtbase)))
9e81af9e
EF
1862 (arguments
1863 `(#:tests? #f ; No tests included
1864 #:phases
1865 (modify-phases %standard-phases
2879e605 1866 (add-before 'configure 'set-qt-trans-dir
9e81af9e
EF
1867 (lambda _
1868 (substitute* "CMakeLists.txt"
1869 (("\\$\\{qt_translations_dir\\}")
2879e605 1870 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
4ad70ad8 1871 #t)))))
9e81af9e
EF
1872 (home-page "https://github.com/frankosterfeld/qtkeychain")
1873 (synopsis "Qt API to store passwords")
1874 (description
1875 "QtKeychain is a Qt library to store passwords and other secret data
1876securely. It will not store any data unencrypted unless explicitly requested.")
225941b0 1877 (license license:bsd-3)))
fc381a33
TD
1878
1879(define-public qwt
1880 (package
1881 (name "qwt")
f1aa44ad 1882 (version "6.1.4")
fc381a33
TD
1883 (source
1884 (origin
1885 (method url-fetch)
1886 (uri
1887 (string-append "mirror://sourceforge/qwt/qwt/"
1888 version "/qwt-" version ".tar.bz2"))
1889 (sha256
f1aa44ad 1890 (base32 "1navkcnmn0qz8kzsyqmk32d929zl72l0b580w1ica7z5559j2a8m"))))
fc381a33
TD
1891 (build-system gnu-build-system)
1892 (inputs
1893 `(("qtbase" ,qtbase)
1894 ("qtsvg" ,qtsvg)
1895 ("qttools" ,qttools)))
1896 (arguments
1897 `(#:phases
1898 (modify-phases %standard-phases
1899 (replace 'configure
1900 (lambda* (#:key outputs #:allow-other-keys)
163651cb
SB
1901 (let* ((out (assoc-ref outputs "out"))
1902 (docdir (string-append out "/share/doc/qwt"))
1903 (incdir (string-append out "/include/qwt"))
1904 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
1905 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
fc381a33 1906 (substitute* '("qwtconfig.pri")
163651cb
SB
1907 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
1908 (format #f "~a = ~a\n" x out))
1909 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
1910 (format #f "~a = ~a\n" x docdir))
1911 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
1912 (format #f "~a = ~a\n" x incdir))
1913 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
1914 (format #f "~a = ~a\n" x pluginsdir))
1915 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
1916 (format #f "~a = ~a\n" x featuresdir)))
1917 (substitute* '("doc/doc.pro")
1918 ;; We'll install them in the 'install-man-pages' phase.
1919 (("^unix:doc\\.files.*") ""))
41173df9 1920 (invoke "qmake"))))
163651cb 1921 (add-after 'install 'install-man-pages
fc381a33
TD
1922 (lambda* (#:key outputs #:allow-other-keys)
1923 (let* ((out (assoc-ref outputs "out"))
1924 (man (string-append out "/share/man")))
1925 ;; Remove some incomplete manual pages.
1926 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1927 (mkdir-p man)
1928 (copy-recursively "doc/man" man)
1929 #t))))))
1930 (home-page "http://qwt.sourceforge.net")
1931 (synopsis "Qt widgets for plots, scales, dials and other technical software
1932GUI components")
1933 (description
1934 "The Qwt library contains widgets and components which are primarily useful
1935for technical and scientific purposes. It includes a 2-D plotting widget,
1936different kinds of sliders, and much more.")
1937 (license
1938 (list
1939 ;; The Qwt license is LGPL2.1 with some exceptions.
1940 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1941 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1942 license:lgpl2.1 license:gpl3))))
47e1d280
TD
1943
1944(define-public qtwebkit
1945 (package
1946 (name "qtwebkit")
e6df9c7e 1947 (version "5.212.0-alpha3")
47e1d280
TD
1948 (source
1949 (origin
1950 (method url-fetch)
601cb1be 1951 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
b5bf3dd9 1952 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
47e1d280
TD
1953 (sha256
1954 (base32
e6df9c7e 1955 "05syvwi3jw9abwsc93rmjkna0vyh6bkfrsqhwir48ms54icfwzim"))
601cb1be
AE
1956 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
1957 (build-system cmake-build-system)
47e1d280
TD
1958 (native-inputs
1959 `(("perl" ,perl)
1960 ("python" ,python-2.7)
1961 ("ruby" ,ruby)
1962 ("bison" ,bison)
1963 ("flex" ,flex)
1964 ("gperf" ,gperf)
1965 ("pkg-config" ,pkg-config)))
1966 (inputs
1967 `(("icu" ,icu4c)
601cb1be
AE
1968 ("glib" ,glib)
1969 ("gst-plugins-base" ,gst-plugins-base)
47e1d280
TD
1970 ("libjpeg" ,libjpeg)
1971 ("libpng" ,libpng)
1972 ("libwebp" ,libwebp)
8bfd7c8b 1973 ("sqlite" ,sqlite-with-column-metadata)
47e1d280 1974 ("fontconfig" ,fontconfig)
c695fb76 1975 ("libxrender" ,libxrender)
47e1d280
TD
1976 ("qtbase" ,qtbase)
1977 ("qtdeclarative" ,qtdeclarative)
601cb1be 1978 ("qtlocation" ,qtlocation)
47e1d280 1979 ("qtmultimedia" ,qtmultimedia)
601cb1be
AE
1980 ("qtsensors" ,qtsensors)
1981 ("qtwebchannel" ,qtwebchannel)
47e1d280
TD
1982 ("libxml2" ,libxml2)
1983 ("libxslt" ,libxslt)
1984 ("libx11" ,libx11)
1985 ("libxcomposite" ,libxcomposite)))
1986 (arguments
601cb1be
AE
1987 `(#:tests? #f ; no apparent tests; it might be necessary to set
1988 ; ENABLE_API_TESTS, see CMakeLists.txt
b717d0f9
LC
1989
1990 ;; Parallel builds fail due to a race condition:
1991 ;; <https://bugs.gnu.org/34062>.
1992 #:parallel-build? #f
1993
601cb1be
AE
1994 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
1995 "-DPORT=Qt"
1996 "-DUSE_LIBHYPHEN=OFF"
0995a569
EB
1997 "-DUSE_SYSTEM_MALLOC=ON"
1998 ;; XXX: relative dir installs to build dir?
1999 (string-append "-DECM_MKSPECS_INSTALL_DIR="
ebdb15bc
EB
2000 %output "/lib/qt5/mkspecs/modules")
2001 ;; Sacrifice a little speed in order to link
2002 ;; libraries and test executables in a
2003 ;; reasonable amount of memory.
2004 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2005 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
47e1d280
TD
2006 (home-page "https://www.webkit.org")
2007 (synopsis "Web browser engine and classes to render and interact with web
2008content")
2009 (description "QtWebKit provides a Web browser engine that makes it easy to
2010embed content from the World Wide Web into your Qt application. At the same
2011time Web content can be enhanced with native controls.")
af9afb0b
MB
2012 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2013 ;; room for slower or busy hardware.
2014 (properties '((timeout . 64800))) ;18 hours
4961364f
LC
2015
2016 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2017 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2018 ;; disable it on non-Intel platforms.
2019 (supported-systems '("x86_64-linux" "i686-linux"))
2020
47e1d280 2021 (license license:lgpl2.1+)))
f048f12b 2022
2023(define-public dotherside
2024 (package
2025 (name "dotherside")
53216881 2026 (version "0.6.4")
f048f12b 2027 (source
2028 (origin
d43f1732
EF
2029 (method git-fetch)
2030 (uri (git-reference
2031 (url "https://github.com/filcuc/DOtherSide")
2032 (commit (string-append "v" version))))
2033 (file-name (git-file-name name version))
f048f12b 2034 (sha256
2035 (base32
53216881 2036 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
f048f12b 2037 (build-system cmake-build-system)
2038 (native-inputs
2039 `(("qttools" ,qttools)))
2040 (inputs
2041 `(("qtbase" ,qtbase)
2042 ("qtdeclarative" ,qtdeclarative)))
96bdf904 2043 (home-page "https://filcuc.github.io/DOtherSide/index.html")
f048f12b 2044 (synopsis "C language library for creating bindings for the Qt QML language")
2045 (description
2046 "DOtherSide is a C language library for creating bindings for the
2047QT QML language. The following features are implementable from
2048a binding language:
2049@itemize
2050@item Creating custom QObject
2051@item Creating custom QAbstractListModels
2052@item Creating custom properties, signals and slots
2053@item Creating from QML QObject defined in the binded language
2054@item Creating from Singleton QML QObject defined in the binded language
2055@end itemize\n")
2056 (license license:lgpl3))) ;version 3 only (+ exception)
b16640ac
P
2057
2058;; There have been no public releases yet.
2059(define-public qtcolorwidgets
2060 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2061 (revision "1"))
2062 (package
2063 (name "qtcolorwidgets")
2064 (version (git-version "0" revision commit))
2065 (source (origin
2066 (method git-fetch)
2067 (uri (git-reference
2068 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2069 (commit commit)))
2070 (file-name (git-file-name name version))
2071 (sha256
2072 (base32
2073 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2074 (build-system cmake-build-system)
2075 (arguments `(#:tests? #f)) ; There are no tests
2076 (native-inputs
2077 `(("qttools" ,qttools)))
2078 (inputs
2079 `(("qtbase" ,qtbase)))
2080 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2081 (synopsis "Color management widgets")
2082 (description "QtColorWidgets provides a Qt color dialog that is more
2083user-friendly than the default @code{QColorDialog} and several other
2084color-related widgets.")
2085 ;; Includes a license exception for combining with GPL2 code.
2086 (license license:lgpl3+))))
37a3abb1
JS
2087
2088(define-public python-shiboken-2
2089 (let ((revision "1")
2090 ;; Pinned to branches with support for qt 5.11.3
2091 (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
2092 (package
2093 (name "python-shiboken-2")
2094 (version (git-version "v5.11.3" revision commit))
2095 (source
2096 (origin
2097 (method git-fetch)
2098 (uri (git-reference
2099 ;; The latest versions of Shiboken live in the pyside repo.
2100 ;; There is another standalone repo only for Shiboken
2101 ;; but it is outdated
2102 (url "https://code.qt.io/pyside/pyside-setup")
2103 (commit commit)))
2104 (file-name (git-file-name name version))
2105 (sha256
2106 (base32
2107 "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
2108 (build-system cmake-build-system)
2109 (inputs
162cc7f8 2110 `(("clang-toolchain" ,clang-toolchain-6)
37a3abb1
JS
2111 ("libxml2" ,libxml2)
2112 ("libxslt" ,libxslt)
2113 ("python-wrapper" ,python-wrapper)
2114 ("qtbase" ,qtbase)
2115 ("qtxmlpatterns" ,qtxmlpatterns)))
2116 (arguments
2117 `(#:tests? #f
2118 ;; FIXME: Building tests fails
2119 #:configure-flags '("-DBUILD_TESTS=off")
2120 #:phases
2121 (modify-phases %standard-phases
2122 (add-after 'unpack 'use-shiboken-dir-only
2123 (lambda _ (chdir "sources/shiboken2") #t))
2124 (add-before 'configure 'set-build-env
2125 (lambda* (#:key inputs #:allow-other-keys)
162cc7f8 2126 (let ((llvm (assoc-ref inputs "clang-toolchain")))
37a3abb1
JS
2127 (setenv "CLANG_INSTALL_DIR" llvm)
2128 #t))))))
2129 (home-page "https://wiki.qt.io/Qt_for_Python")
2130 (synopsis
2131 "Shiboken generates bindings for C++ libraries using CPython source code")
2132 (description
2133 "Shiboken generates bindings for C++ libraries using CPython source code")
2134 (license
2135 (list
2136 ;; The main code is GPL3 or LGPL3.
2137 ;; Examples are BSD-3.
2138 license:gpl3
2139 license:lgpl3
2140 license:bsd-3)))))
f1c4dbfa
JS
2141
2142(define-public python-pyside-2
2143 (let ((revision "1")
2144 ;; Pinned to branches with support for qt 5.11.3
2145 (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
2146 (package
2147 (name "python-pyside-2")
2148 (version (git-version "v5.11.3" revision commit))
2149 (source
2150 (origin
2151 (method git-fetch)
2152 (uri (git-reference
2153 (url "https://code.qt.io/pyside/pyside-setup")
2154 (commit commit)))
2155 (file-name (git-file-name name version))
2156 (sha256
2157 (base32
2158 "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
2159 (build-system cmake-build-system)
2160 (inputs
2161 `(("libcxx" ,libcxx-6)
2162 ("libxml2" ,libxml2)
2163 ("libxslt" ,libxslt)
2164 ("llvm-6" ,llvm-6)
2165 ("clang-6" ,clang-6)
2166 ("qtbase" ,qtbase)
2167 ("qtdatavis3d" ,qtdatavis3d)
2168 ("qtlocation" ,qtlocation)
2169 ("qtmultimedia" ,qtmultimedia)
2170 ("qtquickcontrols" ,qtquickcontrols)
2171 ("qtscript" ,qtscript)
2172 ("qtscxml" ,qtscxml)
2173 ("qtsensors" ,qtsensors)
2174 ("qtspeech" ,qtspeech)
2175 ("qtsvg" ,qtsvg)
2176 ("qtwebchannel" ,qtwebchannel)
2177 ("qtwebsockets" ,qtwebsockets)
2178 ("qtx11extras" ,qtx11extras)
2179 ("qtxmlpatterns" ,qtxmlpatterns)))
2180 (native-inputs
2181 `(("cmake" ,cmake)
2182 ("python-shiboken-2" ,python-shiboken-2)
2183 ("python-wrapper" ,python-wrapper)
2184 ("qttools" ,qttools)
2185 ("which" ,which)))
2186 (arguments
2187 `(#:tests? #f
2188 ;; FIXME: Building tests fail.
2189 #:configure-flags '("-DBUILD_TESTS=FALSE")
2190 #:phases
2191 (modify-phases
2192 %standard-phases
2193 (add-after 'unpack 'go-to-source-dir
2194 (lambda _ (chdir "sources/pyside2") #t))
2195 (add-before 'configure 'set-clang-dir
2196 (lambda* (#:key inputs #:allow-other-keys)
2197 (let ((clang (assoc-ref inputs "clang-6"))
2198 (libcxx (assoc-ref inputs "libcxx")))
2199 (setenv "CLANG_INSTALL_DIR" clang)
2200 (substitute* "cmake/Macros/PySideModules.cmake"
2201 (("--include-paths=")
2202 (string-append "--include-paths=" libcxx "/include/c++/v1:")))
2203 #t))))))
2204 (home-page "https://wiki.qt.io/Qt_for_Python")
2205 (synopsis
2206 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2207 (description
2208 "The Qt for Python product enables the use of Qt5 APIs in Python
2209applications. It lets Python developers utilize the full potential of Qt,
2210using the PySide2 module. The PySide2 module provides access to the
2211individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2212comes with the Shiboken2 CPython binding code generator, which can be used to
2213generate Python bindings for your C or C++ code.")
2214 (license (list
2215 license:lgpl3
2216 ;;They state that:
2217 ;; this file may be used under the terms of the GNU General
2218 ;; Public License version 2.0 or (at your option) the GNU
2219 ;; General Public license version 3 or any later version
2220 ;; approved by the KDE Free Qt Foundation.
2221 ;; Thus, it is currently v2 or v3, but no "+".
2222 license:gpl3
2223 license:gpl2)))))
2ea8b51a
JS
2224
2225(define-public python-pyside-2-tools
2226 (let ((revision "1")
2227 ;; Pinned to branches with support for qt 5.11.3
2228 (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
2229 (package
2230 (name "python-pyside-2-tools")
2231 (version (git-version "v5.11.2" revision commit))
2232 (source
2233 (origin
2234 (method git-fetch)
2235 (uri (git-reference
2236 (url "https://code.qt.io/pyside/pyside-tools")
2237 (commit commit)))
2238 (file-name (git-file-name name version))
2239 (sha256
2240 (base32
2241 "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
2242 (build-system cmake-build-system)
2243 (inputs
2244 `(("python-pyside-2" ,python-pyside-2)
2245 ("python-shiboken-2" ,python-shiboken-2)
2246 ("qtbase" ,qtbase)))
2247 (arguments
2248 `(#:tests? #f
2249 #:configure-flags '("-DBUILD_TESTS=off")))
2250 (home-page "https://wiki.qt.io/Qt_for_Python")
2251 (synopsis
2252 "Contains command line tools for PySide2")
2253 (description
2254 "Contains lupdate, rcc and uic tools for PySide2")
2255 (license license:gpl2))))