gnu: icecat: Update to 78.10.0-guix0-preview1 [security fixes].
[jackhill/guix/guix.git] / gnu / packages / qt.scm
CommitLineData
bd677c2d 1;;; GNU Guix --- Functional package management for GNU
84ef83dd 2;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
5b490ab5 3;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
9d01749f 4;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
2879e605 5;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
3c986a7d 6;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
fc381a33 7;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
6feb86f4 8;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
3befd0a9 9;;; Copyright © 2017 Quiliro <quiliro@fsfla.org>
d8a85f82 10;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
23f8c101 11;;; Copyright © 2018, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
359e30c9 12;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
0995a569 13;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
2c7511fb 14;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
37a3abb1 15;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
db481636 16;;; Copyright © 2020 Mike Rosset <mike.rosset@gmail.com>
6e332fd3 17;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
e792dd32 18;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
8d1ab36a 19;;; Copyright © 2020 TomZ <tomz@freedommail.ch>
20b5f149 20;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
a0a55309 21;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
12bb72fb 22;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
c990604c 23;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
bd677c2d
AE
24;;;
25;;; This file is part of GNU Guix.
26;;;
27;;; GNU Guix is free software; you can redistribute it and/or modify it
28;;; under the terms of the GNU General Public License as published by
29;;; the Free Software Foundation; either version 3 of the License, or (at
30;;; your option) any later version.
31;;;
32;;; GNU Guix is distributed in the hope that it will be useful, but
33;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35;;; GNU General Public License for more details.
36;;;
37;;; You should have received a copy of the GNU General Public License
38;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39
40(define-module (gnu packages qt)
225941b0 41 #:use-module ((guix licenses) #:prefix license:)
bd677c2d
AE
42 #:use-module (guix packages)
43 #:use-module (guix download)
2879e605 44 #:use-module (guix git-download)
9e81af9e 45 #:use-module (guix build-system cmake)
bd677c2d 46 #:use-module (guix build-system gnu)
2456153a 47 #:use-module (guix build-system trivial)
eb5af18e 48 #:use-module (guix build-system python)
75bdc9a7 49 #:use-module (guix build-system qt)
84ef83dd 50 #:use-module (guix packages)
02511196 51 #:use-module (guix deprecation)
84ef83dd 52 #:use-module (guix utils)
1e9ed0e3 53 #:use-module (gnu packages)
37a3abb1 54 #:use-module (gnu packages base)
b332e366 55 #:use-module (gnu packages bison)
37a3abb1 56 #:use-module (gnu packages cmake)
b332e366 57 #:use-module (gnu packages compression)
2cba3d6f 58 #:use-module (gnu packages cups)
2c7511fb 59 #:use-module (gnu packages curl)
2cba3d6f 60 #:use-module (gnu packages databases)
aa8c0ada 61 #:use-module (gnu packages documentation)
578a1d79 62 #:use-module (gnu packages enchant)
b332e366 63 #:use-module (gnu packages fontutils)
0009ed71 64 #:use-module (gnu packages flex)
bc8ede01 65 #:use-module (gnu packages freedesktop)
86b995dc 66 #:use-module (gnu packages gcc)
db481636 67 #:use-module (gnu packages ghostscript)
8b6a5e0f 68 #:use-module (gnu packages gl)
b332e366 69 #:use-module (gnu packages glib)
db481636 70 #:use-module (gnu packages gnupg)
0009ed71 71 #:use-module (gnu packages gperf)
a5f13705 72 #:use-module (gnu packages graphics)
04231311 73 #:use-module (gnu packages gstreamer)
f7fb0ccb 74 #:use-module (gnu packages gtk)
b332e366 75 #:use-module (gnu packages icu4c)
e55354b8 76 #:use-module (gnu packages image)
75bdc9a7 77 #:use-module (gnu packages kde-frameworks)
db481636 78 #:use-module (gnu packages libevent)
b332e366 79 #:use-module (gnu packages linux)
37a3abb1 80 #:use-module (gnu packages llvm)
04f8decf 81 #:use-module (gnu packages maths)
12bb72fb 82 #:use-module (gnu packages networking)
db481636 83 #:use-module (gnu packages ninja)
aff0cce9 84 #:use-module (gnu packages nss)
0009ed71
SB
85 #:use-module (gnu packages pciutils)
86 #:use-module (gnu packages pcre)
b332e366
AE
87 #:use-module (gnu packages perl)
88 #:use-module (gnu packages pkg-config)
39fa8f6c 89 #:use-module (gnu packages pulseaudio)
db481636 90 #:use-module (gnu packages protobuf)
b332e366 91 #:use-module (gnu packages python)
c990604c 92 #:use-module (gnu packages python-build)
44d10b1f 93 #:use-module (gnu packages python-xyz)
db481636 94 #:use-module (gnu packages regex)
8b6a5e0f 95 #:use-module (gnu packages ruby)
51519fd3 96 #:use-module (gnu packages sdl)
db481636 97 #:use-module (gnu packages serialization)
cd0322a3 98 #:use-module (gnu packages sqlite)
db481636 99 #:use-module (gnu packages telephony)
cc2b77df 100 #:use-module (gnu packages tls)
2c7511fb 101 #:use-module (gnu packages valgrind)
db481636 102 #:use-module (gnu packages video)
124351ef 103 #:use-module (gnu packages vulkan)
0009ed71 104 #:use-module (gnu packages xdisorg)
db481636 105 #:use-module (gnu packages xiph)
0009ed71 106 #:use-module (gnu packages xorg)
124351ef
EF
107 #:use-module (gnu packages xml)
108 #:use-module (srfi srfi-1))
bd677c2d 109
54fd3167
RG
110(define-public qite
111 (let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
112 (revision "74"))
113 (package
114 (name "qite")
115 (version (git-version "0" revision commit))
116 (source
117 (origin
118 (method git-fetch)
119 (uri
120 (git-reference
121 (url "https://github.com/Ri0n/qite")
122 (commit commit)))
123 (file-name (git-file-name name version))
124 (sha256
125 (base32 "0jmmgy9pvk9hwwph1nwy7hxhczy8drhl4ymhnjjn6yx7bckssvsq"))))
126 (build-system qt-build-system)
127 (arguments
128 `(#:tests? #f ; no target
129 #:phases
130 (modify-phases %standard-phases
131 (add-after 'unpack 'chdir
132 (lambda _
133 (chdir "libqite")
134 #t)))))
135 (inputs
136 `(("qtbase" ,qtbase)
137 ("qtmultimedia" ,qtmultimedia)))
138 (home-page "https://github.com/Ri0n/qite/")
139 (synopsis "Qt Interactive Text Elements")
140 (description "Qite allows to manage interactive elements on QTextEdit.")
141 (license license:asl2.0))))
142
6a3ec5c5
RG
143(define-public qt5ct
144 (package
145 (name "qt5ct")
146 (version "1.1")
147 (source
148 (origin
149 (method url-fetch)
150 (uri
151 (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
152 (sha256
153 (base32 "1lnx4wqk87lbr6lqc64w5g5ppjjv75kq2r0q0bz9gfpryzdw8xxg"))))
154 (build-system gnu-build-system)
155 (arguments
156 `(#:tests? #f ; No target
157 #:imported-modules
158 (,@%gnu-build-system-modules
159 (guix build cmake-build-system)
160 (guix build qt-build-system))
161 #:modules
162 ((guix build gnu-build-system)
163 ((guix build qt-build-system)
164 #:prefix qt:)
165 (guix build utils))
166 #:phases
167 (modify-phases %standard-phases
168 (add-after 'unpack 'patch
169 (lambda* (#:key inputs #:allow-other-keys)
170 (substitute* "qt5ct.pro"
171 (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease")
172 (string-append (assoc-ref inputs "qttools")
173 "/bin/lrelease")))
174 #t))
175 (replace 'configure
176 (lambda* (#:key outputs #:allow-other-keys)
177 (let* ((out (assoc-ref outputs "out")))
178 (invoke "qmake"
179 (string-append "PREFIX=" out)
180 (string-append "BINDIR=" out "/bin")
181 (string-append "DATADIR=" out "/share")
182 (string-append "PLUGINDIR=" out "/lib/qt5/plugins")))
183 #t))
184 (add-after 'install 'qt-wrap
185 (assoc-ref qt:%standard-phases 'qt-wrap)))))
186 (native-inputs
187 `(("qttools" ,qttools)))
188 (inputs
189 `(("qtbase" ,qtbase)
190 ("qtsvg" ,qtsvg)))
191 (synopsis "Qt5 Configuration Tool")
192 (description "Qt5CT is a program that allows users to configure Qt5
193settings (such as icons, themes, and fonts) in desktop environments or
194window managers, that don't provide Qt integration by themselves.")
195 (home-page "https://qt5ct.sourceforge.io/")
196 (license license:bsd-2)))
197
75bdc9a7 198(define-public materialdecoration
3775eb7f
RG
199 (let ((commit "6a5de23f2e5162fbee39d16f938473ff970a2ec0")
200 (revision "9"))
201 (package
202 (name "materialdecoration")
203 (version
204 (git-version "1.1.0" revision commit))
205 (source
206 (origin
207 (method git-fetch)
208 (uri
209 (git-reference
210 (url "https://github.com/lirios/materialdecoration.git")
211 (commit commit)))
212 (file-name
213 (git-file-name name version))
214 (sha256
215 (base32 "1zdrcb39fhhmn76w8anv1dnspz26pdl6izmj1mlm02aza4y8ffp4"))
216 (modules '((guix build utils)
217 (ice-9 ftw)
218 (srfi srfi-1)))
219 (snippet
220 `(begin
221 (delete-file-recursively "cmake/3rdparty")))))
222 (build-system qt-build-system)
223 (arguments
224 `(#:tests? #f ; No target
225 #:configure-flags
226 (list
227 (string-append "-DCMAKE_CXX_FLAGS=-I"
228 (assoc-ref %build-inputs "qtbase")
229 "/include/qt5/QtXkbCommonSupport/"
230 ,(package-version qtbase)))))
231 (native-inputs
232 `(("cmake-shared" ,cmake-shared)
233 ("extra-cmake-modules" ,extra-cmake-modules)
234 ("pkg-config" ,pkg-config)))
235 (inputs
236 `(("qtbase" ,qtbase)
237 ("qtwayland" ,qtwayland)
238 ("wayland" ,wayland)
239 ("xkbcommon" ,libxkbcommon)))
240 (synopsis "Material Decoration for Qt")
241 (description "MaterialDecoration is a client-side decoration for Qt
75bdc9a7 242applications on Wayland.")
3775eb7f
RG
243 (home-page "https://github.com/lirios/materialdecoration")
244 (license license:lgpl3+))))
75bdc9a7 245
aa8c0ada
TD
246(define-public grantlee
247 (package
248 (name "grantlee")
0ec1622c 249 (version "5.2.0")
aa8c0ada
TD
250 (source
251 (origin
6feb86f4
RW
252 (method git-fetch)
253 (uri (git-reference
b0e7b699 254 (url "https://github.com/steveire/grantlee")
6feb86f4
RW
255 (commit (string-append "v" version))))
256 (file-name (git-file-name name version))
aa8c0ada 257 (sha256
0ec1622c 258 (base32 "02dyqxjyxiqxrlz5g7v9ly8f095vs3iha39l75q6s8axs36y01lq"))))
aa8c0ada 259 (native-inputs
868b1a02 260 ;; Optional: lcov and cccc, both are for code coverage
aa8c0ada
TD
261 `(("doxygen" ,doxygen)))
262 (inputs
263 `(("qtbase" ,qtbase)
0ec1622c 264 ("qtdeclarative" ,qtdeclarative)
aa8c0ada
TD
265 ("qtscript" ,qtscript)))
266 (build-system cmake-build-system)
267 (arguments
0ec1622c 268 `(#:phases
aa8c0ada 269 (modify-phases %standard-phases
868b1a02
HG
270 (add-before 'check 'check-setup
271 (lambda _
272 ;; make Qt render "offscreen", required for tests
273 (setenv "QT_QPA_PLATFORM" "offscreen")
274 #t)))))
aa8c0ada
TD
275 (home-page "https://github.com/steveire/grantlee")
276 (synopsis "Libraries for text templating with Qt")
277 (description "Grantlee Templates can be used for theming and generation of
278other text such as code. The syntax uses the syntax of the Django template
279system, and the core design of Django is reused in Grantlee.")
75c5d360 280 (license license:lgpl2.1+)))
aa8c0ada 281
9d01749f
LC
282(define (qt5-urls component version)
283 "Return a list of URLs for VERSION of the Qt5 COMPONENT."
284 ;; We can't use a mirror:// scheme because these URLs are not exact copies:
285 ;; the layout differs between them.
286 (list (string-append "https://download.qt.io/official_releases/qt/"
287 (version-major+minor version) "/" version
288 "/submodules/" component "-everywhere-src-"
289 version ".tar.xz")
290 (string-append "https://download.qt.io/archive/qt/"
291 (version-major+minor version) "/" version
292 "/submodules/" component "-everywhere-src-"
293 version ".tar.xz")
294 (let ((directory (string-append "qt5" (string-drop component 2))))
295 (string-append "http://sources.buildroot.net/" directory "/"
296 component "-everywhere-src-" version ".tar.xz"))
297 (string-append "https://distfiles.macports.org/qt5/"
298 component "-everywhere-src-" version ".tar.xz")))
299
7868000f
AE
300(define-public qtbase
301 (package
302 (name "qtbase")
18daba93 303 (version "5.15.2")
7868000f
AE
304 (source (origin
305 (method url-fetch)
9d01749f 306 (uri (qt5-urls name version))
7868000f 307 (sha256
c7386f4e 308 (base32
18daba93 309 "1y70libf2x52lpbqvhz10lpk7nyl1ajjwzjxly9pjdpfj4jsv7wh"))
64f390a4 310 ;; Use TZDIR to avoid depending on package "tzdata".
132c1915 311 (patches (search-patches "qtbase-use-TZDIR.patch"
c23737d6 312 "qtbase-moc-ignore-gcc-macro.patch"
18daba93 313 "qtbase-absolute-runpath.patch"))
7868000f
AE
314 (modules '((guix build utils)))
315 (snippet
924e6ddf 316 ;; corelib uses bundled harfbuzz, md4, md5, sha3
7868000f 317 '(begin
c82cd3a7
EF
318 (with-directory-excursion "src/3rdparty"
319 (for-each delete-file-recursively
320 (list "double-conversion" "freetype" "harfbuzz-ng"
321 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
3e93b2bd 322 "zlib"))
c82cd3a7 323 #t)))))
7868000f 324 (build-system gnu-build-system)
ab6fe9d3 325 (outputs '("out" "debug"))
48d4ce6e 326 (propagated-inputs
8075b623 327 `(("mesa" ,mesa)
6e332fd3 328 ;; Use which the package, not the function
8075b623 329 ("which" ,(@ (gnu packages base) which))))
7868000f
AE
330 (inputs
331 `(("alsa-lib" ,alsa-lib)
332 ("cups" ,cups)
333 ("dbus" ,dbus)
04f8decf 334 ("double-conversion" ,double-conversion)
f66970a7 335 ("eudev" ,eudev)
7868000f
AE
336 ("expat" ,expat)
337 ("fontconfig" ,fontconfig)
338 ("freetype" ,freetype)
339 ("glib" ,glib)
340 ("harfbuzz" ,harfbuzz)
341 ("icu4c" ,icu4c)
9ed9b44e 342 ("libinput" ,libinput-minimal)
4bd428a7 343 ("libjpeg" ,libjpeg-turbo)
7868000f
AE
344 ("libmng" ,libmng)
345 ("libpng" ,libpng)
346 ("libx11" ,libx11)
347 ("libxcomposite" ,libxcomposite)
348 ("libxcursor" ,libxcursor)
349 ("libxfixes" ,libxfixes)
350 ("libxi" ,libxi)
351 ("libxinerama" ,libxinerama)
352 ("libxkbcommon" ,libxkbcommon)
353 ("libxml2" ,libxml2)
354 ("libxrandr" ,libxrandr)
355 ("libxrender" ,libxrender)
356 ("libxslt" ,libxslt)
357 ("libxtst" ,libxtst)
358 ("mtdev" ,mtdev)
2b8491fb 359 ("mariadb-dev" ,mariadb "dev")
7868000f
AE
360 ("nss" ,nss)
361 ("openssl" ,openssl)
924e6ddf 362 ("pcre2" ,pcre2)
7868000f
AE
363 ("postgresql" ,postgresql)
364 ("pulseaudio" ,pulseaudio)
fad5b1a6 365 ("sqlite" ,sqlite)
7868000f
AE
366 ("unixodbc" ,unixodbc)
367 ("xcb-util" ,xcb-util)
368 ("xcb-util-image" ,xcb-util-image)
369 ("xcb-util-keysyms" ,xcb-util-keysyms)
370 ("xcb-util-renderutil" ,xcb-util-renderutil)
371 ("xcb-util-wm" ,xcb-util-wm)
6e332fd3 372 ("xdg-utils" ,xdg-utils)
7868000f
AE
373 ("zlib" ,zlib)))
374 (native-inputs
375 `(("bison" ,bison)
376 ("flex" ,flex)
377 ("gperf" ,gperf)
378 ("perl" ,perl)
379 ("pkg-config" ,pkg-config)
d733a469 380 ("python" ,python)
124351ef 381 ("vulkan-headers" ,vulkan-headers)
8075b623 382 ("ruby" ,ruby)))
7868000f
AE
383 (arguments
384 `(#:phases
385 (modify-phases %standard-phases
386 (add-after 'configure 'patch-bin-sh
387 (lambda _
388 (substitute* '("config.status"
389 "configure"
390 "mkspecs/features/qt_functions.prf"
391 "qmake/library/qmakebuiltins.cpp")
392 (("/bin/sh") (which "sh")))
393 #t))
6e332fd3
JK
394 (add-after 'configure 'patch-xdg-open
395 (lambda _
396 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
397 (("^.*const char \\*browsers.*$" all)
398 (string-append "*browser = QStringLiteral(\""
399 (which "xdg-open")
400 "\"); return true; \n" all)))
401 #t))
7868000f
AE
402 (replace 'configure
403 (lambda* (#:key outputs #:allow-other-keys)
404 (let ((out (assoc-ref outputs "out")))
405 (substitute* "configure"
406 (("/bin/pwd") (which "pwd")))
407 (substitute* "src/corelib/global/global.pri"
408 (("/bin/ls") (which "ls")))
7972d8a2
AE
409 ;; The configuration files for other Qt5 packages are searched
410 ;; through a call to "find_package" in Qt5Config.cmake, which
411 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
412 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
413 ;; components can be installed in different places.
414 (substitute* (find-files "." ".*\\.cmake")
415 (("NO_DEFAULT_PATH") ""))
7868000f
AE
416 ;; do not pass "--enable-fast-install", which makes the
417 ;; configure process fail
1f52eb7b
EF
418 (invoke
419 "./configure"
420 "-verbose"
421 "-prefix" out
422 "-docdir" (string-append out "/share/doc/qt5")
423 "-headerdir" (string-append out "/include/qt5")
424 "-archdatadir" (string-append out "/lib/qt5")
425 "-datadir" (string-append out "/share/qt5")
426 "-examplesdir" (string-append
427 out "/share/doc/qt5/examples")
428 "-opensource"
429 "-confirm-license"
65a9f6b6 430
ab6fe9d3
JK
431 ;; Later stripped into the :debug output.
432 "-force-debug-info"
433
65a9f6b6
RW
434 ;; These features require higher versions of Linux than the
435 ;; minimum version of the glibc. See
436 ;; src/corelib/global/minimum-linux_p.h. By disabling these
437 ;; features Qt5 applications can be used on the oldest
438 ;; kernels that the glibc supports, including the RHEL6
439 ;; (2.6.32) and RHEL7 (3.10) kernels.
440 "-no-feature-getentropy" ; requires Linux 3.17
f0de36cb 441 "-no-feature-renameat2" ; requires Linux 3.16
65a9f6b6 442
1f52eb7b
EF
443 ;; Do not build examples; if desired, these could go
444 ;; into a separate output, but for the time being, we
445 ;; prefer to save the space and build time.
446 "-no-compile-examples"
447 ;; Most "-system-..." are automatic, but some use
448 ;; the bundled copy by default.
d28af199 449 "-system-sqlite"
1f52eb7b
EF
450 "-system-harfbuzz"
451 "-system-pcre"
452 ;; explicitly link with openssl instead of dlopening it
453 "-openssl-linked"
454 ;; explicitly link with dbus instead of dlopening it
455 "-dbus-linked"
456 ;; don't use the precompiled headers
457 "-no-pch"
458 ;; drop special machine instructions that do not have
459 ;; runtime detection
460 ,@(if (string-prefix? "x86_64"
461 (or (%current-target-system)
462 (%current-system)))
463 '()
464 '("-no-sse2"))
465 "-no-mips_dsp"
466 "-no-mips_dspr2"))))
8075b623 467 (add-after 'install 'patch-mkspecs
5ca6ef95
SB
468 (lambda* (#:key outputs #:allow-other-keys)
469 (let* ((out (assoc-ref outputs "out"))
8075b623
SB
470 (archdata (string-append out "/lib/qt5"))
471 (mkspecs (string-append archdata "/mkspecs"))
5ca6ef95 472 (qt_config.prf (string-append
6fc0e157 473 mkspecs "/features/qt_config.prf")))
5ca6ef95
SB
474 ;; For each Qt module, let `qmake' uses search paths in the
475 ;; module directory instead of all in QT_INSTALL_PREFIX.
476 (substitute* qt_config.prf
477 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
6fc0e157 478 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
5ca6ef95 479 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
6fc0e157 480 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
5ca6ef95 481 (("\\$\\$\\[QT_HOST_LIBS\\]")
6fc0e157 482 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
5ca6ef95 483 (("\\$\\$\\[QT_INSTALL_BINS\\]")
6fc0e157 484 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
8075b623
SB
485
486 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
487 (substitute* (string-append mkspecs "/features/qt_functions.prf")
488 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
489 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
490
491 ;; Resolve qmake spec files within qtbase by absolute paths.
492 (substitute*
493 (map (lambda (file)
494 (string-append mkspecs "/features/" file))
495 '("device_config.prf" "moc.prf" "qt_build_config.prf"
496 "qt_config.prf" "winrt/package_manifest.prf"))
497 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
498 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata))
64f390a4 499 #t)))
a59e2dd8
MB
500 (add-after 'patch-mkspecs 'patch-prl-files
501 (lambda* (#:key outputs #:allow-other-keys)
502 (let ((out (assoc-ref outputs "out")))
503 ;; Insert absolute references to the qtbase libraries because
504 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
505 ;; on context. See <https://bugs.gnu.org/38405>
506 (substitute* (find-files (string-append out "/lib") "\\.prl$")
507 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
508 (string-append out "/lib")))
509 #t)))
64f390a4
HG
510 (add-after 'unpack 'patch-paths
511 ;; Use the absolute paths for dynamically loaded libs, otherwise
512 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
513 ;; not set in guix.
514 (lambda* (#:key inputs #:allow-other-keys)
515 ;; libresolve
516 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
517 "cross-libc" "libc"))))
518 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
519 "src/network/kernel/qhostinfo_unix.cpp")
520 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
521 (string-append a glibc "/lib/lib" b))))
64f390a4
HG
522 ;; libGL
523 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
524 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
525 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
526 ;; libXcursor
527 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
528 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
529 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
530 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
531 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))
532 #t)))))
5ca6ef95
SB
533 (native-search-paths
534 (list (search-path-specification
535 (variable "QMAKEPATH")
6fc0e157 536 (files '("lib/qt5")))
ed02e1fe
DC
537 (search-path-specification
538 (variable "QML2_IMPORT_PATH")
6fc0e157 539 (files '("lib/qt5/qml")))
ed02e1fe
DC
540 (search-path-specification
541 (variable "QT_PLUGIN_PATH")
6fc0e157 542 (files '("lib/qt5/plugins")))
ed02e1fe
DC
543 (search-path-specification
544 (variable "XDG_DATA_DIRS")
545 (files '("share")))
546 (search-path-specification
547 (variable "XDG_CONFIG_DIRS")
548 (files '("etc/xdg")))))
7868000f
AE
549 (home-page "https://www.qt.io/")
550 (synopsis "Cross-platform GUI library")
551 (description "Qt is a cross-platform application and UI framework for
552developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 553 (license (list license:lgpl2.1 license:lgpl3))))
7868000f 554
02511196 555;; qt used to refer to the monolithic Qt 5.x package
9b65dea8 556(define-deprecated qt qtbase)
02511196 557
19c17631
EF
558(define-public qtsvg
559 (package (inherit qtbase)
560 (name "qtsvg")
18daba93 561 (version "5.15.2")
19c17631
EF
562 (source (origin
563 (method url-fetch)
9d01749f 564 (uri (qt5-urls name version))
19c17631
EF
565 (sha256
566 (base32
18daba93 567 "0pjqrdmd1991x9h4rl8sf81pkd89hfd5h1a2gp3fjw96pk0w5hwb"))))
48d4ce6e 568 (propagated-inputs `())
19c17631
EF
569 (native-inputs `(("perl" ,perl)))
570 (inputs
571 `(("mesa" ,mesa)
572 ("qtbase" ,qtbase)
573 ("zlib" ,zlib)))
574 (arguments
575 `(#:phases
576 (modify-phases %standard-phases
8075b623 577 (add-before 'configure 'configure-qmake
19c17631 578 (lambda* (#:key inputs outputs #:allow-other-keys)
8075b623
SB
579 (let* ((out (assoc-ref outputs "out"))
580 (qtbase (assoc-ref inputs "qtbase"))
581 (tmpdir (string-append (getenv "TMPDIR")))
582 (qmake (string-append tmpdir "/qmake"))
583 (qt.conf (string-append tmpdir "/qt.conf")))
584 ;; Use qmake with a customized qt.conf to override install
585 ;; paths to $out.
586 (symlink (which "qmake") qmake)
587 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
588 (with-output-to-file qt.conf
589 (lambda ()
590 (format #t "[Paths]
591Prefix=~a
592ArchData=lib/qt5
593Data=share/qt5
594Documentation=share/doc/qt5
595Headers=include/qt5
596Libraries=lib
597LibraryExecutables=lib/qt5/libexec
598Binaries=bin
599Tests=tests
600Plugins=lib/qt5/plugins
601Imports=lib/qt5/imports
602Qml2Imports=lib/qt5/qml
603Translations=share/qt5/translations
604Settings=etc/xdg
605Examples=share/doc/qt5/examples
606HostPrefix=~a
607HostData=lib/qt5
608HostBinaries=bin
609HostLibraries=lib
b000294e
SB
610
611[EffectiveSourcePaths]
612HostPrefix=~a
613HostData=lib/qt5
614" out out qtbase)))
c195b5ba 615 #t)))
8075b623
SB
616 (replace 'configure
617 (lambda* (#:key inputs outputs #:allow-other-keys)
618 ;; Valid QT_BUILD_PARTS variables are:
619 ;; libs tools tests examples demos docs translations
1f52eb7b 620 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
8075b623
SB
621 (add-before 'check 'set-display
622 (lambda _
623 ;; make Qt render "offscreen", required for tests
624 (setenv "QT_QPA_PLATFORM" "offscreen")
625 #t)))))
96412f34
EF
626 (synopsis "Qt module for displaying SVGs")
627 (description "The QtSvg module provides classes for displaying the
628 contents of SVG files.")))
19c17631 629
9b694210
EF
630(define-public qtimageformats
631 (package (inherit qtsvg)
632 (name "qtimageformats")
18daba93 633 (version "5.15.2")
9b694210
EF
634 (source (origin
635 (method url-fetch)
9d01749f 636 (uri (qt5-urls name version))
9b694210
EF
637 (sha256
638 (base32
18daba93 639 "1msk8a0z8rr16hkp2fnv668vf6wayiydqgc2mcklaa04rv3qb0mz"))
c04854da
EF
640 (modules '((guix build utils)))
641 (snippet
1f52eb7b
EF
642 '(begin
643 (delete-file-recursively "src/3rdparty")
644 #t))))
a0a55309
MR
645 (arguments
646 (substitute-keyword-arguments (package-arguments qtsvg)
647 ((#:phases phases)
648 `(modify-phases ,phases
649 (add-after 'unpack 'fix-build
650 (lambda _
651 (substitute* "src/plugins/imageformats/jp2/qjp2handler.cpp"
652 (("^#include <jasper/jasper.h>")
653 "#include <jasper/jasper.h>\n#include <QtCore/qmath.h>"))
654 #t))))))
9b694210
EF
655 (native-inputs `())
656 (inputs
a532a671
EF
657 `(("jasper" ,jasper)
658 ("libmng" ,libmng)
9b694210
EF
659 ("libtiff" ,libtiff)
660 ("libwebp" ,libwebp)
661 ("mesa" ,mesa)
662 ("qtbase" ,qtbase)
96412f34
EF
663 ("zlib" ,zlib)))
664 (synopsis "Additional Image Format plugins for Qt")
665 (description "The QtImageFormats module contains plugins for adding
666support for MNG, TGA, TIFF and WBMP image formats.")))
9b694210 667
f6c13613
EF
668(define-public qtx11extras
669 (package (inherit qtsvg)
670 (name "qtx11extras")
18daba93 671 (version "5.15.2")
f6c13613
EF
672 (source (origin
673 (method url-fetch)
9d01749f 674 (uri (qt5-urls name version))
f6c13613
EF
675 (sha256
676 (base32
18daba93 677 "0gkfzj195v9flwljnqpdz3a532618yn4h2577nlsai56x4p7053h"))))
c195b5ba
EF
678 (arguments
679 (substitute-keyword-arguments (package-arguments qtsvg)
680 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
f6c13613
EF
681 (native-inputs `(("perl" ,perl)))
682 (inputs
683 `(("mesa" ,mesa)
96412f34
EF
684 ("qtbase" ,qtbase)))
685 (synopsis "Qt Extras for X11")
686 (description "The QtX11Extras module includes the library to access X11
687from within Qt 5.")))
f6c13613 688
98eec712
EF
689(define-public qtxmlpatterns
690 (package (inherit qtsvg)
691 (name "qtxmlpatterns")
18daba93 692 (version "5.15.2")
98eec712
EF
693 (source (origin
694 (method url-fetch)
9d01749f 695 (uri (qt5-urls name version))
98eec712
EF
696 (sha256
697 (base32
18daba93 698 "1ypj5jpa31rlx8yfw3y9jia212lfnxvnqkvygs6ihjf3lxi23skn"))))
c195b5ba
EF
699 (arguments
700 (substitute-keyword-arguments (package-arguments qtsvg)
3e10b241 701 ((#:tests? _ #f) #f) ; TODO: Enable the tests
f66b3e15
EF
702 ((#:phases phases)
703 `(modify-phases ,phases
704 (add-after 'unpack 'disable-network-tests
705 (lambda _ (substitute* "tests/auto/auto.pro"
706 (("qxmlquery") "# qxmlquery")
a20e00dd 707 (("xmlpatterns ") "# xmlpatterns"))
f66b3e15 708 #t))))))
3e10b241
GLV
709 (native-inputs `(("perl" ,perl)
710 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
711 (inputs `(("qtbase" ,qtbase)))
712 (synopsis "Qt XML patterns module")
713 (description "The QtXmlPatterns module is a XQuery and XPath engine for
714XML and custom data models. It contains programs such as xmlpatterns and
715xmlpatternsvalidator.")))
98eec712 716
e3a2ed81
EF
717(define-public qtdeclarative
718 (package (inherit qtsvg)
719 (name "qtdeclarative")
18daba93 720 (version "5.15.2")
e3a2ed81
EF
721 (source (origin
722 (method url-fetch)
9d01749f 723 (uri (qt5-urls name version))
e3a2ed81
EF
724 (sha256
725 (base32
18daba93 726 "0lancdn7y0lrlmyn5cbdm0izd5yprvd5n77nhkb7a3wl2sbx0066"))))
c195b5ba
EF
727 (arguments
728 (substitute-keyword-arguments (package-arguments qtsvg)
20b5f149
JB
729 ((#:tests? _ #f) #f) ;TODO: Enable the tests
730 ((#:phases phases)
731 `(modify-phases ,phases
732 (add-after 'build 'fix-qt5core-install-prefix
733 (lambda* (#:key outputs #:allow-other-keys)
734 (let ((out (assoc-ref outputs "out")))
735 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
736 ;; is provided by qtdeclarative.
737 (substitute*
738 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
739 (("\\$\\{_qt5Core_install_prefix\\}") out)))
740 #t))))))
e3a2ed81
EF
741 (native-inputs
742 `(("perl" ,perl)
743 ("pkg-config" ,pkg-config)
d733a469
HG
744 ("python" ,python)
745 ("python-wrapper" ,python-wrapper)
8d1ab36a
T
746 ("qtsvg" ,qtsvg)
747 ("vulkan-headers" ,vulkan-headers)))
e3a2ed81
EF
748 (inputs
749 `(("mesa" ,mesa)
96412f34
EF
750 ("qtbase" ,qtbase)))
751 (synopsis "Qt QML module (Quick 2)")
752 (description "The Qt QML module provides a framework for developing
753applications and libraries with the QML language. It defines and implements the
754language and engine infrastructure, and provides an API to enable application
755developers to extend the QML language with custom types and integrate QML code
756with JavaScript and C++.")))
e3a2ed81 757
e98cb96d
EF
758(define-public qtconnectivity
759 (package (inherit qtsvg)
760 (name "qtconnectivity")
18daba93 761 (version "5.15.2")
e98cb96d
EF
762 (source (origin
763 (method url-fetch)
9d01749f 764 (uri (qt5-urls name version))
e98cb96d
EF
765 (sha256
766 (base32
18daba93 767 "185zci61ip1wpjrygcw2m6v55lvninc0b8y2p3jh6qgpf5w35003"))))
e98cb96d
EF
768 (native-inputs
769 `(("perl" ,perl)
770 ("pkg-config" ,pkg-config)
771 ("qtdeclarative" ,qtdeclarative)))
772 (inputs
773 `(("bluez" ,bluez)
96412f34
EF
774 ("qtbase" ,qtbase)))
775 (synopsis "Qt Connectivity module")
776 (description "The Qt Connectivity modules provides modules for interacting
777with Bluetooth and NFC.")))
e98cb96d 778
cac893ec
EF
779(define-public qtwebsockets
780 (package (inherit qtsvg)
781 (name "qtwebsockets")
18daba93 782 (version "5.15.2")
cac893ec
EF
783 (source (origin
784 (method url-fetch)
9d01749f 785 (uri (qt5-urls name version))
cac893ec
EF
786 (sha256
787 (base32
18daba93 788 "0gr399fn5n8j3m9d3vv01vcbr1cb7pw043j04cnnxzrlvn2jvd50"))))
c195b5ba
EF
789 (arguments
790 (substitute-keyword-arguments (package-arguments qtsvg)
791 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
cac893ec
EF
792 (native-inputs
793 `(("perl" ,perl)
794 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
795 (inputs `(("qtbase" ,qtbase)))
796 (synopsis "Qt Web Sockets module")
797 (description "WebSocket is a web-based protocol designed to enable two-way
798communication between a client application and a remote host. The Qt
799WebSockets module provides C++ and QML interfaces that enable Qt applications
800to act as a server that can process WebSocket requests, or a client that can
801consume data received from the server, or both.")))
cac893ec 802
3474767c
EF
803(define-public qtsensors
804 (package (inherit qtsvg)
805 (name "qtsensors")
18daba93 806 (version "5.15.2")
3474767c
EF
807 (source (origin
808 (method url-fetch)
9d01749f 809 (uri (qt5-urls name version))
3474767c
EF
810 (sha256
811 (base32
18daba93 812 "0fa81r7bn1mf9ynwsx524a55dx1q0jb4vda6j48ssb4lx7wi201z"))))
202afee2
EF
813 (arguments
814 (substitute-keyword-arguments (package-arguments qtsvg)
5ea35b42 815 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
202afee2
EF
816 ((#:phases phases)
817 `(modify-phases ,phases
04162e83 818 (add-after 'unpack 'fix-tests
202afee2
EF
819 (lambda _
820 (substitute* "tests/auto/qsensorgestures_gestures/tst_sensorgestures_gestures.cpp"
04162e83
NG
821 (("2000") "5000") ;lengthen test timeout
822 (("QTest::newRow(\"twist\") << \"twist\"") "")) ;failing test
202afee2 823 #t))))))
3474767c
EF
824 (native-inputs
825 `(("perl" ,perl)
826 ("qtdeclarative" ,qtdeclarative)))
96412f34
EF
827 (inputs `(("qtbase" ,qtbase)))
828 (synopsis "Qt Sensors module")
829 (description "The Qt Sensors API provides access to sensor hardware via QML
830and C++ interfaces. The Qt Sensors API also provides a motion gesture
831recognition API for devices.")))
3474767c 832
15378f93
EF
833(define-public qtmultimedia
834 (package (inherit qtsvg)
835 (name "qtmultimedia")
18daba93 836 (version "5.15.2")
15378f93
EF
837 (source (origin
838 (method url-fetch)
9d01749f 839 (uri (qt5-urls name version))
15378f93
EF
840 (sha256
841 (base32
18daba93 842 "1xbd6kc7i0iablqdkvfrajpi32cbq7j6ajbfyyyalcai1s0mhdqc"))
63d8f08f
EF
843 (modules '((guix build utils)))
844 (snippet
845 '(begin
846 (delete-file-recursively
c195b5ba
EF
847 "examples/multimedia/spectrum/3rdparty")
848 ;; We also prevent the spectrum example from being built.
849 (substitute* "examples/multimedia/multimedia.pro"
6cbee49d
MW
850 (("spectrum") "#"))
851 #t))))
c195b5ba
EF
852 (arguments
853 (substitute-keyword-arguments (package-arguments qtsvg)
04231311
RW
854 ((#:phases phases)
855 `(modify-phases ,phases
856 (replace 'configure
857 (lambda* (#:key outputs #:allow-other-keys)
858 (let ((out (assoc-ref outputs "out")))
1f52eb7b
EF
859 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
860 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib -Wl,-rpath,")
861 (string-append "PREFIX=" out)))))))
04231311 862 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
15378f93
EF
863 (native-inputs
864 `(("perl" ,perl)
865 ("pkg-config" ,pkg-config)
d733a469 866 ("python" ,python)
15378f93
EF
867 ("qtdeclarative" ,qtdeclarative)))
868 (inputs
869 `(("alsa-lib" ,alsa-lib)
870 ("mesa" ,mesa)
871 ("pulseaudio" ,pulseaudio)
04231311
RW
872 ("qtbase" ,qtbase)
873 ;; Gstreamer is needed for the mediaplayer plugin
874 ("gstreamer" ,gstreamer)
96412f34
EF
875 ("gst-plugins-base" ,gst-plugins-base)))
876 (synopsis "Qt Multimedia module")
877 (description "The Qt Multimedia module provides set of APIs to play and
878record media, and manage a collection of media content. It also contains a
879set of plugins for interacting with pulseaudio and GStreamer.")))
15378f93 880
bc8ede01
EF
881(define-public qtwayland
882 (package (inherit qtsvg)
883 (name "qtwayland")
18daba93 884 (version "5.15.2")
bc8ede01
EF
885 (source (origin
886 (method url-fetch)
9d01749f 887 (uri (qt5-urls name version))
bc8ede01
EF
888 (sha256
889 (base32
18daba93 890 "1ddfx4nak16xx0zh1kl836zxvpbixmmjyplsmfmg65pqkwi34dqr"))))
6fc0e157
SB
891 (arguments
892 (substitute-keyword-arguments (package-arguments qtsvg)
893 ((#:phases phases)
894 `(modify-phases ,phases
8d1ab36a
T
895 (add-after 'unpack 'disable-failing-tests
896 (lambda _
897 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
898 ;; reason and breaks these two tests.
899 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
900 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
901 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
902 "")
903 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
904 ""))
905 #t))
906 (add-before 'check 'set-test-environment
6fc0e157 907 (lambda _
8d1ab36a
T
908 ;; Do not fail just because /etc/machine-id is missing.
909 (setenv "DBUS_FATAL_WARNINGS" "0")
6fc0e157 910 #t))))))
bc8ede01
EF
911 (native-inputs
912 `(("glib" ,glib)
913 ("perl" ,perl)
914 ("pkg-config" ,pkg-config)
915 ("qtdeclarative" ,qtdeclarative)))
916 (inputs
917 `(("fontconfig" ,fontconfig)
918 ("freetype" ,freetype)
919 ("libx11" ,libx11)
920 ("libxcomposite" ,libxcomposite)
921 ("libxext" ,libxext)
922 ("libxkbcommon" ,libxkbcommon)
923 ("libxrender" ,libxrender)
924 ("mesa" ,mesa)
925 ("mtdev" ,mtdev)
926 ("qtbase" ,qtbase)
18daba93 927 ("vulkan-headers" ,vulkan-headers)
96412f34
EF
928 ("wayland" ,wayland)))
929 (synopsis "Qt Wayland module")
930 (description "The Qt Wayland module provides the QtWayland client and
931compositor libraries.")))
bc8ede01 932
00806f2b
EF
933(define-public qtserialport
934 (package (inherit qtsvg)
935 (name "qtserialport")
18daba93 936 (version "5.15.2")
00806f2b
EF
937 (source (origin
938 (method url-fetch)
9d01749f 939 (uri (qt5-urls name version))
00806f2b
EF
940 (sha256
941 (base32
18daba93 942 "17gp5qzg4wdg8qlxk2p3mh8x1vk33rf33wic3fy0cws193bmkiar"))))
00806f2b 943 (native-inputs `(("perl" ,perl)))
33741e16
EF
944 (inputs
945 `(("qtbase" ,qtbase)
96412f34 946 ("eudev" ,eudev)))
042f7c26
HG
947 (arguments
948 (substitute-keyword-arguments (package-arguments qtsvg)
949 ((#:phases phases)
950 `(modify-phases ,phases
951 (add-after 'unpack 'patch-dlopen-paths
952 (lambda* (#:key inputs #:allow-other-keys)
953 (substitute* "src/serialport/qtudev_p.h"
954 ;; Use the absolute paths for dynamically loaded libs,
955 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
956 ;; typically is not set in guix.
957 (("^\\s*(udevLibrary->setFileNameAndVersion\\(QStringLiteral\\(\")(udev\"\\),\\s*[0-9]+\\);)" _ a b)
958 (string-append a (assoc-ref inputs "eudev") "/lib/lib" b)))
959 #t))))))
96412f34
EF
960 (synopsis "Qt Serial Port module")
961 (description "The Qt Serial Port module provides the library for
962interacting with serial ports from within Qt.")))
00806f2b 963
a98ffab5
EF
964(define-public qtserialbus
965 (package (inherit qtsvg)
966 (name "qtserialbus")
18daba93 967 (version "5.15.2")
a98ffab5
EF
968 (source (origin
969 (method url-fetch)
9d01749f 970 (uri (qt5-urls name version))
a98ffab5
EF
971 (sha256
972 (base32
18daba93 973 "125x6756fjpldqy6wbw6cg7ngjh2016aiq92bchh719z1mf7xsxf"))))
12bb72fb
MC
974 (arguments
975 (substitute-keyword-arguments (package-arguments qtsvg)
976 ((#:phases phases '%standard-phases)
977 `(modify-phases ,phases
978 (add-after 'unpack 'patch-libsocketcan-reference
979 (lambda* (#:key inputs #:allow-other-keys)
980 (let* ((libcansocket (assoc-ref inputs "libsocketcan"))
981 (libcansocket.so (string-append libcansocket
982 "/lib/libsocketcan.so")))
983 (substitute* "src/plugins/canbus/socketcan/libsocketcan.cpp"
984 (("QStringLiteral\\(\"socketcan\"\\)")
985 (format #f "QStringLiteral(~s)" libcansocket.so)))
986 #t)))))))
a98ffab5 987 (inputs
12bb72fb
MC
988 `(("libsocketcan" ,libsocketcan)
989 ("qtbase" ,qtbase)
96412f34
EF
990 ("qtserialport" ,qtserialport)))
991 (synopsis "Qt Serial Bus module")
992 (description "The Qt Serial Bus API provides classes and functions to
993access the various industrial serial buses and protocols, such as CAN, ModBus,
994and others.")))
a98ffab5 995
f5377013
EF
996(define-public qtwebchannel
997 (package (inherit qtsvg)
998 (name "qtwebchannel")
18daba93 999 (version "5.15.2")
f5377013
EF
1000 (source (origin
1001 (method url-fetch)
9d01749f 1002 (uri (qt5-urls name version))
f5377013
EF
1003 (sha256
1004 (base32
18daba93 1005 "1h9y634phvvk557mhmf9z4lmxr41rl8x9mqy2lzp31mk8ffffzqj"))))
f5377013
EF
1006 (native-inputs
1007 `(("perl" ,perl)
1008 ("qtdeclarative" ,qtdeclarative)
1009 ("qtwebsockets" ,qtwebsockets)))
96412f34
EF
1010 (inputs `(("qtbase" ,qtbase)))
1011 (synopsis "Web communication library for Qt")
1012 (description "The Qt WebChannel module enables peer-to-peer communication
1013between the host (QML/C++ application) and the client (HTML/JavaScript
1014application). The transport mechanism is supported out of the box by the two
1015popular web engines, Qt WebKit 2 and Qt WebEngine.")))
f5377013 1016
b5792b9c
HG
1017(define-public qtwebglplugin
1018 (package (inherit qtsvg)
1019 (name "qtwebglplugin")
18daba93 1020 (version "5.15.2")
b5792b9c
HG
1021 (source (origin
1022 (method url-fetch)
9d01749f 1023 (uri (qt5-urls name version))
b5792b9c
HG
1024 (sha256
1025 (base32
18daba93 1026 "0ihlnhv8ldkqz82v3j7j22lrhk17b6ghra8sx85y2agd2ysq5rw1"))))
b6476ecc
EF
1027 (arguments
1028 (substitute-keyword-arguments (package-arguments qtsvg)
1029 ((#:phases phases)
1030 `(modify-phases ,phases
1031 (add-after 'unpack 'disable-network-tests
1032 (lambda _ (substitute* "tests/plugins/platforms/platforms.pro"
1033 (("webgl") "# webgl"))
1034 #t))))))
b5792b9c
HG
1035 (native-inputs '())
1036 (inputs
1037 `(("mesa" ,mesa)
1038 ("qtbase" ,qtbase)
b6476ecc 1039 ("qtdeclarative" ,qtdeclarative)
8d1ab36a
T
1040 ("qtwebsockets" ,qtwebsockets)
1041 ("zlib" ,zlib)))
b5792b9c
HG
1042 (synopsis "QPA plugin for running an application via a browser using
1043streamed WebGL commands")
1044 (description "Qt back end that uses WebGL for rendering. It allows Qt
1045applications (with some limitations) to run in a web browser that supports
1046WebGL. WebGL is a JavaScript API for rendering 2D and 3D graphics within any
1047compatible web browser without the use of plug-ins. The API is similar to
1048OpenGL ES 2.0 and can be used in HTML5 canvas elements")))
1049
359e30c9
HG
1050(define-public qtwebview
1051 (package (inherit qtsvg)
1052 (name "qtwebview")
18daba93 1053 (version "5.15.2")
359e30c9
HG
1054 (source (origin
1055 (method url-fetch)
9d01749f 1056 (uri (qt5-urls name version))
359e30c9
HG
1057 (sha256
1058 (base32
18daba93 1059 "1rw1wibmbxlj6xc86qs3y8h42al1vczqiksyxzaylxs9gqb4d7xy"))))
359e30c9
HG
1060 (native-inputs
1061 `(("perl" ,perl)))
1062 (inputs
1063 `(("qtbase" ,qtbase)
1064 ("qtdeclarative" ,qtdeclarative)))
1065 (synopsis "Display web content in a QML application")
1066 (description "Qt WebView provides a way to display web content in a QML
1067application without necessarily including a full web browser stack by using
1068native APIs where it makes sense.")))
1069
d5ca54ce
EF
1070(define-public qtlocation
1071 (package (inherit qtsvg)
1072 (name "qtlocation")
18daba93 1073 (version "5.15.2")
d5ca54ce
EF
1074 (source (origin
1075 (method url-fetch)
1076 (uri (string-append "https://download.qt.io/official_releases/qt/"
1077 (version-major+minor version) "/" version
1f52eb7b 1078 "/submodules/" name "-everywhere-src-"
d5ca54ce
EF
1079 version ".tar.xz"))
1080 (sha256
1081 (base32
18daba93 1082 "184jychnlfhplpwc5cdcsapwljgwvzk5qpf3val4kpq8w44wnkwq"))))
c195b5ba
EF
1083 (arguments
1084 (substitute-keyword-arguments (package-arguments qtsvg)
1085 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d5ca54ce
EF
1086 (native-inputs
1087 `(("perl" ,perl)
1088 ("qtdeclarative" ,qtdeclarative)
9a935ef2 1089 ("qtquickcontrols" ,qtquickcontrols)
d5ca54ce 1090 ("qtserialport" ,qtserialport)))
924e6ddf
EF
1091 (inputs
1092 `(("icu4c" ,icu4c)
1093 ("openssl" ,openssl)
1094 ("qtbase" ,qtbase)
96412f34
EF
1095 ("zlib" ,zlib)))
1096 (synopsis "Qt Location and Positioning modules")
1097 (description "The Qt Location module provides an interface for location,
1098positioning and geolocation plugins.")))
d5ca54ce 1099
d438c968
EF
1100(define-public qttools
1101 (package (inherit qtsvg)
1102 (name "qttools")
18daba93 1103 (version "5.15.2")
d438c968
EF
1104 (source (origin
1105 (method url-fetch)
9d01749f 1106 (uri (qt5-urls name version))
d438c968
EF
1107 (sha256
1108 (base32
18daba93 1109 "1k618f7v6jaj0ygy8d7jvgb8zjr47sn55kiskbdkkizp3z7d12f1"))))
c195b5ba
EF
1110 (arguments
1111 (substitute-keyword-arguments (package-arguments qtsvg)
1112 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
d438c968
EF
1113 (native-inputs
1114 `(("perl" ,perl)
124351ef
EF
1115 ("qtdeclarative" ,qtdeclarative)
1116 ("vulkan-headers" ,vulkan-headers)))
d438c968
EF
1117 (inputs
1118 `(("mesa" ,mesa)
96412f34
EF
1119 ("qtbase" ,qtbase)))
1120 (synopsis "Qt Tools and Designer modules")
1121 (description "The Qt Tools module provides a set of applications to browse
1122the documentation, translate applications, generate help files and other stuff
1123that helps in Qt development.")))
d438c968 1124
4742c4de
EF
1125(define-public qtscript
1126 (package (inherit qtsvg)
1127 (name "qtscript")
18daba93 1128 (version "5.15.2")
4742c4de
EF
1129 (source (origin
1130 (method url-fetch)
9d01749f 1131 (uri (qt5-urls name version))
4742c4de
EF
1132 (sha256
1133 (base32
18daba93 1134 "0gk74hk488k9ldacxbxcranr3arf8ifqg8kz9nm1rgdgd59p36d2"))
7c5cf7a2 1135 (patches (search-patches "qtscript-disable-tests.patch"))))
4742c4de
EF
1136 (native-inputs
1137 `(("perl" ,perl)
1138 ("qttools" ,qttools)))
1139 (inputs
96412f34
EF
1140 `(("qtbase" ,qtbase)))
1141 (synopsis "Qt Script module")
1142 (description "Qt provides support for application scripting with ECMAScript.
1143The following guides and references cover aspects of programming with
1144ECMAScript and Qt.")))
4742c4de 1145
ae0e5133
DC
1146(define-public qtquickcontrols
1147 (package (inherit qtsvg)
1148 (name "qtquickcontrols")
18daba93 1149 (version "5.15.2")
ae0e5133
DC
1150 (source (origin
1151 (method url-fetch)
9d01749f 1152 (uri (qt5-urls name version))
ae0e5133
DC
1153 (sha256
1154 (base32
18daba93 1155 "1dczakl868mg0lnwpf082jjc5976ycn879li1vqlgw5ihirzp4y3"))))
c195b5ba
EF
1156 (arguments
1157 (substitute-keyword-arguments (package-arguments qtsvg)
1158 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
ae0e5133
DC
1159 (inputs
1160 `(("qtbase" ,qtbase)
96412f34
EF
1161 ("qtdeclarative" ,qtdeclarative)))
1162 (synopsis "Qt Quick Controls and other Quick modules")
1163 (description "The QtScript module provides classes for making Qt
1164applications scriptable. This module provides a set of extra components that
1165can be used to build complete interfaces in Qt Quick.")))
ae0e5133 1166
42da1492
DC
1167(define-public qtquickcontrols2
1168 (package (inherit qtsvg)
1169 (name "qtquickcontrols2")
18daba93 1170 (version "5.15.2")
42da1492
DC
1171 (source (origin
1172 (method url-fetch)
9d01749f 1173 (uri (qt5-urls name version))
42da1492
DC
1174 (sha256
1175 (base32
18daba93 1176 "06c9vrwvbjmzapmfa25y34lgjkzg57xxbm92nr6wkv5qykjnq6v7"))))
c195b5ba
EF
1177 (arguments
1178 (substitute-keyword-arguments (package-arguments qtsvg)
1179 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
42da1492
DC
1180 (inputs
1181 `(("qtbase" ,qtbase)
96412f34
EF
1182 ("qtdeclarative" ,qtdeclarative)))
1183 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
1184 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
1185module that provides platform integration: native dialogs, menus and menu bars,
1186and tray icons. It falls back to Qt Widgets when a native implementation is
1187not available.")))
42da1492 1188
4e4ed0ee
DC
1189(define-public qtgraphicaleffects
1190 (package (inherit qtsvg)
1191 (name "qtgraphicaleffects")
18daba93 1192 (version "5.15.2")
4e4ed0ee
DC
1193 (source (origin
1194 (method url-fetch)
9d01749f 1195 (uri (qt5-urls name version))
4e4ed0ee
DC
1196 (sha256
1197 (base32
18daba93 1198 "1r6zfc0qga2ax155js7c8y5rx6vgayf582s921j09mb797v6g3gc"))))
c195b5ba
EF
1199 (arguments
1200 (substitute-keyword-arguments (package-arguments qtsvg)
1201 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
4e4ed0ee
DC
1202 (inputs
1203 `(("qtbase" ,qtbase)
96412f34
EF
1204 ("qtdeclarative" ,qtdeclarative)))
1205 (synopsis "Qt Graphical Effects module")
1206 (description "The Qt Graphical Effects module provides a set of QML types
1207for adding visually impressive and configurable effects to user interfaces.
1208Effects are visual items that can be added to Qt Quick user interface as UI
1209components. The API consists of over 20 effects provided as separate QML
1210types. The effects cover functional areas such as blending, masking, blurring,
1211coloring, and many more.")))
4e4ed0ee 1212
51519fd3
EF
1213(define-public qtgamepad
1214 (package (inherit qtsvg)
1215 (name "qtgamepad")
18daba93 1216 (version "5.15.2")
51519fd3
EF
1217 (source (origin
1218 (method url-fetch)
9d01749f 1219 (uri (qt5-urls name version))
51519fd3
EF
1220 (sha256
1221 (base32
18daba93 1222 "0p07bg93fdfn4gr2kv38qgnws5znhswajrxdfs8xc9l3i7vi2xn7"))))
51519fd3
EF
1223 (native-inputs
1224 `(("perl" ,perl)
1225 ("pkg-config" ,pkg-config)))
1226 (inputs
1227 `(("fontconfig" ,fontconfig)
1228 ("freetype" ,freetype)
1229 ("libxrender" ,libxrender)
1230 ("sdl2" ,sdl2)
1231 ("qtbase" ,qtbase)
96412f34
EF
1232 ("qtdeclarative" ,qtdeclarative)))
1233 (synopsis "Qt Gamepad module")
1234 (description "The Qt Gamepad module is an add-on library that enables Qt
1235applications to support the use of gamepad hardware and in some cases remote
1236control equipment. The module provides both QML and C++ interfaces. The
1237primary target audience are embedded devices with fullscreen user interfaces,
1238and mobile applications targeting TV-like form factors.")))
51519fd3 1239
56cd88fd
EF
1240(define-public qtscxml
1241 (package (inherit qtsvg)
1242 (name "qtscxml")
18daba93 1243 (version "5.15.2")
56cd88fd
EF
1244 (source (origin
1245 (method url-fetch)
9d01749f 1246 (uri (qt5-urls name version))
56cd88fd
EF
1247 (sha256
1248 (base32
18daba93 1249 "1p5771b9hnpchfcdgy0zkhwg09a6xq88934aggp0rij1k85mkfb0"))
56cd88fd
EF
1250 (modules '((guix build utils)))
1251 (snippet
c195b5ba
EF
1252 '(begin
1253 (delete-file-recursively "tests/3rdparty")
1254 ;; the scion test refers to the bundled 3rd party test code.
1255 (substitute* "tests/auto/auto.pro"
6cbee49d
MW
1256 (("scion") "#"))
1257 #t))))
56cd88fd
EF
1258 (inputs
1259 `(("qtbase" ,qtbase)
96412f34
EF
1260 ("qtdeclarative" ,qtdeclarative)))
1261 (synopsis "Qt SCXML module")
1262 (description "The Qt SCXML module provides functionality to create state
1263machines from SCXML files. This includes both dynamically creating state
1264machines (loading the SCXML file and instantiating states and transitions) and
1265generating a C++ file that has a class implementing the state machine. It
1266also contains functionality to support data models and executable content.")))
56cd88fd 1267
de5e0180
EF
1268(define-public qtpurchasing
1269 (package (inherit qtsvg)
1270 (name "qtpurchasing")
18daba93 1271 (version "5.15.2")
de5e0180
EF
1272 (source (origin
1273 (method url-fetch)
9d01749f 1274 (uri (qt5-urls name version))
de5e0180
EF
1275 (sha256
1276 (base32
18daba93 1277 "09rjx53519dfk4qj2gbn3vlxyriasyb747wpg1p11y7jkwqhs4l7"))))
de5e0180
EF
1278 (inputs
1279 `(("qtbase" ,qtbase)
96412f34
EF
1280 ("qtdeclarative" ,qtdeclarative)))
1281 (synopsis "Qt Purchasing module")
1282 (description "The Qt Purchasing module provides and in-app API for
1283purchasing goods and services.")))
de5e0180 1284
68bbe14b
EF
1285(define-public qtcharts
1286 (package (inherit qtsvg)
1287 (name "qtcharts")
18daba93 1288 (version "5.15.2")
68bbe14b
EF
1289 (source (origin
1290 (method url-fetch)
9d01749f 1291 (uri (qt5-urls name version))
68bbe14b
EF
1292 (sha256
1293 (base32
18daba93 1294 "049x7z8zcp9jixmdv2fjscy2ggpd6za9hkdbb2bqp2mxjm0hwxg0"))))
c195b5ba
EF
1295 (arguments
1296 (substitute-keyword-arguments (package-arguments qtsvg)
1297 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
68bbe14b
EF
1298 (inputs
1299 `(("qtbase" ,qtbase)
96412f34
EF
1300 ("qtdeclarative" ,qtdeclarative)))
1301 (synopsis "Qt Charts module")
1302 (description "The Qt Charts module provides a set of easy to use chart
1303components. It uses the Qt Graphics View Framework, therefore charts can be
1304easily integrated to modern user interfaces. Qt Charts can be used as QWidgets,
1305QGraphicsWidget, or QML types. Users can easily create impressive graphs by
9c2c524d
EF
1306selecting one of the charts themes.")
1307 (license license:gpl3)))
68bbe14b 1308
a69945a7
EF
1309(define-public qtdatavis3d
1310 (package (inherit qtsvg)
1311 (name "qtdatavis3d")
18daba93 1312 (version "5.15.2")
a69945a7
EF
1313 (source (origin
1314 (method url-fetch)
9d01749f 1315 (uri (qt5-urls name version))
a69945a7
EF
1316 (sha256
1317 (base32
18daba93 1318 "1zdn3vm0nfy9ny7c783aabp3mhlnqhi9fw2rljn7ibbksmsnasi2"))))
c195b5ba
EF
1319 (arguments
1320 (substitute-keyword-arguments (package-arguments qtsvg)
1321 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
a69945a7
EF
1322 (inputs
1323 `(("qtbase" ,qtbase)
96412f34
EF
1324 ("qtdeclarative" ,qtdeclarative)))
1325 (synopsis "Qt Data Visualization module")
1326 (description "The Qt Data Visualization module provides a way to visualize
1327data in 3D as bar, scatter, and surface graphs. It is especially useful for
1328visualizing depth maps and large quantities of rapidly changing data, such as
1329data received from multiple sensors. The look and feel of graphs can be
9c2c524d
EF
1330customized by using themes or by adding custom items and labels to them.")
1331 (license license:gpl3)))
f47d2793
EF
1332
1333(define-public qtnetworkauth
1334 (package (inherit qtsvg)
1335 (name "qtnetworkauth")
18daba93 1336 (version "5.15.2")
f47d2793
EF
1337 (source (origin
1338 (method url-fetch)
9d01749f 1339 (uri (qt5-urls name version))
f47d2793
EF
1340 (sha256
1341 (base32
18daba93 1342 "11fdgacv4syr8bff2vdw7rb0dg1gcqpdf37hm3pn31d6z91frhpw"))))
f18c9470
EF
1343 (arguments
1344 (substitute-keyword-arguments (package-arguments qtsvg)
1345 ((#:phases phases)
1346 `(modify-phases ,phases
1347 (add-after 'unpack 'remove-failing-test
1348 (lambda _
1349 ;; These tests can't find their test data.
1350 (substitute* "tests/auto/auto.pro"
1351 (("oauth1 ") "# oauth1 "))
1352 #t))))))
f47d2793 1353 (inputs
96412f34
EF
1354 `(("qtbase" ,qtbase)))
1355 (synopsis "Qt Network Authorization module")
1356 (description "The Qt Network Authorization module provides an
1357implementation of OAuth and OAuth2 authenticathon methods for Qt.")))
213238d9
EF
1358
1359(define-public qtremoteobjects
1360 (package (inherit qtsvg)
1361 (name "qtremoteobjects")
18daba93 1362 (version "5.15.2")
213238d9
EF
1363 (source (origin
1364 (method url-fetch)
9d01749f 1365 (uri (qt5-urls name version))
213238d9
EF
1366 (sha256
1367 (base32
18daba93 1368 "1hngbp0vkr35rpsrac7b9vx6f360v8v2g0fffzm590l8j2ybd0b7"))))
1f52eb7b
EF
1369 (arguments
1370 (substitute-keyword-arguments (package-arguments qtsvg)
1371 ((#:phases phases)
1372 `(modify-phases ,phases
1373 (add-after 'unpack 'remove-failing-test
1374 (lambda _
1375 ;; This test can't find its imports.
1376 (substitute* "tests/auto/qml/qml.pro"
b6476ecc
EF
1377 (("integration") "# integration")
1378 (("usertypes") "# usertypes"))
8d1ab36a
T
1379 ;; disable failing tests: they need network
1380 (substitute* "tests/auto/auto.pro"
1381 (("integration_multiprocess proxy_multiprocess integration_external restart")
1382 "integration_multiprocess"))
1f52eb7b 1383 #t))))))
213238d9
EF
1384 (inputs
1385 `(("qtbase" ,qtbase)
96412f34
EF
1386 ("qtdeclarative" ,qtdeclarative)))
1387 (synopsis "Qt Remote Objects module")
1388 (description "The Qt Remote Objects module is an @dfn{inter-process
1389communication} (IPC) module developed for Qt. The idea is to extend existing
1390Qt's functionalities to enable an easy exchange of information between
1391processes or computers.")))
b84cc89a
EF
1392
1393(define-public qtspeech
1394 (package (inherit qtsvg)
1395 (name "qtspeech")
18daba93 1396 (version "5.15.2")
b84cc89a
EF
1397 (source (origin
1398 (method url-fetch)
9d01749f 1399 (uri (qt5-urls name version))
b84cc89a
EF
1400 (sha256
1401 (base32
18daba93 1402 "1xc3x3ghnhgchsg1kgj156yg69wn4rwjx8r28i1jd05hxjggn468"))))
2c7511fb 1403
b6476ecc
EF
1404 (arguments
1405 (substitute-keyword-arguments (package-arguments qtsvg)
1406 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
b84cc89a
EF
1407 (inputs
1408 `(("qtbase" ,qtbase)))
1409 (native-inputs
1410 `(("perl" ,perl)
1411 ("qtdeclarative" ,qtdeclarative)
1412 ("qtmultimedia" ,qtmultimedia)
96412f34
EF
1413 ("qtxmlpatterns" ,qtxmlpatterns)))
1414 (synopsis "Qt Speech module")
1415 (description "The Qt Speech module enables a Qt application to support
1416accessibility features such as text-to-speech, which is useful for end-users
1417who are visually challenged or cannot access the application for whatever
1418reason. The most common use case where text-to-speech comes in handy is when
1419the end-user is driving and cannot attend the incoming messages on the phone.
1420In such a scenario, the messaging application can read out the incoming
1421message.")))
a69945a7 1422
3844166f
NG
1423(define-public qtspell
1424 (package
1425 (name "qtspell")
1426 (version "0.9.0")
1427 (source
1428 (origin
1429 (method git-fetch)
1430 (uri (git-reference
8ed4c468 1431 (url "https://github.com/manisandro/qtspell")
3844166f
NG
1432 (commit version)))
1433 (file-name (git-file-name name version))
1434 (sha256
1435 (base32 "1081makirjxixz44ghwz362vgnk5wcks6ni6w01pl667x8wggsd2"))))
1436 (build-system cmake-build-system)
1437 (arguments
1438 `(#:tests? #f)) ;no test
1439 (native-inputs
1440 `(("pkg-config" ,pkg-config)
1441 ("qttools" ,qttools)))
1442 (inputs
1443 `(("enchant" ,enchant)
1444 ("qtbase" ,qtbase)))
1445 (home-page "https://github.com/manisandro/qtspell")
1446 (synopsis "Spell checking for Qt text widgets")
1447 (description
1448 "QtSpell adds spell-checking functionality to Qt's text widgets,
1449using the Enchant spell-checking library.")
1450 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
1451 (license license:gpl2+)))
1452
db481636
MR
1453(define-public qtwebengine
1454 (package
1455 (inherit qtsvg)
1456 (name "qtwebengine")
1457 (version (package-version qtbase))
2c7511fb
MB
1458 (source
1459 (origin
1460 (method url-fetch)
9d01749f 1461 (uri (qt5-urls name version))
2c7511fb 1462 (sha256
146d0483 1463 (base32
18daba93 1464 "1q4idxdm81sx102xc12ixj0xpfx52d6vwvs3jpapnkyq8c7cmby8"))
2c7511fb
MB
1465 (modules '((ice-9 ftw)
1466 (ice-9 match)
1467 (srfi srfi-1)
1468 (srfi srfi-26)
1469 (guix build utils)))
1470 (snippet
1471 '(begin
1472 (let ((preserved-third-party-files
18daba93
MB
1473 '("base/third_party/double_conversion"
1474 "base/third_party/cityhash"
1475 "base/third_party/cityhash_v103"
2c7511fb
MB
1476 "base/third_party/dynamic_annotations"
1477 "base/third_party/icu"
1478 "base/third_party/libevent"
1479 "base/third_party/nspr"
1480 "base/third_party/superfasthash"
1481 "base/third_party/symbolize"
1482 "base/third_party/xdg_mime"
1483 "base/third_party/xdg_user_dirs"
2c7511fb
MB
1484 "net/third_party/mozilla_security_manager"
1485 "net/third_party/nss"
8d1ab36a
T
1486 "net/third_party/quiche"
1487 "net/third_party/uri_template"
2c7511fb
MB
1488 "third_party/abseil-cpp"
1489 "third_party/angle"
1490 "third_party/angle/src/common/third_party/base"
1491 "third_party/angle/src/common/third_party/smhasher"
8d1ab36a 1492 "third_party/angle/src/common/third_party/xxhash"
2c7511fb 1493 "third_party/angle/src/third_party/compiler"
8d1ab36a 1494 "third_party/axe-core"
2c7511fb
MB
1495 "third_party/blink"
1496 "third_party/boringssl"
1497 "third_party/boringssl/src/third_party/fiat"
1498 "third_party/breakpad"
1499 "third_party/brotli"
1500 "third_party/ced"
8d1ab36a 1501 "third_party/cld_3"
18daba93
MB
1502 "third_party/closure_compiler"
1503 "third_party/crashpad"
1504 "third_party/crashpad/crashpad/third_party/lss"
1505 "third_party/crashpad/crashpad/third_party/zlib"
2c7511fb 1506 "third_party/crc32c"
8d1ab36a
T
1507 "third_party/dav1d"
1508 "third_party/dawn"
18daba93
MB
1509 "third_party/devtools-frontend"
1510 "third_party/devtools-frontend/src/front_end/third_party/fabricjs"
1511 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
1512 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
1513 "third_party/devtools-frontend/src/third_party/axe-core"
c37b621c 1514 "third_party/emoji-segmenter"
2c7511fb
MB
1515 "third_party/ffmpeg"
1516 "third_party/googletest"
18daba93 1517 "third_party/harfbuzz-ng/utils"
2c7511fb
MB
1518 "third_party/hunspell"
1519 "third_party/iccjpeg"
1520 "third_party/icu"
1521 "third_party/inspector_protocol"
1522 "third_party/jinja2"
8d1ab36a 1523 "third_party/jsoncpp"
2c7511fb
MB
1524 "third_party/jstemplate"
1525 "third_party/khronos"
1526 "third_party/leveldatabase"
1527 "third_party/libaddressinput"
18daba93 1528 "third_party/libgifcodec"
2c7511fb 1529 "third_party/libjingle_xmpp"
18daba93 1530 "third_party/libjpeg_turbo"
2c7511fb
MB
1531 "third_party/libpng"
1532 "third_party/libsrtp"
1533 "third_party/libsync"
1534 "third_party/libudev"
1535 "third_party/libvpx"
1536 "third_party/libwebm"
1537 "third_party/libwebp"
1538 "third_party/libxml"
1539 "third_party/libxslt"
1540 "third_party/libyuv"
1541 "third_party/lss"
18daba93 1542 "third_party/mako"
2c7511fb 1543 "third_party/markupsafe"
c37b621c 1544 "third_party/mesa_headers"
2c7511fb
MB
1545 "third_party/metrics_proto"
1546 "third_party/modp_b64"
8d1ab36a
T
1547 "third_party/nasm"
1548 "third_party/one_euro_filter"
2c7511fb
MB
1549 "third_party/opus"
1550 "third_party/ots"
18daba93
MB
1551 "third_party/pdfium"
1552 "third_party/pdfium/third_party/agg23"
1553 "third_party/pdfium/third_party/base"
1554 "third_party/pdfium/third_party/freetype"
1555 "third_party/pdfium/third_party/lcms"
1556 "third_party/pdfium/third_party/libopenjpeg20"
1557 "third_party/pdfium/third_party/skia_shared"
8d1ab36a
T
1558 "third_party/perfetto"
1559 "third_party/pffft"
2c7511fb
MB
1560 "third_party/ply"
1561 "third_party/polymer"
1562 "third_party/protobuf"
18daba93 1563 "third_party/protobuf/third_party/six"
2c7511fb
MB
1564 "third_party/pyjson5"
1565 "third_party/re2"
1566 "third_party/rnnoise"
1567 "third_party/skia"
8d1ab36a
T
1568 "third_party/skia/include/third_party/skcms/skcms.h"
1569 "third_party/skia/include/third_party/vulkan"
2c7511fb 1570 "third_party/skia/third_party/skcms"
8d1ab36a 1571 "third_party/skia/third_party/vulkanmemoryallocator"
2c7511fb
MB
1572 "third_party/smhasher"
1573 "third_party/snappy"
1574 "third_party/sqlite"
8d1ab36a 1575 "third_party/usb_ids"
2c7511fb
MB
1576 "third_party/usrsctp"
1577 "third_party/web-animations-js"
1578 "third_party/webrtc"
8d1ab36a
T
1579 "third_party/webrtc/common_audio/third_party/fft4g"
1580 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
1581 "third_party/webrtc/modules/third_party/fft"
1582 "third_party/webrtc/modules/third_party/g711"
1583 "third_party/webrtc/modules/third_party/g722"
1584 "third_party/webrtc/rtc_base/third_party/base64"
1585 "third_party/webrtc/rtc_base/third_party/sigslot"
2c7511fb
MB
1586 "third_party/webrtc_overrides"
1587 "third_party/widevine/cdm/widevine_cdm_common.h"
1588 "third_party/widevine/cdm/widevine_cdm_version.h"
1589 "third_party/woff2"
1590 "third_party/yasm"
1591 "third_party/zlib"
1592 "url/third_party/mozilla"
1593 "v8/src/third_party/utf8-decoder"
1594 "v8/src/third_party/valgrind"
8d1ab36a
T
1595 "v8/src/third_party/siphash"
1596 "v8/third_party/v8/builtins"
2c7511fb
MB
1597 "v8/third_party/inspector_protocol"))
1598 (protected (make-regexp "\\.(gn|gyp)i?$")))
1599 (define preserved-club
1600 (map (lambda (member)
1601 (string-append "./" member))
1602 preserved-third-party-files))
1603 (define (empty? dir)
1604 (equal? (scandir dir) '("." "..")))
1605 (define (third-party? file)
1606 (string-contains file "third_party/"))
1607 (define (useless? file)
1608 (any (cute string-suffix? <> file)
1609 '(".zip" ".so" ".dll" ".exe" ".jar")))
1610 (define (parents child)
1611 ;; Return all parent directories of CHILD up to and including
1612 ;; the closest "third_party".
1613 (let* ((dirs (match (string-split child #\/)
1614 ((dirs ... last) dirs)))
1615 (closest (list-index (lambda (dir)
1616 (string=? "third_party" dir))
1617 (reverse dirs)))
1618 (delim (- (length dirs) closest)))
1619 (fold (lambda (dir prev)
1620 (cons (string-append (car prev) "/" dir)
1621 prev))
1622 (list (string-join (list-head dirs delim) "/"))
1623 (list-tail dirs delim))))
1624 (define (remove-loudly file)
8d1ab36a
T
1625 (format #t "deleting ~a...~%" file)
1626 (force-output)
1627 (delete-file file))
2c7511fb
MB
1628 (define (delete-unwanted-files child stat flag base level)
1629 (match flag
1630 ((or 'regular 'symlink 'stale-symlink)
1631 (when (third-party? child)
1632 (unless (or (member child preserved-club)
1633 (any (cute member <> preserved-club)
1634 (parents child))
1635 (regexp-exec protected child))
1636 (remove-loudly child)))
1637 (when (and (useless? child) (file-exists? child))
1638 (remove-loudly child))
1639 #t)
1640 ('directory-processed
1641 (when (empty? child)
1642 (rmdir child))
1643 #t)
1644 (_ #t)))
1645
1646 (with-directory-excursion "src/3rdparty"
1647 ;; TODO: Try removing "gn" too for future versions of qtwebengine.
1648 (delete-file-recursively "ninja")
1649
1650 (with-directory-excursion "chromium"
1651 ;; Delete bundled software and binaries that were not explicitly
1652 ;; preserved above.
1653 (nftw "." delete-unwanted-files 'depth 'physical)
1654
1655 ;; Assert that each preserved item is present to catch removals.
1656 (for-each (lambda (third-party)
1657 (unless (file-exists? third-party)
1658 (error (format #f "~s does not exist!~%" third-party))))
1659 preserved-club)
1660
1661 ;; Use relative header locations instead of hard coded ones.
1662 (substitute*
1663 "base/third_party/dynamic_annotations/dynamic_annotations.c"
1664 (("base/third_party/valgrind") "valgrind"))
1665 (substitute*
1666 "third_party/breakpad/breakpad/src/common/linux/libcurl_wrapper.h"
1667 (("third_party/curl") "curl"))
c37b621c
MB
1668 (substitute*
1669 '("components/viz/common/gpu/vulkan_context_provider.h"
18daba93 1670 "components/viz/common/resources/resource_format_utils_vulkan.h"
c37b621c
MB
1671 "gpu/config/gpu_util.cc")
1672 (("third_party/vulkan/include/")
1673 ""))
2c7511fb
MB
1674
1675 ;; Replace Google Analytics bundle with an empty file and hope
1676 ;; no one notices.
1677 (mkdir-p "third_party/analytics")
1678 (call-with-output-file
1679 "third_party/analytics/google-analytics-bundle.js"
1680 (lambda (port)
1681 (const #t)))))
2c7511fb 1682 ;; Do not enable support for loading the Widevine DRM plugin.
8d1ab36a 1683 (substitute* "src/buildtools/config/common.pri"
2c7511fb
MB
1684 (("enable_widevine=true")
1685 "enable_widevine=false"))
1686 #t)))))
db481636
MR
1687 (build-system gnu-build-system)
1688 (native-inputs
1689 `(("bison" ,bison)
1690 ("flex" ,flex)
1691 ("gperf" ,gperf)
1692 ("ninja" ,ninja)
1693 ("perl" ,perl)
1694 ("pkg-config" ,pkg-config)
1695 ("python-2" ,python-2)
18daba93 1696 ("python-six" ,python2-six)
db481636
MR
1697 ("ruby" ,ruby)))
1698 (inputs
1699 `(("alsa-lib" ,alsa-lib)
1700 ("atk" ,atk)
1701 ("cups-minimal" ,cups-minimal)
2c7511fb 1702 ("curl" ,curl)
db481636
MR
1703 ("dbus" ,dbus)
1704 ("ffmpeg" ,ffmpeg)
1705 ("fontconfig" ,fontconfig)
1706 ("harbuzz" ,harfbuzz)
1707 ("icu4c" ,icu4c)
1708 ("jsoncpp" ,jsoncpp)
1709 ("lcms" ,lcms)
1710 ("libcap" ,libcap)
1711 ("libevent" ,libevent)
1712 ("libgcrypt" ,libgcrypt)
1713 ("libjpeg" ,libjpeg-turbo)
1714 ("libvpx" ,libvpx)
db481636
MR
1715 ("libwebp" ,libwebp)
1716 ("libx11" ,libx11)
1717 ("libxcb" ,libxcb)
1718 ("libxcomposite" ,libxcomposite)
1719 ("libxcursor" ,libxcursor)
1720 ("libxi" ,libxi)
1721 ("libxkbcommon" ,libxkbcommon)
1722 ;; FIXME: libxml2 needs to built with icu support though it links to
1723 ;; libxml2 configure summary still states "Checking for compatible
1724 ;; system libxml2... no"
1725 ("libxml2" ,libxml2)
1726 ("libxrandr" ,libxrandr)
1727 ("libxrender" ,libxrender)
1728 ("libxslt" ,libxslt)
1729 ("libxtst" ,libxtst)
1730 ("mesa" ,mesa)
1731 ("minizip" ,minizip)
1732 ("nss" ,nss)
1733 ("opus" ,opus)
1734 ("pciutils" ,pciutils)
1735 ("protobuf" ,protobuf)
1736 ("pulseaudio" ,pulseaudio)
1737 ("qtbase" ,qtbase)
1738 ("qtdeclarative" ,qtdeclarative)
1739 ("qtmultimedia" ,qtmultimedia)
1740 ("qtwebchannel" ,qtwebchannel)
1741 ("re2" ,re2)
1742 ("snappy" ,snappy)
1743 ("udev" ,eudev)
2c7511fb 1744 ("valgrind" ,valgrind)
8d1ab36a 1745 ("vulkan-headers" ,vulkan-headers)
db481636
MR
1746 ("xcb-util" ,xcb-util)))
1747 (arguments
1748 (substitute-keyword-arguments (package-arguments qtsvg)
1749 ((#:phases phases)
1750 `(modify-phases ,phases
1751 (add-before 'configure 'substitute-source
1752 (lambda* (#:key inputs outputs #:allow-other-keys)
1753 (let ((out (assoc-ref outputs "out"))
1754 (nss (assoc-ref inputs "nss"))
1755 (udev (assoc-ref inputs "udev")))
1756 ;; Qtwebengine is not installed into the same prefix as
1757 ;; qtbase. Some qtbase QTLibraryInfo constants will not
1758 ;; work. Replace with the full path to the qtwebengine
1759 ;; translations and locales in the store.
1760 (substitute* "src/core/web_engine_library_info.cpp"
1761 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
1762 (string-append "QLatin1String(\"" out "/share/qt5/translations\")"))
1763 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
1764 (string-append "QLatin1String(\"" out "/share/qt5\")")))
1765 ;; Substitute full dynamic library path for nss.
1766 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
1767 (("libnssckbi.so")
1768 (string-append nss "/lib/nss/libnssckbi.so")))
1769 ;; Substitute full dynamic library path for udev.
1770 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
1771 (("libudev.so.1")
1772 (string-append udev "/lib/libudev.so.1")))
1773 #t)))
1774 (add-before 'configure 'set-env
1775 (lambda _
1776 ;; Avoids potential race conditions.
1777 (setenv "PYTHONDONTWRITEBYTECODE" "1")
1778 (setenv "NINJAFLAGS"
1779 (string-append "-k1" ;less verbose build output
1780 ;; Respect the '--cores' option of 'guix build'.
1781 " -j" (number->string (parallel-job-count))))
1782 #t))
1783 (replace 'configure
1784 (lambda _
1785 ;; Valid QT_BUILD_PARTS variables are:
1786 ;; libs tools tests examples demos docs translations
1787 (invoke "qmake" "QT_BUILD_PARTS = libs tools" "--"
1788 "--webengine-printing-and-pdf=no"
1789 "--webengine-ffmpeg=system"
1790 "--webengine-icu=system"
1791 "--webengine-pepper-plugins=no")))))
1792 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
1793 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
1794 ;; before running tests.
1795 ((#:tests? _ #f) #f)))
1796 (native-search-paths
1797 (list (search-path-specification
1798 (file-type 'regular)
1799 (separator #f)
1800 (variable "QTWEBENGINEPROCESS_PATH")
1801 (files '("lib/qt5/libexec/QtWebEngineProcess")))))
1802 (home-page "https://wiki.qt.io/QtWebEngine")
1803 (synopsis "Qt WebEngine module")
1804 (description "The Qt5WebEngine module provides support for web applications
1805using the Chromium browser project. The Chromium source code has Google services
1806and binaries removed, and adds modular support for using system libraries.")
1807 (license license:lgpl2.1+)))
1808
84ef83dd
AE
1809(define-public python-sip
1810 (package
c990604c
BT
1811 (name "python-sip")
1812 (version "5.5.0")
1813 (source
1814 (origin
1815 (method url-fetch)
1816 (uri (list (pypi-uri "sip" version)
1817 (string-append "https://www.riverbankcomputing.com/static/"
1818 "Downloads/sip/" version
1819 "/sip-" version ".tar.gz")))
1820 (sha256
1821 (base32
1822 "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"))))
1823 (build-system python-build-system)
1824 (native-inputs
1825 `(("python" ,python-wrapper)))
1826 (propagated-inputs
1827 `(("python-toml" ,python-toml)
1828 ("python-packaging" ,python-packaging)))
1829 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
1830 (synopsis "Python binding creator for C and C++ libraries")
1831 (description
1832 "SIP is a tool to create Python bindings for C and C++ libraries. It
1833was originally developed to create PyQt, the Python bindings for the Qt
1834toolkit, but can be used to create bindings for any C or C++ library.
1835
1836SIP comprises a code generator and a Python module. The code generator
1837processes a set of specification files and generates C or C++ code, which
1838is then compiled to create the bindings extension module. The SIP Python
1839module provides support functions to the automatically generated code.")
1840 ;; There is a choice between a python like license, gpl2 and gpl3.
1841 ;; For compatibility with pyqt, we need gpl3.
1842 (license license:gpl3)))
1843
1844(define-public python-sip-4
1845 (package
1846 (inherit python-sip)
84ef83dd 1847 (name "python-sip")
911e50c6 1848 (version "4.19.24")
84ef83dd
AE
1849 (source
1850 (origin
1851 (method url-fetch)
911e50c6
EF
1852 (uri (list (pypi-uri "sip" version)
1853 (string-append "https://www.riverbankcomputing.com/static/"
1854 "Downloads/sip/" version
1855 "/sip-" version ".tar.gz")))
84ef83dd
AE
1856 (sha256
1857 (base32
911e50c6 1858 "1ra15vb5i9gkg2vdvh16cq9x2mmzw1yi3xphxs8q34q1pf83gkgd"))))
84ef83dd
AE
1859 (build-system gnu-build-system)
1860 (native-inputs
1861 `(("python" ,python-wrapper)))
c990604c 1862 (propagated-inputs `())
84ef83dd
AE
1863 (arguments
1864 `(#:tests? #f ; no check target
8cbb32da
MB
1865 #:imported-modules ((guix build python-build-system)
1866 ,@%gnu-build-system-modules)
e8bdd73a 1867 #:modules ((srfi srfi-1)
8cbb32da 1868 ((guix build python-build-system) #:select (python-version))
e8bdd73a 1869 ,@%gnu-build-system-modules)
84ef83dd 1870 #:phases
39766868
EF
1871 (modify-phases %standard-phases
1872 (replace 'configure
1873 (lambda* (#:key inputs outputs #:allow-other-keys)
1874 (let* ((out (assoc-ref outputs "out"))
1875 (bin (string-append out "/bin"))
1876 (include (string-append out "/include"))
1877 (python (assoc-ref inputs "python"))
39766868 1878 (lib (string-append out "/lib/python"
8cbb32da 1879 (python-version python)
39766868 1880 "/site-packages")))
e3232b26 1881 (invoke "python" "configure.py"
e3232b26
EF
1882 "--bindir" bin
1883 "--destdir" lib
1884 "--incdir" include)))))))
225941b0 1885 (license license:gpl3)))
84ef83dd 1886
014e7dd8
AE
1887(define-public python-pyqt
1888 (package
1889 (name "python-pyqt")
8dee0f95 1890 (version "5.15.2")
014e7dd8
AE
1891 (source
1892 (origin
1893 (method url-fetch)
fd702f8e
MB
1894 ;; PyPI is the canonical distribution point of PyQt. Older
1895 ;; releases are available from the web site.
1896 (uri (list (pypi-uri "PyQt5" version)
1897 (string-append "https://www.riverbankcomputing.com/static/"
1898 "Downloads/PyQt5/" version "/PyQt5-"
1899 version ".tar.gz")))
586f017d 1900 (file-name (string-append "PyQt5-" version ".tar.gz"))
014e7dd8
AE
1901 (sha256
1902 (base32
8dee0f95 1903 "1z74295i69cha52llsqffzhb5zz7qnbjc64h8qg21l91jgf0harp"))
586f017d 1904 (patches (search-patches "pyqt-configure.patch"))))
014e7dd8
AE
1905 (build-system gnu-build-system)
1906 (native-inputs
499991cf
EB
1907 `(("qtbase" ,qtbase))) ; for qmake
1908 (propagated-inputs
586f017d
BT
1909 `(("python-sip" ,python-sip)
1910 ("python-pyqt5-sip" ,python-pyqt5-sip)))
014e7dd8 1911 (inputs
e9adcd81
EF
1912 `(("python" ,python-wrapper)
1913 ("qtbase" ,qtbase)
1914 ("qtconnectivity" ,qtconnectivity)
1915 ("qtdeclarative" ,qtdeclarative)
1916 ("qtlocation" ,qtlocation)
1917 ("qtmultimedia" ,qtmultimedia)
1918 ("qtsensors" ,qtsensors)
1919 ("qtserialport" ,qtserialport)
1920 ("qtsvg" ,qtsvg)
1921 ("qttools" ,qttools)
1922 ("qtwebchannel" ,qtwebchannel)
52404022 1923 ("qtwebkit" ,qtwebkit)
e9adcd81
EF
1924 ("qtwebsockets" ,qtwebsockets)
1925 ("qtx11extras" ,qtx11extras)
1926 ("qtxmlpatterns" ,qtxmlpatterns)))
014e7dd8 1927 (arguments
e8bdd73a 1928 `(#:modules ((srfi srfi-1)
3c48fe36 1929 ((guix build python-build-system) #:select (python-version))
e8bdd73a 1930 ,@%gnu-build-system-modules)
3c48fe36
MB
1931 #:imported-modules ((guix build python-build-system)
1932 ,@%gnu-build-system-modules)
e8bdd73a 1933 #:phases
eef988c8 1934 (modify-phases %standard-phases
9deae982
MR
1935 ;; When building python-pyqtwebengine, <qprinter.h> can not be
1936 ;; included. Here we substitute the full path to the header in the
1937 ;; store.
1938 (add-before 'configure 'substitute-source
1939 (lambda* (#:key inputs #:allow-other-keys)
1940 (let* ((qtbase (assoc-ref inputs "qtbase"))
1941 (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\"")))
1942 (substitute* "sip/QtPrintSupport/qprinter.sip"
1943 (("<qprinter.h>")
1944 qtprinter.h))
1945 #t)))
eef988c8
EF
1946 (replace 'configure
1947 (lambda* (#:key inputs outputs #:allow-other-keys)
1948 (let* ((out (assoc-ref outputs "out"))
1949 (bin (string-append out "/bin"))
1950 (sip (string-append out "/share/sip"))
4ae8180c 1951 (plugins (string-append out "/lib/qt5/plugins"))
eef988c8
EF
1952 (designer (string-append plugins "/designer"))
1953 (qml (string-append plugins "/PyQt5"))
1954 (python (assoc-ref inputs "python"))
eef988c8 1955 (lib (string-append out "/lib/python"
3c48fe36 1956 (python-version python)
43e8824d
HG
1957 "/site-packages"))
1958 (stubs (string-append lib "/PyQt5")))
a01a3763
EF
1959 (invoke "python" "configure.py"
1960 "--confirm-license"
1961 "--bindir" bin
1962 "--destdir" lib
1963 "--designer-plugindir" designer
1964 "--qml-plugindir" qml
1965 ; Where to install the PEP 484 Type Hints stub
1966 ; files. Without this the stubs are tried to be
1967 ; installed into the python package's
1968 ; site-package directory, which is read-only.
1969 "--stubsdir" stubs
1970 "--sipdir" sip)))))))
eef988c8 1971 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
014e7dd8
AE
1972 (synopsis "Python bindings for Qt")
1973 (description
1974 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1975framework. The bindings are implemented as a set of Python modules and
1976contain over 620 classes.")
225941b0 1977 (license license:gpl3)))
eb5af18e 1978
8effa053
BT
1979(define-public python-pyqt5-sip
1980 (package
1981 (name "python-pyqt5-sip")
1982 (version "12.8.1")
1983 (source
1984 (origin
1985 (method url-fetch)
1986 (uri (pypi-uri "PyQt5_sip" version))
1987 (sha256
1988 (base32
1989 "1gg032ys4pccwkdzmdryadc9a4lq85nr05pag9swrsdykbdl9s9h"))))
1990 (build-system python-build-system)
1991 (arguments
1992 `(#:tests? #f)) ;; No test code.
1993 (home-page "https://www.riverbankcomputing.com/software/sip/")
1994 (synopsis "Sip module support for PyQt5")
1995 (description "Sip module support for PyQt5")
1996 (license license:lgpl2.1+)))
1997
eb5af18e
MR
1998(define-public python-pyqtwebengine
1999 (package
2000 (name "python-pyqtwebengine")
d434fe93 2001 (version "5.15.2")
eb5af18e
MR
2002 (source
2003 (origin
2004 (method url-fetch)
7c7e9ac7
MB
2005 ;; The newest releases are only available on PyPI. Older ones
2006 ;; are mirrored at the upstream home page.
2007 (uri (list (pypi-uri "PyQtWebEngine" version)
2008 (string-append "https://www.riverbankcomputing.com/static"
2009 "/Downloads/PyQtWebEngine/" version
2010 "/PyQtWebEngine-" version ".tar.gz")))
eb5af18e
MR
2011 (sha256
2012 (base32
d434fe93 2013 "0d56ak71r14w4f9r96vaj34qcn2rbln3s6ildvvyc707fjkzwwjd"))))
eb5af18e
MR
2014 (build-system gnu-build-system)
2015 (native-inputs
2016 `(("python" ,python)
2017 ("python-sip" ,python-sip)
2018 ;; qtbase is required for qmake
2019 ("qtbase" ,qtbase)))
2020 (inputs
2021 `(("python" ,python-wrapper)
2022 ("python-sip" ,python-sip)
2023 ("python-pyqt" ,python-pyqt)
2024 ("qtbase" ,qtbase)
2025 ("qtsvg" ,qtsvg)
2026 ("qtdeclarative" ,qtdeclarative)
2027 ("qtwebchannel" ,qtwebchannel)
eb5af18e
MR
2028 ("qtwebengine" ,qtwebengine)))
2029 (arguments
2030 `(#:modules ((srfi srfi-1)
67950de7 2031 ((guix build python-build-system) #:select (python-version))
eb5af18e 2032 ,@%gnu-build-system-modules)
67950de7
MB
2033 #:imported-modules ((guix build python-build-system)
2034 ,@%gnu-build-system-modules)
eb5af18e
MR
2035 #:phases
2036 (modify-phases %standard-phases
2037 (replace 'configure
2038 (lambda* (#:key inputs outputs #:allow-other-keys)
2039 (let* ((out (assoc-ref outputs "out"))
2040 (sipdir (string-append out "/share/sip"))
2041 (pyqt-sipdir (string-append
2042 (assoc-ref inputs "python-pyqt") "/share/sip"))
2043 (python (assoc-ref inputs "python"))
eb5af18e 2044 (lib (string-append out "/lib/python"
67950de7 2045 (python-version python)
eb5af18e
MR
2046 "/site-packages/PyQt5"))
2047 (stubs (string-append lib "/PyQt5")))
2048
2049 (mkdir-p sipdir)
2050 (invoke "python" "configure.py"
2051 "-w"
2052 "--no-dist-info"
2053 "--destdir" lib
2054 "--no-qsci-api"
2055 "--stubsdir" stubs
2056 "--sipdir" sipdir
2057 "--pyqt-sipdir" pyqt-sipdir))))
2058 ;; Because this has a different prefix than python-pyqt then we need
2059 ;; to make this a namespace of it's own
2060 (add-after 'install 'make-namespace
2061 (lambda* (#:key inputs outputs #:allow-other-keys)
2062 (let* ((__init__.py (string-append
2063 (assoc-ref outputs "out")
67950de7
MB
2064 "/lib/python"
2065 (python-version (assoc-ref inputs "python"))
2066 "/site-packages/PyQt5/__init__.py")))
eb5af18e
MR
2067 (with-output-to-file __init__.py
2068 (lambda _ (display "
2069from pkgutil import extend_path
2070__path__ = extend_path(__path__, __name__)
2071")))
2072 #t))))))
2073 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
2074 (synopsis "Python bindings for QtWebEngine")
2075 (description
2076 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
2077WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
2078set of three modules. Prior to v5.12 these bindings were part of PyQt
2079itself.")
225941b0 2080 (license license:gpl3)))
014e7dd8 2081
0e2d6d26
RW
2082;; XXX: This is useful because qtwebkit does not build reliably at this time.
2083;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
2084;; packages that could be used together.
2085(define-public python-pyqt-without-qtwebkit
1a265842 2086 (package/inherit python-pyqt
0e2d6d26
RW
2087 (name "python-pyqt-without-qtwebkit")
2088 (inputs
2089 (alist-delete "qtwebkit" (package-inputs python-pyqt)))))
2090
93607062
BT
2091(define-public python-pyqt-builder
2092 (package
2093 (name "python-pyqt-builder")
2094 (version "1.9.0")
2095 (source
2096 (origin
2097 (method url-fetch)
2098 (uri (pypi-uri "PyQt-builder" version))
2099 (sha256
2100 (base32
2101 "0nh0054c54ji3sm6d268fccf0y5f613spswwgwqd3rnn816hnljl"))))
2102 (build-system python-build-system)
2103 (inputs
2104 `(("python-sip" ,python-sip)))
2105 (home-page "https://www.riverbankcomputing.com/static/Docs/PyQt-builder/")
2106 (synopsis "PEP 517 compliant PyQt build system")
2107 (description "PyQt-builder is a tool for generating Python bindings for C++
2108libraries that use the Qt application framework. The bindings are built on
2109top of the PyQt bindings for Qt. PyQt-builder is used to build PyQt itself.")
2110 ;; Either version 2 or 3, but no other version. See the file
2111 ;; 'pyqtbuild/builder.py' in the source distribution for more information.
2112 (license (list license:gpl2 license:gpl3))))
2113
a942ab18
JD
2114(define-public python-qtpy
2115 (package
2116 (name "python-qtpy")
2117 (version "1.9.0")
2118 (source
2119 (origin
2120 (method url-fetch)
2121 (uri (pypi-uri "QtPy" version))
2122 (sha256
2123 (base32
2124 "13cw8l7zrhbdi03k1wl1pg9xdl4ahdfa7yz8gd0f23sxnm22rdrd"))))
2125 (build-system python-build-system)
2126 (propagated-inputs
2127 `(("python-pyside2" ,python-pyside-2)))
2128 (arguments
2129 `(;; Not all supported bindings are packaged. Especially PyQt4.
2130 #:tests? #f))
2131 (home-page "https://github.com/spyder-ide/qtpy")
2132 (synopsis
2133 "Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets")
2134 (description
2135 "Provides an abstraction layer on top of the various Qt bindings
2136(PyQt5, PyQt4 and PySide) and additional custom QWidgets.")
2137 (license license:expat)))
2138
3befd0a9
RW
2139(define-public qscintilla
2140 (package
2141 (name "qscintilla")
64e995b4 2142 (version "2.11.6")
3befd0a9
RW
2143 (source (origin
2144 (method url-fetch)
64e995b4
EF
2145 (uri (string-append "https://www.riverbankcomputing.com/static"
2146 "/Downloads/QScintilla/" version
2147 "/QScintilla-" version ".tar.gz"))
3befd0a9
RW
2148 (sha256
2149 (base32
64e995b4 2150 "19r0vpqb4m9bqwxmjp9w6x0hgahkrg7zryk78hwgplj7vdbn0d77"))))
3befd0a9
RW
2151 (build-system gnu-build-system)
2152 (arguments
2153 `(#:phases
2154 (modify-phases %standard-phases
2155 (replace 'configure
2156 (lambda* (#:key outputs #:allow-other-keys)
2157 (let ((out (assoc-ref outputs "out")))
2158 (chdir "Qt4Qt5")
2159 (substitute* "qscintilla.pro"
2160 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
2161 (string-append out "/lib"))
2162 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
2163 (string-append out "/include"))
2164 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
2165 (string-append out "/translations"))
5430732b
HG
2166 (("\\$\\$\\[QT_INSTALL_DATA\\]")
2167 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
2168 (("\\$\\$\\[QT_HOST_DATA\\]")
2169 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
0af6ffdd 2170 (invoke "qmake")))))))
3befd0a9 2171 (native-inputs `(("qtbase" ,qtbase)))
d338321d 2172 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
3befd0a9
RW
2173 (synopsis "Qt port of the Scintilla C++ editor control")
2174 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2175editor control. QScintilla includes features especially useful when editing
2176and debugging source code. These include support for syntax styling, error
2177indicators, code completion and call tips.")
2178 (license license:gpl3+)))
2179
06d04dbc 2180(define-public python-qscintilla
1a265842 2181 (package/inherit qscintilla
06d04dbc
RW
2182 (name "python-qscintilla")
2183 (arguments
2184 `(#:configure-flags
2185 (list "--pyqt=PyQt5"
2186 (string-append "--pyqt-sipdir="
2187 (assoc-ref %build-inputs "python-pyqt")
2188 "/share/sip")
2189 (string-append "--qsci-incdir="
2190 (assoc-ref %build-inputs "qscintilla")
2191 "/include")
2192 (string-append "--qsci-libdir="
2193 (assoc-ref %build-inputs "qscintilla")
2194 "/lib"))
2195 #:phases
2196 (modify-phases %standard-phases
2197 (replace 'configure
9f8fee50
EF
2198 (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
2199 (let ((out (assoc-ref outputs "out"))
2200 (python (assoc-ref inputs "python")))
2201 (chdir "Python")
2202 (apply invoke "python3" "configure.py"
2203 configure-flags)
2204 ;; Install to the right directory
2205 (substitute* '("Makefile"
2206 "Qsci/Makefile")
2207 (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+") out)
2208 (((string-append python "/lib"))
2209 (string-append out "/lib")))
2210 ;; And fix the installed.txt file
2211 (substitute* "installed.txt"
2212 (("/gnu/store/[^/]+") out)))
76c7fc43 2213 #t)))))
06d04dbc
RW
2214 (inputs
2215 `(("qscintilla" ,qscintilla)
2216 ("python" ,python)
2217 ("python-pyqt" ,python-pyqt)))
2218 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
2219editor control. QScintilla includes features especially useful when editing
2220and debugging source code. These include support for syntax styling, error
2221indicators, code completion and call tips.
2222
2223This package provides the Python bindings.")))
2224
2456153a
RW
2225;; PyQt only looks for modules in its own directory. It ignores environment
2226;; variables such as PYTHONPATH, so we need to build a union package to make
2227;; it work.
2228(define-public python-pyqt+qscintilla
1a265842 2229 (package/inherit python-pyqt
2456153a
RW
2230 (name "python-pyqt+qscintilla")
2231 (source #f)
2232 (build-system trivial-build-system)
2233 (arguments
2234 '(#:modules ((guix build union))
2235 #:builder (begin
2236 (use-modules (ice-9 match)
2237 (guix build union))
2238 (match %build-inputs
2239 (((names . directories) ...)
2240 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
2241 directories)
2242 #t)))))
2456153a
RW
2243 (inputs
2244 `(("python-pyqt" ,python-pyqt)
2245 ("python-qscintilla" ,python-qscintilla)))
2246 (synopsis "Union of PyQt and the Qscintilla extension")
2247 (description
2248 "This package contains the union of PyQt and the Qscintilla extension.")))
2249
9e81af9e
EF
2250(define-public qtkeychain
2251 (package
2252 (name "qtkeychain")
2879e605 2253 (version "0.9.1")
9e81af9e
EF
2254 (source
2255 (origin
2879e605
EF
2256 (method git-fetch)
2257 (uri (git-reference
2258 (url "https://github.com/frankosterfeld/qtkeychain/")
2259 (commit (string-append "v" version))))
2260 (file-name (git-file-name name version))
9e81af9e 2261 (sha256
2879e605
EF
2262 (base32
2263 "0h4wgngn2yl35hapbjs24amkjfbzsvnna4ixfhn87snjnq5lmjbc"))))
9e81af9e 2264 (build-system cmake-build-system)
18174d8a 2265 (native-inputs
f8127d26
HG
2266 `(("pkg-config" ,pkg-config)
2267 ("qttools" ,qttools)))
9e81af9e 2268 (inputs
18174d8a 2269 `(("qtbase" ,qtbase)))
9e81af9e
EF
2270 (arguments
2271 `(#:tests? #f ; No tests included
2272 #:phases
2273 (modify-phases %standard-phases
2879e605 2274 (add-before 'configure 'set-qt-trans-dir
9e81af9e
EF
2275 (lambda _
2276 (substitute* "CMakeLists.txt"
2277 (("\\$\\{qt_translations_dir\\}")
2879e605 2278 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations"))
4ad70ad8 2279 #t)))))
9e81af9e
EF
2280 (home-page "https://github.com/frankosterfeld/qtkeychain")
2281 (synopsis "Qt API to store passwords")
2282 (description
2283 "QtKeychain is a Qt library to store passwords and other secret data
2284securely. It will not store any data unencrypted unless explicitly requested.")
225941b0 2285 (license license:bsd-3)))
fc381a33 2286
92a432c1
RG
2287(define-public qtsolutions
2288 (let ((commit "9568abd142d581b67b86a5f63d823a34b0612702")
2289 (revision "53"))
2290 (package
2291 (name "qtsolutions")
2292 (version (git-version "0" revision commit))
2293 (source
2294 (origin
2295 (method git-fetch)
2296 (uri (git-reference
2297 (url "https://github.com/qtproject/qt-solutions")
2298 (commit commit)))
2299 (file-name (git-file-name name version))
2300 (sha256
2301 (base32 "17fnmassflm3vxi0krpr6fff368jy38cby31a48rban4nqqmgx7n"))
2302 (modules '((guix build utils)
2303 (ice-9 ftw)
2304 (srfi srfi-1)))
2305 (snippet
2306 ;; Unvendor QtLockFile from QtSingleApplication.
2307 '(begin
2308 (with-directory-excursion "qtsingleapplication/src"
2309 (for-each delete-file
2310 (find-files "." "qtlockedfile.*\\.(h|cpp)"))
2311 (substitute* "qtsingleapplication.pri"
2312 ;; Add include path of LockedFile.
2313 (("INCLUDEPATH \\+=")
2314 "INCLUDEPATH += ../../qtlockedfile/src")
2315 ;; Link library of LockedFile.
2316 (("LIBS \\+=")
2317 "LIBS += -lQtSolutions_LockedFile"))
2318 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
2319 (("#include \"qtlockedfile.*\\.cpp\"") "")
2320 ;; Unwrap namespace added in the vendoring process.
2321 (("QtLP_Private::QtLockedFile")
2322 "QtLockedFile")))
2323 #t))))
2324 (build-system gnu-build-system)
2325 (arguments
2326 `(#:tests? #f ; No target
2327 #:imported-modules
2328 ((guix build copy-build-system)
2329 ,@%gnu-build-system-modules)
2330 #:modules
2331 (((guix build copy-build-system) #:prefix copy:)
2332 (guix build gnu-build-system)
2333 (guix build utils))
2334 #:phases
2335 (modify-phases %standard-phases
2336 (add-after 'unpack 'patch-source
2337 (lambda* (#:key outputs #:allow-other-keys)
2338 (substitute* (find-files "." "common.pri")
2339 ;; Remove unnecessary prefixes/suffixes in library names.
2340 (("qt5") "qt")
2341 (("-head") ""))
2342 ;; Disable building of examples.
2343 (substitute* (find-files "." "\\.pro$")
2344 (("SUBDIRS\\+=examples") ""))
2345 ;; Fix deprecated functions.
2346 (substitute* "qtsoap/src/qtsoap.cpp"
2347 (("toAscii") "toUtf8"))
2348 #t))
2349 (replace 'configure
2350 (lambda _
2351 (for-each (lambda (solution)
2352 (with-directory-excursion solution
2353 (invoke "./configure" "-library")
2354 (invoke "qmake")))
2355 '("qtlockedfile" "qtpropertybrowser" "qtservice"
2356 "qtsingleapplication" "qtsoap"))
2357 #t))
2358 (replace 'build
2359 (lambda _
2360 (for-each (lambda (solution)
2361 (with-directory-excursion solution
2362 (invoke "make")))
2363 '("qtlockedfile" "qtpropertybrowser" "qtservice"
2364 "qtsingleapplication" "qtsoap"))
2365 #t))
2366 (replace 'install
2367 (lambda args
2368 (for-each (lambda (solution)
2369 (with-directory-excursion solution
2370 (apply
2371 (assoc-ref copy:%standard-phases 'install)
2372 #:install-plan
2373 '(("src" "include" #:include-regexp ("\\.h$"))
2374 ("lib" "lib"))
2375 args)))
2376 '("qtlockedfile" "qtpropertybrowser" "qtservice"
2377 "qtsingleapplication" "qtsoap")))))))
2378 (inputs
2379 `(("qtbase" ,qtbase)))
2380 (synopsis "Collection of Qt extensions")
2381 (description "QtSolutions is a set of components extending Qt.
2382@itemize
2383@item QtLockedFile: A class that extends QFile with advisory locking functions.
2384@item QtPropertyBrowser: A framework that enables the user to edit a set of
2385properties.
2386@item QtService: A helper for writing services such as Unix daemons.
2387@item QtSingleApplication: A component that provides support for applications
2388that can be only started once per user.
2389@item QtSoap: A component that provides basic web service support with version
23901.1 of the SOAP protocol.
2391@end itemize\n")
2392 (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
2393 (license (list license:bsd-3
2394 ;; QScriptParser and QScriptGrammar specifically allow
2395 ;; redistribution under GPL3 or LGPL2.1
2396 license:gpl3 license:lgpl2.1)))))
2397
fc381a33
TD
2398(define-public qwt
2399 (package
2400 (name "qwt")
d8a85f82 2401 (version "6.1.5")
fc381a33
TD
2402 (source
2403 (origin
2404 (method url-fetch)
2405 (uri
2406 (string-append "mirror://sourceforge/qwt/qwt/"
2407 version "/qwt-" version ".tar.bz2"))
2408 (sha256
d8a85f82 2409 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
fc381a33
TD
2410 (build-system gnu-build-system)
2411 (inputs
2412 `(("qtbase" ,qtbase)
2413 ("qtsvg" ,qtsvg)
2414 ("qttools" ,qttools)))
2415 (arguments
2416 `(#:phases
2417 (modify-phases %standard-phases
2418 (replace 'configure
2419 (lambda* (#:key outputs #:allow-other-keys)
163651cb
SB
2420 (let* ((out (assoc-ref outputs "out"))
2421 (docdir (string-append out "/share/doc/qwt"))
2422 (incdir (string-append out "/include/qwt"))
2423 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
2424 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
fc381a33 2425 (substitute* '("qwtconfig.pri")
163651cb
SB
2426 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
2427 (format #f "~a = ~a\n" x out))
2428 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
2429 (format #f "~a = ~a\n" x docdir))
2430 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
2431 (format #f "~a = ~a\n" x incdir))
2432 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
2433 (format #f "~a = ~a\n" x pluginsdir))
2434 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
2435 (format #f "~a = ~a\n" x featuresdir)))
2436 (substitute* '("doc/doc.pro")
2437 ;; We'll install them in the 'install-man-pages' phase.
2438 (("^unix:doc\\.files.*") ""))
41173df9 2439 (invoke "qmake"))))
163651cb 2440 (add-after 'install 'install-man-pages
fc381a33
TD
2441 (lambda* (#:key outputs #:allow-other-keys)
2442 (let* ((out (assoc-ref outputs "out"))
2443 (man (string-append out "/share/man")))
2444 ;; Remove some incomplete manual pages.
2445 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
2446 (mkdir-p man)
2447 (copy-recursively "doc/man" man)
2448 #t))))))
2449 (home-page "http://qwt.sourceforge.net")
2450 (synopsis "Qt widgets for plots, scales, dials and other technical software
2451GUI components")
2452 (description
2453 "The Qwt library contains widgets and components which are primarily useful
2454for technical and scientific purposes. It includes a 2-D plotting widget,
2455different kinds of sliders, and much more.")
2456 (license
2457 (list
2458 ;; The Qwt license is LGPL2.1 with some exceptions.
2459 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
2460 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
2461 license:lgpl2.1 license:gpl3))))
47e1d280
TD
2462
2463(define-public qtwebkit
2464 (package
2465 (name "qtwebkit")
e8a22526 2466 (version "5.212.0-alpha4")
47e1d280
TD
2467 (source
2468 (origin
2469 (method url-fetch)
601cb1be 2470 (uri (string-append "https://github.com/annulen/webkit/releases/download/"
b5bf3dd9 2471 "qtwebkit-" version "/qtwebkit-" version ".tar.xz"))
47e1d280
TD
2472 (sha256
2473 (base32
e8a22526 2474 "1rm9sjkabxna67dl7myx9d9vpdyfxfdhrk9w7b94srkkjbd2d8cw"))
601cb1be
AE
2475 (patches (search-patches "qtwebkit-pbutils-include.patch"))))
2476 (build-system cmake-build-system)
47e1d280
TD
2477 (native-inputs
2478 `(("perl" ,perl)
e8a22526 2479 ("python" ,python)
47e1d280
TD
2480 ("ruby" ,ruby)
2481 ("bison" ,bison)
2482 ("flex" ,flex)
2483 ("gperf" ,gperf)
2484 ("pkg-config" ,pkg-config)))
2485 (inputs
2486 `(("icu" ,icu4c)
601cb1be
AE
2487 ("glib" ,glib)
2488 ("gst-plugins-base" ,gst-plugins-base)
4bd428a7 2489 ("libjpeg" ,libjpeg-turbo)
47e1d280
TD
2490 ("libpng" ,libpng)
2491 ("libwebp" ,libwebp)
2492 ("sqlite" ,sqlite)
2493 ("fontconfig" ,fontconfig)
c695fb76 2494 ("libxrender" ,libxrender)
47e1d280
TD
2495 ("qtbase" ,qtbase)
2496 ("qtdeclarative" ,qtdeclarative)
601cb1be 2497 ("qtlocation" ,qtlocation)
47e1d280 2498 ("qtmultimedia" ,qtmultimedia)
601cb1be
AE
2499 ("qtsensors" ,qtsensors)
2500 ("qtwebchannel" ,qtwebchannel)
47e1d280
TD
2501 ("libxml2" ,libxml2)
2502 ("libxslt" ,libxslt)
2503 ("libx11" ,libx11)
2504 ("libxcomposite" ,libxcomposite)))
2505 (arguments
601cb1be
AE
2506 `(#:tests? #f ; no apparent tests; it might be necessary to set
2507 ; ENABLE_API_TESTS, see CMakeLists.txt
b717d0f9
LC
2508
2509 ;; Parallel builds fail due to a race condition:
2510 ;; <https://bugs.gnu.org/34062>.
2511 #:parallel-build? #f
2512
601cb1be
AE
2513 #:configure-flags (list ;"-DENABLE_API_TESTS=TRUE"
2514 "-DPORT=Qt"
2515 "-DUSE_LIBHYPHEN=OFF"
0995a569
EB
2516 "-DUSE_SYSTEM_MALLOC=ON"
2517 ;; XXX: relative dir installs to build dir?
2518 (string-append "-DECM_MKSPECS_INSTALL_DIR="
ebdb15bc
EB
2519 %output "/lib/qt5/mkspecs/modules")
2520 ;; Sacrifice a little speed in order to link
2521 ;; libraries and test executables in a
2522 ;; reasonable amount of memory.
2523 "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,--no-keep-memory"
2524 "-DCMAKE_EXE_LINKER_FLAGS=-Wl,--no-keep-memory")))
47e1d280
TD
2525 (home-page "https://www.webkit.org")
2526 (synopsis "Web browser engine and classes to render and interact with web
2527content")
2528 (description "QtWebKit provides a Web browser engine that makes it easy to
2529embed content from the World Wide Web into your Qt application. At the same
2530time Web content can be enhanced with native controls.")
af9afb0b
MB
2531 ;; Building QtWebKit takes around 13 hours on an AArch64 machine. Give some
2532 ;; room for slower or busy hardware.
2533 (properties '((timeout . 64800))) ;18 hours
4961364f
LC
2534
2535 ;; XXX: This consumes too much RAM to successfully build on AArch64 (e.g.,
2536 ;; SoftIron OverDrive with 8 GiB of RAM), so instead of wasting resources,
2537 ;; disable it on non-Intel platforms.
2538 (supported-systems '("x86_64-linux" "i686-linux"))
2539
47e1d280 2540 (license license:lgpl2.1+)))
f048f12b 2541
2542(define-public dotherside
2543 (package
2544 (name "dotherside")
53216881 2545 (version "0.6.4")
f048f12b 2546 (source
2547 (origin
d43f1732
EF
2548 (method git-fetch)
2549 (uri (git-reference
2550 (url "https://github.com/filcuc/DOtherSide")
2551 (commit (string-append "v" version))))
2552 (file-name (git-file-name name version))
f048f12b 2553 (sha256
2554 (base32
53216881 2555 "09fz6v8rp28997f235yaifj8p4vvsyv45knc1iivgdvx7msgcd0m"))))
f048f12b 2556 (build-system cmake-build-system)
2557 (native-inputs
2558 `(("qttools" ,qttools)))
2559 (inputs
2560 `(("qtbase" ,qtbase)
2561 ("qtdeclarative" ,qtdeclarative)))
96bdf904 2562 (home-page "https://filcuc.github.io/DOtherSide/index.html")
f048f12b 2563 (synopsis "C language library for creating bindings for the Qt QML language")
2564 (description
2565 "DOtherSide is a C language library for creating bindings for the
2566QT QML language. The following features are implementable from
2567a binding language:
2568@itemize
2569@item Creating custom QObject
2570@item Creating custom QAbstractListModels
2571@item Creating custom properties, signals and slots
2572@item Creating from QML QObject defined in the binded language
2573@item Creating from Singleton QML QObject defined in the binded language
2574@end itemize\n")
2575 (license license:lgpl3))) ;version 3 only (+ exception)
b16640ac
P
2576
2577;; There have been no public releases yet.
2578(define-public qtcolorwidgets
2579 (let ((commit "a95f72e935fe9e046061a1d1c3930cbfbcb533e0")
2580 (revision "1"))
2581 (package
2582 (name "qtcolorwidgets")
2583 (version (git-version "0" revision commit))
2584 (source (origin
2585 (method git-fetch)
2586 (uri (git-reference
2587 (url "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2588 (commit commit)))
2589 (file-name (git-file-name name version))
2590 (sha256
2591 (base32
2592 "0dkiwlqh2gwhlp78c1fmchj3shl4p9inspcl96ya5aa8mn6kydy8"))))
2593 (build-system cmake-build-system)
2594 (arguments `(#:tests? #f)) ; There are no tests
2595 (native-inputs
2596 `(("qttools" ,qttools)))
2597 (inputs
2598 `(("qtbase" ,qtbase)))
2599 (home-page "https://gitlab.com/mattia.basaglia/Qt-Color-Widgets")
2600 (synopsis "Color management widgets")
2601 (description "QtColorWidgets provides a Qt color dialog that is more
2602user-friendly than the default @code{QColorDialog} and several other
2603color-related widgets.")
2604 ;; Includes a license exception for combining with GPL2 code.
2605 (license license:lgpl3+))))
37a3abb1
JS
2606
2607(define-public python-shiboken-2
76e0b5ba
MB
2608 (package
2609 (name "python-shiboken-2")
dec0217f 2610 (version "5.14.2.3")
76e0b5ba
MB
2611 (source (origin
2612 (method url-fetch)
2613 (uri (string-append "https://download.qt.io/official_releases"
2614 "/QtForPython/pyside2/PySide2-" version
dec0217f 2615 "-src/pyside-setup-opensource-src-"
76e0b5ba
MB
2616 version ".tar.xz"))
2617 (sha256
2618 (base32
dec0217f 2619 "08lhqm0n3fjqpblcx9rshsp8g3bvf7yzbai5q99bly2wa04y6b83"))))
76e0b5ba
MB
2620 (build-system cmake-build-system)
2621 (inputs
dec0217f 2622 `(("clang-toolchain" ,clang-toolchain)
76e0b5ba
MB
2623 ("libxml2" ,libxml2)
2624 ("libxslt" ,libxslt)
2625 ("python-wrapper" ,python-wrapper)
2626 ("qtbase" ,qtbase)
2627 ("qtxmlpatterns" ,qtxmlpatterns)))
2628 (arguments
2629 `(#:tests? #f
2630 ;; FIXME: Building tests fails
2631 #:configure-flags '("-DBUILD_TESTS=off")
2632 #:phases
2633 (modify-phases %standard-phases
2634 (add-after 'unpack 'use-shiboken-dir-only
2635 (lambda _ (chdir "sources/shiboken2") #t))
2636 (add-before 'configure 'make-files-writable-and-update-timestamps
2637 (lambda _
2638 ;; The build scripts need to modify some files in
2639 ;; the read-only source directory, and also attempts
2640 ;; to create Zip files which fails because the Zip
2641 ;; format does not support timestamps before 1980.
2642 (let ((circa-1980 (* 10 366 24 60 60)))
2643 (for-each (lambda (file)
2644 (make-file-writable file)
2645 (utime file circa-1980 circa-1980))
2646 (find-files ".")))
2647 #t))
2648 (add-before 'configure 'set-build-env
2649 (lambda* (#:key inputs #:allow-other-keys)
2650 (let ((llvm (assoc-ref inputs "clang-toolchain")))
2651 (setenv "CLANG_INSTALL_DIR" llvm)
2652 #t))))))
2653 (home-page "https://wiki.qt.io/Qt_for_Python")
2654 (synopsis
2655 "Shiboken generates bindings for C++ libraries using CPython source code")
2656 (description
2657 "Shiboken generates bindings for C++ libraries using CPython source code")
2658 (license
2659 (list
2660 ;; The main code is GPL3 or LGPL3.
2661 ;; Examples are BSD-3.
2662 license:gpl3
2663 license:lgpl3
2664 license:bsd-3))))
f1c4dbfa
JS
2665
2666(define-public python-pyside-2
76e0b5ba
MB
2667 (package
2668 (name "python-pyside-2")
2669 (version (package-version python-shiboken-2))
2670 (source (package-source python-shiboken-2))
2671 (build-system cmake-build-system)
2672 (inputs
2673 `(("libxml2" ,libxml2)
2674 ("libxslt" ,libxslt)
dec0217f 2675 ("clang-toolchain" ,clang-toolchain)
76e0b5ba
MB
2676 ("qtbase" ,qtbase)
2677 ("qtdatavis3d" ,qtdatavis3d)
2678 ("qtlocation" ,qtlocation)
2679 ("qtmultimedia" ,qtmultimedia)
2680 ("qtquickcontrols" ,qtquickcontrols)
2681 ("qtscript" ,qtscript)
2682 ("qtscxml" ,qtscxml)
2683 ("qtsensors" ,qtsensors)
2684 ("qtspeech" ,qtspeech)
2685 ("qtsvg" ,qtsvg)
2686 ("qtwebchannel" ,qtwebchannel)
2687 ("qtwebsockets" ,qtwebsockets)
2688 ("qtx11extras" ,qtx11extras)
2689 ("qtxmlpatterns" ,qtxmlpatterns)))
2690 (native-inputs
2691 `(("cmake" ,cmake-minimal)
2692 ("python-shiboken-2" ,python-shiboken-2)
2693 ("python" ,python-wrapper)
2694 ("qttools" ,qttools)
2695 ("which" ,which)))
2696 (arguments
2697 `(#:tests? #f
2698 ;; FIXME: Building tests fail.
2699 #:configure-flags
2700 (list "-DBUILD_TESTS=FALSE"
2701 (string-append "-DPYTHON_EXECUTABLE="
2702 (assoc-ref %build-inputs "python")
2703 "/bin/python"))
2704 #:phases
2705 (modify-phases %standard-phases
2706 (add-after 'unpack 'go-to-source-dir
2707 (lambda _ (chdir "sources/pyside2") #t))
2708 (add-before 'configure 'set-clang-dir
2709 (lambda* (#:key inputs #:allow-other-keys)
2710 (let ((clang (assoc-ref inputs "clang-toolchain")))
2711 (setenv "CLANG_INSTALL_DIR" clang)
2712 #t))))))
2713 (home-page "https://wiki.qt.io/Qt_for_Python")
2714 (synopsis
2715 "The Qt for Python product enables the use of Qt5 APIs in Python applications")
2716 (description
2717 "The Qt for Python product enables the use of Qt5 APIs in Python
f1c4dbfa
JS
2718applications. It lets Python developers utilize the full potential of Qt,
2719using the PySide2 module. The PySide2 module provides access to the
2720individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
2721comes with the Shiboken2 CPython binding code generator, which can be used to
2722generate Python bindings for your C or C++ code.")
76e0b5ba
MB
2723 (license (list
2724 license:lgpl3
2725 ;;They state that:
2726 ;; this file may be used under the terms of the GNU General
2727 ;; Public License version 2.0 or (at your option) the GNU
2728 ;; General Public license version 3 or any later version
2729 ;; approved by the KDE Free Qt Foundation.
2730 ;; Thus, it is currently v2 or v3, but no "+".
2731 license:gpl3
2732 license:gpl2))))
2ea8b51a
JS
2733
2734(define-public python-pyside-2-tools
76e0b5ba
MB
2735 (package
2736 (name "python-pyside-2-tools")
2737 (version (package-version python-shiboken-2))
2738 (source (package-source python-shiboken-2))
2739 (build-system cmake-build-system)
2740 (inputs
2741 `(("python-pyside-2" ,python-pyside-2)
2742 ("python-shiboken-2" ,python-shiboken-2)
c23737d6 2743 ("qtbase" ,qtbase)))
76e0b5ba
MB
2744 (native-inputs
2745 `(("python" ,python-wrapper)))
2746 (arguments
2747 `(#:tests? #f
2748 #:configure-flags
2749 (list "-DBUILD_TESTS=off"
2750 (string-append "-DPYTHON_EXECUTABLE="
2751 (assoc-ref %build-inputs "python")
2752 "/bin/python"))
2753 #:phases (modify-phases %standard-phases
2754 (add-after 'unpack 'go-to-source-dir
2755 (lambda _ (chdir "sources/pyside2-tools") #t)))))
2756 (home-page "https://wiki.qt.io/Qt_for_Python")
2757 (synopsis
2758 "Contains command line tools for PySide2")
2759 (description
2760 "Contains lupdate, rcc and uic tools for PySide2")
2761 (license license:gpl2)))
e792dd32
KK
2762
2763(define-public libqglviewer
2764 (package
2765 (name "libqglviewer")
2766 (version "2.7.2")
2767 (source (origin
2768 (method url-fetch)
2769 (uri
2770 (string-append "http://libqglviewer.com/src/libQGLViewer-"
2771 version ".tar.gz"))
2772 (sha256
2773 (base32
2774 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
2775 (build-system gnu-build-system)
2776 (arguments
2777 '(#:tests? #f ; no check target
2778 #:make-flags
2779 (list (string-append "PREFIX="
2780 (assoc-ref %outputs "out")))
2781 #:phases
2782 (modify-phases %standard-phases
2783 (replace 'configure
2784 (lambda* (#:key make-flags #:allow-other-keys)
2785 (apply invoke (cons "qmake" make-flags)))))))
2786 (native-inputs
2787 `(("qtbase" ,qtbase)
2788 ("qttools" ,qttools)))
2789 (inputs
2790 `(("glu" ,glu)))
2791 (home-page "http://libqglviewer.com")
2792 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
2793 (description
2794 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
2795of OpenGL 3D viewers.
2796
2797It provides some of the typical 3D viewer functionalities, such as the
2798possibility to move the camera using the mouse, which lacks in most of the
2799other APIs. Other features include mouse manipulated frames, interpolated
2800keyFrames, object selection, stereo display, screenshot saving and much more.
2801It can be used by OpenGL beginners as well as to create complex applications,
2802being fully customizable and easy to extend.")
2803 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
2804 ;; be used.
2805 (license (list license:gpl2 license:gpl3))))
a5f13705
EZ
2806
2807
2808(define-public soqt
2809 (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
2810 (revision "1"))
2811 (package
2812 (name "soqt")
2813 (version (git-version "1.6.0" revision commit-ref))
2814 (source
2815 (origin
2816 (method git-fetch)
2817 (uri (git-reference
2818 (url "https://github.com/coin3d/soqt")
2819 (commit commit-ref)
2820 (recursive? #t)))
2821 (file-name (git-file-name name version))
2822 (sha256
2823 (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
2824 (build-system cmake-build-system)
2825 (arguments '(#:tests? #f)) ; There are no tests
2826 (native-inputs
2827 `(("pkg-config" ,pkg-config)
2828 ("cmake" ,cmake)))
2829 (inputs
2830 `(("qtbase" ,qtbase)
2831 ("coin3D" ,coin3D-4)))
2832 (home-page "https://github.com/coin3d/soqt")
2833 (synopsis "Qt GUI component toolkit library for Coin")
2834 (description "SoQt is a Qt GUI component toolkit library for Coin. It is
2835also compatible with SGI and TGS Open Inventor, and the API is based on the API
2836of the InventorXt GUI component toolkit.")
2837 (license license:bsd-3))))