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