gnu: emacs-undo-tree: Update to 0.7.1.
[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)
3e10b241 726 ((#:tests? _ #f) #f) ; TODO: Enable the tests
f66b3e15
EF
727 ((#:phases phases)
728 `(modify-phases ,phases
729 (add-after 'unpack 'disable-network-tests
730 (lambda _ (substitute* "tests/auto/auto.pro"
731 (("qxmlquery") "# qxmlquery")
a20e00dd 732 (("xmlpatterns ") "# xmlpatterns"))
f66b3e15 733 #t))))))
3e10b241
GLV
734 (native-inputs `(("perl" ,perl)
735 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
736 (inputs `(("qtbase" ,qtbase)))
737 (synopsis "Qt XML patterns module")
738 (description "The QtXmlPatterns module is a XQuery and XPath engine for
739XML and custom data models. It contains programs such as xmlpatterns and
740xmlpatternsvalidator.")))
98eec712 741
e3a2ed81
EF
742(define-public qtdeclarative
743 (package (inherit qtsvg)
744 (name "qtdeclarative")
6d460e80 745 (version "5.12.6")
e3a2ed81
EF
746 (source (origin
747 (method url-fetch)
748 (uri (string-append "https://download.qt.io/official_releases/qt/"
749 (version-major+minor version) "/" version
1f52eb7b 750 "/submodules/" name "-everywhere-src-"
e3a2ed81
EF
751 version ".tar.xz"))
752 (sha256
753 (base32
6d460e80 754 "1lw6nr26cjdrshin3gq5xwqb0bvslg0ml99cw8rx9wb2anpd3c9l"))))
c195b5ba
EF
755 (arguments
756 (substitute-keyword-arguments (package-arguments qtsvg)
757 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
e3a2ed81
EF
758 (native-inputs
759 `(("perl" ,perl)
760 ("pkg-config" ,pkg-config)
d733a469
HG
761 ("python" ,python)
762 ("python-wrapper" ,python-wrapper)
3e10b241 763 ("qtsvg" ,qtsvg)))
e3a2ed81
EF
764 (inputs
765 `(("mesa" ,mesa)
96412f34
EF
766 ("qtbase" ,qtbase)))
767 (synopsis "Qt QML module (Quick 2)")
768 (description "The Qt QML module provides a framework for developing
769applications and libraries with the QML language. It defines and implements the
770language and engine infrastructure, and provides an API to enable application
771developers to extend the QML language with custom types and integrate QML code
772with JavaScript and C++.")))
e3a2ed81 773
e98cb96d
EF
774(define-public qtconnectivity
775 (package (inherit qtsvg)
776 (name "qtconnectivity")
6d460e80 777 (version "5.12.6")
e98cb96d
EF
778 (source (origin
779 (method url-fetch)
780 (uri (string-append "https://download.qt.io/official_releases/qt/"
781 (version-major+minor version) "/" version
1f52eb7b 782 "/submodules/" name "-everywhere-src-"
e98cb96d
EF
783 version ".tar.xz"))
784 (sha256
785 (base32
6d460e80 786 "1ni2x848dxf0c7ilk461vz0z46qis8zv6jxbpyhpbhzdg9rcdw8h"))))
e98cb96d
EF
787 (native-inputs
788 `(("perl" ,perl)
789 ("pkg-config" ,pkg-config)
790 ("qtdeclarative" ,qtdeclarative)))
791 (inputs
792 `(("bluez" ,bluez)
96412f34
EF
793 ("qtbase" ,qtbase)))
794 (synopsis "Qt Connectivity module")
795 (description "The Qt Connectivity modules provides modules for interacting
796with Bluetooth and NFC.")))
e98cb96d 797
cac893ec
EF
798(define-public qtwebsockets
799 (package (inherit qtsvg)
800 (name "qtwebsockets")
6d460e80 801 (version "5.12.6")
cac893ec
EF
802 (source (origin
803 (method url-fetch)
804 (uri (string-append "https://download.qt.io/official_releases/qt/"
805 (version-major+minor version) "/" version
1f52eb7b 806 "/submodules/" name "-everywhere-src-"
cac893ec
EF
807 version ".tar.xz"))
808 (sha256
809 (base32
6d460e80 810 "07nnzqhsnb4q8pbka9dk5nxmqinbg9yicag7f4rlq2p6ffmgn2zh"))))
c195b5ba
EF
811 (arguments
812 (substitute-keyword-arguments (package-arguments qtsvg)
813 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
cac893ec
EF
814 (native-inputs
815 `(("perl" ,perl)
816 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
817 (inputs `(("qtbase" ,qtbase)))
818 (synopsis "Qt Web Sockets module")
819 (description "WebSocket is a web-based protocol designed to enable two-way
820communication between a client application and a remote host. The Qt
821WebSockets module provides C++ and QML interfaces that enable Qt applications
822to act as a server that can process WebSocket requests, or a client that can
823consume data received from the server, or both.")))
cac893ec 824
3474767c
EF
825(define-public qtsensors
826 (package (inherit qtsvg)
827 (name "qtsensors")
6d460e80 828 (version "5.12.6")
3474767c
EF
829 (source (origin
830 (method url-fetch)
831 (uri (string-append "https://download.qt.io/official_releases/qt/"
832 (version-major+minor version) "/" version
1f52eb7b 833 "/submodules/" name "-everywhere-src-"
3474767c
EF
834 version ".tar.xz"))
835 (sha256
836 (base32
6d460e80 837 "1x8f55qyix5bsd0hl9rzi56ndyv4h16z2qh8is9nv13jpk0a9nsr"))))
202afee2
EF
838 (arguments
839 (substitute-keyword-arguments (package-arguments qtsvg)
5ea35b42 840 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
202afee2
EF
841 ((#:phases phases)
842 `(modify-phases ,phases
04162e83 843 (add-after 'unpack 'fix-tests
202afee2
EF
844 (lambda _
845 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
04162e83
NG
846 (("2000") "5000") ;lengthen test timeout
847 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
202afee2 848 #t))))))
3474767c
EF
849 (native-inputs
850 `(("perl" ,perl)
851 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
852 (inputs `(("qtbase" ,qtbase)))
853 (synopsis "Qt Sensors module")
854 (description "The Qt Sensors API provides access to sensor hardware via QML
855and C++ interfaces. The Qt Sensors API also provides a motion gesture
856recognition API for devices.")))
3474767c 857
15378f93
EF
858(define-public qtmultimedia
859 (package (inherit qtsvg)
860 (name "qtmultimedia")
6d460e80 861 (version "5.12.6")
15378f93
EF
862 (source (origin
863 (method url-fetch)
864 (uri (string-append "https://download.qt.io/official_releases/qt/"
865 (version-major+minor version) "/" version
1f52eb7b 866 "/submodules/" name "-everywhere-src-"
15378f93
EF
867 version ".tar.xz"))
868 (sha256
869 (base32
6d460e80 870 "0w4mcxmj41b9phwirppn9ws1vxy3sww7prvhhmh0jsnaca4hwn4z"))
63d8f08f
EF
871 (modules '((guix build utils)))
872 (snippet
873 '(begin
874 (delete-file-recursively
c195b5ba
EF
875 "examples/multimedia/spectrum/3rdparty")
876 ;; We also prevent the spectrum example from being built.
877 (substitute* "examples/multimedia/multimedia.pro"
6cbee49d
MW
878 (("spectrum") "#"))
879 #t))))
c195b5ba
EF
880 (arguments
881 (substitute-keyword-arguments (package-arguments qtsvg)
04231311
RW
882 ((#:phases phases)
883 `(modify-phases ,phases
884 (replace 'configure
885 (lambda* (#:key outputs #:allow-other-keys)
886 (let ((out (assoc-ref outputs "out")))
1f52eb7b
EF
887 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
888 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
889 (string-append "PREFIX=" out)))))))
04231311 890 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
15378f93
EF
891 (native-inputs
892 `(("perl" ,perl)
893 ("pkg-config" ,pkg-config)
d733a469 894 ("python" ,python)
15378f93
EF
895 ("qtdeclarative" ,qtdeclarative)))
896 (inputs
897 `(("alsa-lib" ,alsa-lib)
898 ("mesa" ,mesa)
899 ("pulseaudio" ,pulseaudio)
04231311
RW
900 ("qtbase" ,qtbase)
901 ;; Gstreamer is needed for the mediaplayer plugin
902 ("gstreamer" ,gstreamer)
96412f34
EF
903 ("gst-plugins-base" ,gst-plugins-base)))
904 (synopsis "Qt Multimedia module")
905 (description "The Qt Multimedia module provides set of APIs to play and
906record media, and manage a collection of media content. It also contains a
907set of plugins for interacting with pulseaudio and GStreamer.")))
15378f93 908
bc8ede01
EF
909(define-public qtwayland
910 (package (inherit qtsvg)
911 (name "qtwayland")
6d460e80 912 (version "5.12.6")
bc8ede01
EF
913 (source (origin
914 (method url-fetch)
915 (uri (string-append "https://download.qt.io/official_releases/qt/"
916 (version-major+minor version) "/" version
1f52eb7b 917 "/submodules/" name "-everywhere-src-"
bc8ede01
EF
918 version ".tar.xz"))
919 (sha256
920 (base32
6d460e80 921 "1i2i4d6qa512njm6gvd1ygcyb5p4d6axciqg9ys380yw9nl6m77s"))
924e6ddf
EF
922 (modules '((guix build utils)))
923 (snippet
924 ;; The examples try to build and cause the build to fail
1f52eb7b
EF
925 '(begin
926 (delete-file-recursively "examples")
927 #t))))
6fc0e157
SB
928 (arguments
929 (substitute-keyword-arguments (package-arguments qtsvg)
930 ((#:phases phases)
931 `(modify-phases ,phases
932 (add-before 'check 'set-ld-library-path
933 ;; <https://lists.gnu.org/archive/html/guix-devel/2017-09/msg00019.html>
934 ;;
935 ;; Make the uninstalled libQt5WaylandClient.so.5 available to the
936 ;; wayland platform plugin.
937 (lambda _
938 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/lib"))
939 #t))))))
bc8ede01
EF
940 (native-inputs
941 `(("glib" ,glib)
942 ("perl" ,perl)
943 ("pkg-config" ,pkg-config)
944 ("qtdeclarative" ,qtdeclarative)))
945 (inputs
946 `(("fontconfig" ,fontconfig)
947 ("freetype" ,freetype)
948 ("libx11" ,libx11)
949 ("libxcomposite" ,libxcomposite)
950 ("libxext" ,libxext)
951 ("libxkbcommon" ,libxkbcommon)
952 ("libxrender" ,libxrender)
953 ("mesa" ,mesa)
954 ("mtdev" ,mtdev)
955 ("qtbase" ,qtbase)
96412f34
EF
956 ("wayland" ,wayland)))
957 (synopsis "Qt Wayland module")
958 (description "The Qt Wayland module provides the QtWayland client and
959compositor libraries.")))
bc8ede01 960
00806f2b
EF
961(define-public qtserialport
962 (package (inherit qtsvg)
963 (name "qtserialport")
8df9249d 964 (version "5.12.5")
00806f2b
EF
965 (source (origin
966 (method url-fetch)
967 (uri (string-append "https://download.qt.io/official_releases/qt/"
968 (version-major+minor version) "/" version
1f52eb7b 969 "/submodules/" name "-everywhere-src-"
00806f2b
EF
970 version ".tar.xz"))
971 (sha256
972 (base32
8df9249d 973 "0qmq3yppc54vf7xrwyrwk91h6x04w0hf4bnw5b3y5kwyllhh7vzq"))))
00806f2b 974 (native-inputs `(("perl" ,perl)))
33741e16
EF
975 (inputs
976 `(("qtbase" ,qtbase)
96412f34 977 ("eudev" ,eudev)))
042f7c26
HG
978 (arguments
979 (substitute-keyword-arguments (package-arguments qtsvg)
980 ((#:phases phases)
981 `(modify-phases ,phases
982 (add-after 'unpack 'patch-dlopen-paths
983 (lambda* (#:key inputs #:allow-other-keys)
984 (substitute* "src/serialport/qtudev_p.h"
985 ;; Use the absolute paths for dynamically loaded libs,
986 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
987 ;; typically is not set in guix.
988 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
989 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
990 #t))))))
96412f34
EF
991 (synopsis "Qt Serial Port module")
992 (description "The Qt Serial Port module provides the library for
993interacting with serial ports from within Qt.")))
00806f2b 994
a98ffab5
EF
995(define-public qtserialbus
996 (package (inherit qtsvg)
997 (name "qtserialbus")
6d460e80 998 (version "5.12.6")
a98ffab5
EF
999 (source (origin
1000 (method url-fetch)
1001 (uri (string-append "https://download.qt.io/official_releases/qt/"
1002 (version-major+minor version) "/" version
1f52eb7b 1003 "/submodules/" name "-everywhere-src-"
a98ffab5
EF
1004 version ".tar.xz"))
1005 (sha256
1006 (base32
6d460e80 1007 "1ppmrwshj42lpx21m2gxblrlbigjf10fwg3fk5x5130ih89446q7"))))
a98ffab5
EF
1008 (inputs
1009 `(("qtbase" ,qtbase)
96412f34
EF
1010 ("qtserialport" ,qtserialport)))
1011 (synopsis "Qt Serial Bus module")
1012 (description "The Qt Serial Bus API provides classes and functions to
1013access the various industrial serial buses and protocols, such as CAN, ModBus,
1014and others.")))
a98ffab5 1015
f5377013
EF
1016(define-public qtwebchannel
1017 (package (inherit qtsvg)
1018 (name "qtwebchannel")
6d460e80 1019 (version "5.12.6")
f5377013
EF
1020 (source (origin
1021 (method url-fetch)
1022 (uri (string-append "https://download.qt.io/official_releases/qt/"
1023 (version-major+minor version) "/" version
1f52eb7b 1024 "/submodules/" name "-everywhere-src-"
f5377013
EF
1025 version ".tar.xz"))
1026 (sha256
1027 (base32
6d460e80 1028 "1my8vcsidx9r5wpd1iax8skhp5ac3234g9r7ax04k9z17mqd2i97"))))
f5377013
EF
1029 (native-inputs
1030 `(("perl" ,perl)
1031 ("qtdeclarative" ,qtdeclarative)
1032 ("qtwebsockets" ,qtwebsockets)))
96412f34
EF
1033 (inputs `(("qtbase" ,qtbase)))
1034 (synopsis "Web communication library for Qt")
1035 (description "The Qt WebChannel module enables peer-to-peer communication
1036between the host (QML/C++ application) and the client (HTML/JavaScript
1037application). The transport mechanism is supported out of the box by the two
1038popular web engines, Qt WebKit 2 and Qt WebEngine.")))
f5377013 1039
b5792b9c
HG
1040(define-public qtwebglplugin
1041 (package (inherit qtsvg)
1042 (name "qtwebglplugin")
6d460e80 1043 (version "5.12.6")
b5792b9c
HG
1044 (source (origin
1045 (method url-fetch)
1046 (uri (string-append "https://download.qt.io/official_releases/qt/"
1047 (version-major+minor version) "/" version
1048 "/submodules/" name "-everywhere-src-"
1049 version ".tar.xz"))
1050 (sha256
1051 (base32
6d460e80 1052 "1pahdyhinhq1xhsc7lsfprjjpz6fn9vgwqcyi72hc3wzyr98in11"))))
b6476ecc
EF
1053 (arguments
1054 (substitute-keyword-arguments (package-arguments qtsvg)
1055 ((#:phases phases)
1056 `(modify-phases ,phases
1057 (add-after 'unpack 'disable-network-tests
1058 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1059 (("webgl") "# webgl"))
1060 #t))))))
b5792b9c
HG
1061 (native-inputs '())
1062 (inputs
1063 `(("mesa" ,mesa)
1064 ("qtbase" ,qtbase)
b6476ecc 1065 ("qtdeclarative" ,qtdeclarative)
b5792b9c
HG
1066 ("qtwebsockets" ,qtwebsockets)))
1067 (synopsis "QPA plugin for running an application via a browser using
1068streamed WebGL commands")
1069 (description "Qt back end that uses WebGL for rendering. It allows Qt
1070applications (with some limitations) to run in a web browser that supports
1071WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1072compatible web browser without the use of plug-ins. The API is similar to
1073OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1074
359e30c9
HG
1075(define-public qtwebview
1076 (package (inherit qtsvg)
1077 (name "qtwebview")
6d460e80 1078 (version "5.12.6")
359e30c9
HG
1079 (source (origin
1080 (method url-fetch)
1081 (uri (string-append "https://download.qt.io/official_releases/qt/"
1082 (version-major+minor version) "/" version
1083 "/submodules/" name "-everywhere-src-"
1084 version ".tar.xz"))
1085 (sha256
1086 (base32
6d460e80 1087 "0ykjwz3cwv718gvgvnlhq7wia8gllnj3cdzw3amj0rh63hy65h22"))))
359e30c9
HG
1088 (native-inputs
1089 `(("perl" ,perl)))
1090 (inputs
1091 `(("qtbase" ,qtbase)
1092 ("qtdeclarative" ,qtdeclarative)))
1093 (synopsis "Display web content in a QML application")
1094 (description "Qt WebView provides a way to display web content in a QML
1095application without necessarily including a full web browser stack by using
1096native APIs where it makes sense.")))
1097
d5ca54ce
EF
1098(define-public qtlocation
1099 (package (inherit qtsvg)
1100 (name "qtlocation")
6d460e80 1101 (version "5.12.6")
d5ca54ce
EF
1102 (source (origin
1103 (method url-fetch)
1104 (uri (string-append "https://download.qt.io/official_releases/qt/"
1105 (version-major+minor version) "/" version
1f52eb7b 1106 "/submodules/" name "-everywhere-src-"
d5ca54ce
EF
1107 version ".tar.xz"))
1108 (sha256
1109 (base32
6d460e80 1110 "0y12vs6jwiwljdn57jqs1dwi6wfw1l5l95dvj9g93h739p533qks"))))
c195b5ba
EF
1111 (arguments
1112 (substitute-keyword-arguments (package-arguments qtsvg)
1113 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d5ca54ce
EF
1114 (native-inputs
1115 `(("perl" ,perl)
1116 ("qtdeclarative" ,qtdeclarative)
9a935ef2 1117 ("qtquickcontrols" ,qtquickcontrols)
d5ca54ce 1118 ("qtserialport" ,qtserialport)))
924e6ddf
EF
1119 (inputs
1120 `(("icu4c" ,icu4c)
1121 ("openssl" ,openssl)
1122 ("qtbase" ,qtbase)
96412f34
EF
1123 ("zlib" ,zlib)))
1124 (synopsis "Qt Location and Positioning modules")
1125 (description "The Qt Location module provides an interface for location,
1126positioning and geolocation plugins.")))
d5ca54ce 1127
d438c968
EF
1128(define-public qttools
1129 (package (inherit qtsvg)
1130 (name "qttools")
6d460e80 1131 (version "5.12.6")
d438c968
EF
1132 (source (origin
1133 (method url-fetch)
1134 (uri (string-append "https://download.qt.io/official_releases/qt/"
1135 (version-major+minor version) "/" version
1f52eb7b 1136 "/submodules/" name "-everywhere-src-"
d438c968
EF
1137 version ".tar.xz"))
1138 (sha256
1139 (base32
6d460e80 1140 "0xy7sf8w2lln1l59lhrf0kb687avwirrh63izp7509jwi33r2jg9"))))
c195b5ba
EF
1141 (arguments
1142 (substitute-keyword-arguments (package-arguments qtsvg)
1143 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d438c968
EF
1144 (native-inputs
1145 `(("perl" ,perl)
124351ef
EF
1146 ("qtdeclarative" ,qtdeclarative)
1147 ("vulkan-headers" ,vulkan-headers)))
d438c968
EF
1148 (inputs
1149 `(("mesa" ,mesa)
96412f34
EF
1150 ("qtbase" ,qtbase)))
1151 (synopsis "Qt Tools and Designer modules")
1152 (description "The Qt Tools module provides a set of applications to browse
1153the documentation, translate applications, generate help files and other stuff
1154that helps in Qt development.")))
d438c968 1155
4742c4de
EF
1156(define-public qtscript
1157 (package (inherit qtsvg)
1158 (name "qtscript")
6d460e80 1159 (version "5.12.6")
4742c4de
EF
1160 (source (origin
1161 (method url-fetch)
1162 (uri (string-append "https://download.qt.io/official_releases/qt/"
1163 (version-major+minor version) "/" version
1f52eb7b 1164 "/submodules/" name "-everywhere-src-"
4742c4de
EF
1165 version ".tar.xz"))
1166 (sha256
1167 (base32
6d460e80 1168 "0z3p4bb2ddylb7y2xvagjbn7fc5d0ic08cmrrb67h8wf6fnq5051"))
7c5cf7a2 1169 (patches (search-patches "qtscript-disable-tests.patch"))))
4742c4de
EF
1170 (native-inputs
1171 `(("perl" ,perl)
1172 ("qttools" ,qttools)))
1173 (inputs
96412f34
EF
1174 `(("qtbase" ,qtbase)))
1175 (synopsis "Qt Script module")
1176 (description "Qt provides support for application scripting with ECMAScript.
1177The following guides and references cover aspects of programming with
1178ECMAScript and Qt.")))
4742c4de 1179
ae0e5133
DC
1180(define-public qtquickcontrols
1181 (package (inherit qtsvg)
1182 (name "qtquickcontrols")
6d460e80 1183 (version "5.12.6")
ae0e5133
DC
1184 (source (origin
1185 (method url-fetch)
1186 (uri (string-append "https://download.qt.io/official_releases/qt/"
1187 (version-major+minor version) "/" version
1f52eb7b 1188 "/submodules/" name "-everywhere-src-"
ae0e5133
DC
1189 version ".tar.xz"))
1190 (sha256
1191 (base32
6d460e80 1192 "169cvwiav5d538cw81rbdimb1pis0z6fkaxlwhd4z4pzhyhrd3f4"))))
c195b5ba
EF
1193 (arguments
1194 (substitute-keyword-arguments (package-arguments qtsvg)
1195 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
ae0e5133
DC
1196 (inputs
1197 `(("qtbase" ,qtbase)
96412f34
EF
1198 ("qtdeclarative" ,qtdeclarative)))
1199 (synopsis "Qt Quick Controls and other Quick modules")
1200 (description "The QtScript module provides classes for making Qt
1201applications scriptable. This module provides a set of extra components that
1202can be used to build complete interfaces in Qt Quick.")))
ae0e5133 1203
42da1492
DC
1204(define-public qtquickcontrols2
1205 (package (inherit qtsvg)
1206 (name "qtquickcontrols2")
6d460e80 1207 (version "5.12.6")
42da1492
DC
1208 (source (origin
1209 (method url-fetch)
1210 (uri (string-append "https://download.qt.io/official_releases/qt/"
1211 (version-major+minor version) "/" version
1f52eb7b 1212 "/submodules/" name "-everywhere-src-"
42da1492
DC
1213 version ".tar.xz"))
1214 (sha256
1215 (base32
6d460e80 1216 "0w5910wblzc7q2llyb7fyfcbmy1fl369c6w5d6r5sh26z490gasw"))))
c195b5ba
EF
1217 (arguments
1218 (substitute-keyword-arguments (package-arguments qtsvg)
1219 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
42da1492
DC
1220 (inputs
1221 `(("qtbase" ,qtbase)
96412f34
EF
1222 ("qtdeclarative" ,qtdeclarative)))
1223 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1224 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1225module that provides platform integration: native dialogs, menus and menu bars,
1226and tray icons. It falls back to Qt Widgets when a native implementation is
1227not available.")))
42da1492 1228
4e4ed0ee
DC
1229(define-public qtgraphicaleffects
1230 (package (inherit qtsvg)
1231 (name "qtgraphicaleffects")
6d460e80 1232 (version "5.12.6")
4e4ed0ee
DC
1233 (source (origin
1234 (method url-fetch)
1235 (uri (string-append "https://download.qt.io/official_releases/qt/"
1236 (version-major+minor version) "/" version
1f52eb7b 1237 "/submodules/" name "-everywhere-src-"
4e4ed0ee
DC
1238 version ".tar.xz"))
1239 (sha256
1240 (base32
6d460e80 1241 "1vvpq34433j94n9yyhh4if4yv51i8xiffpvyn3xgffx14iv35l6y"))))
c195b5ba
EF
1242 (arguments
1243 (substitute-keyword-arguments (package-arguments qtsvg)
1244 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
4e4ed0ee
DC
1245 (inputs
1246 `(("qtbase" ,qtbase)
96412f34
EF
1247 ("qtdeclarative" ,qtdeclarative)))
1248 (synopsis "Qt Graphical Effects module")
1249 (description "The Qt Graphical Effects module provides a set of QML types
1250for adding visually impressive and configurable effects to user interfaces.
1251Effects are visual items that can be added to Qt Quick user interface as UI
1252components. The API consists of over 20 effects provided as separate QML
1253types. The effects cover functional areas such as blending, masking, blurring,
1254coloring, and many more.")))
4e4ed0ee 1255
51519fd3
EF
1256(define-public qtgamepad
1257 (package (inherit qtsvg)
1258 (name "qtgamepad")
6d460e80 1259 (version "5.12.6")
51519fd3
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
1f52eb7b 1264 "/submodules/" name "-everywhere-src-"
51519fd3
EF
1265 version ".tar.xz"))
1266 (sha256
1267 (base32
6d460e80 1268 "1cxkqnhx0baxh3csjl7ar151v0zizf86f4338rr38liwb7rwbsz1"))))
51519fd3
EF
1269 (native-inputs
1270 `(("perl" ,perl)
1271 ("pkg-config" ,pkg-config)))
1272 (inputs
1273 `(("fontconfig" ,fontconfig)
1274 ("freetype" ,freetype)
1275 ("libxrender" ,libxrender)
1276 ("sdl2" ,sdl2)
1277 ("qtbase" ,qtbase)
96412f34
EF
1278 ("qtdeclarative" ,qtdeclarative)))
1279 (synopsis "Qt Gamepad module")
1280 (description "The Qt Gamepad module is an add-on library that enables Qt
1281applications to support the use of gamepad hardware and in some cases remote
1282control equipment. The module provides both QML and C++ interfaces. The
1283primary target audience are embedded devices with fullscreen user interfaces,
1284and mobile applications targeting TV-like form factors.")))
51519fd3 1285
56cd88fd
EF
1286(define-public qtscxml
1287 (package (inherit qtsvg)
1288 (name "qtscxml")
6d460e80 1289 (version "5.12.6")
56cd88fd
EF
1290 (source (origin
1291 (method url-fetch)
1292 (uri (string-append "https://download.qt.io/official_releases/qt/"
1293 (version-major+minor version) "/" version
1f52eb7b 1294 "/submodules/" name "-everywhere-src-"
56cd88fd
EF
1295 version ".tar.xz"))
1296 (sha256
1297 (base32
6d460e80 1298 "12y6ga7j6xby9rz1c9h17r9ih4i16i1ylr6b4vmrn7svidy87msk"))
56cd88fd
EF
1299 (modules '((guix build utils)))
1300 (snippet
c195b5ba
EF
1301 '(begin
1302 (delete-file-recursively "tests/3rdparty")
1303 ;; the scion test refers to the bundled 3rd party test code.
1304 (substitute* "tests/auto/auto.pro"
6cbee49d
MW
1305 (("scion") "#"))
1306 #t))))
56cd88fd
EF
1307 (inputs
1308 `(("qtbase" ,qtbase)
96412f34
EF
1309 ("qtdeclarative" ,qtdeclarative)))
1310 (synopsis "Qt SCXML module")
1311 (description "The Qt SCXML module provides functionality to create state
1312machines from SCXML files. This includes both dynamically creating state
1313machines (loading the SCXML file and instantiating states and transitions) and
1314generating a C++ file that has a class implementing the state machine. It
1315also contains functionality to support data models and executable content.")))
56cd88fd 1316
de5e0180
EF
1317(define-public qtpurchasing
1318 (package (inherit qtsvg)
1319 (name "qtpurchasing")
6d460e80 1320 (version "5.12.6")
de5e0180
EF
1321 (source (origin
1322 (method url-fetch)
1323 (uri (string-append "https://download.qt.io/official_releases/qt/"
1324 (version-major+minor version) "/" version
1f52eb7b 1325 "/submodules/" name "-everywhere-src-"
de5e0180
EF
1326 version ".tar.xz"))
1327 (sha256
1328 (base32
6d460e80 1329 "1kbhmzrw612yb4brxi3fwslil31j31vm0zqpb52vcma7vbivg80z"))))
de5e0180
EF
1330 (inputs
1331 `(("qtbase" ,qtbase)
96412f34
EF
1332 ("qtdeclarative" ,qtdeclarative)))
1333 (synopsis "Qt Purchasing module")
1334 (description "The Qt Purchasing module provides and in-app API for
1335purchasing goods and services.")))
de5e0180 1336
173b54b9
EF
1337(define-public qtcanvas3d
1338 (package (inherit qtsvg)
1339 (name "qtcanvas3d")
6d460e80 1340 (version "5.12.6")
173b54b9
EF
1341 (source (origin
1342 (method url-fetch)
1343 (uri (string-append "https://download.qt.io/official_releases/qt/"
1344 (version-major+minor version) "/" version
1f52eb7b 1345 "/submodules/" name "-everywhere-src-"
173b54b9
EF
1346 version ".tar.xz"))
1347 (sha256
1348 (base32
6d460e80 1349 "024xglrb321rp3wb3fhprw7pl6zvmpgfkpwgabbyx8p58k4yccrd"))
173b54b9
EF
1350 (modules '((guix build utils)))
1351 (snippet
1f52eb7b
EF
1352 '(begin
1353 (delete-file-recursively "examples/canvas3d/3rdparty")
1354 #t))))
c195b5ba
EF
1355 (arguments
1356 (substitute-keyword-arguments (package-arguments qtsvg)
1357 ;; Building the tests depends on the bundled 3rd party javascript files,
1358 ;; and the test phase fails to import QtCanvas3D, causing the phase to
1359 ;; fail, so we skip building them for now.
1360 ((#:phases phases)
1361 `(modify-phases ,phases
1362 (replace 'configure
1363 (lambda* (#:key outputs #:allow-other-keys)
1364 (let ((out (assoc-ref outputs "out")))
1f52eb7b
EF
1365 (invoke "qmake" "QT_BUILD_PARTS = libs tools"
1366 (string-append "PREFIX=" out)))))))
c195b5ba 1367 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
173b54b9
EF
1368 (native-inputs `())
1369 (inputs
1370 `(("qtbase" ,qtbase)
96412f34
EF
1371 ("qtdeclarative" ,qtdeclarative)))
1372 (synopsis "Qt Canvas 3D module")
1373 (description "The Qt Canvas 3D module provides a way to make WebGL-like 3D
1374drawing calls from Qt Quick JavaScript.")))
173b54b9 1375
68bbe14b
EF
1376(define-public qtcharts
1377 (package (inherit qtsvg)
1378 (name "qtcharts")
6d460e80 1379 (version "5.12.6")
68bbe14b
EF
1380 (source (origin
1381 (method url-fetch)
1382 (uri (string-append "https://download.qt.io/official_releases/qt/"
1383 (version-major+minor version) "/" version
1f52eb7b 1384 "/submodules/" name "-everywhere-src-"
68bbe14b
EF
1385 version ".tar.xz"))
1386 (sha256
1387 (base32
6d460e80 1388 "0gdark4z2g8j0kzjg1aqq91ap04h6hzjl163g8xlwxwdn5dxpnql"))))
c195b5ba
EF
1389 (arguments
1390 (substitute-keyword-arguments (package-arguments qtsvg)
1391 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
68bbe14b
EF
1392 (inputs
1393 `(("qtbase" ,qtbase)
96412f34
EF
1394 ("qtdeclarative" ,qtdeclarative)))
1395 (synopsis "Qt Charts module")
1396 (description "The Qt Charts module provides a set of easy to use chart
1397components. It uses the Qt Graphics View Framework, therefore charts can be
1398easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1399QGraphicsWidget, or QML types. Users can easily create impressive graphs by
9c2c524d
EF
1400selecting one of the charts themes.")
1401 (license license:gpl3)))
68bbe14b 1402
a69945a7
EF
1403(define-public qtdatavis3d
1404 (package (inherit qtsvg)
1405 (name "qtdatavis3d")
6d460e80 1406 (version "5.12.6")
a69945a7
EF
1407 (source (origin
1408 (method url-fetch)
1409 (uri (string-append "https://download.qt.io/official_releases/qt/"
1410 (version-major+minor version) "/" version
1f52eb7b 1411 "/submodules/" name "-everywhere-src-"
a69945a7
EF
1412 version ".tar.xz"))
1413 (sha256
1414 (base32
6d460e80 1415 "1zm4xfi2ijqr3n3g0lfs3yzil6w7c54r8vsj1d541lz7wnm92ka1"))))
c195b5ba
EF
1416 (arguments
1417 (substitute-keyword-arguments (package-arguments qtsvg)
1418 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
a69945a7
EF
1419 (inputs
1420 `(("qtbase" ,qtbase)
96412f34
EF
1421 ("qtdeclarative" ,qtdeclarative)))
1422 (synopsis "Qt Data Visualization module")
1423 (description "The Qt Data Visualization module provides a way to visualize
1424data in 3D as bar, scatter, and surface graphs. It is especially useful for
1425visualizing depth maps and large quantities of rapidly changing data, such as
1426data received from multiple sensors. The look and feel of graphs can be
9c2c524d
EF
1427customized by using themes or by adding custom items and labels to them.")
1428 (license license:gpl3)))
f47d2793
EF
1429
1430(define-public qtnetworkauth
1431 (package (inherit qtsvg)
1432 (name "qtnetworkauth")
6d460e80 1433 (version "5.12.6")
f47d2793
EF
1434 (source (origin
1435 (method url-fetch)
1436 (uri (string-append "https://download.qt.io/official_releases/qt/"
1437 (version-major+minor version) "/" version
1f52eb7b 1438 "/submodules/" name "-everywhere-src-"
f47d2793
EF
1439 version ".tar.xz"))
1440 (sha256
1441 (base32
6d460e80 1442 "1gba6rdhcvljc4dnzhnkxrdlaxm3y095ljqg1sz3p1k0m632s4pa"))))
f18c9470
EF
1443 (arguments
1444 (substitute-keyword-arguments (package-arguments qtsvg)
1445 ((#:phases phases)
1446 `(modify-phases ,phases
1447 (add-after 'unpack 'remove-failing-test
1448 (lambda _
1449 ;; These tests can't find their test data.
1450 (substitute* "tests/auto/auto.pro"
1451 (("oauth1 ") "# oauth1 "))
1452 #t))))))
f47d2793 1453 (inputs
96412f34
EF
1454 `(("qtbase" ,qtbase)))
1455 (synopsis "Qt Network Authorization module")
1456 (description "The Qt Network Authorization module provides an
1457implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
213238d9
EF
1458
1459(define-public qtremoteobjects
1460 (package (inherit qtsvg)
1461 (name "qtremoteobjects")
6d460e80 1462 (version "5.12.6")
213238d9
EF
1463 (source (origin
1464 (method url-fetch)
1465 (uri (string-append "https://download.qt.io/official_releases/qt/"
1466 (version-major+minor version) "/" version
1f52eb7b 1467 "/submodules/" name "-everywhere-src-"
213238d9
EF
1468 version ".tar.xz"))
1469 (sha256
1470 (base32
6d460e80 1471 "16fna70pljn45yj6hv3g4qvb1imcnfj43jchvydspdhg08ykbda9"))))
1f52eb7b
EF
1472 (arguments
1473 (substitute-keyword-arguments (package-arguments qtsvg)
1474 ((#:phases phases)
1475 `(modify-phases ,phases
1476 (add-after 'unpack 'remove-failing-test
1477 (lambda _
1478 ;; This test can't find its imports.
1479 (substitute* "tests/auto/qml/qml.pro"
b6476ecc
EF
1480 (("integration") "# integration")
1481 (("usertypes") "# usertypes"))
1f52eb7b 1482 #t))))))
213238d9
EF
1483 (inputs
1484 `(("qtbase" ,qtbase)
96412f34
EF
1485 ("qtdeclarative" ,qtdeclarative)))
1486 (synopsis "Qt Remote Objects module")
1487 (description "The Qt Remote Objects module is an @dfn{inter-process
1488communication} (IPC) module developed for Qt. The idea is to extend existing
1489Qt's functionalities to enable an easy exchange of information between
1490processes or computers.")))
b84cc89a
EF
1491
1492(define-public qtspeech
1493 (package (inherit qtsvg)
1494 (name "qtspeech")
6d460e80 1495 (version "5.12.6")
b84cc89a
EF
1496 (source (origin
1497 (method url-fetch)
1498 (uri (string-append "https://download.qt.io/official_releases/qt/"
1499 (version-major+minor version) "/" version
1f52eb7b 1500 "/submodules/" name "-everywhere-src-"
b84cc89a
EF
1501 version ".tar.xz"))
1502 (sha256
1503 (base32
6d460e80 1504 "12l7rycjfa6d9gnnjd6i097pf1qqzjnz9c1jgxhpldvkf0n7pbi7"))))
b6476ecc
EF
1505 (arguments
1506 (substitute-keyword-arguments (package-arguments qtsvg)
1507 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
b84cc89a
EF
1508 (inputs
1509 `(("qtbase" ,qtbase)))
1510 (native-inputs
1511 `(("perl" ,perl)
1512 ("qtdeclarative" ,qtdeclarative)
1513 ("qtmultimedia" ,qtmultimedia)
96412f34
EF
1514 ("qtxmlpatterns" ,qtxmlpatterns)))
1515 (synopsis "Qt Speech module")
1516 (description "The Qt Speech module enables a Qt application to support
1517accessibility features such as text-to-speech, which is useful for end-users
1518who are visually challenged or cannot access the application for whatever
1519reason. The most common use case where text-to-speech comes in handy is when
1520the end-user is driving and cannot attend the incoming messages on the phone.
1521In such a scenario, the messaging application can read out the incoming
1522message.")))
a69945a7 1523
84ef83dd
AE
1524(define-public python-sip
1525 (package
1526 (name "python-sip")
3e93b2bd 1527 (version "4.19.18")
84ef83dd
AE
1528 (source
1529 (origin
1530 (method url-fetch)
3e93b2bd
EF
1531 (uri (string-append "https://www.riverbankcomputing.com/static/"
1532 "Downloads/sip/" version "/sip-" version ".tar.gz"))
84ef83dd
AE
1533 (sha256
1534 (base32
3e93b2bd 1535 "07kyd56xgbb40ljb022rq82shgxprlbl0z27mpf1b6zd00w8dgf0"))))
84ef83dd
AE
1536 (build-system gnu-build-system)
1537 (native-inputs
1538 `(("python" ,python-wrapper)))
1539 (arguments
1540 `(#:tests? #f ; no check target
e8bdd73a
AE
1541 #:modules ((srfi srfi-1)
1542 ,@%gnu-build-system-modules)
84ef83dd 1543 #:phases
39766868
EF
1544 (modify-phases %standard-phases
1545 (replace 'configure
1546 (lambda* (#:key inputs outputs #:allow-other-keys)
1547 (let* ((out (assoc-ref outputs "out"))
1548 (bin (string-append out "/bin"))
1549 (include (string-append out "/include"))
1550 (python (assoc-ref inputs "python"))
1551 (python-version
1552 (last (string-split python #\-)))
1553 (python-major+minor
1554 (string-join
1555 (take (string-split python-version #\.) 2)
1556 "."))
1557 (lib (string-append out "/lib/python"
1558 python-major+minor
1559 "/site-packages")))
e3232b26 1560 (invoke "python" "configure.py"
e3232b26
EF
1561 "--bindir" bin
1562 "--destdir" lib
1563 "--incdir" include)))))))
39766868 1564 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
84ef83dd
AE
1565 (synopsis "Python binding creator for C and C++ libraries")
1566 (description
1567 "SIP is a tool to create Python bindings for C and C++ libraries. It
1568was originally developed to create PyQt, the Python bindings for the Qt
1569toolkit, but can be used to create bindings for any C or C++ library.
1570
1571SIP comprises a code generator and a Python module. The code generator
1572processes a set of specification files and generates C or C++ code, which
1573is then compiled to create the bindings extension module. The SIP Python
1574module provides support functions to the automatically generated code.")
1575 ;; There is a choice between a python like license, gpl2 and gpl3.
1576 ;; For compatibility with pyqt, we need gpl3.
225941b0 1577 (license license:gpl3)))
84ef83dd
AE
1578
1579(define-public python2-sip
1580 (package (inherit python-sip)
1581 (name "python2-sip")
1582 (native-inputs
1583 `(("python" ,python-2)))))
014e7dd8
AE
1584
1585(define-public python-pyqt
1586 (package
1587 (name "python-pyqt")
3e93b2bd 1588 (version "5.12.3")
014e7dd8
AE
1589 (source
1590 (origin
1591 (method url-fetch)
3e93b2bd
EF
1592 (uri (string-append "https://www.riverbankcomputing.com/static/"
1593 "Downloads/PyQt5/" version "/PyQt5_gpl-"
1594 version ".tar.gz"))
014e7dd8
AE
1595 (sha256
1596 (base32
3e93b2bd 1597 "041155bdzp57jy747p5d59740c55yy3241cy1x2lgcdsvqvzmc0d"))
2338755a 1598 (patches (search-patches "pyqt-configure.patch"
e8062974 1599 "pyqt-unbundled-qt.patch"
2338755a 1600 "pyqt-public-sip.patch"))))
014e7dd8
AE
1601 (build-system gnu-build-system)
1602 (native-inputs
499991cf
EB
1603 `(("qtbase" ,qtbase))) ; for qmake
1604 (propagated-inputs
1605 `(("python-sip" ,python-sip)))
014e7dd8 1606 (inputs
e9adcd81
EF
1607 `(("python" ,python-wrapper)
1608 ("qtbase" ,qtbase)
1609 ("qtconnectivity" ,qtconnectivity)
1610 ("qtdeclarative" ,qtdeclarative)
1611 ("qtlocation" ,qtlocation)
1612 ("qtmultimedia" ,qtmultimedia)
1613 ("qtsensors" ,qtsensors)
1614 ("qtserialport" ,qtserialport)
1615 ("qtsvg" ,qtsvg)
1616 ("qttools" ,qttools)
1617 ("qtwebchannel" ,qtwebchannel)
52404022 1618 ("qtwebkit" ,qtwebkit)
e9adcd81
EF
1619 ("qtwebsockets" ,qtwebsockets)
1620 ("qtx11extras" ,qtx11extras)
1621 ("qtxmlpatterns" ,qtxmlpatterns)))
014e7dd8 1622 (arguments
e8bdd73a
AE
1623 `(#:modules ((srfi srfi-1)
1624 ,@%gnu-build-system-modules)
1625 #:phases
eef988c8
EF
1626 (modify-phases %standard-phases
1627 (replace 'configure
1628 (lambda* (#:key inputs outputs #:allow-other-keys)
1629 (let* ((out (assoc-ref outputs "out"))
1630 (bin (string-append out "/bin"))
1631 (sip (string-append out "/share/sip"))
4ae8180c 1632 (plugins (string-append out "/lib/qt5/plugins"))
eef988c8
EF
1633 (designer (string-append plugins "/designer"))
1634 (qml (string-append plugins "/PyQt5"))
1635 (python (assoc-ref inputs "python"))
1636 (python-version
1637 (last (string-split python #\-)))
1638 (python-major+minor
1639 (string-join
1640 (take (string-split python-version #\.) 2)
1641 "."))
1642 (lib (string-append out "/lib/python"
1643 python-major+minor
43e8824d
HG
1644 "/site-packages"))
1645 (stubs (string-append lib "/PyQt5")))
a01a3763
EF
1646 (invoke "python" "configure.py"
1647 "--confirm-license"
1648 "--bindir" bin
1649 "--destdir" lib
1650 "--designer-plugindir" designer
1651 "--qml-plugindir" qml
1652 ; Where to install the PEP 484 Type Hints stub
1653 ; files. Without this the stubs are tried to be
1654 ; installed into the python package's
1655 ; site-package directory, which is read-only.
1656 "--stubsdir" stubs
1657 "--sipdir" sip)))))))
eef988c8 1658 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
014e7dd8
AE
1659 (synopsis "Python bindings for Qt")
1660 (description
1661 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1662framework. The bindings are implemented as a set of Python modules and
1663contain over 620 classes.")
225941b0 1664 (license license:gpl3)))
014e7dd8 1665
0e2d6d26
RW
1666;; XXX: This is useful because qtwebkit does not build reliably at this time.
1667;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
1668;; packages that could be used together.
1669(define-public python-pyqt-without-qtwebkit
1670 (package (inherit python-pyqt)
1671 (name "python-pyqt-without-qtwebkit")
1672 (inputs
1673 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
1674
014e7dd8
AE
1675(define-public python2-pyqt
1676 (package (inherit python-pyqt)
1677 (name "python2-pyqt")
1678 (native-inputs
1679 `(("python-sip" ,python2-sip)
2be06813 1680 ("qtbase" ,qtbase)))
014e7dd8 1681 (inputs
e9adcd81 1682 `(("python" ,python-2)
a01a3763 1683 ("python2-enum34" ,python2-enum34)
e9adcd81 1684 ,@(alist-delete "python" (package-inputs python-pyqt))))))
3e291958 1685
bba60697 1686(define-public python2-pyqt-4
3e291958 1687 (package (inherit python-pyqt)
bba60697 1688 (name "python2-pyqt")
41fa164a 1689 (version "4.12")
3e291958
AE
1690 (source
1691 (origin
1692 (method url-fetch)
1693 (uri
1694 (string-append "mirror://sourceforge/pyqt/PyQt4/"
41fa164a 1695 "PyQt-" version "/PyQt4_gpl_x11-"
3e291958
AE
1696 version ".tar.gz"))
1697 (sha256
1698 (base32
41fa164a 1699 "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"))))
3e291958 1700 (native-inputs
bba60697 1701 `(("python-sip" ,python2-sip)
3e291958 1702 ("qt" ,qt-4)))
bba60697 1703 (inputs `(("python" ,python-2)))
3e291958
AE
1704 (arguments
1705 `(#:tests? #f ; no check target
e8bdd73a
AE
1706 #:modules ((srfi srfi-1)
1707 ,@%gnu-build-system-modules)
3e291958 1708 #:phases
f9513086
EF
1709 (modify-phases %standard-phases
1710 (replace 'configure
1711 (lambda* (#:key inputs outputs #:allow-other-keys)
1712 (let* ((out (assoc-ref outputs "out"))
1713 (bin (string-append out "/bin"))
1714 (sip (string-append out "/share/sip"))
1715 (python (assoc-ref inputs "python"))
1716 (python-version
1717 (last (string-split python #\-)))
1718 (python-major+minor
1719 (string-join
1720 (take (string-split python-version #\.) 2)
1721 "."))
1722 (lib (string-append out "/lib/python"
1723 python-major+minor
1724 "/site-packages")))
39df4d19
RW
1725 (invoke "python" "configure.py"
1726 "--confirm-license"
1727 "--bindir" bin
1728 "--destdir" lib
1729 "--sipdir" sip)))))))
225941b0 1730 (license (list license:gpl2 license:gpl3)))) ; choice of either license
3e291958 1731
3befd0a9
RW
1732(define-public qscintilla
1733 (package
1734 (name "qscintilla")
9f8fee50 1735 (version "2.10.8")
3befd0a9
RW
1736 (source (origin
1737 (method url-fetch)
1738 (uri (string-append "mirror://sourceforge/pyqt/QScintilla2/"
1739 "QScintilla-" version "/QScintilla_gpl-"
1740 version ".tar.gz"))
1741 (sha256
1742 (base32
9f8fee50 1743 "1swjr786w04r514pry9pn32ivza4il1cg35s60qy39cwc175pka6"))))
3befd0a9
RW
1744 (build-system gnu-build-system)
1745 (arguments
1746 `(#:phases
1747 (modify-phases %standard-phases
1748 (replace 'configure
1749 (lambda* (#:key outputs #:allow-other-keys)
1750 (let ((out (assoc-ref outputs "out")))
1751 (chdir "Qt4Qt5")
1752 (substitute* "qscintilla.pro"
1753 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1754 (string-append out "/lib"))
1755 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1756 (string-append out "/include"))
1757 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
1758 (string-append out "/translations"))
5430732b
HG
1759 (("\\$\\$\\[QT_INSTALL_DATA\\]")
1760 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
1761 (("\\$\\$\\[QT_HOST_DATA\\]")
1762 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
0af6ffdd 1763 (invoke "qmake")))))))
3befd0a9 1764 (native-inputs `(("qtbase" ,qtbase)))
d338321d 1765 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
3befd0a9
RW
1766 (synopsis "Qt port of the Scintilla C++ editor control")
1767 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1768editor control. QScintilla includes features especially useful when editing
1769and debugging source code. These include support for syntax styling, error
1770indicators, code completion and call tips.")
1771 (license license:gpl3+)))
1772
06d04dbc
RW
1773(define-public python-qscintilla
1774 (package (inherit qscintilla)
1775 (name "python-qscintilla")
1776 (arguments
1777 `(#:configure-flags
1778 (list "--pyqt=PyQt5"
1779 (string-append "--pyqt-sipdir="
1780 (assoc-ref %build-inputs "python-pyqt")
1781 "/share/sip")
1782 (string-append "--qsci-incdir="
1783 (assoc-ref %build-inputs "qscintilla")
1784 "/include")
1785 (string-append "--qsci-libdir="
1786 (assoc-ref %build-inputs "qscintilla")
1787 "/lib"))
1788 #:phases
1789 (modify-phases %standard-phases
1790 (replace 'configure
9f8fee50
EF
1791 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
1792 (let ((out (assoc-ref outputs "out"))
1793 (python (assoc-ref inputs "python")))
1794 (chdir "Python")
1795 (apply invoke "python3" "configure.py"
1796 configure-flags)
1797 ;; Install to the right directory
1798 (substitute* '("Makefile"
1799 "Qsci/Makefile")
1800 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
1801 (((string-append python "/lib"))
1802 (string-append out "/lib")))
1803 ;; And fix the installed.txt file
1804 (substitute* "installed.txt"
1805 (("/gnu/store/[^/]+") out)))
76c7fc43 1806 #t)))))
06d04dbc
RW
1807 (inputs
1808 `(("qscintilla" ,qscintilla)
1809 ("python" ,python)
1810 ("python-pyqt" ,python-pyqt)))
1811 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
1812editor control. QScintilla includes features especially useful when editing
1813and debugging source code. These include support for syntax styling, error
1814indicators, code completion and call tips.
1815
1816This package provides the Python bindings.")))
1817
2456153a
RW
1818;; PyQt only looks for modules in its own directory. It ignores environment
1819;; variables such as PYTHONPATH, so we need to build a union package to make
1820;; it work.
1821(define-public python-pyqt+qscintilla
1822 (package (inherit python-pyqt)
1823 (name "python-pyqt+qscintilla")
1824 (source #f)
1825 (build-system trivial-build-system)
1826 (arguments
1827 '(#:modules ((guix build union))
1828 #:builder (begin
1829 (use-modules (ice-9 match)
1830 (guix build union))
1831 (match %build-inputs
1832 (((names . directories) ...)
1833 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
1834 directories)
1835 #t)))))
2456153a
RW
1836 (inputs
1837 `(("python-pyqt" ,python-pyqt)
1838 ("python-qscintilla" ,python-qscintilla)))
1839 (synopsis "Union of PyQt and the Qscintilla extension")
1840 (description
1841 "This package contains the union of PyQt and the Qscintilla extension.")))
1842
9e81af9e
EF
1843(define-public qtkeychain
1844 (package
1845 (name "qtkeychain")
2879e605 1846 (version "0.9.1")
9e81af9e
EF
1847 (source
1848 (origin
2879e605
EF
1849 (method git-fetch)
1850 (uri (git-reference
1851 (url "https://github.com/frankosterfeld/qtkeychain/")
1852 (commit (string-append "v" version))))
1853 (file-name (git-file-name name version))
9e81af9e 1854 (sha256
2879e605
EF
1855 (base32
1856 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
9e81af9e 1857 (build-system cmake-build-system)
18174d8a 1858 (native-inputs
f8127d26
HG
1859 `(("pkg-config" ,pkg-config)
1860 ("qttools" ,qttools)))
9e81af9e 1861 (inputs
18174d8a 1862 `(("qtbase" ,qtbase)))
9e81af9e
EF
1863 (arguments
1864 `(#:tests? #f ; No tests included
1865 #:phases
1866 (modify-phases %standard-phases
2879e605 1867 (add-before 'configure 'set-qt-trans-dir
9e81af9e
EF
1868 (lambda _
1869 (substitute* "CMakeLists.txt"
1870 (("\\$\\{qt_translations_dir\\}")
2879e605 1871 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
4ad70ad8 1872 #t)))))
9e81af9e
EF
1873 (home-page "https://github.com/frankosterfeld/qtkeychain")
1874 (synopsis "Qt API to store passwords")
1875 (description
1876 "QtKeychain is a Qt library to store passwords and other secret data
1877securely. It will not store any data unencrypted unless explicitly requested.")
225941b0 1878 (license license:bsd-3)))
fc381a33
TD
1879
1880(define-public qwt
1881 (package
1882 (name "qwt")
f1aa44ad 1883 (version "6.1.4")
fc381a33
TD
1884 (source
1885 (origin
1886 (method url-fetch)
1887 (uri
1888 (string-append "mirror://sourceforge/qwt/qwt/"
1889 version "/qwt-" version ".tar.bz2"))
1890 (sha256
f1aa44ad 1891 (base32 "1navkcnmn0qz8kzsyqmk32d929zl72l0b580w1ica7z5559j2a8m"))))
fc381a33
TD
1892 (build-system gnu-build-system)
1893 (inputs
1894 `(("qtbase" ,qtbase)
1895 ("qtsvg" ,qtsvg)
1896 ("qttools" ,qttools)))
1897 (arguments
1898 `(#:phases
1899 (modify-phases %standard-phases
1900 (replace 'configure
1901 (lambda* (#:key outputs #:allow-other-keys)
163651cb
SB
1902 (let* ((out (assoc-ref outputs "out"))
1903 (docdir (string-append out "/share/doc/qwt"))
1904 (incdir (string-append out "/include/qwt"))
1905 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
1906 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
fc381a33 1907 (substitute* '("qwtconfig.pri")
163651cb
SB
1908 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
1909 (format #f "~a = ~a\n" x out))
1910 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
1911 (format #f "~a = ~a\n" x docdir))
1912 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
1913 (format #f "~a = ~a\n" x incdir))
1914 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
1915 (format #f "~a = ~a\n" x pluginsdir))
1916 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
1917 (format #f "~a = ~a\n" x featuresdir)))
1918 (substitute* '("doc/doc.pro")
1919 ;; We'll install them in the 'install-man-pages' phase.
1920 (("^unix:doc\\.files.*") ""))
41173df9 1921 (invoke "qmake"))))
163651cb 1922 (add-after 'install 'install-man-pages
fc381a33
TD
1923 (lambda* (#:key outputs #:allow-other-keys)
1924 (let* ((out (assoc-ref outputs "out"))
1925 (man (string-append out "/share/man")))
1926 ;; Remove some incomplete manual pages.
1927 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1928 (mkdir-p man)
1929 (copy-recursively "doc/man" man)
1930 #t))))))
1931 (home-page "http://qwt.sourceforge.net")
1932 (synopsis "Qt widgets for plots, scales, dials and other technical software
1933GUI components")
1934 (description
1935 "The Qwt library contains widgets and components which are primarily useful
1936for technical and scientific purposes. It includes a 2-D plotting widget,
1937different kinds of sliders, and much more.")
1938 (license
1939 (list
1940 ;; The Qwt license is LGPL2.1 with some exceptions.
1941 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1942 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1943 license:lgpl2.1 license:gpl3))))
47e1d280
TD
1944
1945(define-public qtwebkit
1946 (package
1947 (name "qtwebkit")
e6df9c7e 1948 (version "5.212.0-alpha3")
47e1d280
TD
1949 (source
1950 (origin
1951 (method url-fetch)
601cb1be 1952 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
b5bf3dd9 1953 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
47e1d280
TD
1954 (sha256
1955 (base32
e6df9c7e 1956 "05syvwi3jw9abwsc93rmjkna0vyh6bkfrsqhwir48ms54icfwzim"))
601cb1be
AE
1957 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
1958 (build-system cmake-build-system)
47e1d280
TD
1959 (native-inputs
1960 `(("perl" ,perl)
1961 ("python" ,python-2.7)
1962 ("ruby" ,ruby)
1963 ("bison" ,bison)
1964 ("flex" ,flex)
1965 ("gperf" ,gperf)
1966 ("pkg-config" ,pkg-config)))
1967 (inputs
1968 `(("icu" ,icu4c)
601cb1be
AE
1969 ("glib" ,glib)
1970 ("gst-plugins-base" ,gst-plugins-base)
47e1d280
TD
1971 ("libjpeg" ,libjpeg)
1972 ("libpng" ,libpng)
1973 ("libwebp" ,libwebp)
8bfd7c8b 1974 ("sqlite" ,sqlite-with-column-metadata)
47e1d280 1975 ("fontconfig" ,fontconfig)
c695fb76 1976 ("libxrender" ,libxrender)
47e1d280
TD
1977 ("qtbase" ,qtbase)
1978 ("qtdeclarative" ,qtdeclarative)
601cb1be 1979 ("qtlocation" ,qtlocation)
47e1d280 1980 ("qtmultimedia" ,qtmultimedia)
601cb1be
AE
1981 ("qtsensors" ,qtsensors)
1982 ("qtwebchannel" ,qtwebchannel)
47e1d280
TD
1983 ("libxml2" ,libxml2)
1984 ("libxslt" ,libxslt)
1985 ("libx11" ,libx11)
1986 ("libxcomposite" ,libxcomposite)))
1987 (arguments
601cb1be
AE
1988 `(#:tests? #f ; no apparent tests; it might be necessary to set
1989 ; ENABLE_API_TESTS, see CMakeLists.txt
b717d0f9
LC
1990
1991 ;; Parallel builds fail due to a race condition:
1992 ;; <https://bugs.gnu.org/34062>.
1993 #:parallel-build? #f
1994
601cb1be
AE
1995 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
1996 "-DPORT=Qt"
1997 "-DUSE_LIBHYPHEN=OFF"
0995a569
EB
1998 "-DUSE_SYSTEM_MALLOC=ON"
1999 ;; XXX: relative dir installs to build dir?
2000 (string-append "-DECM_MKSPECS_INSTALL_DIR="
ebdb15bc
EB
2001 %output "/lib/qt5/mkspecs/modules")
2002 ;; Sacrifice a little speed in order to link
2003 ;; libraries and test executables in a
2004 ;; reasonable amount of memory.
2005 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2006 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
47e1d280
TD
2007 (home-page "https://www.webkit.org")
2008 (synopsis "Web browser engine and classes to render and interact with web
2009content")
2010 (description "QtWebKit provides a Web browser engine that makes it easy to
2011embed content from the World Wide Web into your Qt application. At the same
2012time Web content can be enhanced with native controls.")
af9afb0b
MB
2013 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2014 ;; room for slower or busy hardware.
2015 (properties '((timeout . 64800))) ;18 hours
4961364f
LC
2016
2017 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2018 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2019 ;; disable it on non-Intel platforms.
2020 (supported-systems '("x86_64-linux" "i686-linux"))
2021
47e1d280 2022 (license license:lgpl2.1+)))
f048f12b 2023
2024(define-public dotherside
2025 (package
2026 (name "dotherside")
53216881 2027 (version "0.6.4")
f048f12b 2028 (source
2029 (origin
d43f1732
EF
2030 (method git-fetch)
2031 (uri (git-reference
2032 (url "https://github.com/filcuc/DOtherSide")
2033 (commit (string-append "v" version))))
2034 (file-name (git-file-name name version))
f048f12b 2035 (sha256
2036 (base32
53216881 2037 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
f048f12b 2038 (build-system cmake-build-system)
2039 (native-inputs
2040 `(("qttools" ,qttools)))
2041 (inputs
2042 `(("qtbase" ,qtbase)
2043 ("qtdeclarative" ,qtdeclarative)))
96bdf904 2044 (home-page "https://filcuc.github.io/DOtherSide/index.html")
f048f12b 2045 (synopsis "C language library for creating bindings for the Qt QML language")
2046 (description
2047 "DOtherSide is a C language library for creating bindings for the
2048QT QML language. The following features are implementable from
2049a binding language:
2050@itemize
2051@item Creating custom QObject
2052@item Creating custom QAbstractListModels
2053@item Creating custom properties, signals and slots
2054@item Creating from QML QObject defined in the binded language
2055@item Creating from Singleton QML QObject defined in the binded language
2056@end itemize\n")
2057 (license license:lgpl3))) ;version 3 only (+ exception)
b16640ac
P
2058
2059;; There have been no public releases yet.
2060(define-public qtcolorwidgets
2061 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2062 (revision "1"))
2063 (package
2064 (name "qtcolorwidgets")
2065 (version (git-version "0" revision commit))
2066 (source (origin
2067 (method git-fetch)
2068 (uri (git-reference
2069 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2070 (commit commit)))
2071 (file-name (git-file-name name version))
2072 (sha256
2073 (base32
2074 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2075 (build-system cmake-build-system)
2076 (arguments `(#:tests? #f)) ; There are no tests
2077 (native-inputs
2078 `(("qttools" ,qttools)))
2079 (inputs
2080 `(("qtbase" ,qtbase)))
2081 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2082 (synopsis "Color management widgets")
2083 (description "QtColorWidgets provides a Qt color dialog that is more
2084user-friendly than the default @code{QColorDialog} and several other
2085color-related widgets.")
2086 ;; Includes a license exception for combining with GPL2 code.
2087 (license license:lgpl3+))))
37a3abb1
JS
2088
2089(define-public python-shiboken-2
2090 (let ((revision "1")
2091 ;; Pinned to branches with support for qt 5.11.3
2092 (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
2093 (package
2094 (name "python-shiboken-2")
2095 (version (git-version "v5.11.3" revision commit))
2096 (source
2097 (origin
2098 (method git-fetch)
2099 (uri (git-reference
2100 ;; The latest versions of Shiboken live in the pyside repo.
2101 ;; There is another standalone repo only for Shiboken
2102 ;; but it is outdated
2103 (url "https://code.qt.io/pyside/pyside-setup")
2104 (commit commit)))
2105 (file-name (git-file-name name version))
2106 (sha256
2107 (base32
2108 "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
2109 (build-system cmake-build-system)
2110 (inputs
162cc7f8 2111 `(("clang-toolchain" ,clang-toolchain-6)
37a3abb1
JS
2112 ("libxml2" ,libxml2)
2113 ("libxslt" ,libxslt)
2114 ("python-wrapper" ,python-wrapper)
2115 ("qtbase" ,qtbase)
2116 ("qtxmlpatterns" ,qtxmlpatterns)))
2117 (arguments
2118 `(#:tests? #f
2119 ;; FIXME: Building tests fails
2120 #:configure-flags '("-DBUILD_TESTS=off")
2121 #:phases
2122 (modify-phases %standard-phases
2123 (add-after 'unpack 'use-shiboken-dir-only
2124 (lambda _ (chdir "sources/shiboken2") #t))
2125 (add-before 'configure 'set-build-env
2126 (lambda* (#:key inputs #:allow-other-keys)
162cc7f8 2127 (let ((llvm (assoc-ref inputs "clang-toolchain")))
37a3abb1
JS
2128 (setenv "CLANG_INSTALL_DIR" llvm)
2129 #t))))))
2130 (home-page "https://wiki.qt.io/Qt_for_Python")
2131 (synopsis
2132 "Shiboken generates bindings for C++ libraries using CPython source code")
2133 (description
2134 "Shiboken generates bindings for C++ libraries using CPython source code")
2135 (license
2136 (list
2137 ;; The main code is GPL3 or LGPL3.
2138 ;; Examples are BSD-3.
2139 license:gpl3
2140 license:lgpl3
2141 license:bsd-3)))))
f1c4dbfa
JS
2142
2143(define-public python-pyside-2
2144 (let ((revision "1")
2145 ;; Pinned to branches with support for qt 5.11.3
2146 (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
2147 (package
2148 (name "python-pyside-2")
2149 (version (git-version "v5.11.3" revision commit))
2150 (source
2151 (origin
2152 (method git-fetch)
2153 (uri (git-reference
2154 (url "https://code.qt.io/pyside/pyside-setup")
2155 (commit commit)))
2156 (file-name (git-file-name name version))
2157 (sha256
2158 (base32
2159 "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
2160 (build-system cmake-build-system)
2161 (inputs
2162 `(("libcxx" ,libcxx-6)
2163 ("libxml2" ,libxml2)
2164 ("libxslt" ,libxslt)
43001931 2165 ("clang-toolchain" ,clang-toolchain-6)
f1c4dbfa
JS
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
43001931 2191 (modify-phases %standard-phases
f1c4dbfa
JS
2192 (add-after 'unpack 'go-to-source-dir
2193 (lambda _ (chdir "sources/pyside2") #t))
2194 (add-before 'configure 'set-clang-dir
2195 (lambda* (#:key inputs #:allow-other-keys)
43001931 2196 (let ((clang (assoc-ref inputs "clang-toolchain"))
f1c4dbfa
JS
2197 (libcxx (assoc-ref inputs "libcxx")))
2198 (setenv "CLANG_INSTALL_DIR" clang)
2199 (substitute* "cmake/Macros/PySideModules.cmake"
2200 (("--include-paths=")
2201 (string-append "--include-paths=" libcxx "/include/c++/v1:")))
2202 #t))))))
2203 (home-page "https://wiki.qt.io/Qt_for_Python")
2204 (synopsis
2205 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2206 (description
2207 "The Qt for Python product enables the use of Qt5 APIs in Python
2208applications. It lets Python developers utilize the full potential of Qt,
2209using the PySide2 module. The PySide2 module provides access to the
2210individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2211comes with the Shiboken2 CPython binding code generator, which can be used to
2212generate Python bindings for your C or C++ code.")
2213 (license (list
2214 license:lgpl3
2215 ;;They state that:
2216 ;; this file may be used under the terms of the GNU General
2217 ;; Public License version 2.0 or (at your option) the GNU
2218 ;; General Public license version 3 or any later version
2219 ;; approved by the KDE Free Qt Foundation.
2220 ;; Thus, it is currently v2 or v3, but no "+".
2221 license:gpl3
2222 license:gpl2)))))
2ea8b51a
JS
2223
2224(define-public python-pyside-2-tools
2225 (let ((revision "1")
2226 ;; Pinned to branches with support for qt 5.11.3
2227 (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
2228 (package
2229 (name "python-pyside-2-tools")
2230 (version (git-version "v5.11.2" revision commit))
2231 (source
2232 (origin
2233 (method git-fetch)
2234 (uri (git-reference
2235 (url "https://code.qt.io/pyside/pyside-tools")
2236 (commit commit)))
2237 (file-name (git-file-name name version))
2238 (sha256
2239 (base32
2240 "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
2241 (build-system cmake-build-system)
2242 (inputs
2243 `(("python-pyside-2" ,python-pyside-2)
2244 ("python-shiboken-2" ,python-shiboken-2)
2245 ("qtbase" ,qtbase)))
2246 (arguments
2247 `(#:tests? #f
2248 #:configure-flags '("-DBUILD_TESTS=off")))
2249 (home-page "https://wiki.qt.io/Qt_for_Python")
2250 (synopsis
2251 "Contains command line tools for PySide2")
2252 (description
2253 "Contains lupdate, rcc and uic tools for PySide2")
2254 (license license:gpl2))))