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