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