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