gnu: python-pyside-2: Fix build.
[jackhill/guix/guix.git] / gnu / packages / qt.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
7 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
10 ;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018, 2020, 2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
12 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
13 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
14 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
15 ;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
16 ;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
17 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
18 ;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
19 ;;; Copyright © 2020 TomZ <tomz@freedommail.ch>
20 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
21 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
22 ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
23 ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
24 ;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
25 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
26 ;;; Copyright © 2022 Foo Chuan Wei <chuanwei.foo@hotmail.com>
27 ;;;
28 ;;; This file is part of GNU Guix.
29 ;;;
30 ;;; GNU Guix is free software; you can redistribute it and/or modify it
31 ;;; under the terms of the GNU General Public License as published by
32 ;;; the Free Software Foundation; either version 3 of the License, or (at
33 ;;; your option) any later version.
34 ;;;
35 ;;; GNU Guix is distributed in the hope that it will be useful, but
36 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;;; GNU General Public License for more details.
39 ;;;
40 ;;; You should have received a copy of the GNU General Public License
41 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
42
43 (define-module (gnu packages qt)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix packages)
46 #:use-module (guix download)
47 #:use-module (guix git-download)
48 #:use-module (guix build-system cmake)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system trivial)
51 #:use-module (guix build-system python)
52 #:use-module (guix build-system qt)
53 #:use-module (guix gexp)
54 #:use-module (guix packages)
55 #:use-module (guix deprecation)
56 #:use-module (guix utils)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages bash)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages bison)
61 #:use-module (gnu packages cmake)
62 #:use-module (gnu packages compression)
63 #:use-module (gnu packages cups)
64 #:use-module (gnu packages curl)
65 #:use-module (gnu packages databases)
66 #:use-module (gnu packages documentation)
67 #:use-module (gnu packages enchant)
68 #:use-module (gnu packages fontutils)
69 #:use-module (gnu packages flex)
70 #:use-module (gnu packages freedesktop)
71 #:use-module (gnu packages gcc)
72 #:use-module (gnu packages ghostscript)
73 #:use-module (gnu packages gl)
74 #:use-module (gnu packages glib)
75 #:use-module (gnu packages gnome)
76 #:use-module (gnu packages gnupg)
77 #:use-module (gnu packages gperf)
78 #:use-module (gnu packages graphics)
79 #:use-module (gnu packages gstreamer)
80 #:use-module (gnu packages gtk)
81 #:use-module (gnu packages icu4c)
82 #:use-module (gnu packages image)
83 #:use-module (gnu packages kde-frameworks)
84 #:use-module (gnu packages libevent)
85 #:use-module (gnu packages linux)
86 #:use-module (gnu packages llvm)
87 #:use-module (gnu packages maths)
88 #:use-module (gnu packages markup)
89 #:use-module (gnu packages networking)
90 #:use-module (gnu packages ninja)
91 #:use-module (gnu packages node)
92 #:use-module (gnu packages nss)
93 #:use-module (gnu packages pciutils)
94 #:use-module (gnu packages pcre)
95 #:use-module (gnu packages perl)
96 #:use-module (gnu packages pkg-config)
97 #:use-module (gnu packages pulseaudio)
98 #:use-module (gnu packages protobuf)
99 #:use-module (gnu packages python)
100 #:use-module (gnu packages python-build)
101 #:use-module (gnu packages python-xyz)
102 #:use-module (gnu packages python-web)
103 #:use-module (gnu packages regex)
104 #:use-module (gnu packages ruby)
105 #:use-module (gnu packages sdl)
106 #:use-module (gnu packages serialization)
107 #:use-module (gnu packages sqlite)
108 #:use-module (gnu packages telephony)
109 #:use-module (gnu packages tls)
110 #:use-module (gnu packages valgrind)
111 #:use-module (gnu packages video)
112 #:use-module (gnu packages vulkan)
113 #:use-module (gnu packages xdisorg)
114 #:use-module (gnu packages xiph)
115 #:use-module (gnu packages xorg)
116 #:use-module (gnu packages xml)
117 #:use-module (srfi srfi-1))
118
119 (define-public qite
120 (let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
121 (revision "74"))
122 (package
123 (name "qite")
124 (version (git-version "0" revision commit))
125 (source
126 (origin
127 (method git-fetch)
128 (uri
129 (git-reference
130 (url "https://github.com/Ri0n/qite")
131 (commit commit)))
132 (file-name (git-file-name name version))
133 (sha256
134 (base32 "0jmmgy9pvk9hwwph1nwy7hxhczy8drhl4ymhnjjn6yx7bckssvsq"))))
135 (build-system qt-build-system)
136 (arguments
137 `(#:tests? #f ; no target
138 #:phases
139 (modify-phases %standard-phases
140 (add-after 'unpack 'chdir
141 (lambda _
142 (chdir "libqite")
143 #t)))))
144 (inputs
145 (list qtbase-5 qtmultimedia-5))
146 (home-page "https://github.com/Ri0n/qite/")
147 (synopsis "Qt Interactive Text Elements")
148 (description "Qite manages interactive elements on QTextEdit.")
149 (license license:asl2.0))))
150
151 (define-public qt5ct
152 (package
153 (name "qt5ct")
154 (version "1.5")
155 (source
156 (origin
157 (method url-fetch)
158 (uri
159 (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
160 (sha256
161 (base32 "14742vs32m98nbfb5mad0i8ciff5f45gfcb5v03p4hh2dvhhqgfn"))))
162 (build-system qt-build-system)
163 (arguments
164 (list
165 #:tests? #f ; No target
166 #:phases
167 #~(modify-phases %standard-phases
168 (add-after 'unpack 'patch
169 (lambda _
170 (substitute* '("src/qt5ct-qtplugin/CMakeLists.txt"
171 "src/qt5ct-style/CMakeLists.txt")
172 (("\\$\\{PLUGINDIR\\}")
173 (string-append #$output "/lib/qt5/plugins"))))))))
174 (native-inputs
175 (list qttools-5))
176 (inputs
177 (list qtsvg-5))
178 (synopsis "Qt5 Configuration Tool")
179 (description "Qt5CT is a program that allows users to configure Qt5
180 settings (such as icons, themes, and fonts) in desktop environments or
181 window managers, that don't provide Qt integration by themselves.")
182 (home-page "https://qt5ct.sourceforge.io/")
183 (license license:bsd-2)))
184
185 (define-public materialdecoration
186 (let ((commit "6a5de23f2e5162fbee39d16f938473ff970a2ec0")
187 (revision "9"))
188 (package
189 (name "materialdecoration")
190 (version
191 (git-version "1.1.0" revision commit))
192 (source
193 (origin
194 (method git-fetch)
195 (uri
196 (git-reference
197 (url "https://github.com/lirios/materialdecoration.git")
198 (commit commit)))
199 (file-name
200 (git-file-name name version))
201 (sha256
202 (base32 "1zdrcb39fhhmn76w8anv1dnspz26pdl6izmj1mlm02aza4y8ffp4"))
203 (modules '((guix build utils)
204 (ice-9 ftw)
205 (srfi srfi-1)))
206 (snippet
207 `(begin
208 (delete-file-recursively "cmake/3rdparty")))))
209 (build-system qt-build-system)
210 (arguments
211 `(#:tests? #f ; No target
212 #:configure-flags
213 ,#~(list
214 (string-append "-DCMAKE_CXX_FLAGS=-I"
215 #$(this-package-input "qtbase")
216 "/include/qt5/QtXkbCommonSupport/"
217 #$(package-version qtbase-5)))))
218 (native-inputs
219 (list cmake-shared extra-cmake-modules pkg-config))
220 (inputs
221 `(("qtbase" ,qtbase-5)
222 ("qtwayland" ,qtwayland)
223 ("wayland" ,wayland)
224 ("xkbcommon" ,libxkbcommon)))
225 (synopsis "Material Decoration for Qt")
226 (description "MaterialDecoration is a client-side decoration for Qt
227 applications on Wayland.")
228 (home-page "https://github.com/lirios/materialdecoration")
229 (license license:lgpl3+))))
230
231 (define-public grantlee
232 (package
233 (name "grantlee")
234 (version "5.2.0")
235 (source
236 (origin
237 (method git-fetch)
238 (uri (git-reference
239 (url "https://github.com/steveire/grantlee")
240 (commit (string-append "v" version))))
241 (file-name (git-file-name name version))
242 (sha256
243 (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
244 (native-inputs
245 ;; Optional: lcov and cccc, both are for code coverage
246 (list doxygen))
247 (inputs
248 (list qtbase-5 qtdeclarative-5 qtscript))
249 (build-system cmake-build-system)
250 (arguments
251 `(#:phases
252 (modify-phases %standard-phases
253 (add-before 'check 'check-setup
254 (lambda _
255 ;; make Qt render "offscreen", required for tests
256 (setenv "QT_QPA_PLATFORM" "offscreen")
257 #t)))))
258 (home-page "https://github.com/steveire/grantlee")
259 (synopsis "Libraries for text templating with Qt")
260 (description "Grantlee Templates can be used for theming and generation of
261 other text such as code. The syntax uses the syntax of the Django template
262 system, and the core design of Django is reused in Grantlee.")
263 (license license:lgpl2.1+)))
264
265 (define (qt5-urls component version)
266 "Return a list of URLs for VERSION of the Qt5 COMPONENT."
267 ;; We can't use a mirror:// scheme because these URLs are not exact copies:
268 ;; the layout differs between them.
269 (list (string-append "https://download.qt.io/official_releases/qt/"
270 (version-major+minor version) "/" version
271 "/submodules/" component "-everywhere-src-"
272 version ".tar.xz")
273 (string-append "https://download.qt.io/archive/qt/"
274 (version-major+minor version) "/" version
275 "/submodules/" component "-everywhere-src-"
276 version ".tar.xz")
277 (let ((directory (string-append "qt5" (string-drop component 2))))
278 (string-append "http://sources.buildroot.net/" directory "/"
279 component "-everywhere-src-" version ".tar.xz"))
280 (string-append "https://distfiles.macports.org/qt5/"
281 component "-everywhere-src-" version ".tar.xz")))
282
283 (define-public qtbase-5
284 (package
285 (name "qtbase")
286 (version "5.15.2")
287 (source (origin
288 (method url-fetch)
289 (uri (qt5-urls name version))
290 (sha256
291 (base32
292 "1y70libf2x52lpbqvhz10lpk7nyl1ajjwzjxly9pjdpfj4jsv7wh"))
293 ;; Use TZDIR to avoid depending on package "tzdata".
294 (patches (search-patches "qtbase-use-TZDIR.patch"
295 "qtbase-moc-ignore-gcc-macro.patch"
296 "qtbase-absolute-runpath.patch"))
297 (modules '((guix build utils)))
298 (snippet
299 ;; corelib uses bundled harfbuzz, md4, md5, sha3
300 '(begin
301 (with-directory-excursion "src/3rdparty"
302 (for-each delete-file-recursively
303 (list "double-conversion" "freetype" "harfbuzz-ng"
304 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
305 "zlib")))))))
306 (build-system gnu-build-system)
307 (outputs '("out" "debug"))
308 (propagated-inputs
309 (list mesa
310 ;; Use which the package, not the function
311 (@ (gnu packages base) which)))
312 (inputs
313 `(("alsa-lib" ,alsa-lib)
314 ("cups" ,cups)
315 ("dbus" ,dbus)
316 ("double-conversion" ,double-conversion)
317 ("eudev" ,eudev)
318 ("expat" ,expat)
319 ("fontconfig" ,fontconfig)
320 ("freetype" ,freetype)
321 ("glib" ,glib)
322 ("gtk+" ,gtk+) ;for GTK theme support
323 ("harfbuzz" ,harfbuzz)
324 ("icu4c" ,icu4c)
325 ("libinput" ,libinput-minimal)
326 ("libjpeg" ,libjpeg-turbo)
327 ("libmng" ,libmng)
328 ("libpng" ,libpng)
329 ("libx11" ,libx11)
330 ("libxcomposite" ,libxcomposite)
331 ("libxcursor" ,libxcursor)
332 ("libxfixes" ,libxfixes)
333 ("libxi" ,libxi)
334 ("libxinerama" ,libxinerama)
335 ("libxkbcommon" ,libxkbcommon)
336 ("libxml2" ,libxml2)
337 ("libxrandr" ,libxrandr)
338 ("libxrender" ,libxrender)
339 ("libxslt" ,libxslt)
340 ("libxtst" ,libxtst)
341 ("mtdev" ,mtdev)
342 ("mariadb-dev" ,mariadb "dev")
343 ("nss" ,nss)
344 ("openssl" ,openssl)
345 ("pcre2" ,pcre2)
346 ;; TODO: Switch to 'postgres' in the next rebuild cycle.
347 ("postgresql" ,postgresql-13)
348 ("pulseaudio" ,pulseaudio)
349 ("sqlite" ,sqlite)
350 ("unixodbc" ,unixodbc)
351 ("xcb-util" ,xcb-util)
352 ("xcb-util-image" ,xcb-util-image)
353 ("xcb-util-keysyms" ,xcb-util-keysyms)
354 ("xcb-util-renderutil" ,xcb-util-renderutil)
355 ("xcb-util-wm" ,xcb-util-wm)
356 ("xdg-utils" ,xdg-utils)
357 ("zlib" ,zlib)))
358 (native-inputs
359 (list bison
360 flex
361 gperf
362 perl
363 pkg-config
364 python
365 vulkan-headers
366 ruby))
367 (arguments
368 `(#:configure-flags
369 (let ((out (assoc-ref %outputs "out")))
370 (list "-verbose"
371 "-prefix" out
372 "-docdir" (string-append out "/share/doc/qt5")
373 "-headerdir" (string-append out "/include/qt5")
374 "-archdatadir" (string-append out "/lib/qt5")
375 "-datadir" (string-append out "/share/qt5")
376 "-examplesdir" (string-append
377 out "/share/doc/qt5/examples")
378 "-opensource"
379 "-confirm-license"
380
381 ;; Later stripped into the :debug output.
382 "-force-debug-info"
383
384 ;; These features require higher versions of Linux than the
385 ;; minimum version of the glibc. See
386 ;; src/corelib/global/minimum-linux_p.h. By disabling these
387 ;; features Qt5 applications can be used on the oldest
388 ;; kernels that the glibc supports, including the RHEL6
389 ;; (2.6.32) and RHEL7 (3.10) kernels.
390 "-no-feature-getentropy" ; requires Linux 3.17
391 "-no-feature-renameat2" ; requires Linux 3.16
392
393 ;; Do not build examples; if desired, these could go
394 ;; into a separate output, but for the time being, we
395 ;; prefer to save the space and build time.
396 "-no-compile-examples"
397 ;; Most "-system-..." are automatic, but some use
398 ;; the bundled copy by default.
399 "-system-sqlite"
400 "-system-harfbuzz"
401 "-system-pcre"
402 ;; explicitly link with openssl instead of dlopening it
403 "-openssl-linked"
404 ;; explicitly link with dbus instead of dlopening it
405 "-dbus-linked"
406 ;; don't use the precompiled headers
407 "-no-pch"
408 ;; drop special machine instructions that do not have
409 ;; runtime detection
410 ,@(if (string-prefix? "x86_64"
411 (or (%current-target-system)
412 (%current-system)))
413 '()
414 '("-no-sse2"))
415 "-no-mips_dsp"
416 "-no-mips_dspr2"))
417 #:phases
418 (modify-phases %standard-phases
419 (add-after 'configure 'patch-bin-sh
420 (lambda _
421 (substitute* '("config.status"
422 "configure"
423 "mkspecs/features/qt_functions.prf"
424 "qmake/library/qmakebuiltins.cpp")
425 (("/bin/sh") (which "sh")))))
426 (add-after 'configure 'patch-xdg-open
427 (lambda _
428 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
429 (("^.*const char \\*browsers.*$" all)
430 (string-append "*browser = QStringLiteral(\""
431 (which "xdg-open")
432 "\"); return true; \n" all)))))
433 (replace 'configure
434 ;; Overridden to not pass "--enable-fast-install", which makes the
435 ;; configure process fail.
436 (lambda* (#:key outputs configure-flags #:allow-other-keys)
437 (let ((out (assoc-ref outputs "out")))
438 (substitute* "configure"
439 (("/bin/pwd") (which "pwd")))
440 (substitute* "src/corelib/global/global.pri"
441 (("/bin/ls") (which "ls")))
442 ;; The configuration files for other Qt5 packages are searched
443 ;; through a call to "find_package" in Qt5Config.cmake, which
444 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
445 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
446 ;; components can be installed in different places.
447 (substitute* (find-files "." ".*\\.cmake")
448 (("NO_DEFAULT_PATH") ""))
449 (format #t "build directory: ~s~%" (getcwd))
450 (format #t "configure flags: ~s~%" configure-flags)
451 (apply invoke "./configure" configure-flags))))
452 (add-after 'install 'patch-mkspecs
453 (lambda* (#:key outputs #:allow-other-keys)
454 (let* ((out (assoc-ref outputs "out"))
455 (archdata (string-append out "/lib/qt5"))
456 (mkspecs (string-append archdata "/mkspecs"))
457 (qt_config.prf (string-append
458 mkspecs "/features/qt_config.prf")))
459 ;; For each Qt module, let `qmake' uses search paths in the
460 ;; module directory instead of all in QT_INSTALL_PREFIX.
461 (substitute* qt_config.prf
462 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
463 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
464 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
465 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
466 (("\\$\\$\\[QT_HOST_LIBS\\]")
467 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
468 (("\\$\\$\\[QT_INSTALL_BINS\\]")
469 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
470
471 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
472 (substitute* (string-append mkspecs "/features/qt_functions.prf")
473 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
474 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
475
476 ;; Resolve qmake spec files within qtbase by absolute paths.
477 (substitute*
478 (map (lambda (file)
479 (string-append mkspecs "/features/" file))
480 '("device_config.prf" "moc.prf" "qt_build_config.prf"
481 "qt_config.prf" "winrt/package_manifest.prf"))
482 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
483 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))
484 (add-after 'patch-mkspecs 'patch-prl-files
485 (lambda* (#:key outputs #:allow-other-keys)
486 (let ((out (assoc-ref outputs "out")))
487 ;; Insert absolute references to the qtbase libraries because
488 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
489 ;; on context. See <https://bugs.gnu.org/38405>
490 (substitute* (find-files (string-append out "/lib") "\\.prl$")
491 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
492 (string-append out "/lib"))))))
493 (add-after 'unpack 'patch-paths
494 ;; Use the absolute paths for dynamically loaded libs, otherwise
495 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
496 ;; not set in guix.
497 (lambda* (#:key inputs #:allow-other-keys)
498 ;; libresolve
499 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
500 "cross-libc" "libc"))))
501 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
502 "src/network/kernel/qhostinfo_unix.cpp")
503 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
504 (string-append a glibc "/lib/lib" b))))
505 ;; libGL
506 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
507 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
508 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
509 ;; libXcursor
510 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
511 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
512 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
513 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
514 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))))))))
515 (native-search-paths
516 (list (search-path-specification
517 (variable "QMAKEPATH")
518 (files '("lib/qt5")))
519 (search-path-specification
520 (variable "QML2_IMPORT_PATH")
521 (files '("lib/qt5/qml")))
522 (search-path-specification
523 (variable "QT_PLUGIN_PATH")
524 (files '("lib/qt5/plugins")))
525 (search-path-specification
526 (variable "XDG_DATA_DIRS")
527 (files '("share")))
528 (search-path-specification
529 (variable "XDG_CONFIG_DIRS")
530 (files '("etc/xdg")))))
531 (home-page "https://www.qt.io/")
532 (synopsis "Cross-platform GUI library")
533 (description "Qt is a cross-platform application and UI framework for
534 developers using C++ or QML, a CSS & JavaScript like language.")
535 (license (list license:lgpl2.1 license:lgpl3))))
536
537 (define-public qtbase
538 (package/inherit qtbase-5
539 (name "qtbase")
540 (version "6.3.1")
541 (source (origin
542 (inherit (package-source qtbase-5))
543 (uri (qt5-urls name version))
544 (sha256
545 (base32
546 "00sfya41ihqb0zwg6wf1kiy02iymj6mk584hhk2c4s94khfl4r0a"))
547 (modules '((guix build utils)))
548 (snippet
549 ;; corelib uses bundled harfbuzz, md4, md5, sha3
550 '(with-directory-excursion "src/3rdparty"
551 (for-each delete-file-recursively
552 ;; The bundled pcre2 copy is kept, as its headers
553 ;; are required by some internal bootstrap target
554 ;; used for the tools.
555 (list "double-conversion" "freetype" "harfbuzz-ng"
556 "libpng" "libjpeg" "sqlite" "xcb" "zlib"))))))
557 (build-system cmake-build-system)
558 (arguments
559 (substitute-keyword-arguments (package-arguments qtbase-5)
560 ((#:configure-flags _ ''())
561 `(let ((out (assoc-ref %outputs "out")))
562 (list "-GNinja" ;the build fails otherwise
563 "-DQT_BUILD_TESTS=ON"
564 (string-append "-DINSTALL_ARCHDATADIR=" out "/lib/qt6")
565 (string-append "-DINSTALL_DATADIR=" out "/share/qt6")
566 (string-append "-DINSTALL_DOCDIR=" out "/share/doc/qt6")
567 (string-append "-DINSTALL_MKSPECSDIR=" out "/lib/qt6/mkspecs")
568 (string-append "-DINSTALL_EXAMPLESDIR=" out
569 "/share/doc/qt6/examples")
570 (string-append "-DINSTALL_INCLUDEDIR=" out "/include/qt6")
571 ;; Link with DBus and OpenSSL so they don't get dlopen'ed.
572 "-DINPUT_dbus=linked"
573 "-DINPUT_openssl=linked"
574 ;; These features require higher versions of Linux than the
575 ;; minimum version of the glibc. See
576 ;; src/corelib/global/minimum-linux_p.h. By disabling these
577 ;; features Qt applications can be used on the oldest kernels
578 ;; that the glibc supports, including the RHEL6 (2.6.32) and
579 ;; RHEL7 (3.10) kernels.
580 "-DFEATURE_getentropy=OFF" ; requires Linux 3.17
581 "-DFEATURE_renameat2=OFF" ; requires Linux 3.16
582 ;; Most system libraries are used by default, except in some
583 ;; cases such as for those below.
584 "-DFEATURE_system_pcre2=ON"
585 "-DFEATURE_system_sqlite=ON"
586 "-DFEATURE_system_xcb_xinput=ON"
587 ;; Don't use the precompiled headers.
588 "-DBUILD_WITH_PCH=OFF"
589 ;; Drop special machine instructions that do not have runtime
590 ;; detection.
591 ,@(if (string-prefix? "x86_64"
592 (or (%current-target-system)
593 (%current-system)))
594 '() ;implicitly enabled
595 '("-DFEATURE_sse2=OFF"
596 "-DFEATURE_sse3=OFF"
597 "-DFEATURE_ssse3=OFF"
598 "-DFEATURE_sse4_1=OFF"
599 "-DFEATURE_sse4_2=OFF"))
600 "-DFEATURE_mips_dsp=OFF"
601 "-DFEATURE_mips_dspr2=OFF")))
602 ((#:phases phases)
603 #~(modify-phases #$phases
604 (add-after 'unpack 'honor-CMAKE_PREFIX_PATH
605 (lambda _
606 ;; The configuration files for other Qt packages are searched
607 ;; through a call to "find_package" in Qt5Config.cmake, which
608 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
609 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
610 ;; components can be installed in different places.
611 (substitute* (find-files "." "\\.cmake(\\.in)?$")
612 (("\\bNO_DEFAULT_PATH\\b") ""))
613 ;; Because Qt goes against the grain of CMake and set
614 ;; NO_DEFAULT_PATH, it needs to invent yet another variable
615 ;; to do what CMAKE_PREFIX_PATH could have done:
616 ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH. Since we patch out
617 ;; the NO_DEFAULT_PATH, we can set the default value of
618 ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH to that of
619 ;; CMAKE_PREFIX_PATH to ensure tools such as
620 ;; 'qmlimportscanner' from qtdeclarative work out of the
621 ;; box.
622 (substitute* "cmake/QtConfig.cmake.in"
623 (("(set\\(QT_ADDITIONAL_PACKAGES_PREFIX_PATH )\"\"" _ head)
624 (string-append head "\"$ENV{CMAKE_PREFIX_PATH}\"")))))
625 (delete 'patch-bin-sh)
626 (delete 'patch-xdg-open)
627 (add-after 'patch-paths 'patch-more-paths
628 (lambda* (#:key inputs #:allow-other-keys)
629 (substitute* (find-files "bin" "\\.in$")
630 (("/bin/pwd")
631 (search-input-file inputs "bin/pwd")))
632 (substitute* "src/gui/platform/unix/qgenericunixservices.cpp"
633 (("\"xdg-open\"")
634 (format #f "~s" (search-input-file inputs "bin/xdg-open"))))
635 (substitute* '("mkspecs/features/qt_functions.prf"
636 "qmake/library/qmakebuiltins.cpp")
637 (("/bin/sh")
638 (search-input-file inputs "bin/bash")))
639 (substitute* "src/corelib/CMakeLists.txt"
640 (("/bin/ls")
641 (search-input-file inputs "bin/ls")))))
642 (replace 'configure
643 (assoc-ref %standard-phases 'configure))
644 (replace 'build
645 (lambda* (#:key parallel-build? #:allow-other-keys)
646 (apply invoke "cmake" "--build" "."
647 (if parallel-build?
648 `("--parallel" ,(number->string (parallel-job-count)))
649 '()))))
650 (delete 'check) ;move after patch-prl-files
651 (add-after 'patch-prl-files 'check
652 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
653 (when tests?
654 ;; The tests expect to find the modules provided by this
655 ;; package; extend the environment variables needed to do so.
656 (setenv "CMAKE_PREFIX_PATH"
657 (string-append #$output
658 ":" (getenv "CMAKE_PREFIX_PATH")))
659 (setenv "QMAKEPATH" (string-append #$output "/lib/qt6"))
660 (setenv "QML2_IMPORT_PATH"
661 (string-append #$output "/lib/qt6/qml"))
662 (setenv "QT_PLUGIN_PATH"
663 (string-append #$output "/lib/qt6/plugins"))
664 (setenv "QT_QPA_PLATFORM" "offscreen")
665 ;; Skip tests known to fail on GNU/Linux, in a CI context or
666 ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
667 ;; /tree/src/testlib/qtestblacklist.cpp).
668 (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
669 (setenv "HOME" "/tmp") ;some tests require a writable HOME
670 (invoke
671 "xvfb-run" "ctest" "--output-on-failure"
672 "-j" (if parallel-tests?
673 (number->string (parallel-job-count))
674 "1")
675 "-E" ;disable problematic tests
676 (string-append
677 "("
678 (string-join
679 (list
680 ;; The 'tst_moc' test fails with "'fi.exists()' returned FALSE".
681 "tst_moc"
682 ;; The 'test_rcc' test fails on a comparison:
683 ;; <<<<<< actual
684 ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xe8,
685 ;; ======
686 ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
687 ;; >>>>>> expected
688 "tst_rcc"
689 ;; The 'tst_qtemporarydir' and 'tst_qtemporaryfile'
690 ;; tests depend on '/home' not being writable.
691 "tst_qtemporarydir"
692 "tst_qtemporaryfile"
693 ;; The 'tst_qdir' compares two directories which are
694 ;; unexpectedly different when inside the build
695 ;; container.
696 "tst_qdir"
697 ;; This checks the last modified time of '/', and fails
698 ;; because Epoch 0 is considered to be invalid.
699 "tst_qresourceengine"
700 ;; The 'tst_qfilesystemwatcher' installs a watcher on
701 ;; '/home', which doesn't exist in the build container.
702 "tst_qfilesystemwatcher"
703 ;; The 'mockplugins' test fail following error: "Unknown
704 ;; platform linux-g++", and the other plugin tests
705 ;; depend on it.
706 "mockplugins"
707 "test_plugin_flavor.*"
708 ;; The 'test_import_plugins' fails with "Could NOT find
709 ;; Qt6MockPlugins1".
710 "test_import_plugins"
711 ;; The 'tst_QTimeZone::systemZone' validates the
712 ;; currently set timezone and fails.
713 "tst_qtimezone"
714 ;; The 'tst_qdatetime' fails with:
715 ;; FAIL! : tst_QDateTime::offsetFromUtc() Compared values are not the same
716 ;; Actual (dt5.offsetFromUtc()): 0
717 ;; Expected (46800) : 46800
718 "tst_qdatetime"
719 ;; The 'tst_QSettings::fromFile' assumes the data
720 ;; location to be relative to the root directory and
721 ;; fails.
722 "tst_qsettings"
723 ;; The 'tst_qaddpreroutine',
724 ;; 'test_generating_cpp_exports' and
725 ;; 'test_static_resources' tests fail with: "Unknown
726 ;; platform linux-g++.
727 "tst_qaddpreroutine"
728 "test_generating_cpp_exports"
729 "test_static_resources"
730 ;; The 'tst_qfile' fails since there is no /home in the
731 ;; build container.
732 "tst_qfile"
733 ;; The 'tst_QGlyphRun::mixedScripts' test fails with:
734 ;; Actual (glyphRuns.size()): 1
735 ;; Expected (2) : 2
736 "tst_qglyphrun"
737 ;; The 'tst_qx11info' test fails with "Internal error:
738 ;; QPA plugin doesn't implement generatePeekerId",
739 ;; likely requires a real display.
740 "tst_qx11info"
741 ;; The 'tst_qgraphicswidget' test fails because "This
742 ;; plugin does not support propagateSizeHints".
743 "tst_qgraphicswidget"
744 ;; The 'tst_qdnslookup' test requires networking.
745 "tst_qdnslookup"
746 ;; The 'tst_qcompleter' and 'tst_QFiledialog::completer'
747 ;; attempt to complete paths they assume exist, such as
748 ;; "/home", "/etc" or "/root" and fail.
749 "tst_qcompleter"
750 "tst_qfiledialog") "|")
751 ")")))))
752 (replace 'install
753 (lambda _
754 (invoke "cmake" "--install" ".")))
755 (replace 'patch-mkspecs
756 (lambda* (#:key outputs #:allow-other-keys)
757 (let* ((archdata (search-input-directory outputs "lib/qt6"))
758 (mkspecs (search-input-directory outputs
759 "lib/qt6/mkspecs"))
760 (qt_config.prf
761 (search-input-file
762 outputs "lib/qt6/mkspecs/features/qt_config.prf"))
763 (qt_functions.prf
764 (search-input-file
765 outputs "lib/qt6/mkspecs/features/qt_functions.prf")))
766 ;; For each Qt module, let `qmake' uses search paths in the
767 ;; module directory instead of all in QT_INSTALL_PREFIX.
768 (substitute* qt_config.prf
769 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
770 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt6))")
771 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
772 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
773 (("\\$\\$\\[QT_HOST_LIBS\\]")
774 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
775 (("\\$\\$\\[QT_INSTALL_BINS\\]")
776 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
777
778 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
779 (substitute* qt_functions.prf
780 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
781 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
782
783 ;; Resolve qmake spec files within qtbase by absolute paths.
784 (substitute*
785 (map (lambda (file)
786 (search-input-file
787 outputs
788 (string-append "lib/qt6/mkspecs/features/" file)))
789 '("device_config.prf" "moc.prf" "qt_build_config.prf"
790 "qt_config.prf"))
791 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
792 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))))))
793 (native-inputs
794 (modify-inputs (package-native-inputs qtbase-5)
795 (prepend ninja
796 wayland-protocols
797 xvfb-run)))
798 (inputs
799 (modify-inputs (package-inputs qtbase-5)
800 (prepend bash-minimal coreutils-minimal libxcb md4c)
801 (replace "postgresql" postgresql))) ;use latest postgresql
802 (native-search-paths
803 (list (search-path-specification
804 (variable "QMAKEPATH")
805 (files '("lib/qt6")))
806 (search-path-specification
807 (variable "QML2_IMPORT_PATH")
808 (files '("lib/qt6/qml")))
809 (search-path-specification
810 (variable "QT_PLUGIN_PATH")
811 (files '("lib/qt6/plugins")))
812 (search-path-specification
813 (variable "XDG_DATA_DIRS")
814 (files '("share")))
815 (search-path-specification
816 (variable "XDG_CONFIG_DIRS")
817 (files '("etc/xdg")))))))
818
819 (define-public qt5compat
820 (package
821 (name "qt5compat")
822 (version "6.3.1")
823 (source (origin
824 (method url-fetch)
825 (uri (qt5-urls name version))
826 (sha256
827 (base32
828 "1zbcaswpl79ixcxzj85qzjq73962s4c7316pibwfrskqswmwcgm4"))))
829 (build-system cmake-build-system)
830 (arguments
831 (list
832 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
833 #:phases #~(modify-phases %standard-phases
834 (add-after 'install 'delete-installed-tests
835 (lambda _
836 (delete-file-recursively
837 (string-append #$output "/tests")))))))
838 (native-inputs (list perl))
839 (inputs (list icu4c libxkbcommon qtbase qtdeclarative qtshadertools))
840 (home-page (package-home-page qtbase))
841 (synopsis "Legacy Qt 5 APIs ported to Qt 6")
842 (description "The @code{qt5compat} package includes application
843 programming interfaces (APIs) from Qt 5 that were ported to Qt 6, to ease
844 migration. It provides for example the @code{GraphicalEffects} module that
845 came with the @{qtgraphicaleffects} Qt 5 package.")
846 (license (list license:gpl2+ license:lgpl3+)))) ;dual licensed
847
848 (define-public qtsvg-5
849 (package
850 (inherit qtbase-5)
851 (name "qtsvg")
852 (version "5.15.2")
853 (source (origin
854 (method url-fetch)
855 (uri (qt5-urls name version))
856 (sha256
857 (base32
858 "0pjqrdmd1991x9h4rl8sf81pkd89hfd5h1a2gp3fjw96pk0w5hwb"))))
859 (propagated-inputs `())
860 (native-inputs (list perl))
861 (inputs
862 (list mesa qtbase-5 zlib))
863 (arguments
864 `(#:phases
865 (modify-phases %standard-phases
866 (add-before 'configure 'configure-qmake
867 (lambda* (#:key inputs outputs #:allow-other-keys)
868 (let* ((out (assoc-ref outputs "out"))
869 (qtbase (assoc-ref inputs "qtbase"))
870 (tmpdir (string-append (getenv "TMPDIR")))
871 (qmake (string-append tmpdir "/qmake"))
872 (qt.conf (string-append tmpdir "/qt.conf")))
873 ;; Use qmake with a customized qt.conf to override install
874 ;; paths to $out.
875 (symlink (which "qmake") qmake)
876 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
877 (with-output-to-file qt.conf
878 (lambda ()
879 (format #t "[Paths]
880 Prefix=~a
881 ArchData=lib/qt5
882 Data=share/qt5
883 Documentation=share/doc/qt5
884 Headers=include/qt5
885 Libraries=lib
886 LibraryExecutables=lib/qt5/libexec
887 Binaries=bin
888 Tests=tests
889 Plugins=lib/qt5/plugins
890 Imports=lib/qt5/imports
891 Qml2Imports=lib/qt5/qml
892 Translations=share/qt5/translations
893 Settings=etc/xdg
894 Examples=share/doc/qt5/examples
895 HostPrefix=~a
896 HostData=lib/qt5
897 HostBinaries=bin
898 HostLibraries=lib
899
900 [EffectiveSourcePaths]
901 HostPrefix=~a
902 HostData=lib/qt5
903 " out out qtbase)))
904 #t)))
905 (replace 'configure
906 (lambda* (#:key inputs outputs #:allow-other-keys)
907 ;; Valid QT_BUILD_PARTS variables are:
908 ;; libs tools tests examples demos docs translations
909 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
910 (add-before 'check 'set-display
911 (lambda _
912 ;; make Qt render "offscreen", required for tests
913 (setenv "QT_QPA_PLATFORM" "offscreen")
914 #t)))))
915 (synopsis "Qt module for displaying SVGs")
916 (description "The QtSvg module provides classes for displaying the
917 contents of SVG files.")))
918
919 (define-public qtsvg
920 (package
921 (name "qtsvg")
922 (version "6.3.1")
923 (source (origin
924 (method url-fetch)
925 (uri (qt5-urls name version))
926 (sha256
927 (base32
928 "1xvxz2jfpr1al85rhwss7ji5vkxa812d0b888hry5f7pwqcg86bv"))))
929 (build-system cmake-build-system)
930 (arguments
931 (list
932 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
933 #:phases
934 #~(modify-phases %standard-phases
935 (add-before 'check 'set-display
936 (lambda _
937 ;; Make Qt render "offscreen", required for tests.
938 (setenv "QT_QPA_PLATFORM" "offscreen")))
939 (add-after 'install 'delete-installed-tests
940 (lambda _
941 (delete-file-recursively (string-append #$output "/tests")))))))
942 (native-inputs (list perl))
943 (inputs (list libxkbcommon mesa qtbase zlib))
944 (synopsis "Qt module for displaying SVGs")
945 (description "The QtSvg module provides classes for displaying the
946 contents of SVG files.")
947 (home-page (package-home-page qtbase))
948 (license (package-license qtbase))))
949
950 (define-public qtimageformats
951 (package (inherit qtsvg-5)
952 (name "qtimageformats")
953 (version "5.15.2")
954 (source (origin
955 (method url-fetch)
956 (uri (qt5-urls name version))
957 (sha256
958 (base32
959 "1msk8a0z8rr16hkp2fnv668vf6wayiydqgc2mcklaa04rv3qb0mz"))
960 (modules '((guix build utils)))
961 (snippet
962 '(begin
963 (delete-file-recursively "src/3rdparty")
964 #t))))
965 (arguments
966 (substitute-keyword-arguments (package-arguments qtsvg-5)
967 ((#:phases phases)
968 `(modify-phases ,phases
969 (add-after 'unpack 'fix-build
970 (lambda _
971 (substitute* "src/plugins/imageformats/jp2/qjp2handler.cpp"
972 (("^#include <jasper/jasper.h>")
973 "#include <jasper/jasper.h>\n#include <QtCore/qmath.h>"))
974 #t))))))
975 (native-inputs `())
976 (inputs
977 (list jasper
978 libmng
979 libtiff
980 libwebp
981 mesa
982 qtbase-5
983 zlib))
984 (synopsis "Additional Image Format plugins for Qt")
985 (description "The QtImageFormats module contains plugins for adding
986 support for MNG, TGA, TIFF and WBMP image formats.")))
987
988 (define-public qtx11extras
989 (package (inherit qtsvg-5)
990 (name "qtx11extras")
991 (version "5.15.2")
992 (source (origin
993 (method url-fetch)
994 (uri (qt5-urls name version))
995 (sha256
996 (base32
997 "0gkfzj195v9flwljnqpdz3a532618yn4h2577nlsai56x4p7053h"))))
998 (arguments
999 (substitute-keyword-arguments (package-arguments qtsvg-5)
1000 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1001 (native-inputs (list perl))
1002 (inputs
1003 (list mesa qtbase-5))
1004 (synopsis "Qt Extras for X11")
1005 (description "The QtX11Extras module includes the library to access X11
1006 from within Qt 5.")))
1007
1008 (define-public qtxmlpatterns
1009 (package (inherit qtsvg-5)
1010 (name "qtxmlpatterns")
1011 (version "5.15.2")
1012 (source (origin
1013 (method url-fetch)
1014 (uri (qt5-urls name version))
1015 (sha256
1016 (base32
1017 "1ypj5jpa31rlx8yfw3y9jia212lfnxvnqkvygs6ihjf3lxi23skn"))))
1018 (arguments
1019 (substitute-keyword-arguments (package-arguments qtsvg-5)
1020 ((#:tests? _ #f) #f) ; TODO: Enable the tests
1021 ((#:phases phases)
1022 `(modify-phases ,phases
1023 (add-after 'unpack 'disable-network-tests
1024 (lambda _ (substitute* "tests/auto/auto.pro"
1025 (("qxmlquery") "# qxmlquery")
1026 (("xmlpatterns ") "# xmlpatterns"))
1027 #t))))))
1028 (native-inputs (list perl qtdeclarative-5))
1029 (inputs (list qtbase-5))
1030 (synopsis "Qt XML patterns module")
1031 (description "The QtXmlPatterns module is a XQuery and XPath engine for
1032 XML and custom data models. It contains programs such as xmlpatterns and
1033 xmlpatternsvalidator.")))
1034
1035 (define-public qtdeclarative-5
1036 (package (inherit qtsvg-5)
1037 (name "qtdeclarative")
1038 (version "5.15.2")
1039 (source (origin
1040 (method url-fetch)
1041 (uri (qt5-urls name version))
1042 (sha256
1043 (base32
1044 "0lancdn7y0lrlmyn5cbdm0izd5yprvd5n77nhkb7a3wl2sbx0066"))))
1045 (arguments
1046 (substitute-keyword-arguments (package-arguments qtsvg-5)
1047 ((#:tests? _ #f) #f) ;TODO: Enable the tests
1048 ((#:phases phases)
1049 `(modify-phases ,phases
1050 (add-after 'build 'fix-qt5core-install-prefix
1051 (lambda* (#:key outputs #:allow-other-keys)
1052 (let ((out (assoc-ref outputs "out")))
1053 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
1054 ;; is provided by qtdeclarative-5.
1055 (substitute*
1056 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
1057 (("\\$\\{_qt5Core_install_prefix\\}") out)))
1058 #t))))))
1059 (native-inputs
1060 (list perl
1061 pkg-config
1062 python
1063 python-wrapper
1064 qtsvg-5
1065 vulkan-headers))
1066 (inputs
1067 (list mesa qtbase-5))
1068 (synopsis "Qt QML module (Quick 2)")
1069 (description "The Qt QML module provides a framework for developing
1070 applications and libraries with the QML language. It defines and implements the
1071 language and engine infrastructure, and provides an API to enable application
1072 developers to extend the QML language with custom types and integrate QML code
1073 with JavaScript and C++.")))
1074
1075 (define-public qtdeclarative
1076 (package
1077 (name "qtdeclarative")
1078 (version "6.3.1")
1079 ;; TODO: Package 'masm' and unbundle from sources.
1080 (source (origin
1081 (method url-fetch)
1082 (uri (qt5-urls name version))
1083 (sha256
1084 (base32
1085 "1s268fha3650dn1lqxf8jfa07wxpw09f6p7rjyiwq3w24d0nkrq3"))))
1086 (build-system cmake-build-system)
1087 (arguments
1088 (list
1089 #:configure-flags #~(list "-GNinja" ;about twice as fast!
1090 "-DQT_BUILD_TESTS=ON")
1091 #:phases
1092 #~(modify-phases %standard-phases
1093 (add-after 'unpack 'honor-cmake-install-rpath
1094 ;; The build system goes out of its way to compute a runpath it
1095 ;; thinks makes more sense, and fails. Revert to the default
1096 ;; behavior, which is to honor CMAKE_INSTALL_RPATH.
1097 (lambda _
1098 (substitute* "src/qml/Qt6QmlMacros.cmake"
1099 (("set_target_properties.*PROPERTIES.*INSTALL_RPATH.*" all)
1100 (string-append "# " all)))))
1101 (add-after 'unpack 'patch-qlibraryinfo-paths
1102 (lambda _
1103 ;; The QLibraryInfo paths are hard-coded to point to the qtbase
1104 ;; installation, but all the tools used in the test suite come
1105 ;; from this package.
1106 (substitute* (find-files "tests" "\\.cpp$")
1107 (("QLibraryInfo::path\\(QLibraryInfo::BinariesPath)")
1108 (string-append "QStringLiteral(\"" #$output "/bin\")"))
1109 (("QLibraryInfo::path\\(QLibraryInfo::LibraryExecutablesPath)")
1110 (string-append "QStringLiteral(\"" #$output
1111 "/lib/qt6/libexec\")"))
1112 (("QLibraryInfo::path\\(QLibraryInfo::QmlImportsPath)")
1113 (string-append "QStringLiteral(\"" #$output
1114 "/lib/qt6/qml\")")))))
1115 (replace 'build
1116 (lambda* (#:key parallel-build? #:allow-other-keys)
1117 (apply invoke "cmake" "--build" "."
1118 (if parallel-build?
1119 `("--parallel" ,(number->string (parallel-job-count)))
1120 '()))))
1121 (delete 'check) ;move after the install phase
1122 (replace 'install
1123 (lambda _
1124 (invoke "cmake" "--install" ".")))
1125 (add-after 'install 'check
1126 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
1127 (when tests?
1128 ;; The tests expect to find the modules provided by this
1129 ;; package; extend the environment variables needed to do so.
1130 ;(setenv "CMAKE_PREFIX_PATH" #$output)
1131 (setenv "QML2_IMPORT_PATH"
1132 (string-append #$output "/lib/qt6/qml"))
1133 (setenv "QT_PLUGIN_PATH"
1134 (string-append #$output "/lib/qt6/plugins:"
1135 (getenv "QT_PLUGIN_PATH")))
1136 (setenv "QT_QPA_PLATFORM" "offscreen")
1137 ;; Skip tests known to fail on GNU/Linux, in a CI context or
1138 ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
1139 ;; /tree/src/testlib/qtestblacklist.cpp).
1140 (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
1141 (setenv "HOME" "/tmp") ;a few tests require a writable HOME
1142 (invoke
1143 "ctest" "--output-on-failure"
1144 "-j" (if parallel-tests?
1145 (number->string (parallel-job-count))
1146 "1")
1147 "-E" ;exclude some tests by regex
1148 (string-append
1149 "("
1150 (string-join
1151 (list
1152 ;; This test is marked as flaky upstream (see:
1153 ;; https://bugreports.qt.io/browse/QTBUG-101488).
1154 "tst_qquickfiledialogimpl"
1155 ;; These tests all fail because 'test_overlappingHandles'
1156 ;; (see: https://bugreports.qt.io/browse/QTBUG-95750).
1157 "tst_basic"
1158 "tst_fusion"
1159 "tst_imagine"
1160 "tst_material"
1161 "tst_universal"
1162 ;; Fails due to using the wrong lib/qt6/qml prefix:
1163 ;; "Warning: Failed to find the following builtins:
1164 ;; builtins.qmltypes, jsroot.qmltypes (so will use
1165 ;; qrc). Import paths used:
1166 ;; /gnu/store/...-qtbase-6.3.1/lib/qt6/qml"
1167 "tst_qmltc_qprocess"
1168 ;; These test fail when running qmlimportscanner; perhaps
1169 ;; an extra CMAKE_PREFIX_PATH location is missing to
1170 ;; correctly locate the imports.
1171 "empty_qmldir"
1172 "qtquickcompiler"
1173 "cmake_tooling_imports"
1174 ;; This test seems to hangs for a long time, possibly
1175 ;; waiting for a killed process, which becomes a zombie in
1176 ;; the build container (perhaps solved after
1177 ;; fixing/applying #30948).
1178 "tst_qqmlpreview") "|")
1179 ")")))))
1180 (add-after 'install 'delete-installed-tests
1181 (lambda _
1182 (delete-file-recursively (string-append #$output "/tests")))))))
1183 (native-inputs
1184 (list ninja
1185 perl
1186 pkg-config
1187 python
1188 qtshadertools
1189 vulkan-headers))
1190 (inputs
1191 (list libxkbcommon
1192 mesa
1193 qtbase))
1194 (home-page (package-home-page qtbase))
1195 (synopsis "Qt QML module (Quick 2)")
1196 (description "The Qt QML module provides a framework for developing
1197 applications and libraries with the QML language. It defines and implements
1198 the language and engine infrastructure, and provides an API to enable
1199 application developers to extend the QML language with custom types and
1200 integrate QML code with JavaScript and C++.")
1201 (license (package-license qtbase))))
1202
1203 (define-public qtconnectivity
1204 (package (inherit qtsvg-5)
1205 (name "qtconnectivity")
1206 (version "5.15.2")
1207 (source (origin
1208 (method url-fetch)
1209 (uri (qt5-urls name version))
1210 (sha256
1211 (base32
1212 "185zci61ip1wpjrygcw2m6v55lvninc0b8y2p3jh6qgpf5w35003"))))
1213 (native-inputs
1214 (list perl pkg-config qtdeclarative-5))
1215 (inputs
1216 (list bluez qtbase-5))
1217 (synopsis "Qt Connectivity module")
1218 (description "The Qt Connectivity modules provides modules for interacting
1219 with Bluetooth and NFC.")))
1220
1221 (define-public qtwebsockets-5
1222 (package (inherit qtsvg-5)
1223 (name "qtwebsockets")
1224 (version "5.15.2")
1225 (source (origin
1226 (method url-fetch)
1227 (uri (qt5-urls name version))
1228 (sha256
1229 (base32
1230 "0gr399fn5n8j3m9d3vv01vcbr1cb7pw043j04cnnxzrlvn2jvd50"))))
1231 (arguments
1232 (substitute-keyword-arguments (package-arguments qtsvg-5)
1233 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1234 (native-inputs
1235 (list perl qtdeclarative-5))
1236 (inputs (list qtbase-5))
1237 (synopsis "Qt Web Sockets module")
1238 (description "WebSocket is a web-based protocol designed to enable two-way
1239 communication between a client application and a remote host. The Qt
1240 WebSockets module provides C++ and QML interfaces that enable Qt applications
1241 to act as a server that can process WebSocket requests, or a client that can
1242 consume data received from the server, or both.")))
1243
1244 (define-public qtwebsockets
1245 (package
1246 (name "qtwebsockets")
1247 (version "6.3.1")
1248 (source (origin
1249 (method url-fetch)
1250 (uri (qt5-urls name version))
1251 (sha256
1252 (base32
1253 "06hj0pkdzjicmbiinjp1dk1ziz8cb3fgcwy7a0dxxjvzr680v64z"))))
1254 (build-system cmake-build-system)
1255 (arguments
1256 (list
1257 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1258 #:phases #~(modify-phases %standard-phases
1259 (delete 'check) ;move after install
1260 (add-after 'install 'prepare-for-tests
1261 (lambda _
1262 (setenv "QT_QPA_PLATFORM" "offscreen")
1263 (setenv "QML2_IMPORT_PATH"
1264 (string-append #$output "/lib/qt6/qml:"
1265 (getenv "QML2_IMPORT_PATH")))))
1266 (add-after 'prepare-for-tests 'check
1267 (assoc-ref %standard-phases 'check))
1268 (add-after 'check 'delete-installed-tests
1269 (lambda _
1270 (delete-file-recursively
1271 (string-append #$output "/tests")))))))
1272 (native-inputs (list perl))
1273 (inputs (list qtbase qtdeclarative))
1274 (synopsis "Qt Web Sockets module")
1275 (description "WebSocket is a web-based protocol designed to enable two-way
1276 communication between a client application and a remote host. The Qt
1277 WebSockets module provides C++ and QML interfaces that enable Qt applications
1278 to act as a server that can process WebSocket requests, or a client that can
1279 consume data received from the server, or both.")
1280 (home-page (package-home-page qtbase))
1281 (license (package-license qtbase))))
1282
1283 (define-public qtsensors
1284 (package (inherit qtsvg-5)
1285 (name "qtsensors")
1286 (version "5.15.2")
1287 (source (origin
1288 (method url-fetch)
1289 (uri (qt5-urls name version))
1290 (sha256
1291 (base32
1292 "0fa81r7bn1mf9ynwsx524a55dx1q0jb4vda6j48ssb4lx7wi201z"))))
1293 (arguments
1294 (substitute-keyword-arguments (package-arguments qtsvg-5)
1295 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
1296 ((#:phases phases)
1297 `(modify-phases ,phases
1298 (add-after 'unpack 'fix-tests
1299 (lambda _
1300 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
1301 (("2000") "5000") ;lengthen test timeout
1302 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
1303 #t))))))
1304 (native-inputs
1305 (list perl qtdeclarative-5))
1306 (inputs (list qtbase-5))
1307 (synopsis "Qt Sensors module")
1308 (description "The Qt Sensors API provides access to sensor hardware via QML
1309 and C++ interfaces. The Qt Sensors API also provides a motion gesture
1310 recognition API for devices.")))
1311
1312 (define-public qtmultimedia-5
1313 (package
1314 (inherit qtsvg-5)
1315 (name "qtmultimedia")
1316 (version "5.15.2")
1317 (source (origin
1318 (method url-fetch)
1319 (uri (qt5-urls name version))
1320 (sha256
1321 (base32
1322 "1xbd6kc7i0iablqdkvfrajpi32cbq7j6ajbfyyyalcai1s0mhdqc"))
1323 (modules '((guix build utils)))
1324 (snippet
1325 '(begin
1326 (delete-file-recursively
1327 "examples/multimedia/spectrum/3rdparty")
1328 ;; We also prevent the spectrum example from being built.
1329 (substitute* "examples/multimedia/multimedia.pro"
1330 (("spectrum") "#"))
1331 #t))))
1332 (arguments
1333 (substitute-keyword-arguments (package-arguments qtsvg-5)
1334 ((#:phases phases)
1335 `(modify-phases ,phases
1336 (replace 'configure
1337 (lambda* (#:key outputs #:allow-other-keys)
1338 (let ((out (assoc-ref outputs "out")))
1339 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
1340 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
1341 (string-append "PREFIX=" out)))))))
1342 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1343 (native-inputs
1344 (list perl pkg-config python qtdeclarative-5))
1345 (inputs
1346 (list alsa-lib
1347 mesa
1348 pulseaudio
1349 qtbase-5
1350 ;; Gstreamer is needed for the mediaplayer plugin
1351 gstreamer
1352 gst-plugins-base))
1353 (synopsis "Qt Multimedia module")
1354 (description "The Qt Multimedia module provides set of APIs to play and
1355 record media, and manage a collection of media content. It also contains a
1356 set of plugins for interacting with pulseaudio and GStreamer.")))
1357
1358 (define-public qtshadertools
1359 (package
1360 (name "qtshadertools")
1361 (version "6.3.1")
1362 (source (origin
1363 (method url-fetch)
1364 (uri (qt5-urls name version))
1365 ;; Note: the source bundles *patched* glslang and SPIRV-Cross
1366 ;; sources.
1367 (sha256
1368 (base32
1369 "0nj35s2z5n438q7nqf6bnj3slwz2am3169ck1ixwqa0mjrv73dsr"))))
1370 (build-system cmake-build-system)
1371 (arguments
1372 (list
1373 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1374 #:phases #~(modify-phases %standard-phases
1375 (add-before 'check 'prepare-for-tests
1376 (lambda _
1377 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
1378 (native-inputs (list perl))
1379 (inputs (list glslang libxkbcommon qtbase))
1380 (home-page (package-home-page qtbase))
1381 (synopsis "Shader pipeline API and and tools for Qt")
1382 (description "The @code{qtshadertools} module provides APIs and tools
1383 supporting shader pipeline functionality as offered in Qt Quick to operate on
1384 Vulkan, OpenGL and other main graphic APIs.")
1385 (license (package-home-page qtbase))))
1386
1387 (define-public qtmultimedia
1388 (package
1389 (name "qtmultimedia")
1390 (version "6.3.1")
1391 (source (origin
1392 (method url-fetch)
1393 (uri (qt5-urls name version))
1394 (sha256
1395 (base32
1396 "0dkk3lmzi2fs13cnj8q1lpcs6gghj219826gkwnzyd6nmlm280vy"))
1397 (modules '((guix build utils)))
1398 (snippet
1399 '(begin
1400 (delete-file-recursively
1401 "examples/multimedia/spectrum/3rdparty")
1402 ;; We also prevent the spectrum example from being built.
1403 (substitute* "examples/multimedia/multimedia.pro"
1404 (("spectrum") "#"))))))
1405 (build-system cmake-build-system)
1406 (arguments
1407 (list
1408 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON"
1409 "-DQT_FEATURE_pulseaudio=ON")
1410 #:phases
1411 #~(modify-phases %standard-phases
1412 (add-after 'unpack 'disable-integration-tests
1413 (lambda _
1414 ;; XXX: The tst_qaudiodecoderbackend, tst_qaudiodevice,
1415 ;; tst_qaudiosource, tst_qmediaplayerbackend and
1416 ;; tst_qcamerabackend tests fail, presumably because they
1417 ;; require a functional pulseaudio daemon (which requires a dbus
1418 ;; session bus, which requires an X11 server, and then is still
1419 ;; unhappy).
1420 (substitute* "tests/auto/CMakeLists.txt"
1421 (("add_subdirectory\\(integration)") ""))))
1422 (add-before 'check 'prepare-for-tests
1423 (lambda _
1424 (setenv "QT_QPA_PLATFORM" "offscreen")))
1425 (add-after 'install 'delete-installed-tests
1426 (lambda _
1427 (delete-file-recursively (string-append #$output "/tests")))))))
1428 (native-inputs
1429 (list perl
1430 pkg-config
1431 qtshadertools
1432 vulkan-headers))
1433 (inputs
1434 (list alsa-lib
1435 glib
1436 gstreamer
1437 gst-plugins-base ;gstreamer-gl
1438 gst-plugins-good ;camera support, additional plugins
1439 gst-libav ;ffmpeg plugin
1440 libxkbcommon
1441 mesa
1442 qtbase
1443 qtdeclarative
1444 pulseaudio))
1445 (home-page (package-home-page qtbase))
1446 (synopsis "Qt Multimedia module")
1447 (description "The Qt Multimedia module provides set of APIs to play and
1448 record media, and manage a collection of media content. It also contains a
1449 set of plugins for interacting with pulseaudio and GStreamer.")
1450 (license (package-license qtbase))))
1451
1452 (define-public qtwayland
1453 (package (inherit qtsvg-5)
1454 (name "qtwayland")
1455 (version "5.15.2")
1456 (source (origin
1457 (method url-fetch)
1458 (uri (qt5-urls name version))
1459 (sha256
1460 (base32
1461 "1ddfx4nak16xx0zh1kl836zxvpbixmmjyplsmfmg65pqkwi34dqr"))))
1462 (arguments
1463 (substitute-keyword-arguments (package-arguments qtsvg-5)
1464 ((#:phases phases)
1465 `(modify-phases ,phases
1466 (add-after 'unpack 'disable-failing-tests
1467 (lambda _
1468 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
1469 ;; reason and breaks these two tests.
1470 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
1471 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
1472 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
1473 "")
1474 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
1475 ""))
1476 #t))
1477 (add-before 'check 'set-test-environment
1478 (lambda _
1479 ;; Do not fail just because /etc/machine-id is missing.
1480 (setenv "DBUS_FATAL_WARNINGS" "0")
1481 #t))))))
1482 (native-inputs
1483 (list glib perl pkg-config qtdeclarative-5))
1484 (inputs
1485 `(("fontconfig" ,fontconfig)
1486 ("freetype" ,freetype)
1487 ("libx11" ,libx11)
1488 ("libxcomposite" ,libxcomposite)
1489 ("libxext" ,libxext)
1490 ("libxkbcommon" ,libxkbcommon)
1491 ("libxrender" ,libxrender)
1492 ("mesa" ,mesa)
1493 ("mtdev" ,mtdev)
1494 ("qtbase" ,qtbase-5)
1495 ("vulkan-headers" ,vulkan-headers)
1496 ("wayland" ,wayland)))
1497 (synopsis "Qt Wayland module")
1498 (description "The Qt Wayland module provides the QtWayland client and
1499 compositor libraries.")))
1500
1501 (define-public qtserialport
1502 (package (inherit qtsvg-5)
1503 (name "qtserialport")
1504 (version "5.15.2")
1505 (source (origin
1506 (method url-fetch)
1507 (uri (qt5-urls name version))
1508 (sha256
1509 (base32
1510 "17gp5qzg4wdg8qlxk2p3mh8x1vk33rf33wic3fy0cws193bmkiar"))))
1511 (native-inputs (list perl))
1512 (inputs
1513 (list qtbase-5 eudev))
1514 (arguments
1515 (substitute-keyword-arguments (package-arguments qtsvg-5)
1516 ((#:phases phases)
1517 `(modify-phases ,phases
1518 (add-after 'unpack 'patch-dlopen-paths
1519 (lambda* (#:key inputs #:allow-other-keys)
1520 (substitute* "src/serialport/qtudev_p.h"
1521 ;; Use the absolute paths for dynamically loaded libs,
1522 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
1523 ;; typically is not set in guix.
1524 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
1525 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
1526 #t))))))
1527 (synopsis "Qt Serial Port module")
1528 (description "The Qt Serial Port module provides the library for
1529 interacting with serial ports from within Qt.")))
1530
1531 (define-public qtserialbus
1532 (package (inherit qtsvg-5)
1533 (name "qtserialbus")
1534 (version "5.15.2")
1535 (source (origin
1536 (method url-fetch)
1537 (uri (qt5-urls name version))
1538 (sha256
1539 (base32
1540 "125x6756fjpldqy6wbw6cg7ngjh2016aiq92bchh719z1mf7xsxf"))))
1541 (arguments
1542 (substitute-keyword-arguments (package-arguments qtsvg-5)
1543 ((#:phases phases '%standard-phases)
1544 `(modify-phases ,phases
1545 (add-after 'unpack 'patch-libsocketcan-reference
1546 (lambda* (#:key inputs #:allow-other-keys)
1547 (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
1548 (libcansocket.so (string-append libcansocket
1549 "/lib/libsocketcan.so")))
1550 (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
1551 (("QStringLiteral\\(\"socketcan\"\\)")
1552 (format #f "QStringLiteral(~s)" libcansocket.so)))
1553 #t)))))))
1554 (inputs
1555 (list libsocketcan qtbase-5 qtserialport))
1556 (synopsis "Qt Serial Bus module")
1557 (description "The Qt Serial Bus API provides classes and functions to
1558 access the various industrial serial buses and protocols, such as CAN, ModBus,
1559 and others.")))
1560
1561 (define-public qtwebchannel-5
1562 (package (inherit qtsvg-5)
1563 (name "qtwebchannel")
1564 (version "5.15.2")
1565 (source (origin
1566 (method url-fetch)
1567 (uri (qt5-urls name version))
1568 (sha256
1569 (base32
1570 "1h9y634phvvk557mhmf9z4lmxr41rl8x9mqy2lzp31mk8ffffzqj"))))
1571 (native-inputs
1572 (list perl qtdeclarative-5 qtwebsockets-5))
1573 (inputs (list qtbase-5))
1574 (synopsis "Web communication library for Qt")
1575 (description "The Qt WebChannel module enables peer-to-peer communication
1576 between the host (QML/C++ application) and the client (HTML/JavaScript
1577 application). The transport mechanism is supported out of the box by the two
1578 popular web engines, Qt WebKit 2 and Qt WebEngine.")))
1579
1580 (define-public qtwebchannel
1581 (package
1582 (name "qtwebchannel")
1583 (version "6.3.1")
1584 (source (origin
1585 (method url-fetch)
1586 (uri (qt5-urls name version))
1587 (sha256
1588 (base32
1589 "0s16zx3qn3byldvhmsnwijm8rmizk8vpqj7fnwhjg6c67z10m8ma"))))
1590 (build-system cmake-build-system)
1591 (arguments
1592 (list
1593 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1594 #:phases #~(modify-phases %standard-phases
1595 (delete 'check) ;move after install
1596 (add-after 'install 'prepare-for-tests
1597 (lambda _
1598 (setenv "QT_QPA_PLATFORM" "offscreen")
1599 (setenv "QML2_IMPORT_PATH"
1600 (string-append #$output "/lib/qt6/qml:"
1601 (getenv "QML2_IMPORT_PATH")))))
1602 (add-after 'prepare-for-tests 'check
1603 (assoc-ref %standard-phases 'check))
1604 (add-after 'check 'delete-installed-tests
1605 (lambda _
1606 (delete-file-recursively
1607 (string-append #$output "/tests")))))))
1608 (native-inputs (list perl))
1609 (inputs (list qtbase qtdeclarative qtwebsockets))
1610 (home-page (package-home-page qtbase))
1611 (synopsis "Web communication library for Qt")
1612 (description "The Qt WebChannel module enables peer-to-peer communication
1613 between the host (QML/C++ application) and the client (HTML/JavaScript
1614 application).")
1615 (license (package-license qtbase))))
1616
1617 (define-public qtwebglplugin
1618 (package (inherit qtsvg-5)
1619 (name "qtwebglplugin")
1620 (version "5.15.2")
1621 (source (origin
1622 (method url-fetch)
1623 (uri (qt5-urls name version))
1624 (sha256
1625 (base32
1626 "0ihlnhv8ldkqz82v3j7j22lrhk17b6ghra8sx85y2agd2ysq5rw1"))))
1627 (arguments
1628 (substitute-keyword-arguments (package-arguments qtsvg-5)
1629 ((#:phases phases)
1630 `(modify-phases ,phases
1631 (add-after 'unpack 'disable-network-tests
1632 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1633 (("webgl") "# webgl"))
1634 #t))))))
1635 (native-inputs '())
1636 (inputs
1637 (list mesa qtbase-5 qtdeclarative-5 qtwebsockets-5 zlib))
1638 (synopsis "QPA plugin for running an application via a browser using
1639 streamed WebGL commands")
1640 (description "Qt back end that uses WebGL for rendering. It allows Qt
1641 applications (with some limitations) to run in a web browser that supports
1642 WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1643 compatible web browser without the use of plug-ins. The API is similar to
1644 OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1645
1646 (define-public qtwebview
1647 (package (inherit qtsvg-5)
1648 (name "qtwebview")
1649 (version "5.15.2")
1650 (source (origin
1651 (method url-fetch)
1652 (uri (qt5-urls name version))
1653 (sha256
1654 (base32
1655 "1rw1wibmbxlj6xc86qs3y8h42al1vczqiksyxzaylxs9gqb4d7xy"))))
1656 (native-inputs
1657 (list perl))
1658 (inputs
1659 (list qtbase-5 qtdeclarative-5))
1660 (synopsis "Display web content in a QML application")
1661 (description "Qt WebView provides a way to display web content in a QML
1662 application without necessarily including a full web browser stack by using
1663 native APIs where it makes sense.")))
1664
1665 (define-public qtlocation
1666 (package (inherit qtsvg-5)
1667 (name "qtlocation")
1668 (version "5.15.2")
1669 (source (origin
1670 (method url-fetch)
1671 (uri (string-append "https://download.qt.io/official_releases/qt/"
1672 (version-major+minor version) "/" version
1673 "/submodules/" name "-everywhere-src-"
1674 version ".tar.xz"))
1675 (sha256
1676 (base32
1677 "184jychnlfhplpwc5cdcsapwljgwvzk5qpf3val4kpq8w44wnkwq"))))
1678 (arguments
1679 (substitute-keyword-arguments (package-arguments qtsvg-5)
1680 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1681 (native-inputs
1682 (list perl qtdeclarative-5 qtquickcontrols-5 qtserialport))
1683 (inputs
1684 (list icu4c openssl qtbase-5 zlib))
1685 (synopsis "Qt Location and Positioning modules")
1686 (description "The Qt Location module provides an interface for location,
1687 positioning and geolocation plugins.")))
1688
1689 (define-public qtlottie
1690 (package
1691 (name "qtlottie")
1692 (version "6.3.1")
1693 (source (origin
1694 (method url-fetch)
1695 (uri (qt5-urls name version))
1696 (sha256
1697 (base32
1698 "1x8wmc6gwmxk92zjcsrbhrbqbfvnk7302ggghld5wk8jk5lsf2vl"))))
1699 (build-system cmake-build-system)
1700 (arguments
1701 (list
1702 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1703 #:phases
1704 #~(modify-phases %standard-phases
1705 (delete 'check) ;move after install
1706 (add-after 'install 'prepare-for-tests
1707 (lambda _
1708 (setenv "QT_QPA_PLATFORM" "offscreen")
1709 (setenv "QML2_IMPORT_PATH"
1710 (string-append #$output "/lib/qt6/qml:"
1711 (getenv "QML2_IMPORT_PATH"))))))))
1712 (native-inputs (list perl))
1713 (inputs (list libxkbcommon qtbase qtdeclarative))
1714 (home-page (package-home-page qtbase))
1715 (synopsis "QML API for rendering Bodymovin graphics and animations")
1716 (description "Qt Lottie Animation provides a QML API for rendering
1717 graphics and animations that are exported in JSON format by the Bodymovin
1718 plugin for Adobe After Effects.")
1719 (license (package-license qtbase))))
1720
1721 (define-public qttools-5
1722 (package (inherit qtsvg-5)
1723 (name "qttools")
1724 (version "5.15.2")
1725 (source (origin
1726 (method url-fetch)
1727 (uri (qt5-urls name version))
1728 (sha256
1729 (base32
1730 "1k618f7v6jaj0ygy8d7jvgb8zjr47sn55kiskbdkkizp3z7d12f1"))))
1731 (arguments
1732 (substitute-keyword-arguments (package-arguments qtsvg-5)
1733 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1734 (native-inputs
1735 (list perl qtdeclarative-5 vulkan-headers))
1736 (inputs
1737 (list mesa qtbase-5))
1738 (synopsis "Qt Tools and Designer modules")
1739 (description "The Qt Tools module provides a set of applications to browse
1740 the documentation, translate applications, generate help files and other stuff
1741 that helps in Qt development.")))
1742
1743 (define-public qttools
1744 (package
1745 (name "qttools")
1746 (version "6.3.1")
1747 (source (origin
1748 (method url-fetch)
1749 (uri (qt5-urls name version))
1750 (sha256
1751 (base32
1752 "1h96w4bzkbd80vr7lh6hnypdlmbzc1y52c2zrqzvkgm3587pa4n4"))))
1753 (build-system cmake-build-system)
1754 (arguments
1755 (list
1756 ;; The build system attempts to fetch online resources and fails when
1757 ;; building the test suite.
1758 #:configure-flags #~(list "-DQT_BUILD_TESTS=OFF")))
1759 (native-inputs (list perl qtdeclarative vulkan-headers))
1760 (inputs (list libxkbcommon mesa qtbase))
1761 (home-page (package-home-page qtbase))
1762 (synopsis "Qt Tools and Designer modules")
1763 (description "The Qt Tools module provides a set of applications to browse
1764 the documentation, translate applications, generate help files and other stuff
1765 that helps in Qt development.")
1766 ;; GPL 3 only with Qt GPL exception 1.0 (see:
1767 ;; LICENSES/Qt-GPL-exception-1.0.txt).
1768 (license (list license:gpl3))))
1769
1770 (define-public qtscript
1771 (package (inherit qtsvg-5)
1772 (name "qtscript")
1773 (version "5.15.2")
1774 (source (origin
1775 (method url-fetch)
1776 (uri (qt5-urls name version))
1777 (sha256
1778 (base32
1779 "0gk74hk488k9ldacxbxcranr3arf8ifqg8kz9nm1rgdgd59p36d2"))
1780 (patches (search-patches "qtscript-disable-tests.patch"))))
1781 (native-inputs
1782 (list perl qttools-5))
1783 (inputs
1784 (list qtbase-5))
1785 (synopsis "Qt Script module")
1786 (description "Qt provides support for application scripting with ECMAScript.
1787 The following guides and references cover aspects of programming with
1788 ECMAScript and Qt.")))
1789
1790 (define-public qtquickcontrols-5
1791 (package (inherit qtsvg-5)
1792 (name "qtquickcontrols")
1793 (version "5.15.2")
1794 (source (origin
1795 (method url-fetch)
1796 (uri (qt5-urls name version))
1797 (sha256
1798 (base32
1799 "1dczakl868mg0lnwpf082jjc5976ycn879li1vqlgw5ihirzp4y3"))))
1800 (arguments
1801 (substitute-keyword-arguments (package-arguments qtsvg-5)
1802 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1803 (inputs
1804 (list qtbase-5 qtdeclarative-5))
1805 (synopsis "Qt Quick Controls and other Quick modules")
1806 (description "The QtScript module provides classes for making Qt
1807 applications scriptable. This module provides a set of extra components that
1808 can be used to build complete interfaces in Qt Quick.")))
1809
1810 (define-public qtquickcontrols2-5
1811 (package (inherit qtsvg-5)
1812 (name "qtquickcontrols2")
1813 (version "5.15.2")
1814 (source (origin
1815 (method url-fetch)
1816 (uri (qt5-urls name version))
1817 (sha256
1818 (base32
1819 "06c9vrwvbjmzapmfa25y34lgjkzg57xxbm92nr6wkv5qykjnq6v7"))))
1820 (arguments
1821 (substitute-keyword-arguments (package-arguments qtsvg-5)
1822 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1823 (inputs
1824 (list qtbase-5 qtdeclarative-5))
1825 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1826 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1827 module that provides platform integration: native dialogs, menus and menu bars,
1828 and tray icons. It falls back to Qt Widgets when a native implementation is
1829 not available.")))
1830
1831 (define-public qtquickcontrols2
1832 ;; qtquickcontrols2 still exist, but was merged into qtdeclarative.
1833 ;; Unfortunately that hasn't been well communicated at all (see:
1834 ;; https://bugreports.qt.io/browse/QTBUG-79454).
1835 (deprecated-package "qtquickcontrols2" qtdeclarative))
1836
1837 (define-public qtgraphicaleffects
1838 (package (inherit qtsvg-5)
1839 (name "qtgraphicaleffects")
1840 (version "5.15.2")
1841 (source (origin
1842 (method url-fetch)
1843 (uri (qt5-urls name version))
1844 (sha256
1845 (base32
1846 "1r6zfc0qga2ax155js7c8y5rx6vgayf582s921j09mb797v6g3gc"))))
1847 (arguments
1848 (substitute-keyword-arguments (package-arguments qtsvg-5)
1849 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1850 (inputs
1851 (list qtbase-5 qtdeclarative-5))
1852 (synopsis "Qt Graphical Effects module")
1853 (description "The Qt Graphical Effects module provides a set of QML types
1854 for adding visually impressive and configurable effects to user interfaces.
1855 Effects are visual items that can be added to Qt Quick user interface as UI
1856 components. The API consists of over 20 effects provided as separate QML
1857 types. The effects cover functional areas such as blending, masking, blurring,
1858 coloring, and many more.")))
1859
1860 (define-public qtgamepad
1861 (package (inherit qtsvg-5)
1862 (name "qtgamepad")
1863 (version "5.15.2")
1864 (source (origin
1865 (method url-fetch)
1866 (uri (qt5-urls name version))
1867 (sha256
1868 (base32
1869 "0p07bg93fdfn4gr2kv38qgnws5znhswajrxdfs8xc9l3i7vi2xn7"))))
1870 (native-inputs
1871 (list perl pkg-config))
1872 (inputs
1873 `(("fontconfig" ,fontconfig)
1874 ("freetype" ,freetype)
1875 ("libxrender" ,libxrender)
1876 ("sdl2" ,sdl2)
1877 ("qtbase" ,qtbase-5)
1878 ("qtdeclarative-5" ,qtdeclarative-5)))
1879 (synopsis "Qt Gamepad module")
1880 (description "The Qt Gamepad module is an add-on library that enables Qt
1881 applications to support the use of gamepad hardware and in some cases remote
1882 control equipment. The module provides both QML and C++ interfaces. The
1883 primary target audience are embedded devices with fullscreen user interfaces,
1884 and mobile applications targeting TV-like form factors.")))
1885
1886 (define-public qtscxml
1887 (package (inherit qtsvg-5)
1888 (name "qtscxml")
1889 (version "5.15.2")
1890 (source (origin
1891 (method url-fetch)
1892 (uri (qt5-urls name version))
1893 (sha256
1894 (base32
1895 "1p5771b9hnpchfcdgy0zkhwg09a6xq88934aggp0rij1k85mkfb0"))
1896 (modules '((guix build utils)))
1897 (snippet
1898 '(begin
1899 (delete-file-recursively "tests/3rdparty")
1900 ;; the scion test refers to the bundled 3rd party test code.
1901 (substitute* "tests/auto/auto.pro"
1902 (("scion") "#"))
1903 #t))))
1904 (inputs
1905 (list qtbase-5 qtdeclarative-5))
1906 (synopsis "Qt SCXML module")
1907 (description "The Qt SCXML module provides functionality to create state
1908 machines from SCXML files. This includes both dynamically creating state
1909 machines (loading the SCXML file and instantiating states and transitions) and
1910 generating a C++ file that has a class implementing the state machine. It
1911 also contains functionality to support data models and executable content.")))
1912
1913 (define-public qtpositioning
1914 (package
1915 (name "qtpositioning")
1916 (version "6.3.1")
1917 (source (origin
1918 (method url-fetch)
1919 (uri (qt5-urls name version))
1920 (sha256
1921 (base32
1922 "0v78wamvdw02kf9rq7m5v24q2g6jmgq4ch0fnfa014p1r978wy06"))))
1923 (build-system cmake-build-system)
1924 (arguments
1925 (list
1926 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1927 #:phases #~(modify-phases %standard-phases
1928 (add-after 'install 'delete-installed-tests
1929 (lambda _
1930 (delete-file-recursively
1931 (string-append #$output "/tests")))))))
1932 (inputs (list perl qtbase))
1933 (home-page (package-home-page qtbase))
1934 (synopsis "QML and C++ positioning information API")
1935 (description "The Qt Positioning API provides positioning information via
1936 QML and C++ interfaces. The Qt Positioning API lets you to determine a
1937 position by using a variety of possible sources, including satellite, wifi, or
1938 text files. That information can then be used to, for example, determine a
1939 position on a map. In addition, you can use to the API to retrieve satellite
1940 information and perform area based monitoring.")
1941 (license (package-license qtbase))))
1942
1943 (define-public qtpurchasing
1944 (package (inherit qtsvg-5)
1945 (name "qtpurchasing")
1946 (version "5.15.2")
1947 (source (origin
1948 (method url-fetch)
1949 (uri (qt5-urls name version))
1950 (sha256
1951 (base32
1952 "09rjx53519dfk4qj2gbn3vlxyriasyb747wpg1p11y7jkwqhs4l7"))))
1953 (inputs
1954 (list qtbase-5 qtdeclarative-5))
1955 (synopsis "Qt Purchasing module")
1956 (description "The Qt Purchasing module provides and in-app API for
1957 purchasing goods and services.")))
1958
1959 (define-public qtcharts
1960 (package (inherit qtsvg-5)
1961 (name "qtcharts")
1962 (version "5.15.2")
1963 (source (origin
1964 (method url-fetch)
1965 (uri (qt5-urls name version))
1966 (sha256
1967 (base32
1968 "049x7z8zcp9jixmdv2fjscy2ggpd6za9hkdbb2bqp2mxjm0hwxg0"))))
1969 (arguments
1970 (substitute-keyword-arguments (package-arguments qtsvg-5)
1971 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1972 (inputs
1973 (list qtbase-5 qtdeclarative-5))
1974 (synopsis "Qt Charts module")
1975 (description "The Qt Charts module provides a set of easy to use chart
1976 components. It uses the Qt Graphics View Framework, therefore charts can be
1977 easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1978 QGraphicsWidget, or QML types. Users can easily create impressive graphs by
1979 selecting one of the charts themes.")
1980 (license license:gpl3)))
1981
1982 (define-public qtdatavis3d
1983 (package (inherit qtsvg-5)
1984 (name "qtdatavis3d")
1985 (version "5.15.2")
1986 (source (origin
1987 (method url-fetch)
1988 (uri (qt5-urls name version))
1989 (sha256
1990 (base32
1991 "1zdn3vm0nfy9ny7c783aabp3mhlnqhi9fw2rljn7ibbksmsnasi2"))))
1992 (arguments
1993 (substitute-keyword-arguments (package-arguments qtsvg-5)
1994 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1995 (inputs
1996 (list qtbase-5 qtdeclarative-5))
1997 (synopsis "Qt Data Visualization module")
1998 (description "The Qt Data Visualization module provides a way to visualize
1999 data in 3D as bar, scatter, and surface graphs. It is especially useful for
2000 visualizing depth maps and large quantities of rapidly changing data, such as
2001 data received from multiple sensors. The look and feel of graphs can be
2002 customized by using themes or by adding custom items and labels to them.")
2003 (license license:gpl3)))
2004
2005 (define-public qtnetworkauth-5
2006 (package (inherit qtsvg-5)
2007 (name "qtnetworkauth")
2008 (version "5.15.2")
2009 (source (origin
2010 (method url-fetch)
2011 (uri (qt5-urls name version))
2012 (sha256
2013 (base32
2014 "11fdgacv4syr8bff2vdw7rb0dg1gcqpdf37hm3pn31d6z91frhpw"))))
2015 (arguments
2016 (substitute-keyword-arguments (package-arguments qtsvg-5)
2017 ((#:phases phases)
2018 `(modify-phases ,phases
2019 (add-after 'unpack 'remove-failing-test
2020 (lambda _
2021 ;; These tests can't find their test data.
2022 (substitute* "tests/auto/auto.pro"
2023 (("oauth1 ") "# oauth1 "))
2024 #t))))))
2025 (inputs
2026 (list qtbase-5))
2027 (synopsis "Qt Network Authorization module")
2028 (description "The Qt Network Authorization module provides an
2029 implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
2030
2031 (define-public qtnetworkauth
2032 (package
2033 (name "qtnetworkauth")
2034 (version "6.3.1")
2035 (source (origin
2036 (method url-fetch)
2037 (uri (qt5-urls name version))
2038 (sha256
2039 (base32
2040 "0apvsb2ip1m3kw8vi9spvf6f6q72ys8vr40rpyysi7shsjwm83yn"))))
2041 (build-system cmake-build-system)
2042 (arguments (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")))
2043 (native-inputs (list perl))
2044 (inputs (list qtbase))
2045 (home-page (package-home-page qtbase))
2046 (synopsis "Qt Network Authorization module")
2047 (description "The Qt Network Authorization module provides an
2048 implementation of OAuth and OAuth2 authenticathon methods for Qt.")
2049 (license (package-license qtbase))))
2050
2051 (define-public qtremoteobjects
2052 (package (inherit qtsvg-5)
2053 (name "qtremoteobjects")
2054 (version "5.15.2")
2055 (source (origin
2056 (method url-fetch)
2057 (uri (qt5-urls name version))
2058 (sha256
2059 (base32
2060 "1hngbp0vkr35rpsrac7b9vx6f360v8v2g0fffzm590l8j2ybd0b7"))))
2061 (arguments
2062 (substitute-keyword-arguments (package-arguments qtsvg-5)
2063 ((#:phases phases)
2064 `(modify-phases ,phases
2065 (add-after 'unpack 'remove-failing-test
2066 (lambda _
2067 ;; This test can't find its imports.
2068 (substitute* "tests/auto/qml/qml.pro"
2069 (("integration") "# integration")
2070 (("usertypes") "# usertypes"))
2071 ;; disable failing tests: they need network
2072 (substitute* "tests/auto/auto.pro"
2073 (("integration_multiprocess proxy_multiprocess integration_external restart")
2074 "integration_multiprocess"))
2075 #t))))))
2076 (inputs
2077 (list qtbase-5 qtdeclarative-5))
2078 (synopsis "Qt Remote Objects module")
2079 (description "The Qt Remote Objects module is an @dfn{inter-process
2080 communication} (IPC) module developed for Qt. The idea is to extend existing
2081 Qt's functionalities to enable an easy exchange of information between
2082 processes or computers.")))
2083
2084 (define-public qtspeech
2085 (package (inherit qtsvg-5)
2086 (name "qtspeech")
2087 (version "5.15.2")
2088 (source (origin
2089 (method url-fetch)
2090 (uri (qt5-urls name version))
2091 (sha256
2092 (base32
2093 "1xc3x3ghnhgchsg1kgj156yg69wn4rwjx8r28i1jd05hxjggn468"))))
2094
2095 (arguments
2096 (substitute-keyword-arguments (package-arguments qtsvg-5)
2097 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2098 (inputs
2099 (list qtbase-5))
2100 (native-inputs
2101 (list perl qtdeclarative-5 qtmultimedia-5 qtxmlpatterns))
2102 (synopsis "Qt Speech module")
2103 (description "The Qt Speech module enables a Qt application to support
2104 accessibility features such as text-to-speech, which is useful for end-users
2105 who are visually challenged or cannot access the application for whatever
2106 reason. The most common use case where text-to-speech comes in handy is when
2107 the end-user is driving and cannot attend the incoming messages on the phone.
2108 In such a scenario, the messaging application can read out the incoming
2109 message.")))
2110
2111 (define-public qtspell
2112 (package
2113 (name "qtspell")
2114 (version "1.0.1")
2115 (source
2116 (origin
2117 (method git-fetch)
2118 (uri (git-reference
2119 (url "https://github.com/manisandro/qtspell")
2120 (commit version)))
2121 (file-name (git-file-name name version))
2122 (sha256
2123 (base32 "19ff6jzm699wrxrk57w3d4kl9qxgdipdikpwls9n4aqv4mw7g969"))))
2124 (build-system cmake-build-system)
2125 (arguments
2126 `(#:tests? #f)) ;no test
2127 (native-inputs
2128 (list pkg-config qttools-5))
2129 (inputs
2130 (list enchant qtbase-5))
2131 (home-page "https://github.com/manisandro/qtspell")
2132 (synopsis "Spell checking for Qt text widgets")
2133 (description
2134 "QtSpell adds spell-checking functionality to Qt's text widgets,
2135 using the Enchant spell-checking library.")
2136 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
2137 (license license:gpl2+)))
2138
2139 (define-public qtwebengine-5
2140 (package
2141 (inherit qtsvg-5)
2142 (name "qtwebengine")
2143 (version (package-version qtbase-5))
2144 (source
2145 (origin
2146 (method url-fetch)
2147 (uri (qt5-urls name version))
2148 (sha256
2149 (base32
2150 "1q4idxdm81sx102xc12ixj0xpfx52d6vwvs3jpapnkyq8c7cmby8"))
2151 (modules '((ice-9 ftw)
2152 (ice-9 match)
2153 (srfi srfi-1)
2154 (srfi srfi-26)
2155 (guix build utils)))
2156 (snippet
2157 '(begin
2158 (let ((preserved-third-party-files
2159 '("base/third_party/double_conversion"
2160 "base/third_party/cityhash"
2161 "base/third_party/cityhash_v103"
2162 "base/third_party/dynamic_annotations"
2163 "base/third_party/icu"
2164 "base/third_party/libevent"
2165 "base/third_party/nspr"
2166 "base/third_party/superfasthash"
2167 "base/third_party/symbolize"
2168 "base/third_party/xdg_mime"
2169 "base/third_party/xdg_user_dirs"
2170 "net/third_party/mozilla_security_manager"
2171 "net/third_party/nss"
2172 "net/third_party/quiche"
2173 "net/third_party/uri_template"
2174 "third_party/abseil-cpp"
2175 "third_party/angle"
2176 "third_party/angle/src/common/third_party/base"
2177 "third_party/angle/src/common/third_party/smhasher"
2178 "third_party/angle/src/common/third_party/xxhash"
2179 "third_party/angle/src/third_party/compiler"
2180 "third_party/axe-core"
2181 "third_party/blink"
2182 "third_party/boringssl"
2183 "third_party/boringssl/src/third_party/fiat"
2184 "third_party/breakpad"
2185 "third_party/brotli"
2186 "third_party/ced"
2187 "third_party/cld_3"
2188 "third_party/closure_compiler"
2189 "third_party/crashpad"
2190 "third_party/crashpad/crashpad/third_party/lss"
2191 "third_party/crashpad/crashpad/third_party/zlib"
2192 "third_party/crc32c"
2193 "third_party/dav1d"
2194 "third_party/dawn"
2195 "third_party/devtools-frontend"
2196 "third_party/devtools-frontend/src/front_end/third_party/fabricjs"
2197 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
2198 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
2199 "third_party/devtools-frontend/src/third_party/axe-core"
2200 "third_party/emoji-segmenter"
2201 "third_party/ffmpeg"
2202 "third_party/googletest"
2203 "third_party/harfbuzz-ng/utils"
2204 "third_party/hunspell"
2205 "third_party/iccjpeg"
2206 "third_party/icu"
2207 "third_party/inspector_protocol"
2208 "third_party/jinja2"
2209 "third_party/jsoncpp"
2210 "third_party/jstemplate"
2211 "third_party/khronos"
2212 "third_party/leveldatabase"
2213 "third_party/libaddressinput"
2214 "third_party/libgifcodec"
2215 "third_party/libjingle_xmpp"
2216 "third_party/libjpeg_turbo"
2217 "third_party/libpng"
2218 "third_party/libsrtp"
2219 "third_party/libsync"
2220 "third_party/libudev"
2221 "third_party/libvpx"
2222 "third_party/libwebm"
2223 "third_party/libwebp"
2224 "third_party/libxml"
2225 "third_party/libxslt"
2226 "third_party/libyuv"
2227 "third_party/lss"
2228 "third_party/mako"
2229 "third_party/markupsafe"
2230 "third_party/mesa_headers"
2231 "third_party/metrics_proto"
2232 "third_party/modp_b64"
2233 "third_party/nasm"
2234 "third_party/one_euro_filter"
2235 "third_party/openh264/src/codec/api/svc"
2236 "third_party/opus"
2237 "third_party/ots"
2238 "third_party/pdfium"
2239 "third_party/pdfium/third_party/agg23"
2240 "third_party/pdfium/third_party/base"
2241 "third_party/pdfium/third_party/freetype"
2242 "third_party/pdfium/third_party/lcms"
2243 "third_party/pdfium/third_party/libopenjpeg20"
2244 "third_party/pdfium/third_party/skia_shared"
2245 "third_party/perfetto"
2246 "third_party/pffft"
2247 "third_party/ply"
2248 "third_party/polymer"
2249 "third_party/protobuf"
2250 "third_party/protobuf/third_party/six"
2251 "third_party/pyjson5"
2252 "third_party/re2"
2253 "third_party/rnnoise"
2254 "third_party/skia"
2255 "third_party/skia/include/third_party/skcms/skcms.h"
2256 "third_party/skia/include/third_party/vulkan"
2257 "third_party/skia/third_party/skcms"
2258 "third_party/skia/third_party/vulkanmemoryallocator"
2259 "third_party/smhasher"
2260 "third_party/snappy"
2261 "third_party/sqlite"
2262 "third_party/usb_ids"
2263 "third_party/usrsctp"
2264 "third_party/web-animations-js"
2265 "third_party/webrtc"
2266 "third_party/webrtc/common_audio/third_party/fft4g"
2267 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2268 "third_party/webrtc/modules/third_party/fft"
2269 "third_party/webrtc/modules/third_party/g711"
2270 "third_party/webrtc/modules/third_party/g722"
2271 "third_party/webrtc/rtc_base/third_party/base64"
2272 "third_party/webrtc/rtc_base/third_party/sigslot"
2273 "third_party/webrtc_overrides"
2274 "third_party/widevine/cdm/widevine_cdm_common.h"
2275 "third_party/widevine/cdm/widevine_cdm_version.h"
2276 "third_party/woff2"
2277 "third_party/yasm"
2278 "third_party/zlib"
2279 "url/third_party/mozilla"
2280 "v8/src/third_party/utf8-decoder"
2281 "v8/src/third_party/valgrind"
2282 "v8/src/third_party/siphash"
2283 "v8/third_party/v8/builtins"
2284 "v8/third_party/inspector_protocol"))
2285 (protected (make-regexp "\\.(gn|gyp)i?$")))
2286 (define preserved-club
2287 (map (lambda (member)
2288 (string-append "./" member))
2289 preserved-third-party-files))
2290 (define (empty? dir)
2291 (equal? (scandir dir) '("." "..")))
2292 (define (third-party? file)
2293 (string-contains file "third_party/"))
2294 (define (useless? file)
2295 (any (cute string-suffix? <> file)
2296 '(".zip" ".so" ".dll" ".exe" ".jar")))
2297 (define (parents child)
2298 ;; Return all parent directories of CHILD up to and including
2299 ;; the closest "third_party".
2300 (let* ((dirs (match (string-split child #\/)
2301 ((dirs ... last) dirs)))
2302 (closest (list-index (lambda (dir)
2303 (string=? "third_party" dir))
2304 (reverse dirs)))
2305 (delim (- (length dirs) closest)))
2306 (fold (lambda (dir prev)
2307 (cons (string-append (car prev) "/" dir)
2308 prev))
2309 (list (string-join (list-head dirs delim) "/"))
2310 (list-tail dirs delim))))
2311 (define (remove-loudly file)
2312 (format #t "deleting ~a...~%" file)
2313 (force-output)
2314 (delete-file file))
2315 (define (delete-unwanted-files child stat flag base level)
2316 (match flag
2317 ((or 'regular 'symlink 'stale-symlink)
2318 (when (third-party? child)
2319 (unless (or (member child preserved-club)
2320 (any (cute member <> preserved-club)
2321 (parents child))
2322 (regexp-exec protected child))
2323 (remove-loudly child)))
2324 (when (and (useless? child) (file-exists? child))
2325 (remove-loudly child))
2326 #t)
2327 ('directory-processed
2328 (when (empty? child)
2329 (rmdir child))
2330 #t)
2331 (_ #t)))
2332
2333 (with-directory-excursion "src/3rdparty"
2334 ;; TODO: Try removing "gn" too for future versions of qtwebengine-5.
2335 (delete-file-recursively "ninja")
2336
2337 (with-directory-excursion "chromium"
2338 ;; Delete bundled software and binaries that were not explicitly
2339 ;; preserved above.
2340 (nftw "." delete-unwanted-files 'depth 'physical)
2341
2342 ;; Assert that each preserved item is present to catch removals.
2343 (for-each (lambda (third-party)
2344 (unless (file-exists? third-party)
2345 (error (format #f "~s does not exist!~%" third-party))))
2346 preserved-club)
2347
2348 ;; Use relative header locations instead of hard coded ones.
2349 (substitute*
2350 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2351 (("base/third_party/valgrind") "valgrind"))
2352 (substitute*
2353 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
2354 (("third_party/curl") "curl"))
2355 (substitute*
2356 '("components/viz/common/gpu/vulkan_context_provider.h"
2357 "components/viz/common/resources/resource_format_utils_vulkan.h"
2358 "gpu/config/gpu_util.cc")
2359 (("third_party/vulkan/include/")
2360 ""))
2361
2362 ;; Replace Google Analytics bundle with an empty file and hope
2363 ;; no one notices.
2364 (mkdir-p "third_party/analytics")
2365 (call-with-output-file
2366 "third_party/analytics/google-analytics-bundle.js"
2367 (lambda (port)
2368 (const #t)))))
2369 ;; Do not enable support for loading the Widevine DRM plugin.
2370 (substitute* "src/buildtools/config/common.pri"
2371 (("enable_widevine=true")
2372 "enable_widevine=false")))))))
2373 (build-system gnu-build-system)
2374 (native-inputs
2375 (list bison
2376 flex
2377 gperf
2378 ninja
2379 perl
2380 pkg-config
2381 python2-six
2382 python-2
2383 ruby))
2384 (inputs
2385 (list alsa-lib
2386 atk
2387 cups-minimal
2388 curl
2389 dbus
2390 ffmpeg
2391 fontconfig
2392 harfbuzz
2393 icu4c
2394 jsoncpp
2395 lcms
2396 libcap
2397 libevent
2398 libgcrypt
2399 libjpeg-turbo
2400 libvpx
2401 libwebp
2402 libx11
2403 libxcb
2404 libxcomposite
2405 libxcursor
2406 libxi
2407 libxkbcommon
2408 ;; FIXME: libxml2 needs to built with icu support though it links to
2409 ;; libxml2 configure summary still states "Checking for compatible
2410 ;; system libxml2... no"
2411 libxml2
2412 openh264
2413 libxrandr
2414 libxrender
2415 libxslt
2416 libxtst
2417 mesa
2418 minizip
2419 nss
2420 opus
2421 pciutils
2422 protobuf
2423 pulseaudio
2424 qtbase-5
2425 qtdeclarative-5
2426 qtmultimedia-5
2427 qtwebchannel-5
2428 re2
2429 snappy
2430 eudev
2431 valgrind
2432 vulkan-headers
2433 xcb-util))
2434 (arguments
2435 (substitute-keyword-arguments (package-arguments qtsvg-5)
2436 ((#:modules modules '())
2437 `((guix build gnu-build-system)
2438 (guix build utils)
2439 (ice-9 textual-ports)))
2440 ((#:phases phases)
2441 `(modify-phases ,phases
2442 (add-before 'configure 'substitute-source
2443 (lambda* (#:key inputs outputs #:allow-other-keys)
2444 (let ((out (assoc-ref outputs "out")))
2445 (with-atomic-file-replacement
2446 "src/buildtools/config/linux.pri"
2447 (lambda (in out)
2448 (display (get-string-all in) out)
2449 (display "\ngn_args += use_system_openh264=true\n" out)))
2450 ;; Qtwebengine is not installed into the same prefix as
2451 ;; qtbase. Some qtbase QTLibraryInfo constants will not
2452 ;; work. Replace with the full path to the qtwebengine-5
2453 ;; translations and locales in the store.
2454 (substitute* "src/core/web_engine_library_info.cpp"
2455 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
2456 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
2457 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
2458 (string-append "QLatin1String(\"" out "/share/qt5\")")))
2459 ;; Substitute full dynamic library path for nss.
2460 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2461 (("libnssckbi.so")
2462 (search-input-file inputs "lib/nss/libnssckbi.so")))
2463 ;; Substitute full dynamic library path for udev.
2464 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2465 (("libudev.so.1")
2466 (search-input-file inputs "lib/libudev.so.1"))))))
2467 (add-before 'configure 'set-env
2468 (lambda _
2469 ;; Avoids potential race conditions.
2470 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2471 (setenv "NINJAFLAGS"
2472 (string-append "-k1" ;less verbose build output
2473 ;; Respect the '--cores' option of 'guix build'.
2474 " -j" (number->string (parallel-job-count))))))
2475 (replace 'configure
2476 (lambda _
2477 ;; Valid QT_BUILD_PARTS variables are:
2478 ;; libs tools tests examples demos docs translations
2479 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
2480 "--webengine-printing-and-pdf=no"
2481 "--webengine-ffmpeg=system"
2482 ;; FIXME: Building qtwebengine-5 5.12.2 with
2483 ;; icu4c >= 68 fails.
2484 ;;"--webengine-icu=system"
2485 "--webengine-pepper-plugins=no"
2486 "-webengine-proprietary-codecs")))))
2487 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
2488 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
2489 ;; before running tests.
2490 ((#:tests? _ #f) #f)))
2491 (native-search-paths
2492 (list (search-path-specification
2493 (file-type 'regular)
2494 (separator #f)
2495 (variable "QTWEBENGINEPROCESS_PATH")
2496 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
2497 (home-page "https://wiki.qt.io/QtWebEngine")
2498 (synopsis "Qt WebEngine module")
2499 (description "The Qt5WebEngine module provides support for web applications
2500 using the Chromium browser project. The Chromium source code has Google services
2501 and binaries removed, and adds modular support for using system libraries.")
2502 (license license:lgpl2.1+)))
2503
2504 (define-public qtwebengine
2505 (package
2506 (name "qtwebengine")
2507 (version "6.3.1")
2508 (source
2509 (origin
2510 (method url-fetch)
2511 (uri (qt5-urls name version))
2512 (sha256
2513 (base32
2514 "0ivfsqd5c0cxsnssj6z37901cf6a47w50zaqgjiysvcm3ar36ymd"))
2515 (modules '((ice-9 ftw)
2516 (ice-9 match)
2517 (srfi srfi-1)
2518 (srfi srfi-26)
2519 (guix build utils)))
2520 (snippet
2521 '(begin
2522 (let ((preserved-third-party-files
2523 '("base/third_party/double_conversion"
2524 "base/third_party/cityhash"
2525 "base/third_party/cityhash_v103"
2526 "base/third_party/dynamic_annotations"
2527 "base/third_party/icu"
2528 "base/third_party/libevent"
2529 "base/third_party/nspr"
2530 "base/third_party/superfasthash"
2531 "base/third_party/symbolize"
2532 "base/third_party/xdg_mime"
2533 "base/third_party/xdg_user_dirs"
2534 "net/third_party/mozilla_security_manager"
2535 "net/third_party/nss"
2536 "net/third_party/quiche"
2537 "net/third_party/uri_template"
2538 "third_party/abseil-cpp"
2539 "third_party/angle"
2540 "third_party/angle/src/common/third_party/base"
2541 "third_party/angle/src/common/third_party/smhasher"
2542 "third_party/angle/src/common/third_party/xxhash"
2543 "third_party/axe-core"
2544 "third_party/blink"
2545 "third_party/boringssl"
2546 "third_party/boringssl/src/third_party/fiat"
2547 "third_party/breakpad"
2548 "third_party/brotli"
2549 "third_party/ced"
2550 "third_party/cld_3"
2551 "third_party/closure_compiler"
2552 "third_party/crashpad"
2553 "third_party/crashpad/crashpad/third_party/lss"
2554 "third_party/crashpad/crashpad/third_party/zlib"
2555 "third_party/crc32c"
2556 "third_party/dav1d"
2557 "third_party/dawn"
2558 "third_party/devtools-frontend"
2559 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
2560 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
2561 "third_party/emoji-segmenter"
2562 "third_party/ffmpeg"
2563 "third_party/googletest"
2564 "third_party/harfbuzz-ng/utils"
2565 "third_party/hunspell"
2566 "third_party/iccjpeg"
2567 "third_party/icu"
2568 "third_party/inspector_protocol"
2569 "third_party/jinja2"
2570 "third_party/jsoncpp"
2571 "third_party/jstemplate"
2572 "third_party/khronos"
2573 "third_party/leveldatabase"
2574 "third_party/libaddressinput"
2575 "third_party/libgifcodec"
2576 "third_party/libjingle_xmpp"
2577 "third_party/libjpeg_turbo"
2578 "third_party/libpng"
2579 "third_party/libsrtp"
2580 "third_party/libsync"
2581 "third_party/libudev"
2582 "third_party/libvpx"
2583 "third_party/libwebm"
2584 "third_party/libwebp"
2585 "third_party/libxml"
2586 "third_party/libxslt"
2587 "third_party/libyuv"
2588 "third_party/lss"
2589 "third_party/mako"
2590 "third_party/markupsafe"
2591 "third_party/mesa_headers"
2592 "third_party/metrics_proto"
2593 "third_party/modp_b64"
2594 "third_party/nasm"
2595 "third_party/one_euro_filter"
2596 "third_party/openh264/src/codec/api/svc"
2597 "third_party/opus"
2598 "third_party/ots"
2599 "third_party/pdfium"
2600 "third_party/pdfium/third_party/agg23"
2601 "third_party/pdfium/third_party/base"
2602 "third_party/pdfium/third_party/freetype"
2603 "third_party/pdfium/third_party/lcms"
2604 "third_party/pdfium/third_party/libopenjpeg20"
2605 "third_party/pdfium/third_party/skia_shared"
2606 "third_party/perfetto"
2607 "third_party/pffft"
2608 "third_party/ply"
2609 "third_party/polymer"
2610 "third_party/protobuf"
2611 "third_party/protobuf/third_party/six"
2612 "third_party/pyjson5"
2613 "third_party/re2"
2614 "third_party/rnnoise"
2615 "third_party/skia"
2616 "third_party/skia/include/third_party/skcms/skcms.h"
2617 "third_party/skia/include/third_party/vulkan"
2618 "third_party/skia/third_party/skcms"
2619 "third_party/skia/third_party/vulkanmemoryallocator"
2620 "third_party/smhasher"
2621 "third_party/snappy"
2622 "third_party/sqlite"
2623 "third_party/usb_ids"
2624 "third_party/usrsctp"
2625 "third_party/web-animations-js"
2626 "third_party/webrtc"
2627 "third_party/webrtc/common_audio/third_party/ooura"
2628 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
2629 "third_party/webrtc/modules/third_party/fft"
2630 "third_party/webrtc/modules/third_party/g711"
2631 "third_party/webrtc/modules/third_party/g722"
2632 "third_party/webrtc/rtc_base/third_party/base64"
2633 "third_party/webrtc/rtc_base/third_party/sigslot"
2634 "third_party/webrtc_overrides"
2635 "third_party/widevine/cdm/widevine_cdm_common.h"
2636 "third_party/widevine/cdm/widevine_cdm_version.h"
2637 "third_party/woff2"
2638 "third_party/zlib"
2639 "url/third_party/mozilla"
2640 "v8/src/third_party/utf8-decoder"
2641 "v8/src/third_party/valgrind"
2642 "v8/src/third_party/siphash"
2643 "v8/third_party/v8/builtins"
2644 "v8/third_party/inspector_protocol"))
2645 (protected (make-regexp "\\.(gn|gyp)i?$")))
2646 (define preserved-club
2647 (map (lambda (member)
2648 (string-append "./" member))
2649 preserved-third-party-files))
2650 (define (empty? dir)
2651 (equal? (scandir dir) '("." "..")))
2652 (define (third-party? file)
2653 (string-contains file "third_party/"))
2654 (define (useless? file)
2655 (any (cute string-suffix? <> file)
2656 '(".zip" ".so" ".dll" ".exe" ".jar")))
2657 (define (parents child)
2658 ;; Return all parent directories of CHILD up to and including
2659 ;; the closest "third_party".
2660 (let* ((dirs (match (string-split child #\/)
2661 ((dirs ... last) dirs)))
2662 (closest (list-index (lambda (dir)
2663 (string=? "third_party" dir))
2664 (reverse dirs)))
2665 (delim (- (length dirs) closest)))
2666 (fold (lambda (dir prev)
2667 (cons (string-append (car prev) "/" dir)
2668 prev))
2669 (list (string-join (list-head dirs delim) "/"))
2670 (list-tail dirs delim))))
2671 (define (remove-loudly file)
2672 (format #t "deleting ~a...~%" file)
2673 (force-output)
2674 (delete-file file))
2675 (define (delete-unwanted-files child stat flag base level)
2676 (match flag
2677 ((or 'regular 'symlink 'stale-symlink)
2678 (when (third-party? child)
2679 (unless (or (member child preserved-club)
2680 (any (cute member <> preserved-club)
2681 (parents child))
2682 (regexp-exec protected child))
2683 (remove-loudly child)))
2684 (when (and (useless? child) (file-exists? child))
2685 (remove-loudly child)))
2686 ('directory-processed
2687 (when (empty? child)
2688 (rmdir child)))
2689 (_ #t)))
2690
2691 (with-directory-excursion "src/3rdparty"
2692 (delete-file-recursively "ninja")
2693
2694 (with-directory-excursion "chromium"
2695 ;; Delete bundled software and binaries that were not
2696 ;; explicitly preserved above.
2697 (nftw "." delete-unwanted-files 'depth 'physical)
2698
2699 ;; Assert that each preserved item is present to catch
2700 ;; removals.
2701 (for-each (lambda (third-party)
2702 (unless (file-exists? third-party)
2703 (error (format #f "~s does not exist!~%"
2704 third-party))))
2705 preserved-club)
2706
2707 ;; Use relative header locations instead of hard coded ones.
2708 (substitute*
2709 "base/third_party/dynamic_annotations/dynamic_annotations.c"
2710 (("base/third_party/valgrind") "valgrind"))
2711 (substitute* "third_party/breakpad/breakpad/src/common/\
2712 linux/libcurl_wrapper.h"
2713 (("third_party/curl") "curl"))
2714 (substitute*
2715 '("components/viz/common/gpu/vulkan_context_provider.h"
2716 "gpu/config/gpu_util.cc")
2717 (("third_party/vulkan/include/")
2718 ""))
2719
2720 ;; Replace Google Analytics bundle with an empty file and
2721 ;; hope no one notices.
2722 (mkdir-p "third_party/analytics")
2723 (call-with-output-file
2724 "third_party/analytics/google-analytics-bundle.js"
2725 (lambda (port)
2726 (const #t)))))
2727 ;; Do not enable support for loading the Widevine DRM plugin.
2728 (substitute* "src/core/CMakeLists.txt"
2729 (("enable_widevine=true")
2730 "enable_widevine=false")))))))
2731 (build-system cmake-build-system)
2732 (arguments
2733 (list
2734 ;; XXX: The test suite is not built by default; leave it off to save
2735 ;; some build time and resources.
2736 #:tests? #f
2737 #:configure-flags
2738 ;; Use the CMake ninja generator, otherwise the build fails (see:
2739 ;; https://bugreports.qt.io/browse/QTBUG-96897).
2740 #~(list "-GNinja" ;
2741 ;; Manually add the NSS library prefix to the linker
2742 ;; search path, otherwise it fails to be linked (see:
2743 ;; https://bugreports.qt.io/browse/QTBUG-105053).
2744 (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-L"
2745 (search-input-directory %build-inputs "lib/nss"))
2746
2747 ;; The PDF renderer plugin fails to build with errors such as
2748 ;; "src/3rdparty/chromium/components/pdf
2749 ;; /renderer/pdf_accessibility_tree.cc:1373:39:
2750 ;; error: use of undeclared identifier 'IDS_PDF_PAGE_INDEX'";
2751 ;; disable it.
2752 "-DQT_FEATURE_webengine_printing_and_pdf=OFF"
2753 "-DQT_FEATURE_webengine_pepper_plugins=OFF" ;widevine
2754 "-DQT_FEATURE_system_ffmpeg=ON"
2755 ;; Do not artificially limit codec support; video decoding is
2756 ;; done by ffmpeg.
2757 "-DQT_FEATURE_webengine_proprietary_codecs=ON"
2758 "-DQT_FEATURE_webengine_system_alsa=ON"
2759 "-DQT_FEATURE_webengine_system_icu=ON"
2760 "-DQT_FEATURE_webengine_system_libxml=ON"
2761 "-DQT_FEATURE_webengine_system_libpci=ON"
2762 "-DQT_FEATURE_webengine_system_libpng=ON"
2763 "-DQT_FEATURE_webengine_system_pulseaudio=ON"
2764 "-DQT_FEATURE_webengine_system_zlib=ON")
2765 #:phases
2766 #~(modify-phases %standard-phases
2767 (add-after 'unpack 'patch-paths
2768 (lambda* (#:key inputs #:allow-other-keys)
2769 ;; Qtwebengine is not installed into the same prefix as qtbase.
2770 ;; Some qtbase QTLibraryInfo constants will not work. Replace
2771 ;; with the full path to the qtwebengine translations and
2772 ;; locales in the store.
2773 (substitute* "src/core/web_engine_library_info.cpp"
2774 (("QLibraryInfo::path\\(QLibraryInfo::TranslationsPath)")
2775 (string-append "QLatin1String(\"" #$output
2776 "/share/qt6/translations\")"))
2777 (("QLibraryInfo::path\\(QLibraryInfo::DataPath)")
2778 (string-append "QLatin1String(\"" #$output
2779 "/share/qt6\")")))
2780 ;; Substitute full dynamic library path for nss.
2781 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
2782 (("libnssckbi.so")
2783 (search-input-file inputs "lib/nss/libnssckbi.so")))
2784 ;; Substitute full dynamic library path for udev.
2785 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
2786 (("libudev.so.1")
2787 (search-input-file inputs "lib/libudev.so.1")))
2788 ;; Patch the location of the X11 keywoard layouts, otherwise
2789 ;; webengine *crashes* at run time when the default directory,
2790 ;; '/usr/share/X11/xkb' is empty (see:
2791 ;; https://bugreports.qt.io/browse/QTBUG-105124).
2792 (substitute* "src/3rdparty/chromium/ui/events/ozone/layout/xkb\
2793 /xkb_keyboard_layout_engine.cc"
2794 (("/usr/share/X11/xkb")
2795 (search-input-directory inputs "share/X11/xkb")))))
2796 (add-before 'configure 'prepare-build-environment
2797 (lambda _
2798 ;; Avoids potential race conditions.
2799 (setenv "PYTHONDONTWRITEBYTECODE" "1")
2800 (setenv "NINJAFLAGS"
2801 (string-append
2802 "-k1" ;less verbose build output
2803 ;; Respect the '--cores' option of 'guix build'.
2804 " -j" (number->string (parallel-job-count))))
2805 ;; Use Clang/LDD to help tame the memory requirements and hasten
2806 ;; the build.
2807 (setenv "AR" "llvm-ar") (setenv "NM" "llvm-nm")
2808 (setenv "CC" "clang") (setenv "CXX" "clang++")))
2809 (replace 'build
2810 (lambda* (#:key parallel-build? #:allow-other-keys)
2811 (apply invoke "cmake" "--build" "."
2812 (if parallel-build?
2813 `("--parallel" ,(number->string (parallel-job-count)))
2814 '()))))
2815 (replace 'install
2816 (lambda _
2817 (invoke "cmake" "--install" "."))))))
2818 (native-inputs
2819 (modify-inputs (package-native-inputs qtwebengine-5)
2820 (delete "python2" "python2-six")
2821 (append clang-14
2822 lld-as-ld-wrapper
2823 node-lts
2824 python-wrapper
2825 python-html5lib)))
2826 (inputs
2827 (modify-inputs (package-inputs qtwebengine-5)
2828 (replace "qtbase" qtbase)
2829 (replace "qtdeclarative" qtdeclarative)
2830 (replace "qtmultimedia" qtmultimedia)
2831 (replace "qtwebchannel" qtwebchannel)
2832 (append libxkbfile xkeyboard-config)))
2833 (native-search-paths
2834 (list (search-path-specification
2835 (file-type 'regular)
2836 (separator #f)
2837 (variable "QTWEBENGINEPROCESS_PATH")
2838 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
2839 (home-page "https://wiki.qt.io/QtWebEngine")
2840 (synopsis "Qt WebEngine module")
2841 (description "The Qt WebEngine module provides support for web
2842 applications using the Chromium browser project. The Chromium source code has
2843 Google services and binaries removed, and adds modular support for using
2844 system libraries.")
2845 (license license:lgpl2.1+)))
2846
2847 (define-public single-application-qt5
2848 ;; Change in function signature, nheko requires at least this commit
2849 (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053"))
2850 (package
2851 (name "single-application-qt5")
2852 (version (string-append "3.2.0-" (string-take commit 7)))
2853 (source
2854 (origin
2855 (method git-fetch)
2856 (uri
2857 (git-reference
2858 (url "https://github.com/itay-grudev/SingleApplication")
2859 (commit commit)))
2860 (file-name (git-file-name name version))
2861 (sha256
2862 (base32
2863 "163aa2x2qb0h8w26si5ql833ilj427jjbdwlz1p2p8iaq6dh0vq1"))))
2864 (build-system cmake-build-system)
2865 (arguments
2866 `(#:tests? #f ; no check target
2867 ;; Projects can decide how to build this library. You might need to
2868 ;; override this flag (QApplication, QGuiApplication or
2869 ;; QCoreApplication).
2870 #:configure-flags '("-DQAPPLICATION_CLASS=QApplication")
2871 #:phases
2872 (modify-phases %standard-phases
2873 ;; No install target, install things manually
2874 (replace 'install
2875 (lambda* (#:key inputs outputs source #:allow-other-keys)
2876 (let* ((qt (assoc-ref inputs "qtbase"))
2877 (qt-version ,(version-major (package-version qtbase-5)))
2878 (out (assoc-ref outputs "out")))
2879 (install-file
2880 "libSingleApplication.a" (string-append out "/lib"))
2881 (for-each
2882 (lambda (file)
2883 (install-file
2884 (string-append source "/" file)
2885 (string-append out "/include")))
2886 '("SingleApplication"
2887 "singleapplication.h" "singleapplication_p.h"))
2888 #t))))))
2889 (inputs
2890 (list qtbase-5))
2891 (home-page "https://github.com/itay-grudev/SingleApplication")
2892 (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6")
2893 (description
2894 "SingleApplication is a replacement of the QtSingleApplication for Qt5 and Qt6.
2895
2896 It keeps the Primary Instance of your Application and kills each subsequent
2897 instances. It can (if enabled) spawn secondary (non-related to the primary)
2898 instances and can send data to the primary instance from secondary
2899 instances.")
2900 (license license:expat))))
2901
2902 (define-public python-sip
2903 (package
2904 (name "python-sip")
2905 (version "5.5.0")
2906 (source
2907 (origin
2908 (method url-fetch)
2909 (uri (list (pypi-uri "sip" version)
2910 (string-append "https://www.riverbankcomputing.com/static/"
2911 "Downloads/sip/" version
2912 "/sip-" version ".tar.gz")))
2913 (sha256
2914 (base32
2915 "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"))))
2916 (build-system python-build-system)
2917 (native-inputs
2918 (list python-wrapper))
2919 (propagated-inputs
2920 (list python-toml python-packaging))
2921 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
2922 (synopsis "Python binding creator for C and C++ libraries")
2923 (description
2924 "SIP is a tool to create Python bindings for C and C++ libraries. It
2925 was originally developed to create PyQt, the Python bindings for the Qt
2926 toolkit, but can be used to create bindings for any C or C++ library.
2927
2928 SIP comprises a code generator and a Python module. The code generator
2929 processes a set of specification files and generates C or C++ code, which
2930 is then compiled to create the bindings extension module. The SIP Python
2931 module provides support functions to the automatically generated code.")
2932 ;; There is a choice between a python like license, gpl2 and gpl3.
2933 ;; For compatibility with pyqt, we need gpl3.
2934 (license license:gpl3)))
2935
2936 (define-public python-sip-4
2937 (package
2938 (inherit python-sip)
2939 (name "python-sip")
2940 (version "4.19.25")
2941 (source
2942 (origin
2943 (method url-fetch)
2944 (uri (list (pypi-uri "sip" version)
2945 (string-append "https://www.riverbankcomputing.com/static/"
2946 "Downloads/sip/" version
2947 "/sip-" version ".tar.gz")))
2948 (sha256
2949 (base32
2950 "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"))))
2951 (build-system gnu-build-system)
2952 (native-inputs
2953 `(("python" ,python-wrapper)))
2954 (propagated-inputs `())
2955 (arguments
2956 `(#:tests? #f ; no check target
2957 #:imported-modules ((guix build python-build-system)
2958 ,@%gnu-build-system-modules)
2959 #:modules ((srfi srfi-1)
2960 ((guix build python-build-system) #:select (python-version))
2961 ,@%gnu-build-system-modules)
2962 #:phases
2963 (modify-phases %standard-phases
2964 (replace 'configure
2965 (lambda* (#:key inputs outputs #:allow-other-keys)
2966 (let* ((out (assoc-ref outputs "out"))
2967 (bin (string-append out "/bin"))
2968 (include (string-append out "/include"))
2969 (python (assoc-ref inputs "python"))
2970 (lib (string-append out "/lib/python"
2971 (python-version python)
2972 "/site-packages")))
2973 (invoke "python" "configure.py"
2974 "--bindir" bin
2975 "--destdir" lib
2976 "--incdir" include)))))))
2977 (license license:gpl3)))
2978
2979 (define-public python-pyqt
2980 (package
2981 (name "python-pyqt")
2982 (version "5.15.2")
2983 (source
2984 (origin
2985 (method url-fetch)
2986 ;; PyPI is the canonical distribution point of PyQt. Older
2987 ;; releases are available from the web site.
2988 (uri (list (pypi-uri "PyQt5" version)
2989 (string-append "https://www.riverbankcomputing.com/static/"
2990 "Downloads/PyQt5/" version "/PyQt5-"
2991 version ".tar.gz")))
2992 (file-name (string-append "PyQt5-" version ".tar.gz"))
2993 (sha256
2994 (base32
2995 "1z74295i69cha52llsqffzhb5zz7qnbjc64h8qg21l91jgf0harp"))
2996 (patches (search-patches "pyqt-configure.patch"))))
2997 (build-system gnu-build-system)
2998 (native-inputs
2999 (list qtbase-5)) ; for qmake
3000 (propagated-inputs
3001 (list python-sip python-pyqt5-sip))
3002 (inputs
3003 `(("python" ,python-wrapper)
3004 ("qtbase" ,qtbase-5)
3005 ("qtconnectivity" ,qtconnectivity)
3006 ("qtdeclarative-5" ,qtdeclarative-5)
3007 ("qtlocation" ,qtlocation)
3008 ("qtmultimedia-5" ,qtmultimedia-5)
3009 ("qtsensors" ,qtsensors)
3010 ("qtserialport" ,qtserialport)
3011 ("qtsvg-5" ,qtsvg-5)
3012 ("qttools-5" ,qttools-5)
3013 ("qtwebchannel-5" ,qtwebchannel-5)
3014 ("qtwebkit" ,qtwebkit)
3015 ("qtwebsockets-5" ,qtwebsockets-5)
3016 ("qtx11extras" ,qtx11extras)
3017 ("qtxmlpatterns" ,qtxmlpatterns)))
3018 (arguments
3019 `(#:modules ((srfi srfi-1)
3020 ((guix build python-build-system) #:select (python-version))
3021 ,@%gnu-build-system-modules)
3022 #:imported-modules ((guix build python-build-system)
3023 ,@%gnu-build-system-modules)
3024 #:phases
3025 (modify-phases %standard-phases
3026 ;; When building python-pyqtwebengine, <qprinter.h> can not be
3027 ;; included. Here we substitute the full path to the header in the
3028 ;; store.
3029 (add-before 'configure 'substitute-source
3030 (lambda* (#:key inputs #:allow-other-keys)
3031 (let* ((qtbase (assoc-ref inputs "qtbase"))
3032 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
3033 (substitute* "sip/QtPrintSupport/qprinter.sip"
3034 (("<qprinter.h>")
3035 qtprinter.h))
3036 #t)))
3037 (replace 'configure
3038 (lambda* (#:key inputs outputs #:allow-other-keys)
3039 (let* ((out (assoc-ref outputs "out"))
3040 (bin (string-append out "/bin"))
3041 (sip (string-append out "/share/sip"))
3042 (plugins (string-append out "/lib/qt5/plugins"))
3043 (designer (string-append plugins "/designer"))
3044 (qml (string-append plugins "/PyQt5"))
3045 (python (assoc-ref inputs "python"))
3046 (lib (string-append out "/lib/python"
3047 (python-version python)
3048 "/site-packages"))
3049 (stubs (string-append lib "/PyQt5")))
3050 (invoke "python" "configure.py"
3051 "--confirm-license"
3052 "--bindir" bin
3053 "--destdir" lib
3054 "--designer-plugindir" designer
3055 "--qml-plugindir" qml
3056 ; Where to install the PEP 484 Type Hints stub
3057 ; files. Without this the stubs are tried to be
3058 ; installed into the python package's
3059 ; site-package directory, which is read-only.
3060 "--stubsdir" stubs
3061 "--sipdir" sip)))))))
3062 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
3063 (synopsis "Python bindings for Qt")
3064 (description
3065 "PyQt is a set of Python v2 and v3 bindings for the Qt application
3066 framework. The bindings are implemented as a set of Python modules and
3067 contain over 620 classes.")
3068 (license license:gpl3)))
3069
3070 (define-public python-pyqt5-sip
3071 (package
3072 (name "python-pyqt5-sip")
3073 (version "12.8.1")
3074 (source
3075 (origin
3076 (method url-fetch)
3077 (uri (pypi-uri "PyQt5_sip" version))
3078 (sha256
3079 (base32
3080 "1gg032ys4pccwkdzmdryadc9a4lq85nr05pag9swrsdykbdl9s9h"))))
3081 (build-system python-build-system)
3082 (arguments
3083 `(#:tests? #f)) ;; No test code.
3084 (home-page "https://www.riverbankcomputing.com/software/sip/")
3085 (synopsis "Sip module support for PyQt5")
3086 (description "Sip module support for PyQt5")
3087 (license license:lgpl2.1+)))
3088
3089 (define-public python-pyqtwebengine
3090 (package
3091 (name "python-pyqtwebengine")
3092 (version "5.15.2")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 ;; The newest releases are only available on PyPI. Older ones
3097 ;; are mirrored at the upstream home page.
3098 (uri (list (pypi-uri "PyQtWebEngine" version)
3099 (string-append "https://www.riverbankcomputing.com/static"
3100 "/Downloads/PyQtWebEngine/" version
3101 "/PyQtWebEngine-" version ".tar.gz")))
3102 (sha256
3103 (base32
3104 "0d56ak71r14w4f9r96vaj34qcn2rbln3s6ildvvyc707fjkzwwjd"))))
3105 (build-system gnu-build-system)
3106 (native-inputs
3107 (list python python-sip
3108 ;; qtbase is required for qmake
3109 qtbase-5))
3110 (inputs
3111 `(("python" ,python-wrapper)
3112 ("python-sip" ,python-sip)
3113 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3114 ("qtbase" ,qtbase-5)
3115 ("qtsvg-5" ,qtsvg-5)
3116 ("qtdeclarative-5" ,qtdeclarative-5)
3117 ("qtwebchannel-5" ,qtwebchannel-5)
3118 ("qtwebengine-5" ,qtwebengine-5)))
3119 (arguments
3120 `(#:modules ((srfi srfi-1)
3121 ((guix build python-build-system) #:select (python-version))
3122 ,@%gnu-build-system-modules)
3123 #:imported-modules ((guix build python-build-system)
3124 ,@%gnu-build-system-modules)
3125 #:phases
3126 (modify-phases %standard-phases
3127 (replace 'configure
3128 (lambda* (#:key inputs outputs #:allow-other-keys)
3129 (let* ((out (assoc-ref outputs "out"))
3130 (sipdir (string-append out "/share/sip"))
3131 (pyqt-sipdir (string-append
3132 (assoc-ref inputs "python-pyqt") "/share/sip"))
3133 (python (assoc-ref inputs "python"))
3134 (lib (string-append out "/lib/python"
3135 (python-version python)
3136 "/site-packages/PyQt5"))
3137 (stubs (string-append lib "/PyQt5")))
3138
3139 (mkdir-p sipdir)
3140 (invoke "python" "configure.py"
3141 "-w"
3142 "--no-dist-info"
3143 "--destdir" lib
3144 "--no-qsci-api"
3145 "--stubsdir" stubs
3146 "--sipdir" sipdir
3147 "--pyqt-sipdir" pyqt-sipdir))))
3148 ;; Because this has a different prefix than python-pyqt then we need
3149 ;; to make this a namespace of its own.
3150 (add-after 'install 'make-namespace
3151 (lambda* (#:key inputs outputs #:allow-other-keys)
3152 (let* ((__init__.py (string-append
3153 (assoc-ref outputs "out")
3154 "/lib/python"
3155 (python-version (assoc-ref inputs "python"))
3156 "/site-packages/PyQt5/__init__.py")))
3157 (with-output-to-file __init__.py
3158 (lambda _ (display "
3159 from pkgutil import extend_path
3160 __path__ = extend_path(__path__, __name__)
3161 ")))
3162 #t))))))
3163 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
3164 (synopsis "Python bindings for QtWebEngine")
3165 (description
3166 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
3167 WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
3168 set of three modules. Prior to v5.12 these bindings were part of PyQt
3169 itself.")
3170 (license license:gpl3)))
3171
3172 ;; XXX: This is useful for removing qtwebkit from other packages' dependency
3173 ;; graphs, as well as for preventing python-pyqtwebengine from transitively
3174 ;; depending on qtwebkit.
3175 ;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
3176 ;; packages that could be used together.
3177 (define-public python-pyqt-without-qtwebkit
3178 (package/inherit python-pyqt
3179 (name "python-pyqt-without-qtwebkit")
3180 (inputs
3181 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
3182
3183 (define-public python-pyqt-builder
3184 (package
3185 (name "python-pyqt-builder")
3186 (version "1.9.0")
3187 (source
3188 (origin
3189 (method url-fetch)
3190 (uri (pypi-uri "PyQt-builder" version))
3191 (sha256
3192 (base32
3193 "0nh0054c54ji3sm6d268fccf0y5f613spswwgwqd3rnn816hnljl"))))
3194 (build-system python-build-system)
3195 (inputs
3196 (list python-sip))
3197 (home-page "https://www.riverbankcomputing.com/static/Docs/PyQt-builder/")
3198 (synopsis "PEP 517 compliant PyQt build system")
3199 (description "PyQt-builder is a tool for generating Python bindings for C++
3200 libraries that use the Qt application framework. The bindings are built on
3201 top of the PyQt bindings for Qt. PyQt-builder is used to build PyQt itself.")
3202 ;; Either version 2 or 3, but no other version. See the file
3203 ;; 'pyqtbuild/builder.py' in the source distribution for more information.
3204 (license (list license:gpl2 license:gpl3))))
3205
3206 (define-public python-qtpy
3207 (package
3208 (name "python-qtpy")
3209 (version "2.0.1")
3210 (source
3211 (origin
3212 (method url-fetch)
3213 (uri (pypi-uri "QtPy" version))
3214 (sha256
3215 (base32
3216 "13zbhnl2rm30xafwrzfwdb4mjp7gk4s9h2xagbf83pnjzczhgzdd"))))
3217 (build-system python-build-system)
3218 (propagated-inputs (list python-packaging))
3219 (arguments
3220 `(;; Not all supported bindings are packaged. Especially PyQt4.
3221 #:tests? #f))
3222 (home-page "https://github.com/spyder-ide/qtpy")
3223 (synopsis
3224 "Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets")
3225 (description
3226 "Provides an abstraction layer on top of the various Qt bindings
3227 (PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
3228 (license license:expat)))
3229
3230 (define-public qscintilla
3231 (package
3232 (name "qscintilla")
3233 (version "2.11.6")
3234 (source (origin
3235 (method url-fetch)
3236 (uri (string-append "https://www.riverbankcomputing.com/static"
3237 "/Downloads/QScintilla/" version
3238 "/QScintilla-" version ".tar.gz"))
3239 (sha256
3240 (base32
3241 "19r0vpqb4m9bqwxmjp9w6x0hgahkrg7zryk78hwgplj7vdbn0d77"))))
3242 (build-system gnu-build-system)
3243 (arguments
3244 `(#:phases
3245 (modify-phases %standard-phases
3246 (replace 'configure
3247 (lambda* (#:key outputs #:allow-other-keys)
3248 (let ((out (assoc-ref outputs "out")))
3249 (chdir "Qt4Qt5")
3250 (substitute* "qscintilla.pro"
3251 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
3252 (string-append out "/lib"))
3253 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
3254 (string-append out "/include"))
3255 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
3256 (string-append out "/translations"))
3257 (("\\$\\$\\[QT_INSTALL_DATA\\]")
3258 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
3259 (("\\$\\$\\[QT_HOST_DATA\\]")
3260 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
3261 (invoke "qmake")))))))
3262 (native-inputs (list qtbase-5))
3263 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
3264 (synopsis "Qt port of the Scintilla C++ editor control")
3265 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3266 editor control. QScintilla includes features especially useful when editing
3267 and debugging source code. These include support for syntax styling, error
3268 indicators, code completion and call tips.")
3269 (license license:gpl3+)))
3270
3271 (define-public python-qscintilla
3272 (package/inherit qscintilla
3273 (name "python-qscintilla")
3274 (arguments
3275 `(#:configure-flags
3276 (list "--pyqt=PyQt5"
3277 (string-append "--pyqt-sipdir="
3278 (assoc-ref %build-inputs "python-pyqt")
3279 "/share/sip")
3280 (string-append "--qsci-incdir="
3281 (assoc-ref %build-inputs "qscintilla")
3282 "/include")
3283 (string-append "--qsci-libdir="
3284 (assoc-ref %build-inputs "qscintilla")
3285 "/lib"))
3286 #:phases
3287 (modify-phases %standard-phases
3288 (replace 'configure
3289 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
3290 (let ((out (assoc-ref outputs "out"))
3291 (python (assoc-ref inputs "python")))
3292 (chdir "Python")
3293 (apply invoke "python3" "configure.py"
3294 configure-flags)
3295 ;; Install to the right directory
3296 (substitute* '("Makefile"
3297 "Qsci/Makefile")
3298 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
3299 (((string-append python "/lib"))
3300 (string-append out "/lib")))
3301 ;; And fix the installed.txt file
3302 (substitute* "installed.txt"
3303 (("/gnu/store/[^/]+") out)))
3304 #t)))))
3305 (inputs
3306 `(("qscintilla" ,qscintilla)
3307 ("python" ,python)
3308 ("python-pyqt" ,python-pyqt)))
3309 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
3310 editor control. QScintilla includes features especially useful when editing
3311 and debugging source code. These include support for syntax styling, error
3312 indicators, code completion and call tips.
3313
3314 This package provides the Python bindings.")))
3315
3316 ;; PyQt only looks for modules in its own directory. It ignores environment
3317 ;; variables such as PYTHONPATH, so we need to build a union package to make
3318 ;; it work.
3319 (define-public python-pyqt+qscintilla
3320 (package/inherit python-pyqt
3321 (name "python-pyqt+qscintilla")
3322 (source #f)
3323 (build-system trivial-build-system)
3324 (arguments
3325 '(#:modules ((guix build union))
3326 #:builder (begin
3327 (use-modules (ice-9 match)
3328 (guix build union))
3329 (match %build-inputs
3330 (((names . directories) ...)
3331 (union-build (assoc-ref %outputs "out")
3332 directories)
3333 #t)))))
3334 (inputs
3335 `(("python-pyqt" ,python-pyqt)
3336 ("python-qscintilla" ,python-qscintilla)))
3337 (synopsis "Union of PyQt and the Qscintilla extension")
3338 (description
3339 "This package contains the union of PyQt and the Qscintilla extension.")))
3340
3341 (define-public qtkeychain
3342 (package
3343 (name "qtkeychain")
3344 (version "0.13.2")
3345 (source
3346 (origin
3347 (method git-fetch)
3348 (uri (git-reference
3349 (url "https://github.com/frankosterfeld/qtkeychain/")
3350 (commit (string-append "v" version))))
3351 (file-name (git-file-name name version))
3352 (sha256
3353 (base32
3354 "1zk6r2vc1q48qs7mw2h47bpgrfbb9r7lf9cwq4sb1a4nls87zznk"))))
3355 (build-system cmake-build-system)
3356 (native-inputs
3357 (list pkg-config qttools-5))
3358 (inputs
3359 (list libsecret qtbase-5))
3360 (arguments
3361 `(#:tests? #f ; No tests included
3362 #:phases
3363 (modify-phases %standard-phases
3364 (add-before 'configure 'set-qt-trans-dir
3365 (lambda _
3366 (substitute* "CMakeLists.txt"
3367 (("\\$\\{qt_translations_dir\\}")
3368 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations")))))))
3369 (home-page "https://github.com/frankosterfeld/qtkeychain")
3370 (synopsis "Qt API to store passwords")
3371 (description
3372 "QtKeychain is a Qt library to store passwords and other secret data
3373 securely. It will not store any data unencrypted unless explicitly requested.")
3374 (license license:bsd-3)))
3375
3376 (define-public qtsolutions
3377 (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
3378 (revision "53"))
3379 (package
3380 (name "qtsolutions")
3381 (version (git-version "0" revision commit))
3382 (source
3383 (origin
3384 (method git-fetch)
3385 (uri (git-reference
3386 (url "https://github.com/qtproject/qt-solutions")
3387 (commit commit)))
3388 (file-name (git-file-name name version))
3389 (sha256
3390 (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
3391 (modules '((guix build utils)
3392 (ice-9 ftw)
3393 (srfi srfi-1)))
3394 (snippet
3395 ;; Unvendor QtLockFile from QtSingleApplication.
3396 '(begin
3397 (with-directory-excursion "qtsingleapplication/src"
3398 (for-each delete-file
3399 (find-files "." "qtlockedfile.*\\.(h|cpp)"))
3400 (substitute* "qtsingleapplication.pri"
3401 ;; Add include path of LockedFile.
3402 (("INCLUDEPATH \\+=")
3403 "INCLUDEPATH += ../../qtlockedfile/src")
3404 ;; Link library of LockedFile.
3405 (("LIBS \\+=")
3406 "LIBS += -lQtSolutions_LockedFile"))
3407 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
3408 (("#include \"qtlockedfile.*\\.cpp\"") "")
3409 ;; Unwrap namespace added in the vendoring process.
3410 (("QtLP_Private::QtLockedFile")
3411 "QtLockedFile")))
3412 #t))))
3413 (build-system gnu-build-system)
3414 (arguments
3415 `(#:tests? #f ; No target
3416 #:imported-modules
3417 ((guix build copy-build-system)
3418 ,@%gnu-build-system-modules)
3419 #:modules
3420 (((guix build copy-build-system) #:prefix copy:)
3421 (guix build gnu-build-system)
3422 (guix build utils))
3423 #:phases
3424 (modify-phases %standard-phases
3425 (add-after 'unpack 'patch-source
3426 (lambda* (#:key outputs #:allow-other-keys)
3427 (substitute* (find-files "." "common.pri")
3428 ;; Remove unnecessary prefixes/suffixes in library names.
3429 (("qt5") "qt")
3430 (("-head") ""))
3431 ;; Disable building of examples.
3432 (substitute* (find-files "." "\\.pro$")
3433 (("SUBDIRS\\+=examples") ""))
3434 ;; Fix deprecated functions.
3435 (substitute* "qtsoap/src/qtsoap.cpp"
3436 (("toAscii") "toUtf8"))
3437 #t))
3438 (replace 'configure
3439 (lambda _
3440 (for-each (lambda (solution)
3441 (with-directory-excursion solution
3442 (invoke "./configure" "-library")
3443 (invoke "qmake")))
3444 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3445 "qtsingleapplication" "qtsoap"))
3446 #t))
3447 (replace 'build
3448 (lambda _
3449 (for-each (lambda (solution)
3450 (with-directory-excursion solution
3451 (invoke "make")))
3452 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3453 "qtsingleapplication" "qtsoap"))
3454 #t))
3455 (replace 'install
3456 (lambda args
3457 (for-each (lambda (solution)
3458 (with-directory-excursion solution
3459 (apply
3460 (assoc-ref copy:%standard-phases 'install)
3461 #:install-plan
3462 '(("src" "include" #:include-regexp ("\\.h$"))
3463 ("lib" "lib"))
3464 args)))
3465 '("qtlockedfile" "qtpropertybrowser" "qtservice"
3466 "qtsingleapplication" "qtsoap")))))))
3467 (inputs
3468 (list qtbase-5))
3469 (synopsis "Collection of Qt extensions")
3470 (description "QtSolutions is a set of components extending Qt.
3471 @itemize
3472 @item QtLockedFile: A class that extends QFile with advisory locking functions.
3473 @item QtPropertyBrowser: A framework that enables the user to edit a set of
3474 properties.
3475 @item QtService: A helper for writing services such as Unix daemons.
3476 @item QtSingleApplication: A component that provides support for applications
3477 that can be only started once per user.
3478 @item QtSoap: A component that provides basic web service support with version
3479 1.1 of the SOAP protocol.
3480 @end itemize\n")
3481 (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
3482 (license (list license:bsd-3
3483 ;; QScriptParser and QScriptGrammar specifically allow
3484 ;; redistribution under GPL3 or LGPL2.1
3485 license:gpl3 license:lgpl2.1)))))
3486
3487 (define-public qwt
3488 (package
3489 (name "qwt")
3490 (version "6.1.5")
3491 (source
3492 (origin
3493 (method url-fetch)
3494 (uri
3495 (string-append "mirror://sourceforge/qwt/qwt/"
3496 version "/qwt-" version ".tar.bz2"))
3497 (sha256
3498 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
3499 (build-system gnu-build-system)
3500 (inputs
3501 (list qtbase-5 qtsvg-5 qttools-5))
3502 (arguments
3503 `(#:phases
3504 (modify-phases %standard-phases
3505 (replace 'configure
3506 (lambda* (#:key outputs #:allow-other-keys)
3507 (let* ((out (assoc-ref outputs "out"))
3508 (docdir (string-append out "/share/doc/qwt"))
3509 (incdir (string-append out "/include/qwt"))
3510 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
3511 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
3512 (substitute* '("qwtconfig.pri")
3513 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
3514 (format #f "~a = ~a\n" x out))
3515 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
3516 (format #f "~a = ~a\n" x docdir))
3517 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
3518 (format #f "~a = ~a\n" x incdir))
3519 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
3520 (format #f "~a = ~a\n" x pluginsdir))
3521 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
3522 (format #f "~a = ~a\n" x featuresdir)))
3523 (substitute* '("doc/doc.pro")
3524 ;; We'll install them in the 'install-man-pages' phase.
3525 (("^unix:doc\\.files.*") ""))
3526 (invoke "qmake"))))
3527 (add-after 'install 'install-man-pages
3528 (lambda* (#:key outputs #:allow-other-keys)
3529 (let* ((out (assoc-ref outputs "out"))
3530 (man (string-append out "/share/man")))
3531 ;; Remove some incomplete manual pages.
3532 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
3533 (mkdir-p man)
3534 (copy-recursively "doc/man" man)
3535 #t))))))
3536 (home-page "http://qwt.sourceforge.net")
3537 (synopsis "Qt widgets for plots, scales, dials and other technical software
3538 GUI components")
3539 (description
3540 "The Qwt library contains widgets and components which are primarily useful
3541 for technical and scientific purposes. It includes a 2-D plotting widget,
3542 different kinds of sliders, and much more.")
3543 (license
3544 (list
3545 ;; The Qwt license is LGPL2.1 with some exceptions.
3546 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
3547 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
3548 license:lgpl2.1 license:gpl3))))
3549
3550 (define-public qtwebkit
3551 (package
3552 (name "qtwebkit")
3553 (version "5.212.0-alpha4")
3554 (source
3555 (origin
3556 (method url-fetch)
3557 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
3558 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
3559 (sha256
3560 (base32
3561 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
3562 (patches (search-patches "qtwebkit-pbutils-include.patch"
3563 "qtwebkit-fix-building-with-bison-3.7.patch"
3564 "qtwebkit-fix-building-with-glib-2.68.patch"
3565 "qtwebkit-fix-building-with-icu-68.patch"
3566 "qtwebkit-fix-building-with-python-3.9.patch"))))
3567 (build-system cmake-build-system)
3568 (native-inputs
3569 (list perl
3570 python
3571 ruby
3572 bison
3573 flex
3574 gperf
3575 pkg-config))
3576 (inputs
3577 `(("icu" ,icu4c)
3578 ("glib" ,glib)
3579 ("gst-plugins-base" ,gst-plugins-base)
3580 ("libjpeg" ,libjpeg-turbo)
3581 ("libpng" ,libpng)
3582 ("libwebp" ,libwebp)
3583 ("sqlite" ,sqlite)
3584 ("fontconfig" ,fontconfig)
3585 ("libxrender" ,libxrender)
3586 ("qtbase" ,qtbase-5)
3587 ("qtdeclarative-5" ,qtdeclarative-5)
3588 ("qtlocation" ,qtlocation)
3589 ("qtmultimedia-5" ,qtmultimedia-5)
3590 ("qtsensors" ,qtsensors)
3591 ("qtwebchannel-5" ,qtwebchannel-5)
3592 ("libxml2" ,libxml2)
3593 ("libxslt" ,libxslt)
3594 ("libx11" ,libx11)
3595 ("libxcomposite" ,libxcomposite)))
3596 (arguments
3597 `(#:tests? #f ; no apparent tests; it might be necessary to set
3598 ; ENABLE_API_TESTS, see CMakeLists.txt
3599
3600 ;; Parallel builds fail due to a race condition:
3601 ;; <https://bugs.gnu.org/34062>.
3602 #:parallel-build? #f
3603
3604 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
3605 "-DPORT=Qt"
3606 "-DUSE_LIBHYPHEN=OFF"
3607 "-DUSE_SYSTEM_MALLOC=ON"
3608 ;; XXX: relative dir installs to build dir?
3609 (string-append "-DECM_MKSPECS_INSTALL_DIR="
3610 %output "/lib/qt5/mkspecs/modules")
3611 ;; Sacrifice a little speed in order to link
3612 ;; libraries and test executables in a
3613 ;; reasonable amount of memory.
3614 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
3615 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
3616 (home-page "https://www.webkit.org")
3617 (synopsis "Web browser engine and classes to render and interact with web
3618 content")
3619 (description "QtWebKit provides a Web browser engine that makes it easy to
3620 embed content from the World Wide Web into your Qt application. At the same
3621 time Web content can be enhanced with native controls.")
3622 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
3623 ;; room for slower or busy hardware.
3624 (properties '((timeout . 64800))) ;18 hours
3625
3626 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
3627 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
3628 ;; disable it on non-Intel platforms.
3629 (supported-systems '("x86_64-linux" "i686-linux"))
3630
3631 (license license:lgpl2.1+)))
3632
3633 (define-public dotherside
3634 (package
3635 (name "dotherside")
3636 (version "0.6.4")
3637 (source
3638 (origin
3639 (method git-fetch)
3640 (uri (git-reference
3641 (url "https://github.com/filcuc/DOtherSide")
3642 (commit (string-append "v" version))))
3643 (file-name (git-file-name name version))
3644 (sha256
3645 (base32
3646 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
3647 (build-system cmake-build-system)
3648 (native-inputs
3649 (list qttools-5))
3650 (inputs
3651 (list qtbase-5 qtdeclarative-5))
3652 (home-page "https://filcuc.github.io/DOtherSide/index.html")
3653 (synopsis "C language library for creating bindings for the Qt QML language")
3654 (description
3655 "DOtherSide is a C language library for creating bindings for the
3656 QT QML language. The following features are implementable from
3657 a binding language:
3658 @itemize
3659 @item Creating custom QObject
3660 @item Creating custom QAbstractListModels
3661 @item Creating custom properties, signals and slots
3662 @item Creating from QML QObject defined in the binded language
3663 @item Creating from Singleton QML QObject defined in the binded language
3664 @end itemize\n")
3665 (license license:lgpl3))) ;version 3 only (+ exception)
3666
3667 ;; There have been no public releases yet.
3668 (define-public qtcolorwidgets
3669 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
3670 (revision "1"))
3671 (package
3672 (name "qtcolorwidgets")
3673 (version (git-version "0" revision commit))
3674 (source (origin
3675 (method git-fetch)
3676 (uri (git-reference
3677 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3678 (commit commit)))
3679 (file-name (git-file-name name version))
3680 (sha256
3681 (base32
3682 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
3683 (build-system cmake-build-system)
3684 (arguments `(#:tests? #f)) ; There are no tests
3685 (native-inputs
3686 (list qttools-5))
3687 (inputs
3688 (list qtbase-5))
3689 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
3690 (synopsis "Color management widgets")
3691 (description "QtColorWidgets provides a Qt color dialog that is more
3692 user-friendly than the default @code{QColorDialog} and several other
3693 color-related widgets.")
3694 ;; Includes a license exception for combining with GPL2 code.
3695 (license license:lgpl3+))))
3696
3697 (define-public qcustomplot
3698 (package
3699 (name "qcustomplot")
3700 (version "2.1.0")
3701 (source
3702 (origin
3703 (method url-fetch)
3704 (uri (string-append "https://www.qcustomplot.com/release/"
3705 version "fixed" "/QCustomPlot.tar.gz"))
3706 (sha256
3707 (base32 "1324kqyj1v1f8k8d7b15gc3apwz9qxx52p86hvchg33hjdlqhskx"))))
3708 (native-inputs
3709 `(("qcustomplot-sharedlib"
3710 ,(origin
3711 (method url-fetch)
3712 (uri (string-append "https://www.qcustomplot.com/release/"
3713 version "fixed" "/QCustomPlot-sharedlib.tar.gz"))
3714 (sha256
3715 (base32 "0vp8lpxvd1nlp4liqrlvslpqrgfn0wpiwizzdsjbj22zzb8vxikc"))))))
3716 (inputs
3717 (list qtbase-5))
3718 (build-system gnu-build-system)
3719 (arguments
3720 `(#:phases
3721 (modify-phases %standard-phases
3722 (add-after 'unpack 'unpack-extra-files
3723 (lambda* (#:key inputs #:allow-other-keys)
3724 (invoke "tar" "-xvf" (assoc-ref inputs "qcustomplot-sharedlib"))))
3725 (replace 'configure
3726 (lambda* (#:key outputs #:allow-other-keys)
3727 (chdir "qcustomplot-sharedlib/sharedlib-compilation")
3728 (substitute* "sharedlib-compilation.pro"
3729 ;; Don't build debug library.
3730 (("debug_and_release")
3731 "release"))
3732 (invoke "qmake"
3733 (string-append "DESTDIR="
3734 (assoc-ref outputs "out")
3735 "/lib"))))
3736 (add-after 'install 'install-header
3737 (lambda* (#:key outputs #:allow-other-keys)
3738 (install-file "../../qcustomplot.h"
3739 (string-append (assoc-ref outputs "out")
3740 "/include")))))))
3741 (home-page "https://www.qcustomplot.com/")
3742 (synopsis "Qt widget for plotting and data visualization")
3743 (description
3744 "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts.")
3745 (license license:gpl3+)))
3746
3747 (define-public python-shiboken-2
3748 (package
3749 (name "python-shiboken-2")
3750 (version "5.15.2")
3751 (source (origin
3752 (method url-fetch)
3753 (uri (string-append "https://download.qt.io/official_releases"
3754 "/QtForPython/pyside2/PySide2-" version
3755 "-src/pyside-setup-opensource-src-"
3756 version ".tar.xz"))
3757 (sha256
3758 (base32
3759 "060ljj1nzyp4zfz2vasbv2i7gs5rfkkjwxxbisd0fdw01d5m01mk"))))
3760 (build-system cmake-build-system)
3761 (inputs
3762 (list clang-toolchain
3763 libxml2
3764 libxslt
3765 python-wrapper
3766 qtbase-5
3767 qtxmlpatterns))
3768 (arguments
3769 `(#:tests? #f
3770 ;; FIXME: Building tests fails
3771 #:configure-flags '("-DBUILD_TESTS=off")
3772 #:phases
3773 (modify-phases %standard-phases
3774 (add-after 'unpack 'use-shiboken-dir-only
3775 (lambda _ (chdir "sources/shiboken2") #t))
3776 (add-before 'configure 'make-files-writable-and-update-timestamps
3777 (lambda _
3778 ;; The build scripts need to modify some files in
3779 ;; the read-only source directory, and also attempts
3780 ;; to create Zip files which fails because the Zip
3781 ;; format does not support timestamps before 1980.
3782 (let ((circa-1980 (* 10 366 24 60 60)))
3783 (for-each (lambda (file)
3784 (make-file-writable file)
3785 (utime file circa-1980 circa-1980))
3786 (find-files ".")))
3787 #t))
3788 (add-before 'configure 'set-build-env
3789 (lambda* (#:key inputs #:allow-other-keys)
3790 (let ((llvm (assoc-ref inputs "clang-toolchain")))
3791 (setenv "CLANG_INSTALL_DIR" llvm)
3792 #t))))))
3793 (home-page "https://wiki.qt.io/Qt_for_Python")
3794 (synopsis
3795 "Shiboken generates bindings for C++ libraries using CPython source code")
3796 (description
3797 "Shiboken generates bindings for C++ libraries using CPython source code")
3798 (license
3799 (list
3800 ;; The main code is GPL3 or LGPL3.
3801 ;; Examples are BSD-3.
3802 license:gpl3
3803 license:lgpl3
3804 license:bsd-3))))
3805
3806 (define-public python-pyside-2
3807 (package
3808 (name "python-pyside-2")
3809 (version (package-version python-shiboken-2))
3810 (source (package-source python-shiboken-2))
3811 (build-system cmake-build-system)
3812 (inputs
3813 (list libxml2
3814 libxslt
3815 clang-toolchain
3816 qtbase-5
3817 qtdatavis3d
3818 qtdeclarative-5
3819 qtlocation
3820 qtmultimedia-5
3821 qtquickcontrols-5
3822 qtquickcontrols2-5
3823 qtscript
3824 qtscxml
3825 qtsensors
3826 qtspeech
3827 qtsvg-5
3828 qtwebchannel-5
3829 qtwebengine-5
3830 qtwebsockets-5
3831 qtx11extras
3832 qtxmlpatterns))
3833 (propagated-inputs
3834 (list python-shiboken-2))
3835 (native-inputs
3836 `(("cmake" ,cmake-minimal)
3837 ("python" ,python-wrapper)
3838 ("qttools-5" ,qttools-5)
3839 ("which" ,which)))
3840 (arguments
3841 `(#:tests? #f
3842 ;; FIXME: Building tests fail.
3843 #:configure-flags
3844 (list "-DBUILD_TESTS=FALSE"
3845 (string-append "-DPYTHON_EXECUTABLE="
3846 (assoc-ref %build-inputs "python")
3847 "/bin/python"))
3848 #:modules ((guix build cmake-build-system)
3849 (guix build utils)
3850 (srfi srfi-1))
3851 #:phases
3852 (modify-phases %standard-phases
3853 (add-after 'unpack 'go-to-source-dir
3854 (lambda _ (chdir "sources/pyside2") #t))
3855 (add-after 'go-to-source-dir 'fix-qt-module-detection
3856 (lambda* (#:key inputs #:allow-other-keys)
3857 ;; Activate qt module support even if it not in the same
3858 ;; directory as qtbase.
3859 (substitute* "../cmake_helpers/helpers.cmake"
3860 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
3861 "true"))
3862 ;; Add include directories for qt modules.
3863 (let ((dirs (map (lambda (name)
3864 (string-append (assoc-ref inputs name)
3865 "/include/qt5"))
3866 '("qtdatavis3d"
3867 "qtdeclarative"
3868 "qtlocation"
3869 "qtmultimedia"
3870 "qtquickcontrols"
3871 "qtquickcontrols2"
3872 "qtscript"
3873 "qtscxml"
3874 "qtsensors"
3875 "qtspeech"
3876 "qtsvg"
3877 "qttools-5"
3878 "qtwebchannel"
3879 "qtwebengine"
3880 "qtwebsockets"
3881 "qtx11extras"
3882 "qtxmlpatterns"))))
3883 (substitute* "cmake/Macros/PySideModules.cmake"
3884 (("\\$\\{PATH_SEP\\}\\$\\{core_includes\\}" all)
3885 (fold (lambda (dir paths)
3886 (string-append paths "${PATH_SEP}" dir))
3887 all
3888 dirs)))
3889 (setenv "CXXFLAGS" (fold (lambda (dir paths)
3890 (string-append paths " -I" dir))
3891 ""
3892 dirs)))))
3893 (add-before 'configure 'set-clang-dir
3894 (lambda* (#:key inputs #:allow-other-keys)
3895 (let ((clang (assoc-ref inputs "clang-toolchain")))
3896 (setenv "CLANG_INSTALL_DIR" clang)
3897 #t))))))
3898 (home-page "https://wiki.qt.io/Qt_for_Python")
3899 (synopsis
3900 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
3901 (description
3902 "The Qt for Python product enables the use of Qt5 APIs in Python
3903 applications. It lets Python developers utilize the full potential of Qt,
3904 using the PySide2 module. The PySide2 module provides access to the
3905 individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
3906 comes with the Shiboken2 CPython binding code generator, which can be used to
3907 generate Python bindings for your C or C++ code.")
3908 (license (list
3909 license:lgpl3
3910 ;;They state that:
3911 ;; this file may be used under the terms of the GNU General
3912 ;; Public License version 2.0 or (at your option) the GNU
3913 ;; General Public license version 3 or any later version
3914 ;; approved by the KDE Free Qt Foundation.
3915 ;; Thus, it is currently v2 or v3, but no "+".
3916 license:gpl3
3917 license:gpl2))))
3918
3919 (define-public python-pyside-2-tools
3920 (package
3921 (name "python-pyside-2-tools")
3922 (version (package-version python-shiboken-2))
3923 (source (package-source python-shiboken-2))
3924 (build-system cmake-build-system)
3925 (inputs
3926 (list python-pyside-2 python-shiboken-2 qtbase-5))
3927 (native-inputs
3928 `(("python" ,python-wrapper)))
3929 (arguments
3930 `(#:tests? #f
3931 #:configure-flags
3932 (list "-DBUILD_TESTS=off"
3933 (string-append "-DPYTHON_EXECUTABLE="
3934 (assoc-ref %build-inputs "python")
3935 "/bin/python"))
3936 #:phases (modify-phases %standard-phases
3937 (add-after 'unpack 'go-to-source-dir
3938 (lambda _ (chdir "sources/pyside2-tools") #t)))))
3939 (home-page "https://wiki.qt.io/Qt_for_Python")
3940 (synopsis
3941 "Contains command line tools for PySide2")
3942 (description
3943 "Contains lupdate, rcc and uic tools for PySide2")
3944 (license license:gpl2)))
3945
3946 (define-public libqglviewer
3947 (package
3948 (name "libqglviewer")
3949 (version "2.7.2")
3950 (source (origin
3951 (method url-fetch)
3952 (uri
3953 (string-append "http://libqglviewer.com/src/libQGLViewer-"
3954 version ".tar.gz"))
3955 (sha256
3956 (base32
3957 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
3958 (build-system gnu-build-system)
3959 (arguments
3960 '(#:tests? #f ; no check target
3961 #:make-flags
3962 (list (string-append "PREFIX="
3963 (assoc-ref %outputs "out")))
3964 #:phases
3965 (modify-phases %standard-phases
3966 (replace 'configure
3967 (lambda* (#:key make-flags #:allow-other-keys)
3968 (apply invoke (cons "qmake" make-flags)))))))
3969 (native-inputs
3970 (list qtbase-5 qttools-5))
3971 (inputs
3972 (list glu))
3973 (home-page "http://libqglviewer.com")
3974 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
3975 (description
3976 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
3977 of OpenGL 3D viewers.
3978
3979 It provides some of the typical 3D viewer functionalities, such as the
3980 possibility to move the camera using the mouse, which lacks in most of the
3981 other APIs. Other features include mouse manipulated frames, interpolated
3982 keyFrames, object selection, stereo display, screenshot saving and much more.
3983 It can be used by OpenGL beginners as well as to create complex applications,
3984 being fully customizable and easy to extend.")
3985 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
3986 ;; be used.
3987 (license (list license:gpl2 license:gpl3))))
3988
3989 (define-public qhexedit
3990 (package
3991 (name "qhexedit")
3992 (version "0.8.9")
3993 (source
3994 (origin
3995 (method git-fetch)
3996 (uri (git-reference
3997 (url "https://github.com/Simsys/qhexedit2")
3998 (commit (string-append "v" version))))
3999 (file-name (git-file-name name version))
4000 (sha256
4001 (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
4002 (build-system gnu-build-system)
4003 (arguments
4004 `(#:phases
4005 (modify-phases %standard-phases
4006 (add-after 'unpack 'fix-path
4007 (lambda* (#:key outputs #:allow-other-keys)
4008 (substitute* "src/qhexedit.pro"
4009 (("^unix:DESTDIR = /usr/lib")
4010 (string-append "unix:DESTDIR = "
4011 (assoc-ref outputs "out") "/lib")))))
4012 (replace 'configure
4013 (lambda _
4014 (chdir "src")
4015 (invoke "qmake" "qhexedit.pro")))
4016 (add-after 'install 'install-headers
4017 (lambda* (#:key outputs #:allow-other-keys)
4018 (let* ((out (assoc-ref outputs "out"))
4019 (include-dir (string-append out "/include")))
4020 (mkdir-p include-dir)
4021 (for-each (lambda (file)
4022 (install-file file include-dir))
4023 (find-files "." "\\.h$"))))))))
4024 (inputs (list qtbase-5))
4025 (native-inputs (list qttools-5))
4026 (home-page "https://simsys.github.io")
4027 (synopsis "Binary editor widget for Qt")
4028 (description
4029 "@code{QHexEdit} is a hex editor widget for the Qt framework. It is a
4030 simple editor for binary data, just like @code{QPlainTextEdit} is for text
4031 data.")
4032 (license license:lgpl2.1)))
4033
4034 (define-public soqt
4035 (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
4036 (revision "1"))
4037 (package
4038 (name "soqt")
4039 (version (git-version "1.6.0" revision commit-ref))
4040 (source
4041 (origin
4042 (method git-fetch)
4043 (uri (git-reference
4044 (url "https://github.com/coin3d/soqt")
4045 (commit commit-ref)
4046 (recursive? #t)))
4047 (file-name (git-file-name name version))
4048 (sha256
4049 (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
4050 (build-system cmake-build-system)
4051 (arguments '(#:tests? #f)) ; There are no tests
4052 (native-inputs
4053 (list pkg-config cmake))
4054 (inputs
4055 (list qtbase-5 coin3D-4))
4056 (home-page "https://github.com/coin3d/soqt")
4057 (synopsis "Qt GUI component toolkit library for Coin")
4058 (description "SoQt is a Qt GUI component toolkit library for Coin. It is
4059 also compatible with SGI and TGS Open Inventor, and the API is based on the API
4060 of the InventorXt GUI component toolkit.")
4061 (license license:bsd-3))))