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