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