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