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