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