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