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