projects/guix·blob ruby-team · refs

6502 lines · 272.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015, 2023, 2026 Andreas Enge <[email protected]>
3;;; Copyright © 2015, 2025 宋文武 <[email protected]>
4;;; Copyright © 2015, 2018-2021, 2023, 2025 Ludovic Courtès <[email protected]>
5;;; Copyright © 2015-2019, 2024, 2025 Efraim Flashner <[email protected]>
6;;; Copyright © 2016, 2017 Nikita <[email protected]>
7;;; Copyright © 2016 Thomas Danckaert <[email protected]>
8;;; Copyright © 2017, 2018, 2019, 2023 Ricardo Wurmus <[email protected]>
9;;; Copyright © 2017 Quiliro <[email protected]>
10;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <[email protected]>
11;;; Copyright © 2018, 2020, 2022 Nicolas Goaziou <[email protected]>
12;;; Copyright © 2018 Hartmut Goebel <[email protected]>
13;;; Copyright © 2018 Eric Bavier <[email protected]>
14;;; Copyright © 2019, 2020, 2022 Marius Bakke <[email protected]>
15;;; Copyright © 2018 John Soo <[email protected]>
16;;; Copyright © 2020 Mike Rosset <[email protected]>
17;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
18;;; Copyright © 2020 Kei Kebreau <[email protected]>
19;;; Copyright © 2020 TomZ <[email protected]>
20;;; Copyright © 2020 Jonathan Brielmaier <[email protected]>
21;;; Copyright © 2020 Michael Rohleder <[email protected]>
22;;; Copyright © 2020-2026 Maxim Cournoyer <[email protected]>
23;;; Copyright © 2021, 2022, 2025 Brendan Tildesley <[email protected]>
24;;; Copyright © 2021, 2022, 2023 Guillaume Le Vaillant <[email protected]>
25;;; Copyright © 2021 Nicolò Balzarotti <[email protected]>
26;;; Copyright © 2022 Foo Chuan Wei <[email protected]>
27;;; Copyright © 2022 Zhu Zihao <[email protected]>
28;;; Copyright © 2022 Petr Hodina <[email protected]>
29;;; Copyright © 2022 Yash Tiwari <[email protected]>
30;;; Copyright © 2023 Sharlatan Hellseher <[email protected]>
31;;; Copyright © 2022, 2024, 2025 Zheng Junjie <[email protected]>
32;;; Copyright © 2023 Herman Rimm <[email protected]>
33;;; Copyright © 2023 Simon South <[email protected]>
34;;; Copyright © 2024 Foundation Devices, Inc. <[email protected]>
35;;; Copyright © 2024 Josep Bigorra <[email protected]>
36;;; Copyright © 2025 John Kehayias <[email protected]>
37;;; Copyright © 2024, 2026 Sughosha <[email protected]>
38;;; Copyright © 2025 Brice Waegeneire <[email protected]>
39;;; Copyright © 2025 Laura Kirsch <[email protected]>
40;;; Copyright © 2026 bdunahu <[email protected]>
41;;;
42;;; This file is part of GNU Guix.
43;;;
44;;; GNU Guix is free software; you can redistribute it and/or modify it
45;;; under the terms of the GNU General Public License as published by
46;;; the Free Software Foundation; either version 3 of the License, or (at
47;;; your option) any later version.
48;;;
49;;; GNU Guix is distributed in the hope that it will be useful, but
50;;; WITHOUT ANY WARRANTY; without even the implied warranty of
51;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52;;; GNU General Public License for more details.
53;;;
54;;; You should have received a copy of the GNU General Public License
55;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
56
57(define-module (gnu packages qt)
58 #:use-module ((guix licenses) #:prefix license:)
59 #:use-module (guix packages)
60 #:use-module (guix download)
61 #:use-module (guix git-download)
62 #:use-module (guix build-system cmake)
63 #:use-module (guix build-system gnu)
64 #:use-module (guix build-system meson)
65 #:use-module (guix build-system trivial)
66 #:use-module (guix build-system pyproject)
67 #:use-module (guix build-system qt)
68 #:use-module (guix gexp)
69 #:use-module (guix packages)
70 #:use-module (guix deprecation)
71 #:use-module (guix search-paths)
72 #:use-module (guix utils)
73 #:use-module (gnu packages)
74 #:use-module (gnu packages backup)
75 #:use-module (gnu packages bash)
76 #:use-module (gnu packages base)
77 #:use-module (gnu packages bison)
78 #:use-module (gnu packages build-tools)
79 #:use-module (gnu packages crypto)
80 #:use-module (gnu packages check)
81 #:use-module (gnu packages cmake)
82 #:use-module (gnu packages compression)
83 #:use-module (gnu packages cpp)
84 #:use-module (gnu packages cups)
85 #:use-module (gnu packages curl)
86 #:use-module (gnu packages databases)
87 #:use-module (gnu packages dlang)
88 #:use-module (gnu packages documentation)
89 #:use-module (gnu packages elf)
90 #:use-module (gnu packages enchant)
91 #:use-module (gnu packages fontutils)
92 #:use-module (gnu packages compiler-tools)
93 #:use-module (gnu packages freedesktop)
94 #:use-module (gnu packages gcc)
95 #:use-module (gnu packages gdb)
96 #:use-module (gnu packages ghostscript)
97 #:use-module (gnu packages gl)
98 #:use-module (gnu packages glib)
99 #:use-module (gnu packages gnome)
100 #:use-module (gnu packages gnupg)
101 #:use-module (gnu packages gperf)
102 #:use-module (gnu packages graphics)
103 #:use-module (gnu packages gstreamer)
104 #:use-module (gnu packages gtk)
105 #:use-module (gnu packages icu4c)
106 #:use-module (gnu packages image)
107 #:use-module (gnu packages image-processing)
108 #:use-module (gnu packages kde-frameworks)
109 #:use-module (gnu packages kde-sdk)
110 #:use-module (gnu packages libevent)
111 #:use-module (gnu packages linux)
112 #:use-module (gnu packages llvm)
113 #:use-module (gnu packages logging)
114 #:use-module (gnu packages maths)
115 #:use-module (gnu packages markup)
116 #:use-module (gnu packages networking)
117 #:use-module (gnu packages node)
118 #:use-module (gnu packages nss)
119 #:use-module (gnu packages pciutils)
120 #:use-module (gnu packages pcre)
121 #:use-module (gnu packages perl)
122 #:use-module (gnu packages pkg-config)
123 #:use-module (gnu packages pulseaudio)
124 #:use-module (gnu packages pretty-print)
125 #:use-module (gnu packages protobuf)
126 #:use-module (gnu packages python)
127 #:use-module (gnu packages python-build)
128 #:use-module (gnu packages python-check)
129 #:use-module (gnu packages python-web)
130 #:use-module (gnu packages python-xyz)
131 #:use-module (gnu packages regex)
132 #:use-module (gnu packages ruby)
133 #:use-module (gnu packages rust-sources)
134 #:use-module (gnu packages sdl)
135 #:use-module (gnu packages serialization)
136 #:use-module (gnu packages sqlite)
137 #:use-module (gnu packages telephony)
138 #:use-module (gnu packages tls)
139 #:use-module (gnu packages toolkits)
140 #:use-module (gnu packages valgrind)
141 #:use-module (gnu packages video)
142 #:use-module (gnu packages vulkan)
143 #:use-module (gnu packages web)
144 #:use-module (gnu packages xdisorg)
145 #:use-module (gnu packages xiph)
146 #:use-module (gnu packages xorg)
147 #:use-module (gnu packages xml)
148 #:use-module (ice-9 format)
149 #:use-module (ice-9 match)
150 #:use-module (srfi srfi-1))
151
152(define-public qtappinstancemanager
153 (package
154 (name "qtappinstancemanager")
155 (version "1.3.2")
156 (source
157 (origin
158 (method git-fetch)
159 (uri (git-reference
160 (url "https://github.com/oclero/qtappinstancemanager")
161 (commit (string-append "v" version))))
162 (file-name (git-file-name name version))
163 (sha256
164 (base32 "12vfhjvxlnnm3wszv5qs7c1925gywgm00583ppnx0ab3k8iswqwd"))))
165 (build-system cmake-build-system)
166 (arguments
167 (list
168 #:tests? #f)) ;no tests
169 (inputs (list qtbase))
170 (synopsis "Single application instance manager for Qt6")
171 (description
172 "QtAppInstanceManager is a tool to control how many instances of your Qt
173application are running at the same time, and to send messages between
174instances. It uses a local socket under the hood. You may then build upon this
175foundation any messaging system or protocol, such as JSON-RPC for
176instance (NB: not provided because out of the scope of this library).
177
178It is intended to be a replacement for QtSingleApplication, the deprecated Qt4
179official project.")
180 (home-page "https://github.com/oclero/qtappinstancemanager")
181 (license license:expat)))
182
183(define-public qcoro-qt6
184 (package
185 (name "qcoro-qt6")
186 (version "0.11.0")
187 (source
188 (origin
189 (method git-fetch)
190 (uri (git-reference
191 (url "https://github.com/danvratil/qcoro")
192 (commit (string-append "v" version))))
193 (file-name (git-file-name name version))
194 (sha256
195 (base32 "0g9laaw1mkp5ynpp3c7aingndcmgncbacslq3p6bzwjisdd6xr5m"))))
196 (build-system qt-build-system)
197 (arguments
198 (list #:qtbase qtbase
199 #:configure-flags
200 #~(list "-DCMAKE_CXX_FLAGS=-fPIC"
201 "-DUSE_QT_VERSION=6")))
202 (native-inputs (list dbus)) ;for tests
203 (inputs (list qtdeclarative qtwebsockets libxkbcommon))
204 (home-page "https://qcoro.dvratil.cz/")
205 (synopsis "C++ Coroutine Library for Qt6")
206 (description "QCoro is a C++ library that provide set of tools to make use
207of C++20 coroutines in connection with certain asynchronous Qt actions.")
208 (license license:expat)))
209
210(define-public qlementine
211 (package
212 (name "qlementine")
213 (version "1.4.2")
214 (source
215 (origin
216 (method git-fetch)
217 (uri (git-reference
218 (url "https://github.com/oclero/qlementine")
219 (commit (string-append "v" version))))
220 (file-name (git-file-name name version))
221 (sha256
222 (base32 "1cjch1jhlb67hcfgzf2vv5f9zlawr8ngl0gc43scplxdfpv3wda0"))))
223 (build-system cmake-build-system)
224 (arguments
225 (list
226 #:tests? #f)) ;no tests
227 (inputs (list qtbase qtsvg))
228 (synopsis "Modern QStyle for desktop Qt6 applications")
229 (description "Qlementine is a modern QStyle for desktop Qt6 applications.")
230 (home-page "https://github.com/oclero/qlementine")
231 (license license:expat)))
232
233(define-public qlementine-icons
234 (package
235 (name "qlementine-icons")
236 (version "1.14.0")
237 (source
238 (origin
239 (method git-fetch)
240 (uri (git-reference
241 (url "https://github.com/oclero/qlementine-icons")
242 (commit (string-append "v" version))))
243 (file-name (git-file-name name version))
244 (sha256
245 (base32 "187h8yvykah7xangbds9a0860p9p2fyf8v54y0ga2a3ygc7y5mfv"))))
246 (build-system cmake-build-system)
247 (arguments
248 (list
249 #:tests? #f)) ;no tests
250 (inputs (list qtbase qtsvg))
251 (synopsis "Modern icon set for desktop Qt applications")
252 (description
253 "Qlementine Icons is a modern, vector, elegant, free, and open-source icon
254library designed for use with a C++ library that enhances the appearance of
255your QtWidgets application.")
256 (home-page "https://oclero.github.io/qlementine-icons/")
257 (license license:expat)))
258
259(define-public qmdnsengine
260 ;; Used as submodule in https://github.com/moonlight-stream/moonlight-qt
261 (let ((commit "b7a5a9f225d5e14b39f9fd1f905c4f505cf2ee99")
262 (revision "1"))
263 (package
264 (name "qmdnsengine")
265 (version (git-version "0.0.1" revision commit))
266 (source (origin
267 (method git-fetch)
268 (uri (git-reference
269 (url "https://github.com/cgutman/qmdnsengine")
270 (commit commit)))
271 (file-name (git-file-name name version))
272 (sha256
273 (base32
274 "1f5v5n9w4aszcdjxmw81cwmd26ssywvfiyr8x0vbyamp4kqd8mww"))))
275 (build-system cmake-build-system)
276 (arguments
277 '(#:configure-flags (list "-DBUILD_TESTS=ON")))
278 (inputs (list qtbase-5))
279 (synopsis "Multicast DNS library for Qt application")
280 (description "This package provides multicast DNS library for Qt
281 applications.")
282 (home-page "https://github.com/moonlight-stream/moonlight-common-c")
283 (license license:expat))))
284
285(define-public qpropgen
286 (package
287 (name "qpropgen")
288 (version "0.1.2")
289 (source
290 (origin
291 (method git-fetch)
292 (uri (git-reference
293 (url "https://github.com/agateau/qpropgen")
294 (commit version)))
295 (file-name (git-file-name name version))
296 (sha256
297 (base32
298 "0rrd7dbmhycqcxs2pkzcadjh2khhzqc69xzha003161hjdf3vh9f"))))
299 (build-system pyproject-build-system)
300 (arguments
301 (list
302 ;; XXX: 0.1.2 does not have tests/, examples are manual and require C++.
303 #:tests? #f
304 #:phases
305 #~(modify-phases %standard-phases
306 (add-after 'install 'install-cmake
307 (lambda _
308 (install-file "cmake/qpropgen.cmake"
309 (string-append #$output "/share/"
310 #$name "/cmake")))))))
311 (propagated-inputs (list python-jinja2 python-pyyaml python-strictyaml))
312 (native-inputs (list python-pytest python-setuptools))
313 (home-page "https://github.com/agateau/qpropgen")
314 (synopsis "Generates QObject properties from a YAML file")
315 (description "This package provides a tool to generate QML-friendly
316QObject-based C++ classes from class definition files.")
317 (license license:asl2.0)))
318
319(define-public qite
320 (let ((commit "e9d33c84a0b346185b27efb44189f18acaa53906")
321 (revision "75"))
322 (package
323 (name "qite")
324 (version (git-version "0" revision commit))
325 (source
326 (origin
327 (method git-fetch)
328 (uri
329 (git-reference
330 (url "https://github.com/Ri0n/qite")
331 (commit commit)))
332 (file-name (git-file-name name version))
333 (sha256
334 (base32 "13rwlb77hw44qksfh82mpklhkjr6z4pv1n4dj906hdw6213448vj"))
335 (modules '((guix build utils)))
336 (snippet
337 #~(begin
338 (substitute* "libqite/CMakeLists.txt"
339 (("CXX_STANDARD 14") "CXX_STANDARD 20"))))))
340 (build-system qt-build-system)
341 (arguments
342 `(#:tests? #f ; no target
343 #:phases
344 (modify-phases %standard-phases
345 (add-after 'unpack 'chdir
346 (lambda _
347 (chdir "libqite"))))))
348 (inputs
349 (list qtbase-5 qtmultimedia-5))
350 (home-page "https://github.com/Ri0n/qite/")
351 (synopsis "Qt Interactive Text Elements")
352 (description "Qite manages interactive elements on QTextEdit.")
353 (license license:asl2.0))))
354
355(define-public qt5ct
356 (package
357 (name "qt5ct")
358 (version "1.9")
359 (source
360 (origin
361 (method url-fetch)
362 (uri
363 (string-append "mirror://sourceforge/qt5ct/qt5ct-" version ".tar.bz2"))
364 (sha256
365 (base32 "1zwbb2jgwplbdizcra92q1hnynq13axzwryfh5cr4fs2kn9yc46w"))))
366 (build-system qt-build-system)
367 (arguments
368 (list
369 #:tests? #f ; No target
370 #:phases
371 #~(modify-phases %standard-phases
372 (add-after 'unpack 'patch
373 (lambda _
374 (substitute* '("src/qt5ct-qtplugin/CMakeLists.txt"
375 "src/qt5ct-style/CMakeLists.txt")
376 (("\\$\\{PLUGINDIR\\}")
377 (string-append #$output "/lib/qt5/plugins"))))))))
378 (native-inputs
379 (list qttools-5))
380 (inputs
381 (list qtsvg-5))
382 (synopsis "Qt5 Configuration Tool")
383 (description "Qt5CT is a program that allows users to configure Qt5
384settings (such as icons, themes, and fonts) in desktop environments or
385window managers, that don't provide Qt integration by themselves.")
386 (home-page "https://qt5ct.sourceforge.io/")
387 (license license:bsd-2)))
388
389(define-public qt6ct
390 (package
391 (name "qt6ct")
392 (version "0.11")
393 (source
394 (origin
395 (method git-fetch)
396 (uri (git-reference
397 (url "https://www.opencode.net/trialuser/qt6ct")
398 (commit version)))
399 (file-name (git-file-name name version))
400 (sha256
401 (base32 "17hfx90wnc40a1sq0qcdp2hml5mkjhlj5rwm95pc40p03nicpn67"))))
402 (build-system qt-build-system)
403 (arguments
404 (list
405 #:qtbase qtbase
406 #:tests? #f ; No target
407 #:phases
408 #~(modify-phases %standard-phases
409 (add-after 'unpack 'patch
410 (lambda _
411 (substitute* '("src/qt6ct-qtplugin/CMakeLists.txt"
412 "src/qt6ct-style/CMakeLists.txt")
413 (("\\$\\{PLUGINDIR\\}")
414 (string-append #$output "/lib/qt6/plugins"))))))))
415 (native-inputs
416 (list qttools))
417 (inputs
418 (list qtsvg
419 libxkbcommon))
420 (synopsis "Qt6 Configuration Tool")
421 (description "Qt6CT is a program that allows users to configure Qt6
422settings (such as icons, themes, and fonts) in desktop environments or
423window managers, that don't provide Qt integration by themselves.")
424 (home-page "https://www.opencode.net/trialuser/qt6ct")
425 (license license:bsd-2)))
426
427(define-public kddockwidgets
428 (package
429 (name "kddockwidgets")
430 (version "2.4.0")
431 (source (origin
432 (method git-fetch)
433 (uri (git-reference
434 (url "https://github.com/KDAB/KDDockWidgets")
435 (commit (string-append "v" version))))
436 (file-name (git-file-name name version))
437 (sha256
438 (base32
439 "0yrx6q74xb5ribah0naxln1sx4md9cakwn4jp0wbzapiyigh4apy"))))
440 (build-system cmake-build-system)
441 (arguments (list #:tests? #f
442 #:configure-flags #~(list
443 "-DKDDockWidgets_QT6=ON"
444 "-DKDDockWidgets_TESTS=ON")))
445 (inputs
446 (list fmt-12
447 nlohmann-json
448 qtbase
449 qtdeclarative
450 spdlog
451 libxkbcommon))
452 (home-page "https://github.com/KDAB/KDDockWidgets")
453 (synopsis "KDAB's Dock Widget Framework for Qt")
454 (description "KDDockWidgets is a Qt dock widget library suitable for
455replacing QDockWidget and implementing advanced functionalities missing in
456Qt. Some of its features include:
457@itemize
458@item Advanced docking that QDockWidget doesn't support
459@item Layout engine honouring size constraints and some size policies
460@item Lazy separator resize
461@item Reordering tabs with mouse
462@item Partial layout save/restore, affecting only a chosen subset
463@item Double-click on title bar to maximize
464@item Double-click on separator to distribute equally
465@item Show close button on tabs
466@item Allows making a dock widget non-closable and/or non-dockable
467@item Optional minimize and maximize button on the title bar
468@item FloatingWindows can be utility windows or full native ones.
469@end itemize")
470 (license (list license:gpl2 license:gpl3)))) ;dual-licensed
471
472(define-public kvantum
473 (package
474 (name "kvantum")
475 (version "1.1.5")
476 (source (origin
477 (method git-fetch)
478 (uri (git-reference
479 (url "https://github.com/tsujan/Kvantum")
480 (commit (string-append "V" version))))
481 (file-name (git-file-name name version))
482 (sha256
483 (base32
484 "17fjhnc8dpxb27dmv1c8mkcy2jwdny06zzqgd9zpamlqi97alp0v"))
485 (patches
486 (search-patches "kvantum-1.1.5-xdg-dirs-support.patch"))))
487 (build-system qt-build-system)
488 (arguments
489 (list
490 #:tests? #f ;no tests
491 #:qtbase qtbase
492 #:phases
493 #~(modify-phases %standard-phases
494 (add-after 'unpack 'chdir
495 (lambda _
496 (chdir "Kvantum")))
497 (add-after 'chdir 'patch-style-dir
498 (lambda _
499 (substitute* "style/CMakeLists.txt"
500 (("\\$\\{KVANTUM_STYLE_DIR\\}")
501 (string-append #$output
502 "/lib/qt6/plugins/styles"))))))))
503 (native-inputs (list qttools))
504 (inputs (list
505 kwindowsystem
506 qtsvg
507 qtwayland))
508 (synopsis "SVG-based theme engine for Qt")
509 (description
510 "Kvantum is an SVG-based theme engine for Qt,
511tuned to KDE and LXQt, with an emphasis on elegance, usability and
512practicality.")
513 (home-page "https://github.com/tsujan/Kvantum")
514 (license license:gpl3+)))
515
516(define-public materialdecoration
517 (let ((commit "6a5de23f2e5162fbee39d16f938473ff970a2ec0")
518 (revision "9"))
519 (package
520 (name "materialdecoration")
521 (version
522 (git-version "1.1.0" revision commit))
523 (source
524 (origin
525 (method git-fetch)
526 (uri
527 (git-reference
528 (url "https://github.com/lirios/materialdecoration.git")
529 (commit commit)))
530 (file-name
531 (git-file-name name version))
532 (sha256
533 (base32 "1zdrcb39fhhmn76w8anv1dnspz26pdl6izmj1mlm02aza4y8ffp4"))
534 (modules '((guix build utils)
535 (ice-9 ftw)
536 (srfi srfi-1)))
537 (snippet
538 `(begin
539 (delete-file-recursively "cmake/3rdparty")))))
540 (build-system qt-build-system)
541 (arguments
542 `(#:tests? #f ; No target
543 #:configure-flags
544 ,#~(list
545 (string-append "-DCMAKE_CXX_FLAGS=-I"
546 #$(this-package-input "qtbase")
547 "/include/qt5/QtXkbCommonSupport/"
548 #$(package-version qtbase-5)))))
549 (native-inputs
550 (list cmake-shared extra-cmake-modules pkg-config))
551 (inputs
552 (list qtbase-5
553 qtwayland-5
554 wayland
555 libxkbcommon))
556 (synopsis "Material Decoration for Qt")
557 (description "MaterialDecoration is a client-side decoration for Qt
558applications on Wayland.")
559 (home-page "https://github.com/lirios/materialdecoration")
560 (license license:lgpl3+))))
561
562(define-public grantlee
563 (package
564 (name "grantlee")
565 (version "5.3.1")
566 (source
567 (origin
568 (method git-fetch)
569 (uri (git-reference
570 (url "https://github.com/steveire/grantlee")
571 (commit (string-append "v" version))))
572 (file-name (git-file-name name version))
573 (sha256
574 (base32 "1ipnkdi8wgv519mvwa5zxlz20wipbypyfixjv2qdfd9vl1pznwvs"))
575 (patches (search-patches "grantlee-fix-i586-precision.patch"
576 "grantlee-register-metaenumvariable.patch"))))
577 (native-inputs
578 ;; Optional: lcov and cccc, both are for code coverage
579 (list doxygen))
580 (inputs
581 (list qtdeclarative))
582 (build-system qt-build-system)
583 (arguments
584 (list #:qtbase qtbase
585 #:configure-flags #~(list "-DGRANTLEE_BUILD_WITH_QT6=ON")
586 #:phases #~(modify-phases %standard-phases
587 (add-before 'check 'check-setup
588 (lambda _
589 ;; make Qt render "offscreen", required for tests
590 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
591 (home-page "https://github.com/steveire/grantlee")
592 (synopsis "Libraries for text templating with Qt")
593 (description "Grantlee Templates can be used for theming and generation of
594other text such as code. The syntax uses the syntax of the Django template
595system, and the core design of Django is reused in Grantlee.")
596 (license license:lgpl2.1+)))
597
598(define (qt-url component version)
599 "Return a mirror URL for the Qt5 COMPONENT at VERSION."
600 ;; We can't use a mirror:// scheme because these URLs are not exact copies:
601 ;; the layout differs between them.
602 (let ((x (match (version-major version)
603 ("5" "-everywhere-opensource-src-")
604 ;; Version 6 and later dropped 'opensource' from the archive
605 ;; names.
606 (_ "-everywhere-src-"))))
607 (string-append "mirror://qt/qt/"
608 (version-major+minor version) "/" version
609 "/submodules/" component x version ".tar.xz")))
610
611(define-public qtbase-5
612 (package
613 (name "qtbase")
614 (version "5.15.17")
615 (source (origin
616 (method url-fetch)
617 (uri (qt-url name version))
618 (sha256
619 (base32
620 "1zsnww4hp5n46jyg43w039lgxxrnjj1w0ngp54ibv9glng5i65fv"))
621 ;; Use TZDIR to avoid depending on package "tzdata".
622 (patches (search-patches "qtbase-5-use-TZDIR.patch"
623 "qtbase-moc-ignore-gcc-macro.patch"
624 "qtbase-absolute-runpath.patch"))
625 (modules '((guix build utils)))
626 (snippet
627 ;; corelib uses bundled harfbuzz, md4, md5, sha3
628 '(begin
629 (with-directory-excursion "src/3rdparty"
630 (for-each delete-file-recursively
631 (list "double-conversion" "freetype" "harfbuzz-ng"
632 "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
633 "zlib")))))))
634 (build-system gnu-build-system)
635 (outputs '("out" "debug"))
636 (propagated-inputs
637 (list mesa
638 ;; Use which the package, not the function
639 (@ (gnu packages base) which)))
640 (inputs
641 (list alsa-lib
642 cups
643 dbus
644 double-conversion
645 eudev
646 expat
647 fontconfig
648 freetype
649 glib
650 gtk+ ;for GTK theme support
651 harfbuzz
652 icu4c
653 libinput-minimal
654 libjpeg-turbo
655 libmng
656 libpng
657 libx11
658 libxcomposite
659 libxcursor
660 libxfixes
661 libxi
662 libxinerama
663 libxkbcommon
664 libxml2
665 libxrandr
666 libxrender
667 libxslt
668 libxtst
669 mtdev
670 `(,mariadb "dev")
671 nss
672 openssl
673 pcre2
674 postgresql
675 pulseaudio
676 sqlite
677 unixodbc
678 xcb-util
679 xcb-util-image
680 xcb-util-keysyms
681 xcb-util-renderutil
682 xcb-util-wm
683 xdg-utils
684 zlib))
685 (native-inputs
686 (list bison
687 flex
688 gperf
689 perl
690 pkg-config
691 python
692 vulkan-headers
693 ruby-3.4))
694 (arguments
695 `(#:disallowed-references ,(list (this-package-native-input "python"))
696 #:configure-flags
697 (let ((out (assoc-ref %outputs "out")))
698 (list "-verbose"
699 "-prefix" out
700 "-docdir" (string-append out "/share/doc/qt5")
701 "-headerdir" (string-append out "/include/qt5")
702 "-archdatadir" (string-append out "/lib/qt5")
703 "-datadir" (string-append out "/share/qt5")
704 "-examplesdir" (string-append
705 out "/share/doc/qt5/examples")
706 "-opensource"
707 "-confirm-license"
708
709 ;; Later stripped into the :debug output.
710 "-force-debug-info"
711
712 ;; These features require higher versions of Linux than the
713 ;; minimum version of the glibc. See
714 ;; src/corelib/global/minimum-linux_p.h. By disabling these
715 ;; features Qt5 applications can be used on the oldest
716 ;; kernels that the glibc supports, including the RHEL6
717 ;; (2.6.32) and RHEL7 (3.10) kernels.
718 "-no-feature-getentropy" ; requires Linux 3.17
719 "-no-feature-renameat2" ; requires Linux 3.16
720
721 ;; Do not build examples; if desired, these could go
722 ;; into a separate output, but for the time being, we
723 ;; prefer to save the space and build time.
724 "-no-compile-examples"
725 ;; Most "-system-..." are automatic, but some use
726 ;; the bundled copy by default.
727 "-system-sqlite"
728 "-system-harfbuzz"
729 "-system-pcre"
730 ;; explicitly link with openssl instead of dlopening it
731 "-openssl-linked"
732 ;; explicitly link with dbus instead of dlopening it
733 "-dbus-linked"
734 ;; don't use the precompiled headers
735 "-no-pch"
736 ;; drop special machine instructions that do not have
737 ;; runtime detection
738 ,@(if (string-prefix? "x86_64"
739 (or (%current-target-system)
740 (%current-system)))
741 '()
742 '("-no-sse2"))
743 "-no-mips_dsp"
744 "-no-mips_dspr2"))
745 #:phases
746 (modify-phases %standard-phases
747 (add-after 'configure 'patch-bin-sh
748 (lambda _
749 (substitute* '("config.status"
750 "configure"
751 "mkspecs/features/qt_functions.prf"
752 "qmake/library/qmakebuiltins.cpp")
753 (("/bin/sh") (which "sh")))))
754 (add-after 'configure 'patch-xdg-open
755 (lambda _
756 (substitute* '("src/platformsupport/services/genericunix/qgenericunixservices.cpp")
757 (("^.*const char \\*browsers.*$" all)
758 (string-append "*browser = QStringLiteral(\""
759 (which "xdg-open")
760 "\"); return true; \n" all)))))
761 (replace 'configure
762 ;; Overridden to not pass "--enable-fast-install", which makes the
763 ;; configure process fail.
764 (lambda* (#:key outputs configure-flags #:allow-other-keys)
765 (let ((out (assoc-ref outputs "out")))
766 (substitute* "configure"
767 (("/bin/pwd") (which "pwd")))
768 (substitute* "src/corelib/global/global.pri"
769 (("/bin/ls") (which "ls")))
770 ;; The configuration files for other Qt5 packages are searched
771 ;; through a call to "find_package" in Qt5Config.cmake, which
772 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
773 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
774 ;; components can be installed in different places.
775 (substitute* (find-files "." ".*\\.cmake")
776 (("NO_DEFAULT_PATH") ""))
777 (format #t "build directory: ~s~%" (getcwd))
778 (format #t "configure flags: ~s~%" configure-flags)
779 (apply invoke "./configure" configure-flags))))
780 (add-after 'install 'patch-mkspecs
781 (lambda* (#:key outputs #:allow-other-keys)
782 (let* ((out (assoc-ref outputs "out"))
783 (archdata (string-append out "/lib/qt5"))
784 (mkspecs (string-append archdata "/mkspecs"))
785 (qt_config.prf (string-append
786 mkspecs "/features/qt_config.prf")))
787 ;; For each Qt module, let `qmake' uses search paths in the
788 ;; module directory instead of all in QT_INSTALL_PREFIX.
789 (substitute* qt_config.prf
790 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
791 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")
792 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
793 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
794 (("\\$\\$\\[QT_HOST_LIBS\\]")
795 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
796 (("\\$\\$\\[QT_INSTALL_BINS\\]")
797 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
798
799 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
800 (substitute* (string-append mkspecs "/features/qt_functions.prf")
801 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
802 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
803
804 ;; Resolve qmake spec files within qtbase by absolute paths.
805 (substitute*
806 (map (lambda (file)
807 (string-append mkspecs "/features/" file))
808 '("device_config.prf" "moc.prf" "qt_build_config.prf"
809 "qt_config.prf" "winrt/package_manifest.prf"))
810 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
811 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))
812 (add-after 'patch-mkspecs 'patch-prl-files
813 (lambda* (#:key outputs #:allow-other-keys)
814 (let ((out (assoc-ref outputs "out")))
815 ;; Insert absolute references to the qtbase libraries because
816 ;; QT_INSTALL_LIBS does not always resolve correctly, depending
817 ;; on context. See <https://bugs.gnu.org/38405>
818 (substitute* (find-files (string-append out "/lib") "\\.prl$")
819 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
820 (string-append out "/lib"))))))
821 (add-after 'unpack 'patch-paths
822 ;; Use the absolute paths for dynamically loaded libs, otherwise
823 ;; the lib will be searched in LD_LIBRARY_PATH which typically is
824 ;; not set in guix.
825 (lambda* (#:key inputs #:allow-other-keys)
826 ;; libresolve
827 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
828 "cross-libc" "libc"))))
829 (substitute* '("src/network/kernel/qdnslookup_unix.cpp"
830 "src/network/kernel/qhostinfo_unix.cpp")
831 (("^\\s*(lib.setFileName\\(QLatin1String\\(\")(resolv\"\\)\\);)" _ a b)
832 (string-append a glibc "/lib/lib" b))))
833 ;; libGL
834 (substitute* "src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp"
835 (("^\\s*(QLibrary lib\\(QLatin1String\\(\")(GL\"\\)\\);)" _ a b)
836 (string-append a (assoc-ref inputs "mesa") "/lib/lib" b)))
837 ;; libXcursor
838 (substitute* "src/plugins/platforms/xcb/qxcbcursor.cpp"
839 (("^\\s*(QLibrary xcursorLib\\(QLatin1String\\(\")(Xcursor\"\\), 1\\);)" _ a b)
840 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b))
841 (("^\\s*(xcursorLib.setFileName\\(QLatin1String\\(\")(Xcursor\"\\)\\);)" _ a b)
842 (string-append a (assoc-ref inputs "libxcursor") "/lib/lib" b)))))
843 (add-after 'install 'do-not-capture-python
844 (lambda* (#:key outputs #:allow-other-keys)
845 ;; For some reason, patching the file after the
846 ;; patch-source-shebangs phase doesn't work for Qt 5.
847 (substitute*
848 (search-input-file
849 outputs "lib/qt5/mkspecs/features/uikit/devices.py")
850 (((which "python3"))
851 "/usr/bin/env python3")))))))
852 (native-search-paths
853 (list (search-path-specification
854 (variable "QMAKEPATH")
855 (files '("lib/qt5")))
856 (search-path-specification
857 (variable "QML2_IMPORT_PATH")
858 (files '("lib/qt5/qml")))
859 (search-path-specification
860 (variable "QT_PLUGIN_PATH")
861 (files '("lib/qt5/plugins")))
862 (search-path-specification
863 (variable "XDG_DATA_DIRS")
864 (files '("share")))
865 (search-path-specification
866 (variable "XDG_CONFIG_DIRS")
867 (files '("etc/xdg")))))
868 (home-page "https://www.qt.io/")
869 (synopsis "Cross-platform GUI library")
870 (description "Qt is a cross-platform application and UI framework for
871developers using C++ or QML, a CSS & JavaScript like language.")
872 (license (list license:lgpl2.1 license:lgpl3))))
873
874(define-public qtbase
875 (package
876 (inherit qtbase-5)
877 (name "qtbase")
878 (version "6.9.2")
879 (source (origin
880 (inherit (package-source qtbase-5))
881 (uri (qt-url name version))
882 (sha256
883 (base32
884 "0h149x8l2ywfr5m034n20z6cjxnldary39x0vv22jhg0ryg9rgj4"))
885 (modules '((guix build utils)))
886 (snippet
887 ;; corelib uses bundled harfbuzz, md4, md5, sha3
888 '(with-directory-excursion "src/3rdparty"
889 (for-each delete-file-recursively
890 (list "double-conversion" "freetype" "harfbuzz-ng"
891 "pcre2" "md4c" "libpng" "libjpeg"
892 "sqlite" "xcb" "zlib"))))
893 (patches
894 (search-patches
895 "qtbase-moc-ignore-gcc-macro.patch"
896 "qtbase-absolute-runpath.patch"
897 "qtbase-qmake-use-libname.patch"
898 "qtbase-qmlimportscanner-qml-import-path.patch"
899 "qtbase-qmake-fix-includedir.patch"
900 "qtbase-patch-libvulkan.patch"))))
901 (build-system cmake-build-system)
902 (arguments
903 (substitute-keyword-arguments arguments
904 ((#:configure-flags _ ''())
905 `(let ((out (assoc-ref %outputs "out")))
906 (list "-GNinja" ;officially supported
907 "-DQT_BUILD_TESTS=ON"
908 (string-append "-DINSTALL_ARCHDATADIR=" out "/lib/qt6")
909 (string-append "-DINSTALL_DATADIR=" out "/share/qt6")
910 (string-append "-DINSTALL_DOCDIR=" out "/share/doc/qt6")
911 (string-append "-DINSTALL_MKSPECSDIR=" out "/lib/qt6/mkspecs")
912 (string-append "-DINSTALL_EXAMPLESDIR=" out
913 "/share/doc/qt6/examples")
914 (string-append "-DINSTALL_INCLUDEDIR=" out "/include/qt6")
915
916 ;; Do not embed an absolute reference to compilers, to reduce
917 ;; the closure size.
918 "-DQT_EMBED_TOOLCHAIN_COMPILER=OFF"
919
920 ;; Link with DBus and OpenSSL so they don't get dlopen'ed.
921 "-DINPUT_dbus=linked"
922 "-DINPUT_openssl=linked"
923 ;; These features require higher versions of Linux than the
924 ;; minimum version of the glibc. See
925 ;; src/corelib/global/minimum-linux_p.h. By disabling these
926 ;; features Qt applications can be used on the oldest kernels
927 ;; that the glibc supports, including the RHEL6 (2.6.32) and
928 ;; RHEL7 (3.10) kernels.
929 "-DFEATURE_getentropy=OFF" ; requires Linux 3.17
930 "-DFEATURE_renameat2=OFF" ; requires Linux 3.16
931 ;; Most system libraries are used by default, except in some
932 ;; cases such as for those below.
933 "-DFEATURE_system_pcre2=ON"
934 "-DFEATURE_system_sqlite=ON"
935 "-DFEATURE_system_xcb_xinput=ON"
936 ;; Don't use the precompiled headers.
937 "-DBUILD_WITH_PCH=OFF")))
938 ((#:phases phases)
939 #~(modify-phases #$phases
940 (replace 'build
941 (lambda* (#:key parallel-build? #:allow-other-keys)
942 (apply invoke "cmake" "--build" "."
943 (if parallel-build?
944 `("--parallel" ,(number->string
945 (parallel-job-count)))
946 '()))))
947 (replace 'install
948 (lambda _
949 (invoke "cmake" "--install" ".")))
950 (add-after 'unpack 'honor-CMAKE_PREFIX_PATH
951 (lambda _
952 ;; The configuration files for other Qt packages are searched
953 ;; through a call to "find_package" in Qt5Config.cmake, which
954 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
955 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
956 ;; components can be installed in different places.
957 (substitute* (find-files "." "\\.cmake(\\.in)?$")
958 (("\\bNO_DEFAULT_PATH\\b") ""))
959 ;; Because Qt goes against the grain of CMake and set
960 ;; NO_DEFAULT_PATH, it needs to invent yet another variable
961 ;; to do what CMAKE_PREFIX_PATH could have done:
962 ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH. Since we patch out
963 ;; the NO_DEFAULT_PATH, we can set the default value of
964 ;; QT_ADDITIONAL_PACKAGES_PREFIX_PATH to that of
965 ;; CMAKE_PREFIX_PATH to ensure tools such as
966 ;; 'qmlimportscanner' from qtdeclarative work out of the
967 ;; box.
968 (substitute* "cmake/QtConfig.cmake.in"
969 (("set\\(QT_ADDITIONAL_HOST_PACKAGES_PREFIX_PATH" below)
970 (string-append "
971if(QT_ADDITIONAL_PACKAGES_PREFIX_PATH STREQUAL \"\")
972 cmake_path(CONVERT $ENV{CMAKE_PREFIX_PATH} TO_CMAKE_PATH_LIST
973 QT_ADDITIONAL_PACKAGES_PREFIX_PATH)
974endif()\n" below)))))
975 (delete 'patch-bin-sh)
976 (delete 'patch-xdg-open)
977 ;; Some tests fail to build on i686-linux
978 #$@(if (target-x86-32?)
979 #~((add-after 'unpack 'skip-some-tests
980 ;; This might be a FLOAT16 problem.
981 (lambda _
982 (substitute* "tests/auto/corelib/global/CMakeLists.txt"
983 ((".*qcomparehelpers.*") "")))))
984 #~())
985 (add-after 'patch-paths 'patch-more-paths
986 (lambda* (#:key inputs #:allow-other-keys)
987 (substitute* (find-files "bin" "\\.in$")
988 (("/bin/pwd")
989 (search-input-file inputs "bin/pwd"))
990 ;; Do not keep a reference to cmake-minimal; it is looked
991 ;; from PATH anyway.
992 (("original_cmake_path=\"@CMAKE_COMMAND@\"")
993 "original_cmake_path=\"\""))
994 (substitute* "src/gui/platform/unix/qdesktopunixservices.cpp"
995 (("\"xdg-open\"")
996 (format #f "~s" (search-input-file inputs "bin/xdg-open"))))
997 (substitute* '("mkspecs/features/qt_functions.prf"
998 "qmake/library/qmakebuiltins.cpp")
999 (("/bin/sh")
1000 (search-input-file inputs "bin/bash")))
1001
1002 (substitute* "tests/auto/tools/qt_cmake_create/\
1003tst_qt_cmake_create.cpp"
1004 (("/bin/sh")
1005 (which "sh")))
1006
1007 (substitute* "src/corelib/CMakeLists.txt"
1008 (("/bin/ls")
1009 (search-input-file inputs "bin/ls")))
1010
1011 ;; Patch the added reference for libvulkan.so
1012 (substitute* "src/gui/vulkan/qbasicvulkanplatforminstance.cpp"
1013 (("libvulkan\\.so\\.1")
1014 (search-input-file inputs "lib/libvulkan.so.1")))
1015
1016 ;; Use shared-mime-info as the default MIME type database.
1017 (substitute* "src/corelib/mimetypes/qmimedatabase.cpp"
1018 (("return dirs;" all)
1019 (string-append
1020 "dirs.append(\""
1021 #$(this-package-input "shared-mime-info") "/share/mime"
1022 "\");\n" all)))))
1023 (delete 'do-not-capture-python) ;move after patch-source-shebangs
1024 (add-after 'patch-source-shebangs 'do-not-capture-python
1025 (lambda _
1026 (substitute* '("libexec/qt-android-runner.py"
1027 "mkspecs/features/uikit/devices.py"
1028 "util/testrunner/qt-testrunner.py"
1029 "util/testrunner/sanitizer-testrunner.py")
1030 (((which "python3"))
1031 "/usr/bin/env python3"))))
1032 (replace 'configure
1033 (assoc-ref %standard-phases 'configure))
1034 (delete 'check) ;move after patch-prl-files
1035 (add-after 'patch-prl-files 'check
1036 (lambda* (#:key tests? parallel-tests?
1037 native-inputs inputs #:allow-other-keys)
1038 (when tests?
1039 ;; The tests expect to find the modules provided by this
1040 ;; package; extend the environment variables needed to do so.
1041 (setenv "CMAKE_PREFIX_PATH"
1042 (string-append #$output
1043 ":" (getenv "CMAKE_PREFIX_PATH")))
1044 (setenv "QMAKEPATH" (string-append #$output "/lib/qt6"))
1045 ;; It is necessary to augment LIBRARY_PATH with that of the
1046 ;; freshly installed qtbase because of the
1047 ;; 'qtbase-qmake-use-libname.patch' patch.
1048 (setenv "LIBRARY_PATH" (string-append #$output "/lib:"
1049 (getenv "LIBRARY_PATH")))
1050 (setenv "QML_IMPORT_PATH"
1051 (string-append #$output "/lib/qt6/qml"))
1052 (setenv "QT_PLUGIN_PATH"
1053 (string-append #$output "/lib/qt6/plugins"))
1054 (setenv "QT_QPA_PLATFORM" "offscreen")
1055 ;; Skip tests known to fail on GNU/Linux, in a CI context or
1056 ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
1057 ;; /tree/src/testlib/qtestblacklist.cpp).
1058 (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
1059 (setenv "HOME" "/tmp") ;some tests require a writable HOME
1060
1061 ;; Note: the search path specified for TZDIR is only
1062 ;; effective for users of the package, not while it's being
1063 ;; built.
1064 (setenv "TZDIR" (search-input-directory
1065 (or native-inputs inputs) "share/zoneinfo"))
1066
1067 ;; This is to avoid QTimeZone::systemTimeZone() returning
1068 ;; invalid QDate objects due to missing /etc/timezone or
1069 ;; /etc/localtime.
1070 (setenv "TZ" "Etc/UTC")
1071
1072 (invoke
1073 "xvfb-run" "ctest" "--output-on-failure"
1074 "-j" (if parallel-tests?
1075 (number->string (parallel-job-count))
1076 "1")
1077 "-E" ;disable problematic tests
1078 (string-append
1079 "("
1080 (string-join
1081 (append
1082 (list
1083 ;; The 'tst_qdialogbuttonbox' may fail non-deterministically
1084 ;; (see: https://bugreports.qt.io/browse/QTBUG-123939).
1085 "tst_qdialogbuttonbox"
1086
1087 ;; This test may fail non-deterministically (timeout)
1088 ;; after running for more than 300s (see:
1089 ;; https://bugreports.qt.io/browse/QTBUG-135603).
1090 "tst_qguitimer"
1091
1092 ;; TODO: Enable this when update qtbase.
1093 ;; tst_QDate::startOfDay_endOfDay fails for BajaMexico
1094 ;; due to IANA timezone update (see:
1095 ;; https://bugreports.qt.io/browse/QTQAINFRA-6757).
1096 "tst_qdate"
1097
1098 ;; The 'test_standalone_test' fails with a
1099 ;; "get_property could not find TARGET Qt6::Core" error
1100 ;; (see: https://bugreports.qt.io/browse/QTBUG-123940).
1101 "test_standalone_test"
1102
1103 ;; The 'test_collecting_plugins' fails with a "Unknown
1104 ;; platform linux-g++" error (see:
1105 ;; https://bugreports.qt.io/browse/QTBUG-123941).
1106 "test_collecting_plugins"
1107
1108 ;; The 'tst_selftests' fails with the following error:
1109 ;; with expansion:
1110 ;; false
1111 ;; with messages:
1112 ;; test := "keyboard"
1113 ;; arguments := QList("-o", "-,tap")
1114 ;; Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
1115 ;; Qt depends on a UTF-8 locale, but has failed to switch to one.
1116 ;; If this causes problems, reconfigure your locale. See the locale(1) manual
1117 ;; for more information.
1118
1119 ;; See https://bugreports.qt.io/browse/QTBUG-113371
1120 ;; Adding glibc-utf8-locales to native-inpus is no help.
1121 "tst_selftests"
1122
1123 ;; The qsqldatabase test is flaky (see:
1124 ;; <https://qt-project.atlassian.net/browse/QTBUG-145385>).
1125 "tst_qsqldatabase"
1126
1127 ;; The 'tst_qtimer' test has a propensity to hang and
1128 ;; fail (see:
1129 ;; <https://qt-project.atlassian.net/browse/QTBUG-145261>).
1130 "tst_qtimer"
1131 "tst_qtimer_no_glib"
1132
1133 ;; The 'tst_qthread' test is also flaky, despite the
1134 ;; patch applied that promised to fix it.
1135 "tst_qthread"
1136
1137 ;; The 'tst_qsystemsemaphore' test sometimes fails.
1138 "tst_qsystemsemaphore"
1139 ;; The 'tst_moc' test fails with "'fi.exists()' returned FALSE".
1140 "tst_moc"
1141
1142 ;; The qgraphicsview and qopenglwidget tests fail with a
1143 ;; segfault for unknown reasons (see:
1144 ;; https://bugreports.qt.io/browse/QTBUG-116018).
1145 "tst_qgraphicsview"
1146 "tst_qopenglwidget"
1147
1148 ;; The 'test_rcc' test fails on a comparison:
1149 ;; <<<<<< actual
1150 ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xe8,
1151 ;; ======
1152 ;; 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
1153 ;; >>>>>> expected
1154 "tst_rcc"
1155 ;; The 'tst_qtemporarydir' and 'tst_qtemporaryfile'
1156 ;; tests depend on '/home' not being writable.
1157 "tst_qtemporarydir"
1158 "tst_qtemporaryfile"
1159 ;; The 'tst_qdir' compares two directories which are
1160 ;; unexpectedly different when inside the build
1161 ;; container.
1162 "tst_qdir"
1163 ;; This checks the last modified time of '/', and fails
1164 ;; because Epoch 0 is considered to be invalid.
1165 "tst_qresourceengine"
1166 ;; The 'tst_qfilesystemwatcher' installs a watcher on
1167 ;; '/home', which doesn't exist in the build container.
1168 "tst_qfilesystemwatcher"
1169 ;; Not all of the tested formats are supported by our
1170 ;; build of openssl; 871 passed, 122 failed.
1171 "tst_qsslkey"
1172 ;; The 'mockplugins' test fail following error: "Unknown
1173 ;; platform linux-g++", and the other plugin tests
1174 ;; depend on it.
1175 "mockplugins"
1176 "test_plugin_flavor.*"
1177 ;; The 'test_import_plugins' fails with "Could NOT find
1178 ;; Qt6MockPlugins1".
1179 "test_import_plugins"
1180 ;; The tst_QObjectRace::destroyRace is flaky (see:
1181 ;; https://bugreports.qt.io/browse/QTBUG-103489).
1182 "tst_qobjectrace"
1183 ;; The 'tst_QSettings::fromFile' assumes the data
1184 ;; location to be relative to the root directory and
1185 ;; fails.
1186 "tst_qsettings"
1187 ;; The 'tst_qaddpreroutine',
1188 ;; 'test_generating_cpp_exports' and
1189 ;; 'test_static_resources' tests fail with: "Unknown
1190 ;; platform linux-g++.
1191 "tst_qaddpreroutine"
1192 "test_generating_cpp_exports"
1193 "test_static_resources"
1194 ;; The 'tst_qfile' fails since there is no /home in the
1195 ;; build container.
1196 "tst_qfile"
1197 ;; The 'tst_QGlyphRun::mixedScripts' test fails with:
1198 ;; Actual (glyphRuns.size()): 1
1199 ;; Expected (2) : 2
1200 "tst_qglyphrun"
1201 ;; The 'tst_qx11info' test fails with "Internal error:
1202 ;; QPA plugin doesn't implement generatePeekerId",
1203 ;; likely requires a real display.
1204 "tst_qx11info"
1205
1206 ;; The 'tst_qgraphicswidget' test fails because "This
1207 ;; plugin does not support propagateSizeHints".
1208 "tst_qgraphicswidget"
1209 ;; The 'tst_qdnslookup' test requires networking.
1210 "tst_qdnslookup"
1211 ;; The 'tst_qcompleter' and 'tst_QFiledialog::completer'
1212 ;; attempt to complete paths they assume exist, such as
1213 ;; "/home", "/etc" or "/root" and fail.
1214 "tst_qcompleter"
1215 "tst_qfiledialog"
1216 ;; The following tests fail with: "Generation of UI
1217 ;; files were triggered in the second build", but could
1218 ;; pass in `guix shell --container`.
1219 "test_qt_add_ui_1"
1220 "test_qt_add_ui_2"
1221 "test_qt_add_ui_6"
1222 "test_qt_add_ui_8"
1223 "test_qt_add_ui_9"
1224 ;; This test is susceptible to the 600 ms timeout used:
1225 "tst_qpauseanimation"
1226
1227 ;; This test may fail non-deterministically as reported
1228 ;; in Guix bug#73233 and upstream at
1229 ;; https://bugreports.qt.io/browse/QTBUG-119321.
1230 "tst_qsharedmemory"
1231
1232 ;; One of the finicky tests, see
1233 ;; https://codeberg.org/guix/guix/issues/7545
1234 "tst_qlatin1stringmatcher"
1235
1236 ;; This test fails deterministically on a non-privileged
1237 ;; daemon.
1238 "tst_qstandardpaths")
1239 #$@(cond
1240 ((target-ppc64le?)
1241 #~((list
1242 ;; The 'tst_QPainter::fpe_radialGradients'
1243 ;; test fails with a 'Floating point
1244 ;; exception' error on powerpc64le (see:
1245 ;; https://bugreports.qt.io/browse/QTBUG-117113).
1246 "tst_qpainter"
1247
1248 ;; The 'startStopStartStopBuffers' test fails
1249 ;; on the powerpc64le architecture (see:
1250 ;; https://bugreports.qt.io/browse/QTBUG-80953).
1251 "tst_qprocess"
1252
1253 ;; The 'tst_QSqlThread::readWriteThreading'
1254 ;; test may fail with an sqlite related error,
1255 ;; "'Unable to fetch row' || 'database is
1256 ;; locked'" (see:
1257 ;; https://bugreports.qt.io/browse/QTBUG-117114).
1258 "tst_qsqlthread"
1259
1260 ;; The 'tst_qxmlstream' can time out (see:
1261 ;; https://bugreports.qt.io/projects/QTBUG/issues/QTBUG-123778).
1262 "tst_qxmlstream")))
1263 ((target-x86-32?)
1264 #~((list
1265 ;; QCOMPARE(qRound(actual), expected) returned TRUE
1266 ;; unexpectedly.
1267 "tst_qglobal"
1268
1269 ;; Actual (llMinDbl == llMin) : 0
1270 ;; Expected (-9223372036854775807.0 ==
1271 ;; Q_INT64_C(-9223372036854775807)) : 1
1272 "tst_json"
1273
1274 ;; 'QVector3D::normal(QVector3D(), v1, v2) ==
1275 ;; v3.normalized()' returned FALSE. ()
1276 "tst_qvectornd"
1277
1278 ;; Actual (dv.validate(value, dummy)): Invalid
1279 ;; Expected (standard_state) : Intermediate
1280 "tst_qdoublevalidator")))
1281 (else #~()))) "|") ")")))))
1282 (replace 'patch-mkspecs
1283 (lambda* (#:key outputs #:allow-other-keys)
1284 (let* ((archdata (search-input-directory outputs "lib/qt6"))
1285 (mkspecs (search-input-directory outputs
1286 "lib/qt6/mkspecs"))
1287 (qt_config.prf
1288 (search-input-file
1289 outputs "lib/qt6/mkspecs/features/qt_config.prf"))
1290 (qt_functions.prf
1291 (search-input-file
1292 outputs "lib/qt6/mkspecs/features/qt_functions.prf")))
1293 ;; For each Qt module, let `qmake' uses search paths in the
1294 ;; module directory instead of all in QT_INSTALL_PREFIX.
1295 (substitute* qt_config.prf
1296 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
1297 "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt6))")
1298 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
1299 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
1300 (("\\$\\$\\[QT_HOST_LIBS\\]")
1301 "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")
1302 (("\\$\\$\\[QT_INSTALL_BINS\\]")
1303 "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))"))
1304
1305 ;; Searches Qt tools in the current PATH instead of QT_HOST_BINS.
1306 (substitute* qt_functions.prf
1307 (("cmd = \\$\\$\\[QT_HOST_BINS\\]/\\$\\$2")
1308 "cmd = $$system(which $${2}.pl 2>/dev/null || which $${2})"))
1309
1310 ;; Resolve qmake spec files within qtbase by absolute paths.
1311 (substitute*
1312 (map (lambda (file)
1313 (search-input-file
1314 outputs
1315 (string-append "lib/qt6/mkspecs/features/" file)))
1316 '("device_config.prf" "moc.prf" "qt_config.prf"))
1317 (("\\$\\$\\[QT_HOST_DATA/get\\]") archdata)
1318 (("\\$\\$\\[QT_HOST_DATA/src\\]") archdata)))))
1319 (add-before 'install 'dont-install-tests
1320 (lambda _
1321 (substitute* "cmake_install.cmake"
1322 (("include.*tests/cmake_install") "#"))))))))
1323 (native-inputs
1324 (modify-inputs native-inputs
1325 (prepend ninja ;CMake Generator, also used for tests
1326 tzdata-for-tests
1327 wayland-protocols
1328 xvfb-run-for-tests)))
1329 (propagated-inputs
1330 (modify-inputs propagated-inputs
1331 ;; Required by Qt6GuiDependencies.cmake.
1332 (prepend libxkbcommon vulkan-headers)))
1333 (inputs
1334 (modify-inputs inputs
1335 (delete "libxkbcommon")
1336 (prepend at-spi2-core
1337 bash-minimal
1338 coreutils-minimal
1339 `(,mariadb "lib")
1340 md4c
1341 libb2
1342 libice
1343 libsm
1344 libxcb
1345 libxext
1346 shared-mime-info
1347 vulkan-loader
1348 xcb-util-cursor
1349 `(,zstd "lib"))))
1350 (native-search-paths
1351 (list (search-path-specification
1352 (variable "QMAKEPATH")
1353 (files '("lib/qt6")))
1354 (search-path-specification
1355 (variable "QML_IMPORT_PATH")
1356 (files '("lib/qt6/qml")))
1357 (search-path-specification
1358 (variable "QT_PLUGIN_PATH")
1359 (files '("lib/qt6/plugins")))
1360 $TZDIR
1361 (search-path-specification
1362 (variable "XDG_DATA_DIRS")
1363 (files '("share")))
1364 (search-path-specification
1365 (variable "XDG_CONFIG_DIRS")
1366 (files '("etc/xdg")))))))
1367
1368(define-public qt3d-5
1369 (package
1370 (inherit qtbase-5)
1371 (name "qt3d")
1372 (version "5.15.17")
1373 (source (origin
1374 (method url-fetch)
1375 (uri (qt-url name version))
1376 (sha256
1377 (base32
1378 "13kha7x0zlgkm19lvvs1jmp1s75j70p9cy7iayfrgrygnlh1ckj3"))))
1379 (propagated-inputs `())
1380 (native-inputs (list perl))
1381 (inputs (list mesa qtbase-5 vulkan-headers zlib))
1382 (arguments
1383 (list #:phases #~(modify-phases %standard-phases
1384 (add-before 'configure 'configure-qmake
1385 (lambda* (#:key inputs outputs #:allow-other-keys)
1386 (let* ((tmpdir (string-append (getenv "TMPDIR")))
1387 (qmake (string-append tmpdir "/qmake"))
1388 (qt.conf (string-append tmpdir "/qt.conf")))
1389 (symlink (which "qmake") qmake)
1390 (setenv "PATH"
1391 (string-append tmpdir ":"
1392 (getenv "PATH")))
1393 (with-output-to-file qt.conf
1394 (lambda ()
1395 (format #t "[Paths]
1396Prefix=~a
1397ArchData=lib/qt5
1398Data=share/qt5
1399Documentation=share/doc/qt5
1400Headers=include/qt5
1401Libraries=lib
1402LibraryExecutables=lib/qt5/libexec
1403Binaries=bin
1404Tests=tests
1405Plugins=lib/qt5/plugins
1406Imports=lib/qt5/imports
1407Qml2Imports=lib/qt5/qml
1408Translations=share/qt5/translations
1409Settings=etc/xdg
1410Examples=share/doc/qt5/examples
1411HostPrefix=~a
1412HostData=lib/qt5
1413HostBinaries=bin
1414HostLibraries=lib
1415
1416[EffectiveSourcePaths]
1417HostPrefix=~a
1418HostData=lib/qt5"
1419 #$output #$output #$(this-package-input
1420 "qtbase")))))))
1421 (replace 'configure
1422 (lambda* (#:key inputs outputs #:allow-other-keys)
1423 (invoke "qmake"
1424 "QT_BUILD_PARTS = libs tools tests")))
1425 (add-before 'check 'set-display
1426 (lambda _
1427 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
1428 (synopsis "Qt module for 3D")
1429 (description "The Qt3d module provides classes for displaying 3D.")))
1430
1431(define-public qt3d
1432 (package
1433 (name "qt3d")
1434 (version "6.9.2")
1435 (source (origin
1436 (method url-fetch)
1437 (uri (qt-url name version))
1438 (sha256
1439 (base32
1440 "0ndn5fbsfj2vbcq3siq1gnk2rgblicd6ri2jrh9g41anicxh4vma"))))
1441 (propagated-inputs (list))
1442 (native-inputs (list perl))
1443 (inputs (list libxkbcommon
1444 mesa
1445 qtbase
1446 qtdeclarative
1447 vulkan-headers
1448 zlib))
1449 (build-system cmake-build-system)
1450 (arguments
1451 (list
1452 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1453 #:phases
1454 #~(modify-phases %standard-phases
1455 (add-before 'check 'set-display
1456 (lambda _
1457 ;; Make Qt render "offscreen", required for tests.
1458 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
1459 (synopsis "Qt module for 3D")
1460 (description "The Qt3d module provides classes for displaying 3D.")
1461 (home-page (package-home-page qtbase))
1462 (license (package-license qtbase))))
1463
1464(define-public qt5compat
1465 (package
1466 (name "qt5compat")
1467 (version "6.9.2")
1468 (source (origin
1469 (method url-fetch)
1470 (uri (qt-url name version))
1471 (sha256
1472 (base32
1473 "0q2vly836wgs462czw7lg0ysf2h48iwbdy43wwf2gz49qq2rja6b"))))
1474 (build-system cmake-build-system)
1475 (arguments
1476 (list
1477 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1478 #:phases #~(modify-phases %standard-phases
1479 (add-after 'install 'delete-installed-tests
1480 (lambda _
1481 (delete-file-recursively
1482 (string-append #$output "/tests")))))))
1483 (native-inputs (list perl))
1484 (inputs (list icu4c libxkbcommon qtbase qtdeclarative qtshadertools))
1485 (home-page (package-home-page qtbase))
1486 (synopsis "Legacy Qt 5 APIs ported to Qt 6")
1487 (description "The @code{qt5compat} package includes application
1488programming interfaces (APIs) from Qt 5 that were ported to Qt 6, to ease
1489migration. It provides for example the @code{GraphicalEffects} module that
1490came with the @code{qtgraphicaleffects} Qt 5 package.")
1491 (license (list license:gpl2+ license:lgpl3+)))) ;dual licensed
1492
1493(define-public qtsvg-5
1494 (package
1495 (inherit qtbase-5)
1496 (name "qtsvg")
1497 (version "5.15.17")
1498 (source (origin
1499 (method url-fetch)
1500 (uri (qt-url name version))
1501 (sha256
1502 (base32
1503 "0v0yldb5kwsq309p2rqiy4mcn7r1azm1i6zvrp93kry0f36x82km"))))
1504 (propagated-inputs `())
1505 (native-inputs (list perl))
1506 (inputs
1507 (list mesa qtbase-5 zlib))
1508 (arguments
1509 `(#:phases
1510 (modify-phases %standard-phases
1511 (add-before 'configure 'configure-qmake
1512 (lambda* (#:key inputs outputs #:allow-other-keys)
1513 (let* ((out (assoc-ref outputs "out"))
1514 (qtbase (assoc-ref inputs "qtbase"))
1515 (tmpdir (string-append (getenv "TMPDIR")))
1516 (qmake (string-append tmpdir "/qmake"))
1517 (qt.conf (string-append tmpdir "/qt.conf")))
1518 ;; Use qmake with a customized qt.conf to override install
1519 ;; paths to $out.
1520 (symlink (which "qmake") qmake)
1521 (setenv "PATH" (string-append tmpdir ":" (getenv "PATH")))
1522 (with-output-to-file qt.conf
1523 (lambda ()
1524 (format #t "[Paths]
1525Prefix=~a
1526ArchData=lib/qt5
1527Data=share/qt5
1528Documentation=share/doc/qt5
1529Headers=include/qt5
1530Libraries=lib
1531LibraryExecutables=lib/qt5/libexec
1532Binaries=bin
1533Tests=tests
1534Plugins=lib/qt5/plugins
1535Imports=lib/qt5/imports
1536Qml2Imports=lib/qt5/qml
1537Translations=share/qt5/translations
1538Settings=etc/xdg
1539Examples=share/doc/qt5/examples
1540HostPrefix=~a
1541HostData=lib/qt5
1542HostBinaries=bin
1543HostLibraries=lib
1544
1545[EffectiveSourcePaths]
1546HostPrefix=~a
1547HostData=lib/qt5
1548" out out qtbase))))))
1549 (replace 'configure
1550 (lambda* (#:key inputs outputs #:allow-other-keys)
1551 ;; Valid QT_BUILD_PARTS variables are:
1552 ;; libs tools tests examples demos docs translations
1553 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests")))
1554 (add-before 'check 'set-display
1555 (lambda _
1556 ;; make Qt render "offscreen", required for tests
1557 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
1558 (synopsis "Qt module for displaying SVGs")
1559 (description "The QtSvg module provides classes for displaying the
1560 contents of SVG files.")))
1561
1562(define-public qtsvg
1563 (package
1564 (name "qtsvg")
1565 (version "6.9.2")
1566 (source (origin
1567 (method url-fetch)
1568 (uri (qt-url name version))
1569 (sha256
1570 (base32
1571 "1985asvnkd2ar30nh2zyi490qz0vkz6z1f752lfald33yawcm16r"))))
1572 (build-system cmake-build-system)
1573 (arguments
1574 (list
1575 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
1576 #:phases
1577 #~(modify-phases %standard-phases
1578 (add-before 'check 'set-display
1579 (lambda _
1580 ;; Make Qt render "offscreen", required for tests.
1581 (setenv "QT_QPA_PLATFORM" "offscreen")))
1582 (add-after 'install 'delete-installed-tests
1583 (lambda _
1584 (delete-file-recursively (string-append #$output "/tests")))))))
1585 (native-inputs (list perl))
1586 (inputs (list libxkbcommon mesa qtbase zlib))
1587 (synopsis "Qt module for displaying SVGs")
1588 (description "The QtSvg module provides classes for displaying the
1589 contents of SVG files.")
1590 (home-page (package-home-page qtbase))
1591 (license (package-license qtbase))))
1592
1593(define-public qtimageformats-5
1594 (package
1595 (inherit qtsvg-5)
1596 (name "qtimageformats")
1597 (version "5.15.17")
1598 (source (origin
1599 (method url-fetch)
1600 (uri (qt-url name version))
1601 (sha256
1602 (base32
1603 "1lff6s212bl44ryfzq8hkp80vl37la7hmpvgz5fp553qi14y4623"))
1604 (modules '((guix build utils)))
1605 (snippet
1606 '(begin
1607 (delete-file-recursively "src/3rdparty")))))
1608 (native-inputs `())
1609 (inputs
1610 (list jasper
1611 libmng
1612 libtiff
1613 libwebp
1614 mesa
1615 qtbase-5
1616 zlib))
1617 (synopsis "Additional Image Format plugins for Qt")
1618 (description "The QtImageFormats module contains plugins for adding
1619support for MNG, TGA, TIFF and WBMP image formats.")))
1620
1621(define-public qtimageformats
1622 (package
1623 (name "qtimageformats")
1624 (version "6.9.2")
1625 (source (origin
1626 (inherit (package-source qtimageformats-5))
1627 (method url-fetch)
1628 (uri (qt-url name version))
1629 (sha256
1630 (base32
1631 "0fciahs4i0nn5z0j624gkfncqg6byxswj45bw81drpjp5xz3y0la"))))
1632 (build-system cmake-build-system)
1633 (arguments
1634 (list
1635 #:phases
1636 #~(modify-phases %standard-phases
1637 (add-before 'check 'set-display
1638 (lambda _
1639 ;; Make Qt render "offscreen", required for tests.
1640 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
1641 (inputs
1642 (list jasper
1643 libmng
1644 libtiff
1645 libwebp
1646 mesa
1647 qtbase
1648 zlib))
1649 (synopsis "Additional Image Format plugins for Qt")
1650 (description "The QtImageFormats module contains plugins for adding
1651support for MNG, TGA, TIFF and WBMP image formats.")
1652 (home-page (package-home-page qtbase))
1653 (license (package-license qtbase))))
1654
1655(define-public qtx11extras
1656 (package (inherit qtsvg-5)
1657 (name "qtx11extras")
1658 (version "5.15.17")
1659 (source (origin
1660 (method url-fetch)
1661 (uri (qt-url name version))
1662 (sha256
1663 (base32
1664 "145hbdaj4r3lljgiasx404c12dl5sk4nghc1pc7w5xy1m8gppcgf"))))
1665 (arguments
1666 (substitute-keyword-arguments arguments
1667 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
1668 (native-inputs (list perl))
1669 (inputs
1670 (list mesa qtbase-5))
1671 (synopsis "Qt Extras for X11")
1672 (description "The QtX11Extras module includes the library to access X11
1673from within Qt 5.")))
1674
1675(define-public qxlsx
1676 (package
1677 (name "qxlsx")
1678 (version "1.4.6")
1679 (source
1680 (origin
1681 (method git-fetch)
1682 (uri (git-reference
1683 (url "https://github.com/QtExcel/QXlsx")
1684 (commit (string-append "v" version))))
1685 (file-name (git-file-name name version))
1686 (sha256
1687 (base32 "0xbpajvwkv09h2fang200nsanv5gl1alsdd725gh9cgq4szng6gj"))
1688 (patches (search-patches "qxlsx-fix-include-directory.patch"))))
1689 (build-system cmake-build-system)
1690 (arguments
1691 (list
1692 #:configure-flags
1693 #~(list "../source/QXlsx"
1694 "-DCMAKE_BUILD_TYPE=Release"
1695 (string-append "-DCMAKE_INSTALL_PREFIX=" #$output))
1696 #:phases
1697 #~(modify-phases %standard-phases
1698 (replace 'check
1699 (lambda* (#:key tests? #:allow-other-keys)
1700 (when tests?
1701 (with-directory-excursion "../source/TestExcel"
1702 (invoke "qmake")
1703 (invoke "make" "-j" (number->string (parallel-job-count)))
1704 (invoke "./TestExcel"))))))))
1705 (inputs
1706 (list libxkbcommon qtbase vulkan-headers))
1707 (home-page "https://qtexcel.github.io/QXlsx/")
1708 (synopsis "C++ library to read/write Excel XLSX files using Qt")
1709 (description
1710 "QXlsx is a successor of QtXlsx and providies a functionality to work with Excel
1711XLSX document format.")
1712 (license license:expat)))
1713
1714(define-public qtxmlpatterns-5
1715 (package (inherit qtsvg-5)
1716 (name "qtxmlpatterns")
1717 (version "5.15.17")
1718 (source (origin
1719 (method url-fetch)
1720 (uri (qt-url name version))
1721 (sha256
1722 (base32
1723 "19pq6bmr7zs2n7m8hqsyxyml7kggdkvz0sdhxsg5gvk9fa264b4i"))))
1724 (arguments
1725 (substitute-keyword-arguments arguments
1726 ((#:phases phases)
1727 `(modify-phases ,phases
1728 (add-after 'unpack 'disable-network-tests
1729 (lambda _ (substitute* "tests/auto/auto.pro"
1730 (("qxmlquery") "# qxmlquery")
1731 (("xmlpatterns ") "# xmlpatterns"))))
1732 (add-after 'unpack 'skip-qquickxmllistmodel-test
1733 (lambda _ (substitute* "tests/auto/auto.pro"
1734 ((".*qquickxmllistmodel.*") ""))))))))
1735 (native-inputs (list perl qtdeclarative-5))
1736 (inputs (list qtbase-5))
1737 (synopsis "Qt XML patterns module")
1738 (description "The QtXmlPatterns module is a XQuery and XPath engine for
1739XML and custom data models. It contains programs such as xmlpatterns and
1740xmlpatternsvalidator.")))
1741
1742(define-public qtdeclarative-5
1743 (package
1744 (inherit qtsvg-5)
1745 (name "qtdeclarative")
1746 (version "5.15.17")
1747 (source (origin
1748 (method url-fetch)
1749 (uri (qt-url name version))
1750 (sha256
1751 (base32
1752 "1nnmch6a3k8ja9q8vzhl6kcl52xyy90rpbnaaqqvirwdgrfjvkg1"))
1753 (patches (search-patches "qtdeclarative-5-disable-qmlcache.patch"))))
1754 (arguments
1755 (substitute-keyword-arguments arguments
1756 ((#:tests? _ #f) #f) ;TODO: Enable the tests
1757 ((#:phases phases)
1758 #~(modify-phases #$phases
1759 (add-after 'build 'fix-qt5core-install-prefix
1760 (lambda _
1761 ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen
1762 ;; is provided by qtdeclarative-5.
1763 (substitute*
1764 "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake"
1765 (("\\$\\{_qt5Core_install_prefix\\}") #$output))))
1766 (add-after 'unpack 'fix-linking-riscv64
1767 (lambda _
1768 (substitute* "src/qml/qml.pro"
1769 (("DEFINES \\+= QT_NO_FOREACH")
1770 (string-append
1771 "isEqual(QT_ARCH, \"riscv64\"): QMAKE_LIBS += -latomic\n\n"
1772 "DEFINES += QT_NO_FOREACH")))))))))
1773 (native-inputs
1774 (list perl
1775 pkg-config
1776 python
1777 python-wrapper
1778 qtsvg-5
1779 vulkan-headers))
1780 (inputs
1781 (list mesa qtbase-5))
1782 (synopsis "Qt QML module (Quick 2)")
1783 (description "The Qt QML module provides a framework for developing
1784applications and libraries with the QML language. It defines and implements the
1785language and engine infrastructure, and provides an API to enable application
1786developers to extend the QML language with custom types and integrate QML code
1787with JavaScript and C++.")))
1788
1789(define-public qtdeclarative
1790 (package
1791 (name "qtdeclarative")
1792 (version "6.9.2")
1793 ;; TODO: Package 'masm' and unbundle from sources.
1794 (source (origin
1795 (method url-fetch)
1796 (uri (qt-url name version))
1797 (sha256
1798 (base32
1799 "0r16qima008y2999r1djvwry01l295nmwwhqg081d2fr1cn2szs7"))
1800 (patches (search-patches "qtdeclarative-disable-qmlcache.patch"))))
1801 (outputs '("out" "debug"))
1802 (build-system cmake-build-system)
1803 (arguments
1804 (list
1805 ;; The build takes 12 minutes on a Ryzen 3900X when building with Ninja,
1806 ;; compared to 24 minutes with Make.
1807 #:configure-flags #~(list "-GNinja"
1808 "-DQT_BUILD_TESTS=ON")
1809 #:phases
1810 #~(modify-phases %standard-phases
1811 (add-after 'unpack 'honor-cmake-install-rpath
1812 ;; The build system goes out of its way to compute a runpath it
1813 ;; thinks makes more sense, and fails. Revert to the default
1814 ;; behavior, which is to honor CMAKE_INSTALL_RPATH.
1815 (lambda _
1816 (substitute* "src/qml/Qt6QmlMacros.cmake"
1817 (("set_target_properties.*PROPERTIES.*INSTALL_RPATH.*" all)
1818 (string-append "# " all)))))
1819 (add-after 'unpack 'patch-qlibraryinfo-paths
1820 (lambda _
1821 ;; The QLibraryInfo paths are hard-coded to point to the qtbase
1822 ;; installation, but all the tools used in the test suite come
1823 ;; from this package.
1824 (substitute* (find-files "tests" "\\.cpp$")
1825 (("QLibraryInfo::path\\(QLibraryInfo::BinariesPath)")
1826 (string-append "QStringLiteral(\"" #$output "/bin\")"))
1827 (("QLibraryInfo::path\\(QLibraryInfo::LibraryExecutablesPath)")
1828 (string-append "QStringLiteral(\"" #$output
1829 "/lib/qt6/libexec\")"))
1830 (("QLibraryInfo::path\\(QLibraryInfo::QmlImportsPath)")
1831 (string-append "QStringLiteral(\"" #$output
1832 "/lib/qt6/qml\")")))))
1833 (replace 'build
1834 (lambda* (#:key parallel-build? #:allow-other-keys)
1835 (apply invoke "cmake" "--build" "."
1836 (if parallel-build?
1837 `("--parallel" ,(number->string (parallel-job-count)))
1838 '()))))
1839 (delete 'check) ;move after the install phase
1840 (replace 'install
1841 (lambda _
1842 (invoke "cmake" "--install" ".")))
1843 (add-after 'install 'check
1844 (lambda* (#:key tests? parallel-tests?
1845 native-inputs inputs #:allow-other-keys)
1846 (when tests?
1847 (setenv "TZDIR" (search-input-directory
1848 (or native-inputs inputs) "share/zoneinfo"))
1849 (setenv "TZ" "Etc/UTC")
1850 (setenv "CMAKE_PREFIX_PATH"
1851 (string-append #$output
1852 ":" (getenv "CMAKE_PREFIX_PATH")))
1853 (setenv "CPLUS_INCLUDE_PATH"
1854 (string-append #$output "/include/qt6/:"
1855 (getenv "CPLUS_INCLUDE_PATH")))
1856 ;; The tests expect to find the modules provided by this
1857 ;; package; extend the environment variables needed to do so.
1858 (setenv "QML_IMPORT_PATH"
1859 (string-append #$output "/lib/qt6/qml"))
1860 (setenv "QT_PLUGIN_PATH"
1861 (string-append #$output "/lib/qt6/plugins:"
1862 (getenv "QT_PLUGIN_PATH")))
1863 (setenv "QT_QPA_PLATFORM" "offscreen")
1864 ;; Skip tests known to fail on GNU/Linux, in a CI context or
1865 ;; due to bitness (see: https://code.qt.io/cgit/qt/qtbase.git
1866 ;; /tree/src/testlib/qtestblacklist.cpp).
1867 (setenv "QTEST_ENVIRONMENT" "linux ci 32bit")
1868 (setenv "HOME" "/tmp") ;a few tests require a writable HOME
1869 (invoke
1870 "ctest" "--output-on-failure"
1871 "-j" (if parallel-tests?
1872 (number->string (parallel-job-count))
1873 "1")
1874 "-E" ;exclude some tests by regex
1875 (string-append
1876 "("
1877 (string-join
1878 (list
1879 ;; The 'tst_qmltyperegistrar' test may fail
1880 ;; non-deterministically (see:
1881 ;; https://bugreports.qt.io/browse/QTBUG-123634).
1882 "tst_qmltyperegistrar"
1883 ;; The 'tst_qqmlqt' test may fail non-deterministically
1884 ;; (see: <https://qt-project.atlassian.net/browse/QTBUG-148723>).
1885 "tst_qqmlqt"
1886 ;; This test is marked as flaky upstream (see:
1887 ;; https://bugreports.qt.io/browse/QTBUG-101488).
1888 "tst_qquickfiledialogimpl"
1889 ;; These tests all fail because 'test_overlappingHandles'
1890 ;; (see: https://bugreports.qt.io/browse/QTBUG-95750).
1891 "tst_basic"
1892 "tst_fusion"
1893 "tst_imagine"
1894 "tst_material"
1895 "tst_universal"
1896 ;; Fails due to using the wrong lib/qt6/qml prefix:
1897 ;; "Warning: Failed to find the following builtins:
1898 ;; builtins.qmltypes, jsroot.qmltypes (so will use
1899 ;; qrc). Import paths used:
1900 ;; /gnu/store/...-qtbase-6.3.1/lib/qt6/qml"
1901 "tst_qmltc_qprocess"
1902 ;; This one also causes non-determinstic failures (see:
1903 ;; https://bugreports.qt.io/browse/QTBUG-101488).
1904 "tst_qquickfolderdialogimpl"
1905 ;; These test fail when running qmlimportscanner; perhaps
1906 ;; an extra CMAKE_PREFIX_PATH location is missing to
1907 ;; correctly locate the imports.
1908 "empty_qmldir"
1909 "qtquickcompiler"
1910 "cmake_tooling_imports"
1911 ;; This test seems to hangs for a long time, possibly
1912 ;; waiting for a killed process, which becomes a zombie in
1913 ;; the build container (perhaps solved after
1914 ;; fixing/applying #30948).
1915 "tst_qqmlpreview"
1916
1917 ;; These tests fail starting with 6.5.2 (see:
1918 ;; https://bugreports.qt.io/browse/QTBUG-116019). They
1919 ;; appear to fail because of attempting to load QML from
1920 ;; elsewhere than from QML_IMPORT_PATH.
1921 "cmake_test_common_import_path"
1922 "tst_qqmlcomponent"
1923 "tst_qmllint"
1924 "tst_qmldomitem"
1925 "tst_dom_all"
1926 "tst_qmlls"
1927 "tst_qmllscompletions"
1928 ;; This test fails with comparing 'importPaths' between:
1929 ;; /tmp/guix-build-.../lib/qt6/qml
1930 ;; /gnu/store/......../lib/qt6/qml
1931 "test_generate_qmlls_ini"
1932 ;; This test fails starting with 6.6.3 (see:
1933 ;; https://bugreports.qt.io/browse/QTBUG-123748), for
1934 ;; unknown reasons.
1935 "tst_qquickiconimage"
1936
1937 ;; These tests are slow (> 2 minutes) skip them (see:
1938 ;; <https://qt-project.atlassian.net/browse/QTBUG-148724>).
1939 "tst_qquickpopup"
1940 "tst_qquickmenu"
1941 "tst_qquickdrawer"
1942 "tst_fluentwinui3")
1943 "|")
1944 ")")))))
1945 (add-after 'install 'delete-installed-tests
1946 (lambda _
1947 (delete-file-recursively (string-append #$output "/tests")))))))
1948 (native-inputs
1949 (list ninja
1950 perl
1951 pkg-config
1952 python
1953 qtshadertools
1954 vulkan-headers
1955 tzdata-for-tests))
1956 (inputs
1957 (list at-spi2-core
1958 libxkbcommon
1959 mesa
1960 qtbase
1961 qtimageformats
1962 qtlanguageserver
1963 qtsvg))
1964 (home-page (package-home-page qtbase))
1965 (synopsis "Qt QML module (Quick 2)")
1966 (description "The Qt QML module provides a framework for developing
1967applications and libraries with the QML language. It defines and implements
1968the language and engine infrastructure, and provides an API to enable
1969application developers to extend the QML language with custom types and
1970integrate QML code with JavaScript and C++.")
1971 (license (package-license qtbase))))
1972
1973(define-public qtconnectivity-5
1974 (package
1975 (inherit qtsvg-5)
1976 (name "qtconnectivity")
1977 (version "5.15.17")
1978 (source (origin
1979 (method url-fetch)
1980 (uri (qt-url name version))
1981 (sha256
1982 (base32
1983 "0ashlprn6fak67dpkcwjv8fipf3r3cb3v5bshnncscn8kkfgrxc7"))))
1984 (native-inputs
1985 (list perl pkg-config qtdeclarative-5))
1986 (inputs
1987 (list bluez qtbase-5))
1988 (synopsis "Qt Connectivity module")
1989 (description "The Qt Connectivity modules provides modules for interacting
1990with Bluetooth and NFC.")))
1991
1992(define-public qtconnectivity
1993 (package
1994 (name "qtconnectivity")
1995 (version "6.9.2")
1996 (source (origin
1997 (method url-fetch)
1998 (uri (qt-url name version))
1999 (sha256
2000 (base32
2001 "0qq4d8hn6s8bb9r2gglb6gzq6isbb13knqh7n2s2wsnx8rqwdzwa"))))
2002 (build-system cmake-build-system)
2003 (native-inputs
2004 (list perl pkg-config qtdeclarative))
2005 (inputs
2006 (list bluez qtbase))
2007 (arguments
2008 (list
2009 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
2010 #:phases
2011 #~(modify-phases %standard-phases
2012 (add-before 'check 'set-display
2013 (lambda _
2014 ;; Make Qt render "offscreen", required for tests.
2015 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
2016 (synopsis "Qt Connectivity module")
2017 (description "The Qt Connectivity modules provides modules for interacting
2018with Bluetooth and NFC.")
2019 (home-page (package-home-page qtbase))
2020 (license (package-license qtbase))))
2021
2022(define-public qtwebsockets-5
2023 (package (inherit qtsvg-5)
2024 (name "qtwebsockets")
2025 (version "5.15.17")
2026 (source (origin
2027 (method url-fetch)
2028 (uri (qt-url name version))
2029 (sha256
2030 (base32
2031 "11fb6bvabkdhjlwyd3q0nmzhaildv9dnda78j9sphfdd5c0x1i6c"))))
2032 (arguments
2033 (substitute-keyword-arguments arguments
2034 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2035 (native-inputs
2036 (list perl qtdeclarative-5))
2037 (inputs (list qtbase-5))
2038 (synopsis "Qt Web Sockets module")
2039 (description "WebSocket is a web-based protocol designed to enable two-way
2040communication between a client application and a remote host. The Qt
2041WebSockets module provides C++ and QML interfaces that enable Qt applications
2042to act as a server that can process WebSocket requests, or a client that can
2043consume data received from the server, or both.")))
2044
2045(define-public qtwebsockets
2046 (package
2047 (name "qtwebsockets")
2048 (version "6.9.2")
2049 (source (origin
2050 (method url-fetch)
2051 (uri (qt-url name version))
2052 (sha256
2053 (base32
2054 "1vh82w96436pqrp4daf324mqs2zjvn51z78b3ksc5mnqgrk3z0xy"))
2055 (patches
2056 (search-patches
2057 "qtwebsockets-6.9-fix-tst_QWebSocket.patch"))))
2058 (build-system cmake-build-system)
2059 (arguments
2060 (list
2061 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
2062 #:phases #~(modify-phases %standard-phases
2063 (delete 'check) ;move after install
2064 (add-after 'install 'prepare-for-tests
2065 (lambda _
2066 (setenv "QT_QPA_PLATFORM" "offscreen")
2067 (setenv "QML_IMPORT_PATH"
2068 (string-append #$output "/lib/qt6/qml:"
2069 (getenv "QML_IMPORT_PATH")))))
2070 (add-after 'prepare-for-tests 'check
2071 (assoc-ref %standard-phases 'check))
2072 (add-after 'check 'delete-installed-tests
2073 (lambda _
2074 (delete-file-recursively
2075 (string-append #$output "/tests")))))))
2076 (native-inputs (list perl))
2077 (inputs (list qtbase qtdeclarative))
2078 (synopsis "Qt Web Sockets module")
2079 (description "WebSocket is a web-based protocol designed to enable two-way
2080communication between a client application and a remote host. The Qt
2081WebSockets module provides C++ and QML interfaces that enable Qt applications
2082to act as a server that can process WebSocket requests, or a client that can
2083consume data received from the server, or both.")
2084 (home-page (package-home-page qtbase))
2085 (license (package-license qtbase))))
2086
2087(define-public qtsensors
2088 (package
2089 (inherit qtsvg)
2090 (name "qtsensors")
2091 (version "6.9.2")
2092 (source (origin
2093 (method url-fetch)
2094 (uri (qt-url name version))
2095 (sha256
2096 (base32
2097 "0qj4674vim2p34mq3kp99spjyf82qvs75w625namzqp274pshk4n"))))
2098 (native-inputs (list qtdeclarative))
2099 (inputs (list qtbase))
2100 (synopsis "Qt Sensors module")
2101 (description "The Qt Sensors API provides access to sensor hardware via QML
2102and C++ interfaces. The Qt Sensors API also provides a motion gesture
2103recognition API for devices.")))
2104
2105(define-public qtsensors-5
2106 (package
2107 (inherit qtsvg-5)
2108 (name "qtsensors")
2109 (version "5.15.17")
2110 (source (origin
2111 (method url-fetch)
2112 (uri (qt-url name version))
2113 (sha256
2114 (base32
2115 "00h0qm6g0qjy56q3b7vp1m93p1jyaidlsl1cqmvv38ws5r79pb4h"))))
2116 (arguments
2117 (substitute-keyword-arguments arguments
2118 ((#:parallel-tests? _ #f) #f) ; can lead to race condition
2119 ((#:phases phases)
2120 `(modify-phases ,phases
2121 (add-after 'unpack 'fix-tests
2122 (lambda _
2123 (substitute* "tests/auto/qsensorgestures_gestures\
2124/tst_sensorgestures_gestures.cpp"
2125 (("2000") "5000") ;lengthen test timeout
2126 ;; This test fails.
2127 (("QTest::newRow(\"twist\") << \"twist\"") ""))))))))
2128 (native-inputs
2129 (list perl qtdeclarative-5))
2130 (inputs (list qtbase-5))
2131 (synopsis "Qt Sensors module")
2132 (description "The Qt Sensors API provides access to sensor hardware via QML
2133and C++ interfaces. The Qt Sensors API also provides a motion gesture
2134recognition API for devices.")))
2135
2136(define-public qtmultimedia-5
2137 (package
2138 (inherit qtsvg-5)
2139 (name "qtmultimedia")
2140 (version "5.15.17")
2141 (source (origin
2142 (method url-fetch)
2143 (uri (qt-url name version))
2144 (sha256
2145 (base32
2146 "14rx3dgq1jzp4pii5ywxdpkrpwasbn5z0c518z09gwaafv7wcp56"))
2147 (modules '((guix build utils)))
2148 (snippet
2149 '(begin
2150 (delete-file-recursively
2151 "examples/multimedia/spectrum/3rdparty")
2152 ;; We also prevent the spectrum example from being built.
2153 (substitute* "examples/multimedia/multimedia.pro"
2154 (("spectrum") "#"))))))
2155 (arguments
2156 (substitute-keyword-arguments arguments
2157 ((#:phases phases)
2158 `(modify-phases ,phases
2159 (replace 'configure
2160 (lambda* (#:key outputs #:allow-other-keys)
2161 (let ((out (assoc-ref outputs "out")))
2162 (invoke "qmake" "QT_BUILD_PARTS = libs tools tests"
2163 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath,"
2164 out "/lib -Wl,-rpath,")
2165 (string-append "PREFIX=" out)))))))
2166 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2167 (native-inputs
2168 (list perl pkg-config python qtdeclarative-5))
2169 (inputs
2170 (list alsa-lib
2171 mesa
2172 pulseaudio
2173 qtbase-5
2174 ;; Gstreamer is needed for the mediaplayer plugin
2175 gstreamer
2176 gst-plugins-base))
2177 (synopsis "Qt Multimedia module")
2178 (description "The Qt Multimedia module provides set of APIs to play and
2179record media, and manage a collection of media content. It also contains a
2180set of plugins for interacting with pulseaudio and GStreamer.")))
2181
2182(define-public qtshadertools
2183 (package
2184 (name "qtshadertools")
2185 (version "6.9.2")
2186 (source (origin
2187 (method url-fetch)
2188 (uri (qt-url name version))
2189 ;; Note: the source bundles *patched* glslang and SPIRV-Cross
2190 ;; sources.
2191 (sha256
2192 (base32
2193 "158lpzb1nqspwm0n48d3nfr81q85zka1igrjp6xj8cjlv7wqlrqp"))))
2194 (build-system cmake-build-system)
2195 (arguments
2196 (list
2197 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
2198 #:phases #~(modify-phases %standard-phases
2199 (add-before 'check 'prepare-for-tests
2200 (lambda _
2201 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
2202 (native-inputs (list perl))
2203 (inputs (list glslang libxkbcommon qtbase))
2204 (home-page (package-home-page qtbase))
2205 (synopsis "Shader pipeline API and and tools for Qt")
2206 (description "The @code{qtshadertools} module provides APIs and tools
2207supporting shader pipeline functionality as offered in Qt Quick to operate on
2208Vulkan, OpenGL and other main graphic APIs.")
2209 (license (package-license qtbase))))
2210
2211(define-public qtmultimedia
2212 (package
2213 (name "qtmultimedia")
2214 (version "6.9.2")
2215 (source (origin
2216 (method url-fetch)
2217 (uri (qt-url name version))
2218 (sha256
2219 (base32
2220 "04mbwl1mg4rjgai027chldslpjnqrx52c3jxn20j2hx7ayda3y3v"))))
2221 (build-system cmake-build-system)
2222 (arguments
2223 (list
2224 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON"
2225 "-DQT_FEATURE_pulseaudio=ON")
2226 #:phases
2227 #~(modify-phases %standard-phases
2228 (add-after 'unpack 'disable-integration-tests
2229 (lambda _
2230 ;; XXX: The tst_qaudiodecoderbackend, tst_qaudiodevice,
2231 ;; tst_qaudiosource, tst_qmediaplayerbackend and
2232 ;; tst_qcamerabackend tests fail, presumably because they
2233 ;; require a functional pulseaudio daemon (which requires a dbus
2234 ;; session bus, which requires an X11 server, and then is still
2235 ;; unhappy).
2236 (substitute* "tests/auto/CMakeLists.txt"
2237 (("add_subdirectory\\(integration)") ""))
2238 ;; The "qvideoframecolormanagement" tests fail (image
2239 ;; comparisons). A warning right before the failures read "No
2240 ;; RHI backend. Using CPU conversion." (see:
2241 ;; https://bugreports.qt.io/browse/QTBUG-123749).
2242 (substitute* "tests/auto/unit/multimedia/CMakeLists.txt"
2243 (("add_subdirectory\\(qvideoframecolormanagement\\)") ""))))
2244 (add-before 'check 'prepare-for-tests
2245 (lambda _
2246 (setenv "HOME" (getcwd))
2247 (setenv "QT_QPA_PLATFORM" "offscreen")))
2248 (add-after 'install 'delete-installed-tests
2249 (lambda _
2250 (delete-file-recursively (string-append #$output "/tests")))))))
2251 (native-inputs
2252 (list perl
2253 pkg-config
2254 qtshadertools
2255 vulkan-headers))
2256 (inputs
2257 (list alsa-lib
2258 ffmpeg-6
2259 glib
2260 libxkbcommon
2261 libxrandr
2262 mesa
2263 qtbase
2264 qtdeclarative
2265 pulseaudio))
2266 (home-page (package-home-page qtbase))
2267 (synopsis "Qt Multimedia module")
2268 (description "The Qt Multimedia module provides set of APIs to play and
2269record media, and manage a collection of media content.")
2270 (license (package-license qtbase))))
2271
2272(define-public qtwayland-5
2273 (package
2274 (inherit qtsvg-5)
2275 (name "qtwayland")
2276 (version "5.15.18")
2277 (source (origin
2278 (method url-fetch)
2279 (uri (qt-url name version))
2280 (patches (search-patches
2281 "qtwayland-update-wayland-xml.patch"
2282 ;; KDE Qt5 Patch Collection (kde/5.15 branch, on top
2283 ;; of v5.15.18-lts-lgpl). Includes fix for
2284 ;; QTBUG-103391: Wayland protocol error when
2285 ;; maximumWidth < minimumWidth (patch 0043).
2286 "qtwayland-5.15.18-0001-client-announce-an-output-after-receiving-more-compl.patch"
2287 "qtwayland-5.15.18-0002-fix-issue-with-repeated-window-size-changes.patch"
2288 "qtwayland-5.15.18-0003-client-connect-drags-being-accepted-to-updating-the-.patch"
2289 "qtwayland-5.15.18-0004-client-disconnect-registry-listener-on-destruction.patch"
2290 "qtwayland-5.15.18-0005-client-set-xdgshell-size-hints-before-the-first-comm.patch"
2291 "qtwayland-5.15.18-0006-fix-build.patch"
2292 "qtwayland-5.15.18-0007-fix-remove-listener.patch"
2293 "qtwayland-5.15.18-0008-hook-up-querykeyboardmodifers.patch"
2294 "qtwayland-5.15.18-0009-correctly-detect-if-image-format-is-supported-by-qim.patch"
2295 "qtwayland-5.15.18-0010-client-don-t-always-recreate-frame-callbacks.patch"
2296 "qtwayland-5.15.18-0011-client-always-destroy-frame-callback-in-the-actual-c.patch"
2297 "qtwayland-5.15.18-0012-wayland-client-use-wl_keyboard-to-determine-active-s.patch"
2298 "qtwayland-5.15.18-0013-client-do-not-empty-clipboard-when-a-new-popup-windo.patch"
2299 "qtwayland-5.15.18-0014-client-implement-datadevicev3.patch"
2300 "qtwayland-5.15.18-0015-client-delay-deletion-of-qdrag-object-until-after-we.patch"
2301 "qtwayland-5.15.18-0016-client-avoid-processing-of-events-when-showing-windo.patch"
2302 "qtwayland-5.15.18-0017-handle-registry_global-out-of-constructor.patch"
2303 "qtwayland-5.15.18-0018-connect-flushrequest-after-forceroundtrip.patch"
2304 "qtwayland-5.15.18-0019-move-the-wayland-socket-polling-to-a-separate-event-.patch"
2305 "qtwayland-5.15.18-0020-client-remove-mwaitingforupdatedelivery.patch"
2306 "qtwayland-5.15.18-0021-client-simplify-round-trip-behavior.patch"
2307 "qtwayland-5.15.18-0022-client-fix-opaque-region-setter.patch"
2308 "qtwayland-5.15.18-0023-use-proper-dependencies-in-compile-tests.patch"
2309 "qtwayland-5.15.18-0024-revert-client-remove-mwaitingforupdatedelivery.patch"
2310 "qtwayland-5.15.18-0025-fix-race-condition-on-mwaitingforupdatedelivery.patch"
2311 "qtwayland-5.15.18-0026-use-poll-2-when-reading-from-clipboard.patch"
2312 "qtwayland-5.15.18-0027-reduce-memory-leakage.patch"
2313 "qtwayland-5.15.18-0028-only-close-popup-in-the-the-hierchary.patch"
2314 "qtwayland-5.15.18-0029-check-pointer-for-null-before-use-in-assert.patch"
2315 "qtwayland-5.15.18-0030-use-wl_surface.damage_buffer-on-the-client-side.patch"
2316 "qtwayland-5.15.18-0031-client-clear-focus-on-touch-cancel.patch"
2317 "qtwayland-5.15.18-0032-guard-mresizedirty-by-the-correctmutex.patch"
2318 "qtwayland-5.15.18-0033-fix-compile-tests.patch"
2319 "qtwayland-5.15.18-0034-call-finishdrag-in-qwaylanddatadevice-dragsourcecanc.patch"
2320 "qtwayland-5.15.18-0035-hold-surface-read-lock-throughout-qwaylandeglwindow-.patch"
2321 "qtwayland-5.15.18-0036-keep-toplevel-windows-in-the-top-left-corner-of-the-.patch"
2322 "qtwayland-5.15.18-0037-client-add-f_seal_shrink-seal-to-shm-backing-file.patch"
2323 "qtwayland-5.15.18-0038-client-call-wl_output_release-upon-qwaylandscreen-de.patch"
2324 "qtwayland-5.15.18-0039-client-bump-wl_output-version.patch"
2325 "qtwayland-5.15.18-0040-fix-frame-sync-related-to-unprotected-multithread-ac.patch"
2326 "qtwayland-5.15.18-0041-client-handle-zwp_primary_selection_device_manager_v.patch"
2327 "qtwayland-5.15.18-0042-fixes-the-build-on-centos.patch"
2328 "qtwayland-5.15.18-0043-client-avoid-protocol-error-with-invalid-min-max-siz.patch"
2329 "qtwayland-5.15.18-0044-client-fix-handling-of-qt-blankcursor.patch"
2330 "qtwayland-5.15.18-0045-client-force-a-roundtrip-when-an-xdgoutput-is-not-re.patch"
2331 "qtwayland-5.15.18-0046-destroy-frame-queue-before-display.patch"
2332 "qtwayland-5.15.18-0047-client-fix-crash-on-dnd-updates-after-client-facing-.patch"
2333 "qtwayland-5.15.18-0048-convert-cursor-bitmap-to-supported-format.patch"
2334 "qtwayland-5.15.18-0049-replace-scale-with-devicepixelratio-for-non-integer-.patch"
2335 "qtwayland-5.15.18-0050-client-fix-buffer-damage.patch"
2336 "qtwayland-5.15.18-0051-client-commit-the-initial-surface-state-explicitly.patch"
2337 "qtwayland-5.15.18-0052-tests-fix-tst_xdgshell-minmaxsize.patch"
2338 "qtwayland-5.15.18-0053-client-remove-some-surface-commits.patch"
2339 "qtwayland-5.15.18-0054-client-avoid-locking-resizing-in-qwaylandshmbackings.patch"
2340 "qtwayland-5.15.18-0055-bradient-use-qwaylandwindow-actual-window-title.patch"
2341 "qtwayland-5.15.18-0056-redraw-hidpi.patch"))
2342 (sha256
2343 (base32
2344 "07gqgd6ixqnsvc9r1c9y92vaxwj11ijrqvnxib8sv6xwhcmhvw43"))))
2345 (arguments
2346 (substitute-keyword-arguments arguments
2347 ((#:phases phases)
2348 #~(modify-phases #$phases
2349 (add-after 'unpack 'disable-failing-tests
2350 (lambda _
2351 ;; FIXME: tst_seatv4::animatedCursor() fails for no good
2352 ;; reason and breaks these two tests.
2353 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
2354 (((string-append "QVERIFY\\(!cursorSurface\\(\\)->"
2355 "m_waitingFrameCallbacks\\.empty\\(\\)\\);"))
2356 "")
2357 (("QTRY_COMPARE\\(bufferSpy\\.count\\(\\), 1\\);")
2358 ""))
2359 ;; KDE patch 0053 removed the wl_surface.commit call
2360 ;; from propagateSizeHints() because committing the
2361 ;; surface every time a size hint changed could send
2362 ;; incomplete state to the compositor (e.g. the window
2363 ;; geometry might not be set yet). As a result,
2364 ;; setMaximumSize() updates the xdg_toplevel min/max
2365 ;; size but no longer commits the surface, so the
2366 ;; compositor does not see the new values until the
2367 ;; next frame. This test calls setMaximumSize() and
2368 ;; immediately checks the committed value, which is
2369 ;; still the old one.
2370 (substitute* "tests/auto/client/xdgshell/tst_xdgshell.cpp"
2371 (("QCOMPOSITOR_TRY_COMPARE\\(xdgToplevel\\(\\)->m_committed\\.maxSize, QSize\\(500, 400\\)\\)")
2372 "QSKIP(\"setMaximumSize no longer triggers a surface commit (patch 0053)\")"))
2373 ;; Same issue: patch 0053 removed the wl_surface.commit
2374 ;; from setMask(), so moving a subsurface no longer
2375 ;; triggers an immediate parent surface commit. The
2376 ;; test expects the parent to commit right after
2377 ;; setGeometry on the child, but the commit count
2378 ;; stays at 0.
2379 (substitute* "tests/auto/client/surface/tst_surface.cpp"
2380 (("window\\.setObjectName\\(\"main\"\\)")
2381 "QSKIP(\"subsurface move no longer triggers parent commit (patch 0053)\"); window.setObjectName(\"main\")"))
2382 #$@(if (target-aarch64?)
2383 ;; The tst_surface::createSubsurface test fails on
2384 ;; aarch64 (see:
2385 ;; https://bugreports.qt.io/browse/QTBUG-117112).
2386 #~((substitute* "tests/auto/client/client.pro"
2387 ((".*surface.*") "")))
2388 #~())))
2389 (add-before 'check 'set-test-environment
2390 (lambda _
2391 ;; Do not fail just because /etc/machine-id is missing.
2392 (setenv "DBUS_FATAL_WARNINGS" "0")))))))
2393 (native-inputs (list glib perl pkg-config qtdeclarative-5))
2394 (inputs
2395 (list fontconfig
2396 freetype
2397 libx11
2398 libxcomposite
2399 libxext
2400 libxkbcommon
2401 libxrender
2402 mesa
2403 mtdev
2404 qtbase-5
2405 vulkan-headers
2406 wayland))
2407 (synopsis "Qt Wayland module")
2408 (description "The Qt Wayland module provides the QtWayland client and
2409compositor libraries.")))
2410
2411(define-public qtwayland
2412 (package
2413 (name "qtwayland")
2414 (version "6.9.2")
2415 (source
2416 (origin
2417 (method url-fetch)
2418 (uri (qt-url name version))
2419 (sha256
2420 (base32 "10bpxwpam56gvymz9vjxkppbqsj1369ddzl3k4pz2s2maq39imya"))))
2421 (build-system cmake-build-system)
2422 (arguments
2423 (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
2424 #:phases
2425 #~(modify-phases %standard-phases
2426 (add-after 'unpack 'update-wayland.xml
2427 ;; Upstream commit: c2f61bc47baacf2e6a44c6c3c4e4cbf0abfa4095
2428 (lambda* (#:key inputs #:allow-other-keys)
2429 (copy-file (search-input-file
2430 inputs "/share/wayland/wayland.xml")
2431 "src/3rdparty/protocol/wayland/wayland.xml")))
2432 (add-after 'unpack 'disable-failing-tests
2433 (lambda _
2434 ;; FIXME: tst_seatv4::animatedCursor() fails here.
2435 ;; See also: <https://bugreports.qt.io/browse/QTBUG-78317>
2436 (substitute* "tests/auto/client/seatv4/tst_seatv4.cpp"
2437 (((string-append
2438 "QVERIFY\\(!cursorSurface\\(\\)->"
2439 "m_waitingFrameCallbacks\\.empty\\(\\)\\);")) "")
2440 (("QTRY_COMPARE\\(bufferSpy\\.size\\(\\), 1\\);") ""))
2441 ;; known failing with wayland-1.23.0, so skip this.
2442 ;; See also: <https://bugreports.qt.io/browse/QTBUG-126379>
2443 (substitute* "tests/auto/client/CMakeLists.txt"
2444 (("add_subdirectory\\(scaling\\)") ""))))
2445 (add-before 'check 'set-test-environment
2446 (lambda _
2447 (setenv "XDG_RUNTIME_DIR" (getcwd))
2448 ;; Do not fail just because /etc/machine-id is missing.
2449 (setenv "DBUS_FATAL_WARNINGS" "0")
2450 ;; Make Qt render "offscreen", required for tests.
2451 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
2452 (native-inputs (list glib perl pkg-config qtdeclarative))
2453 (inputs
2454 (list fontconfig
2455 freetype
2456 libx11
2457 libxcomposite
2458 libxext
2459 libxkbcommon
2460 libxrender
2461 mesa
2462 mtdev
2463 qtbase
2464 vulkan-headers
2465 wayland))
2466 (native-search-paths
2467 (list (search-path-specification
2468 (variable "QT_PLUGIN_PATH")
2469 (files '("lib/qt6/plugins")))))
2470 (synopsis "Qt Wayland module")
2471 (description "The Qt Wayland module provides the QtWayland client and
2472compositor libraries.")
2473 (home-page (package-home-page qtbase))
2474 (license (package-license qtbase))))
2475
2476(define-public qtserialport-5
2477 (package
2478 (inherit qtsvg-5)
2479 (name "qtserialport")
2480 (version "5.15.17")
2481 (source (origin
2482 (method url-fetch)
2483 (uri (qt-url name version))
2484 (sha256
2485 (base32
2486 "1r5avi20fyxcnh27lcd78fmm9mqm67yydmq87p624qmqii8bdi12"))))
2487 (native-inputs (list perl))
2488 (inputs (list qtbase-5 eudev))
2489 (arguments
2490 (substitute-keyword-arguments arguments
2491 ((#:phases phases)
2492 #~(modify-phases #$phases
2493 (add-after 'unpack 'patch-dlopen-paths
2494 (lambda* (#:key inputs #:allow-other-keys)
2495 (substitute* "src/serialport/qtudev_p.h"
2496 ;; Use the absolute paths for dynamically loaded libs,
2497 ;; otherwise the lib will be searched in LD_LIBRARY_PATH which
2498 ;; typically is not set in guix.
2499 (("setFileNameAndVersion\\(QStringLiteral\\(\"udev\")")
2500 (format #f "setFileNameAndVersion(QStringLiteral(~s))"
2501 (string-append #$(this-package-input "eudev")
2502 "/lib/libudev"))))))))))
2503 (synopsis "Qt Serial Port module")
2504 (description "The Qt Serial Port module provides the library for
2505interacting with serial ports from within Qt.")))
2506
2507(define-public qtserialport
2508 (package
2509 (name "qtserialport")
2510 (version "6.9.2")
2511 (source
2512 (origin
2513 (method url-fetch)
2514 (uri (qt-url name version))
2515 (sha256
2516 (base32 "0sz2dkas4qjdd6lkfb9g89vi94q18aiq9xdchlqb2yn0qbqb544b"))))
2517 (build-system cmake-build-system)
2518 (arguments
2519 (list #:phases
2520 #~(modify-phases %standard-phases
2521 (add-after 'unpack 'patch-dlopen-paths
2522 (lambda* (#:key inputs #:allow-other-keys)
2523 (substitute* "src/serialport/qtudev_p.h"
2524 ;; Use the absolute paths for dynamically loaded libs,
2525 ;; otherwise the lib will be searched in LD_LIBRARY_PATH
2526 ;; which typically is not set in guix.
2527 (("setFileNameAndVersion\\(QStringLiteral\\(\"udev\")")
2528 (format #f "setFileNameAndVersion(QStringLiteral(~s))"
2529 (string-append #$(this-package-input "eudev")
2530 "/lib/libudev")))))))))
2531 (native-inputs (list pkg-config))
2532 (inputs (list qtbase eudev))
2533 (home-page (package-home-page qtbase))
2534 (synopsis "Qt Serial Port module")
2535 (description "The Qt Serial Port module provides the library for
2536interacting with serial ports from within Qt.")
2537 (license (package-license qtbase))))
2538
2539(define-public qtwebchannel-5
2540 (package (inherit qtsvg-5)
2541 (name "qtwebchannel")
2542 (version "5.15.17")
2543 (source (origin
2544 (method url-fetch)
2545 (uri (qt-url name version))
2546 (sha256
2547 (base32
2548 "157nabb3g7i8damk10i1axmbbzxzh4hd45j0z3kzjj0cywf3rzgc"))))
2549 (native-inputs (list perl qtdeclarative-5 qtwebsockets-5))
2550 (inputs (list qtbase-5))
2551 (synopsis "Web communication library for Qt")
2552 (description "The Qt WebChannel module enables peer-to-peer communication
2553between the host (QML/C++ application) and the client (HTML/JavaScript
2554application). The transport mechanism is supported out of the box by the two
2555popular web engines, Qt WebKit 2 and Qt WebEngine.")))
2556
2557(define-public qtwebchannel
2558 (package
2559 (name "qtwebchannel")
2560 (version "6.9.2")
2561 (source (origin
2562 (method url-fetch)
2563 (uri (qt-url name version))
2564 (sha256
2565 (base32
2566 "0rcf7i1wamdf1qynq3yi88r77ch5dg1jinxywlfjlb2dmlvn72l7"))))
2567 (build-system cmake-build-system)
2568 (arguments
2569 (list
2570 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
2571 #:phases #~(modify-phases %standard-phases
2572 (delete 'check) ;move after install
2573 (add-after 'install 'prepare-for-tests
2574 (lambda _
2575 (setenv "QT_QPA_PLATFORM" "offscreen")
2576 (setenv "QML_IMPORT_PATH"
2577 (string-append #$output "/lib/qt6/qml:"
2578 (getenv "QML_IMPORT_PATH")))))
2579 (add-after 'prepare-for-tests 'check
2580 (assoc-ref %standard-phases 'check))
2581 (add-after 'check 'delete-installed-tests
2582 (lambda _
2583 (delete-file-recursively
2584 (string-append #$output "/tests")))))))
2585 (native-inputs (list perl))
2586 (inputs (list qtbase qtdeclarative qtwebsockets))
2587 (home-page (package-home-page qtbase))
2588 (synopsis "Web communication library for Qt")
2589 (description "The Qt WebChannel module enables peer-to-peer communication
2590between the host (QML/C++ application) and the client (HTML/JavaScript
2591application).")
2592 (license (package-license qtbase))))
2593
2594(define-public qtwebview
2595 (package
2596 (name "qtwebview")
2597 (version "6.9.2")
2598 (source (origin
2599 (method url-fetch)
2600 (uri (qt-url name version))
2601 (sha256
2602 (base32
2603 "1w8z3d7w7z2xjfb5l15gb37v9w6pa7d71jalkrqda8l2wr5d3ksc"))))
2604 (build-system cmake-build-system)
2605 (arguments
2606 (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
2607 #:phases
2608 #~(modify-phases %standard-phases
2609 (add-before 'check 'set-display
2610 (lambda _
2611 ;; Make Qt render "offscreen", required for tests.
2612 (setenv "QT_QPA_PLATFORM" "offscreen")
2613 ;; Set writable HOME for teststing cache directory.
2614 (setenv "HOME" "/tmp"))))))
2615 (native-inputs (list perl))
2616 (inputs (list qtbase qtdeclarative qtwebengine))
2617 (synopsis "Display web content in a QML application")
2618 (description "Qt WebView provides a way to display web content in a QML
2619application without necessarily including a full web browser stack by using
2620native APIs where it makes sense.")
2621 (home-page (package-home-page qtbase))
2622 (license (package-license qtbase))))
2623
2624(define-public qtlanguageserver
2625 (package
2626 (name "qtlanguageserver")
2627 (version "6.9.2")
2628 (source (origin
2629 (method url-fetch)
2630 (uri (qt-url name version))
2631 (sha256
2632 (base32
2633 "1vlb0qn53y1b4zf7zkpxdvdh5ikr1cidq5gv8blvf6pyw6pnw6vq"))))
2634 (build-system cmake-build-system)
2635 (arguments
2636 (list #:phases #~(modify-phases %standard-phases
2637 (add-after 'install 'delete-installed-tests
2638 (lambda _
2639 (delete-file-recursively
2640 (string-append #$output "/tests")))))))
2641 (inputs (list qtbase))
2642 (home-page (package-home-page qtbase))
2643 (synopsis "Implementation of the Language Server Protocol for Qt")
2644 (description "This package provides an implementation of the Language
2645Server Protocol (LSP) for Qt.")
2646 (license (package-license qtbase))))
2647
2648(define-public qtlocation-5
2649 (package
2650 (inherit qtsvg-5)
2651 (name "qtlocation")
2652 (version "5.15.17")
2653 (source (origin
2654 (method url-fetch)
2655 (uri (qt-url name version))
2656 (sha256
2657 (base32
2658 "1kqljk3ax2dfib4g0nh9zwdabiv8lyr7hxbj9qh05lrhcyshkrpk"))
2659 (patches
2660 (search-patches "qtlocation-5.15.8-mapboxgl-gcc13.patch"))
2661 (modules '((guix build utils)))
2662 (snippet
2663 #~(begin
2664 ;; TODO: Unvendor more deps.
2665 (with-directory-excursion "src/3rdparty/mapbox-gl-native"
2666 (for-each delete-file-recursively
2667 (list "deps/rapidjson"
2668 "deps/protozero"))
2669
2670 (substitute* "mapbox-gl-native.pro"
2671 ((" deps/protozero/1\\.5\\.2 \\\\
2672 deps/protozero/1\\.5\\.2/include \\\\
2673 deps/rapidjson/1\\.1\\.0 \\\\
2674 deps/rapidjson/1\\.1\\.0/include \\\\")
2675 "")))))))
2676 (arguments
2677 (substitute-keyword-arguments arguments
2678 ((#:tests? _ #f) #f) ; TODO: Enable the tests
2679 ((#:phases phases)
2680 #~(modify-phases #$phases
2681 (add-before 'check 'pre-check
2682 (lambda _
2683 (setenv "HOME" "/tmp")))))))
2684 (native-inputs (list perl qtdeclarative-5 qtquickcontrols-5 qtserialport-5))
2685 (inputs (list icu4c openssl qtbase-5 zlib rapidjson protozero))
2686 (synopsis "Qt Location and Positioning modules")
2687 (description "The Qt Location module provides an interface for location,
2688positioning and geolocation plugins.")))
2689
2690(define-public qtlocation
2691 (package
2692 (inherit qtsvg)
2693 (name "qtlocation")
2694 (version "6.9.2")
2695 (source (origin
2696 (method url-fetch)
2697 (uri (qt-url name version))
2698 (sha256
2699 (base32
2700 "1ybk3ig69p6zyrxabcfkb4pcyc251gy1m2brkf4q52cmcwcysias"))))
2701 (arguments
2702 (substitute-keyword-arguments arguments
2703 ((#:tests? _ #f) #f) ; TODO: Enable the tests
2704 ((#:phases phases)
2705 #~(modify-phases #$phases
2706 (add-before 'check 'pre-check
2707 (lambda _
2708 (setenv "HOME" "/tmp")))))))
2709 (native-inputs (list perl))
2710 (inputs (list icu4c openssl qtbase zlib qtdeclarative qtpositioning
2711 libxkbcommon))
2712 (synopsis "Qt Location and Positioning modules")
2713 (description "The Qt Location module provides an interface for location,
2714positioning and geolocation plugins.")))
2715
2716(define-public qtlottie
2717 (package
2718 (name "qtlottie")
2719 (version "6.9.2")
2720 (source (origin
2721 (method url-fetch)
2722 (uri (qt-url name version))
2723 (sha256
2724 (base32
2725 "1iiigsb4p1zwkxm1x9c4pbx5rgwz35krdqi3vkql4nawvp997px4"))))
2726 (build-system cmake-build-system)
2727 (arguments
2728 (list
2729 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
2730 #:phases
2731 #~(modify-phases %standard-phases
2732 (delete 'check) ;move after install
2733 (add-after 'install 'prepare-for-tests
2734 (lambda _
2735 (setenv "QT_QPA_PLATFORM" "offscreen")
2736 (setenv "QML_IMPORT_PATH"
2737 (string-append #$output "/lib/qt6/qml:"
2738 (getenv "QML_IMPORT_PATH"))))))))
2739 (native-inputs (list perl))
2740 (inputs (list libxkbcommon qtbase qtdeclarative))
2741 (home-page (package-home-page qtbase))
2742 (synopsis "QML API for rendering Bodymovin graphics and animations")
2743 (description "Qt Lottie Animation provides a QML API for rendering
2744graphics and animations that are exported in JSON format by the Bodymovin
2745plugin for Adobe After Effects.")
2746 (license (package-license qtbase))))
2747
2748(define-public qttools-5
2749 (package
2750 (inherit qtsvg-5)
2751 (name "qttools")
2752 (version "5.15.17")
2753 (source (origin
2754 (method url-fetch)
2755 (uri (qt-url name version))
2756 (sha256
2757 (base32
2758 "1imzr7gxbbl1m05g6a4ji0pxvabp0j4x3q33dxa7zfrjczmhcc23"))))
2759 (arguments
2760 (substitute-keyword-arguments arguments
2761 ((#:tests? _ #f) #f) ; TODO: Enable the tests
2762 ((#:phases phases '%standard-phases)
2763 #~(modify-phases #$phases
2764 (add-after 'unpack 'patch-qmake
2765 (lambda* (#:key inputs #:allow-other-keys)
2766 ;; Adjust the default location of the 'qmake' command known to
2767 ;; the 'lprodump' command, which would otherwise look for it
2768 ;; in its own bindir.
2769 (substitute* "src/linguist/lprodump/main.cpp"
2770 (("app.applicationDirPath\\() \\+ QLatin1String\\(\"/qmake\")")
2771 (format #f "QLatin1String(~s)"
2772 (search-input-file inputs "bin/qmake"))))))))))
2773 (native-inputs (list perl qtdeclarative-5 vulkan-headers))
2774 (inputs (list mesa qtbase-5))
2775 (synopsis "Qt Tools and Designer modules")
2776 (description "The Qt Tools module provides a set of applications to browse
2777the documentation, translate applications, generate help files and other stuff
2778that helps in Qt development.")))
2779
2780(define-public qttools
2781 (package
2782 (name "qttools")
2783 (version "6.9.2")
2784 (source (origin
2785 (method url-fetch)
2786 (uri (qt-url name version))
2787 (sha256
2788 (base32
2789 "12d4czfwvh9rfjwnkpsiwzrpx4ga69c6vz85aabhpk3hx7lggdyq"))))
2790 (build-system cmake-build-system)
2791 (arguments
2792 (list
2793 #:tests? #f
2794 ;; The build system attempts to fetch online resources and fails when
2795 ;; building the test suite.
2796 #:configure-flags #~(list "-DQT_BUILD_TESTS=OFF")
2797 #:phases #~(modify-phases %standard-phases
2798 (add-after 'install 'sanity-check
2799 (lambda* (#:key outputs #:allow-other-keys)
2800 ;; This validation exists to validate that the dynamic
2801 ;; library for Clang works as intended; there was
2802 ;; originally problems due to left-overs patching the
2803 ;; value of BUILD_SHARED_LIBS in CLANG-FROM-LLVM that
2804 ;; would cause the following error: "CommandLine Error:
2805 ;; Option 'filter' registered more than once!"
2806 (invoke/quiet (search-input-file outputs "bin/qdoc")
2807 "--help"))))))
2808 (native-inputs (list perl qtdeclarative vulkan-headers))
2809 ;; Use clang-18, which is built using as a single shared library, which is
2810 ;; what the build system of qttools expects.
2811 (inputs (list clang-18 libxkbcommon mesa qtbase `(,zstd "lib")))
2812 (home-page (package-home-page qtbase))
2813 (synopsis "Qt Tools and Designer modules")
2814 (description "The Qt Tools module provides a set of applications to browse
2815the documentation, translate applications, generate help files and other stuff
2816that helps in Qt development.")
2817 ;; GPL 3 only with Qt GPL exception 1.0 (see:
2818 ;; LICENSES/Qt-GPL-exception-1.0.txt).
2819 (license (list license:gpl3))))
2820
2821(define-public qttranslations
2822 (package
2823 (name "qttranslations")
2824 (version "6.9.2")
2825 (source (origin
2826 (method url-fetch)
2827 (uri (qt-url name version))
2828 (sha256
2829 (base32
2830 "1mky3xj2yhcsrmpz8m28v7pky6ryn7hvdcglakww0rfk3qlbcfy7"))))
2831 (build-system cmake-build-system)
2832 (arguments (list #:tests? #f))
2833 (native-inputs (list qtbase qttools))
2834 (home-page (package-home-page qtbase))
2835 (synopsis "Qt translation catalogs")
2836 (description "This package contains the translations for Qt contributed by
2837the Qt community.")
2838 ;; GPL 3 only with Qt GPL exception 1.0 (see:
2839 ;; LICENSES/Qt-GPL-exception-1.0.txt).
2840 (license (list license:gpl3))))
2841
2842(define-public qtscript-5
2843 (package
2844 (inherit qtsvg-5)
2845 (name "qtscript")
2846 (version "5.15.17")
2847 (source (origin
2848 (method url-fetch)
2849 (uri (qt-url name version))
2850 (sha256
2851 (base32
2852 "1qas9xx7zlika5x8x3n51dfc8ikm4r2p4p0j0w2rg3cigyjb2bb2"))
2853 (patches (search-patches "qtscript-disable-tests.patch"))))
2854 (native-inputs (list perl qttools-5))
2855 (inputs (list qtbase-5))
2856 (synopsis "Qt Script module")
2857 (description "Qt provides support for application scripting with ECMAScript.
2858The following guides and references cover aspects of programming with
2859ECMAScript and Qt.")))
2860
2861(define-public qtquick3d
2862 (package
2863 (name "qtquick3d")
2864 (version "6.9.2")
2865 (source (origin
2866 (method url-fetch)
2867 (uri (qt-url name version))
2868 (sha256
2869 (base32
2870 "002888xfnkxmvn8413fllidl3mm2fcwc4gbzdnbvpjlysaq9f3ig"))))
2871 (build-system cmake-build-system)
2872 (arguments
2873 (list #:modules '((guix build cmake-build-system)
2874 (guix build qt-utils)
2875 (guix build utils))
2876 #:imported-modules `(,@%cmake-build-system-modules
2877 (guix build qt-utils))
2878 #:phases
2879 #~(modify-phases %standard-phases
2880 (delete 'check) ;moved after install phase
2881 (add-after 'install 'check
2882 (assoc-ref %standard-phases 'check))
2883 (add-before 'check 'prepare-for-tests
2884 (lambda _
2885 (setenv "QT_QPA_PLATFORM" "offscreen")
2886 (setenv "QT_PLUGIN_PATH"
2887 (string-append #$output "/lib/qt6/plugins:"
2888 (getenv "QT_PLUGIN_PATH")))
2889 (setenv "QML_IMPORT_PATH"
2890 (string-append #$output "/lib/qt6/qml:"
2891 (getenv "QML_IMPORT_PATH")))))
2892 (add-after 'check 'qt-wrap
2893 (lambda* (#:key inputs outputs #:allow-other-keys)
2894 (wrap-all-qt-programs #:inputs inputs
2895 #:outputs outputs
2896 #:qtbase #$qtbase))))))
2897 (inputs (list qtbase qtdeclarative qtshadertools qtwayland))
2898 (synopsis "Qt module and API for defining 3D content in Qt Quick")
2899 (description "Qt Quick 3D is a module within the Qt framework that
2900provides a high-level interface for creating 3D content for user interfaces. Its key features include:
2901@itemize
2902@item Spatial (3D) scene graph
2903@item Mixing 2D and 3D Qt Quick content
2904@item Physically based rendering (PBR) materials
2905@item Punctual and image based lighting
2906@item Custom material and effect system
2907@item GLTF (Graphics Library Transmission Format) 2.0 model import
2908@item Animation support
2909@item 3D input handling and picking
2910@item 3D particle system
2911@end itemize")
2912 (home-page (package-home-page qtbase))
2913 (license (package-license qtbase))))
2914
2915(define-public qtquick3dphysics
2916 (package
2917 (name "qtquick3dphysics")
2918 (version "6.9.2")
2919 (source (origin
2920 (method url-fetch)
2921 (uri (qt-url name version))
2922 (sha256
2923 (base32
2924 "12yc0lswcmyaw19yyxzy73j95ncgqw8mlx8svhrwsllgcf2n9z47"))))
2925 (build-system cmake-build-system)
2926 (arguments
2927 (list #:phases #~(modify-phases %standard-phases
2928 (add-before 'check 'prepare-for-tests
2929 (lambda _
2930 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
2931 (inputs (list qtbase qtdeclarative qtquick3d qtshadertools))
2932 (synopsis "Physics engine integration for Qt Quick 3D")
2933 (description "Qt Quick 3D Physics provides a high-level API for physics
2934simulation. It supports simulating interactive rigid bodies as well as static
2935meshes and non-colliding bodies used for detecting overlaps. Every simulated
2936body can have its own physical properties like mass, density and friction.")
2937 (home-page (package-home-page qtbase))
2938 (license (package-license qtbase))))
2939
2940(define-public qtquickcontrols-5
2941 (package
2942 (inherit qtsvg-5)
2943 (name "qtquickcontrols")
2944 (version "5.15.17")
2945 (source (origin
2946 (method url-fetch)
2947 (uri (qt-url name version))
2948 (sha256
2949 (base32
2950 "0d22z6a1l7iv1xmzgsf7inpgi857mg1ffv327wv7q2iapg2fsiw3"))))
2951 (arguments
2952 (substitute-keyword-arguments arguments
2953 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2954 (inputs (list qtbase-5 qtdeclarative-5))
2955 (synopsis "Qt Quick Controls and other Quick modules")
2956 (description "The QtScript module provides classes for making Qt
2957applications scriptable. This module provides a set of extra components that
2958can be used to build complete interfaces in Qt Quick.")))
2959
2960(define-public qtquickcontrols2-5
2961 (package
2962 (inherit qtsvg-5)
2963 (name "qtquickcontrols2")
2964 (version "5.15.17")
2965 (source (origin
2966 (method url-fetch)
2967 (uri (qt-url name version))
2968 (sha256
2969 (base32
2970 "0v7mwzhc42cwf12z11g9qmysqhsqcvfk4pghh9n2p2kbrz6xdnd0"))))
2971 (arguments
2972 (substitute-keyword-arguments arguments
2973 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2974 (inputs (list qtbase-5 qtdeclarative-5))
2975 (synopsis "Qt Quick Controls 2 and other Quick 2 modules")
2976 (description "The Qt Quick Controls 2 module contains the Qt Labs Platform
2977module that provides platform integration: native dialogs, menus and menu bars,
2978and tray icons. It falls back to Qt Widgets when a native implementation is
2979not available.")))
2980
2981(define-public qtgraphicaleffects
2982 (package
2983 (inherit qtsvg-5)
2984 (name "qtgraphicaleffects")
2985 (version "5.15.17")
2986 (source (origin
2987 (method url-fetch)
2988 (uri (qt-url name version))
2989 (sha256
2990 (base32
2991 "07m25w5qm6i13ygxg0pwaqfda4b8zyhs87n366cyn3wwm96x18ma"))))
2992 (arguments
2993 (substitute-keyword-arguments arguments
2994 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
2995 (inputs (list qtbase-5 qtdeclarative-5))
2996 (synopsis "Qt Graphical Effects module")
2997 (description "The Qt Graphical Effects module provides a set of QML types
2998for adding visually impressive and configurable effects to user interfaces.
2999Effects are visual items that can be added to Qt Quick user interface as UI
3000components. The API consists of over 20 effects provided as separate QML
3001types. The effects cover functional areas such as blending, masking, blurring,
3002coloring, and many more.")))
3003
3004(define-public qtgamepad-5
3005 (package
3006 (inherit qtsvg-5)
3007 (name "qtgamepad")
3008 (version "5.15.17")
3009 (source (origin
3010 (method url-fetch)
3011 (uri (qt-url name version))
3012 (sha256
3013 (base32
3014 "1d05pl7391vp3s7h52aihka2aildzn3ifnmmvsrhn0g2689q6l95"))))
3015 (native-inputs (list perl pkg-config))
3016 (inputs
3017 (list fontconfig
3018 freetype
3019 libxrender
3020 sdl2
3021 qtbase-5
3022 qtdeclarative-5))
3023 (synopsis "Qt Gamepad module")
3024 (description "The Qt Gamepad module is an add-on library that enables Qt
3025applications to support the use of gamepad hardware and in some cases remote
3026control equipment. The module provides both QML and C++ interfaces. The
3027primary target audience are embedded devices with fullscreen user interfaces,
3028and mobile applications targeting TV-like form factors.")))
3029
3030(define-public qtscxml
3031 (package
3032 (name "qtscxml")
3033 (version "6.9.2")
3034 (source (origin
3035 (method url-fetch)
3036 (uri (qt-url name version))
3037 (sha256
3038 (base32
3039 "1dpb687zbw4akx42kfpbb5cpdlq3hcqn8l3l0x7sd5i9061z2sp0"))
3040 (modules '((guix build utils)))
3041 (snippet
3042 '(delete-file-recursively "tests/3rdparty"))))
3043 (build-system cmake-build-system)
3044 (arguments
3045 (list
3046 ;; tst_scion fails with "Test data requested, but no testdata
3047 ;; available", while tst_qstatemachine has multiple unexplained failures
3048 ;; (see: https://bugreports.qt.io/browse/QTBUG-139847).
3049 #:test-exclude "(tst_scion|tst_qstatemachine)"
3050 #:phases
3051 #~(modify-phases %standard-phases
3052 (delete 'check) ;move after the install phase
3053 (add-after 'install 'check
3054 (assoc-ref %standard-phases 'check))
3055 (add-before 'check 'check-setup
3056 (lambda _
3057 (setenv "QT_QPA_PLATFORM" "offscreen")
3058 (setenv "QML_IMPORT_PATH"
3059 (string-append #$output "/lib/qt6/qml:"
3060 (getenv "QML_IMPORT_PATH"))))))))
3061 (inputs (list qtbase qtdeclarative libxkbcommon))
3062 (synopsis "Qt SCXML module")
3063 (description "The Qt SCXML module provides functionality to create state
3064machines from SCXML files. This includes both dynamically creating state
3065machines (loading the SCXML file and instantiating states and transitions) and
3066generating a C++ file that has a class implementing the state machine. It
3067also contains functionality to support data models and executable content.")
3068 (home-page (package-home-page qtbase))
3069 (license (package-license qtbase))))
3070
3071(define-public qtpositioning
3072 (package
3073 (name "qtpositioning")
3074 (version "6.9.2")
3075 (source (origin
3076 (method url-fetch)
3077 (uri (qt-url name version))
3078 (sha256
3079 (base32
3080 "06mwzlyprwz11ks6fsvzh03ilk5fxy3scr1gqqb4p85xzw0ri6j8"))))
3081 (build-system cmake-build-system)
3082 (arguments
3083 (list
3084 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
3085 #:phases #~(modify-phases %standard-phases
3086 (add-after 'install 'delete-installed-tests
3087 (lambda _
3088 (delete-file-recursively
3089 (string-append #$output "/tests"))))
3090 (delete 'check) ;move after the install phase
3091 (add-after 'install 'check
3092 (assoc-ref %standard-phases 'check))
3093 (add-before 'check 'check-setup
3094 (lambda _
3095 (setenv "QML_IMPORT_PATH"
3096 (string-append #$output "/lib/qt6/qml:"
3097 (getenv "QML_IMPORT_PATH")))
3098 ;; Make Qt render "offscreen", required for tests.
3099 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
3100 (inputs (list perl qtbase qtdeclarative qtserialport libxkbcommon))
3101 (home-page (package-home-page qtbase))
3102 (synopsis "QML and C++ positioning information API")
3103 (description "The Qt Positioning API provides positioning information via
3104QML and C++ interfaces. The Qt Positioning API lets you to determine a
3105position by using a variety of possible sources, including satellite, wifi, or
3106text files. That information can then be used to, for example, determine a
3107position on a map. In addition, you can use to the API to retrieve satellite
3108information and perform area based monitoring.")
3109 (license (package-license qtbase))))
3110
3111(define-public qtcharts-5
3112 (package
3113 (inherit qtsvg-5)
3114 (name "qtcharts")
3115 (version "5.15.17")
3116 (source (origin
3117 (method url-fetch)
3118 (uri (qt-url name version))
3119 (sha256
3120 (base32
3121 "0csimm84df9f70irp8di8r208jpiv6hhfbxdi4sxh9935ygpqgc4"))))
3122 (arguments
3123 (substitute-keyword-arguments arguments
3124 ((#:phases phases)
3125 #~(modify-phases #$phases
3126 (add-after 'unpack 'remove-failing-test
3127 (lambda _
3128 (substitute* "tests/auto/auto.pro"
3129 (("qml") "# qml")
3130 (("qml-qtquicktest") "# qml-qtquicktest"))))))))
3131 (inputs (list qtbase-5 qtdeclarative-5))
3132 (synopsis "Qt Charts module")
3133 (description "The Qt Charts module provides a set of easy to use chart
3134components. It uses the Qt Graphics View Framework, therefore charts can be
3135easily integrated to modern user interfaces. Qt Charts can be used as
3136QWidgets, QGraphicsWidget, or QML types. Users can easily create impressive
3137graphs by selecting one of the charts themes.")
3138 (license license:gpl3)))
3139
3140(define-public qtcharts
3141 (package
3142 (name "qtcharts")
3143 (version "6.9.2")
3144 (source (origin
3145 (method url-fetch)
3146 (uri (qt-url name version))
3147 (sha256
3148 (base32
3149 "0jzzlh0jq5fidgs9r4aqpilyj0nan30r1d0pigp1hgz7cigz20cz"))))
3150 (build-system cmake-build-system)
3151 (arguments
3152 (list
3153 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
3154 #:phases
3155 #~(modify-phases %standard-phases
3156 (add-before 'check 'set-display
3157 (lambda _
3158 ;; Make Qt render "offscreen", required for tests.
3159 (setenv "QT_QPA_PLATFORM" "offscreen")))
3160 (add-after 'install 'delete-installed-tests
3161 (lambda _
3162 (delete-file-recursively (string-append #$output "/tests"))))
3163 (delete 'check) ;; move after the install phase
3164 (add-after 'install 'check
3165 (assoc-ref %standard-phases 'check))
3166 (add-before 'check 'set-QML_IMPORT_PATH
3167 (lambda _
3168 (setenv
3169 "QML_IMPORT_PATH"
3170 (string-append #$output "/lib/qt6/qml:"
3171 (getenv "QML_IMPORT_PATH"))))))))
3172 (native-inputs
3173 (list perl pkg-config qtdeclarative))
3174 (inputs (list qtbase qtdeclarative))
3175 (synopsis "Qt Charts module")
3176 (description "The Qt Charts module provides a set of easy to use chart
3177components. It uses the Qt Graphics View Framework, therefore charts can be
3178easily integrated to modern user interfaces. Qt Charts can be used as
3179QWidgets, QGraphicsWidget, or QML types. Users can easily create impressive
3180graphs by selecting one of the charts themes.")
3181 (home-page (package-home-page qtbase))
3182 (license (package-license qtbase))))
3183
3184(define-public qtgraphs
3185 (package
3186 (name "qtgraphs")
3187 (version "6.9.2")
3188 (source (origin
3189 (method url-fetch)
3190 (uri (qt-url name version))
3191 (sha256
3192 (base32
3193 "0wsa4iar52dhiilyl053j7lmsw3xdn47b0pjrylb5a0ij1izp057"))))
3194 (build-system cmake-build-system)
3195 (arguments
3196 (list #:configure-flags
3197 #~(list "-DQT_BUILD_TESTS=ON")
3198 #:phases
3199 #~(modify-phases %standard-phases
3200 (add-before 'check 'set-display
3201 (lambda _
3202 ;; Make Qt render "offscreen", required for tests.
3203 (setenv "QT_QPA_PLATFORM" "offscreen")))
3204 (add-after 'install 'delete-installed-tests
3205 (lambda _
3206 (delete-file-recursively (string-append #$output
3207 "/tests"))))
3208 (delete 'check) ;; move after the install phase
3209 (add-after 'install 'check
3210 (assoc-ref %standard-phases 'check))
3211 (add-before 'check 'set-QML_IMPORT_PATH
3212 (lambda _
3213 (setenv
3214 "QML_IMPORT_PATH"
3215 (string-append #$output "/lib/qt6/qml:"
3216 (getenv "QML_IMPORT_PATH"))))))))
3217 (inputs (list qtbase qtdeclarative qtquick3d qtshadertools))
3218 (synopsis "Qt Graphs module")
3219 (description "The Qt Graphs module enables you to visualize data in 2D and
32203D graphs.")
3221 (home-page (package-home-page qtbase))
3222 (license (package-license qtbase))))
3223
3224(define-public qtnetworkauth
3225 (package
3226 (name "qtnetworkauth")
3227 (version "6.9.2")
3228 (source (origin
3229 (method url-fetch)
3230 (uri (qt-url name version))
3231 (sha256
3232 (base32
3233 "114c65gyg56v70byyl3if1q7mzhp5kkv1g8sp4y9zaxqirbdjr91"))))
3234 (build-system cmake-build-system)
3235 (arguments
3236 (list #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
3237 #:phases
3238 #~(modify-phases %standard-phases
3239 (add-before 'check 'check-setup
3240 (lambda _
3241 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
3242 (native-inputs (list perl))
3243 (inputs (list qtbase))
3244 (home-page (package-home-page qtbase))
3245 (synopsis "Qt Network Authorization module")
3246 (description "The Qt Network Authorization module provides an
3247implementation of OAuth and OAuth2 authenticathon methods for Qt.")
3248 (license (package-license qtbase))))
3249
3250(define-public qtremoteobjects
3251 (package
3252 (name "qtremoteobjects")
3253 (version "6.9.2")
3254 (source (origin
3255 (method url-fetch)
3256 (uri (qt-url name version))
3257 (sha256
3258 (base32
3259 "09lby6dqc2sfig1krcszg6fkypgxlz2r7hgjjfi95g7g9gqlwqnz"))))
3260 (build-system cmake-build-system)
3261 (arguments
3262 (list
3263 #:test-exclude (format
3264 #f "(~{~a~^|~})"
3265 ;; This test fails with "invalid index", but could
3266 ;; pass in `guix shell --container'.
3267 '("tst_modelview"
3268 ;; This test fails in Guix and is known to be flaky
3269 ;; (see:
3270 ;; https://bugreports.qt.io/browse/QTBUG-105895).
3271 "tst_external_IODevice"))
3272 #:phases
3273 #~(modify-phases %standard-phases
3274 (add-before 'check 'prepare-for-tests
3275 (lambda _
3276 ;; Make Qt render "offscreen", required for tests.
3277 (setenv "QT_QPA_PLATFORM" "offscreen")
3278 (setenv "QML_IMPORT_PATH"
3279 (string-append #$output "/lib/qt6/qml:"
3280 (getenv "QML_IMPORT_PATH")))))
3281 (delete 'check) ;move after the install phase
3282 (add-after 'install 'check
3283 (assoc-ref %standard-phases 'check)))))
3284 (native-inputs (list perl vulkan-headers))
3285 (inputs (list libxkbcommon qtbase qtdeclarative))
3286 (synopsis "Qt Remote Objects module")
3287 (description "The Qt Remote Objects module is an @dfn{inter-process
3288communication} (IPC) module developed for Qt. The idea is to extend existing
3289Qt's functionalities to enable an easy exchange of information between
3290processes or computers.")
3291 (home-page (package-home-page qtbase))
3292 (license (package-license qtbase))))
3293
3294(define-public qtspeech-5
3295 (package
3296 (inherit qtsvg-5)
3297 (name "qtspeech")
3298 (version "5.15.17")
3299 (source (origin
3300 (method url-fetch)
3301 (uri (qt-url name version))
3302 (sha256
3303 (base32
3304 "11s5nhcj7ns7fwwmpmfv8i45b5h3xmjlq8rhm6qk11plvwi44dss"))))
3305 (arguments
3306 (substitute-keyword-arguments arguments
3307 ((#:tests? _ #f) #f))) ; TODO: Enable the tests
3308 (inputs (list qtbase-5))
3309 (native-inputs (list perl qtdeclarative-5 qtmultimedia-5 qtxmlpatterns-5))
3310 (synopsis "Qt Speech module")
3311 (description "The Qt Speech module enables a Qt application to support
3312accessibility features such as text-to-speech, which is useful for end-users
3313who are visually challenged or cannot access the application for whatever
3314reason. The most common use case where text-to-speech comes in handy is when
3315the end-user is driving and cannot attend the incoming messages on the phone.
3316In such a scenario, the messaging application can read out the incoming
3317message.")))
3318
3319(define-public qtspeech
3320 (package
3321 (name "qtspeech")
3322 (version "6.9.2")
3323 (source (origin
3324 (method url-fetch)
3325 (uri (qt-url name version))
3326 (sha256
3327 (base32
3328 "1cc8l2h1frlraay0m40r5a91nsc7b53n6vksa52pwqqia4vngdmj"))))
3329 (build-system cmake-build-system)
3330 (arguments
3331 (list #:phases
3332 #~(modify-phases %standard-phases
3333 (delete 'check) ;move after the install phase
3334 (add-after 'install 'check
3335 (assoc-ref %standard-phases 'check))
3336 (add-before 'check 'set-display
3337 (lambda _
3338 ;; Make Qt render "offscreen", required for tests.
3339 (setenv "QT_QPA_PLATFORM" "offscreen")))
3340 (add-before 'check 'prepare-for-tests
3341 (lambda* (#:key outputs #:allow-other-keys)
3342 (setenv "QML_IMPORT_PATH"
3343 (string-append (assoc-ref outputs "out")
3344 "/lib/qt6/qml:"
3345 (getenv "QML_IMPORT_PATH")))))
3346 (add-after 'install 'delete-installed-tests
3347 (lambda _
3348 (delete-file-recursively
3349 (string-append #$output "/tests")))))))
3350 (propagated-inputs (list qtmultimedia))
3351 (inputs (list qtbase qtdeclarative))
3352 (synopsis "Qt Speech module")
3353 (description "The Qt Speech module enables a Qt application to support
3354accessibility features such as text-to-speech, which is useful for end-users
3355who are visually challenged or cannot access the application for whatever
3356reason. The most common use case where text-to-speech comes in handy is when
3357the end-user is driving and cannot attend the incoming messages on the phone.
3358In such a scenario, the messaging application can read out the incoming
3359message.")
3360 (home-page (package-home-page qtbase))
3361 (license (package-license qtbase))))
3362
3363(define-public qtvirtualkeyboard
3364 (package
3365 (name "qtvirtualkeyboard")
3366 (version "6.9.2")
3367 (source (origin
3368 (method url-fetch)
3369 (uri (qt-url name version))
3370 (sha256
3371 (base32
3372 "1qqizh7kyqbqqnrm1mmlf2709rm1rnflbqdl1bi75yms07d00hbv"))))
3373 (build-system cmake-build-system)
3374 (arguments
3375 (list
3376 #:configure-flags #~(list "-DQT_BUILD_TESTS=ON")
3377 #:phases
3378 #~(modify-phases %standard-phases
3379 (add-before 'check 'check-setup
3380 (lambda _
3381 (setenv "QML_IMPORT_PATH"
3382 (string-append #$output "/lib/qt6/qml:"
3383 (getenv "QML_IMPORT_PATH")))
3384 (setenv "HOME" (getcwd))
3385 (setenv "QT_QPA_PLATFORM" "offscreen")
3386 (setenv "DISPLAY" ":1")
3387 (system "Xvfb +extension GLX :1 &")))
3388 (delete 'check) ;move after the install phase
3389 (add-after 'install 'check
3390 (assoc-ref %standard-phases 'check))
3391 (add-after 'install 'delete-installed-tests
3392 (lambda _
3393 (delete-file-recursively (string-append #$output "/tests")))))))
3394 (native-inputs (list perl xorg-server-for-tests))
3395 (inputs (list qtbase))
3396 (propagated-inputs (list qtdeclarative qtmultimedia qtsvg))
3397 (synopsis "QtQuick virtual keyboard")
3398 (description "The Qt Virtual Keyboard module provides a virtual keyboard
3399framework that consists of a C++ backend supporting custom input methods as well
3400as a UI frontend implemented in QML.")
3401 (home-page (package-home-page qtbase))
3402 (license (package-license qtbase))))
3403
3404(define-public qtspell
3405 (package
3406 (name "qtspell")
3407 (version "1.0.2")
3408 (source
3409 (origin
3410 (method git-fetch)
3411 (uri (git-reference
3412 (url "https://github.com/manisandro/qtspell")
3413 (commit version)))
3414 (file-name (git-file-name name version))
3415 (sha256
3416 (base32 "19ivs1pq9mmas731nx77lg63l0cn6c8g61s7a728s9hpxmihdq9s"))))
3417 (build-system cmake-build-system)
3418 (arguments
3419 `(#:configure-flags (list "-DQT_VER=6")
3420 #:tests? #f)) ;no test
3421 (native-inputs
3422 (list pkg-config qttools))
3423 (inputs
3424 (list enchant qtbase))
3425 (home-page "https://github.com/manisandro/qtspell")
3426 (synopsis "Spell checking for Qt text widgets")
3427 (description
3428 "QtSpell adds spell-checking functionality to Qt's text widgets,
3429using the Enchant spell-checking library.")
3430 ;; COPYING file specify GPL3, but source code files all refer to GPL2+.
3431 (license license:gpl2+)))
3432
3433(define remove-third-party-files
3434 ;; Unlike a simpler option like `delete-all-but', this preserves the various
3435 ;; .gn, .gyp, etc. build files, which must be there even when the a bundled
3436 ;; library is not used.
3437 #~(begin
3438 (define preserved-club
3439 ;; Prefix exceptions with ./ for comparison with ftw.
3440 (map (cut string-append "./" <>)
3441 preserved-third-party-files))
3442 (define protected (make-regexp "\\.(gn|gyp)i?$"))
3443 (define (empty? dir)
3444 (equal? (scandir dir) '("." "..")))
3445 (define (third-party? file)
3446 (string-contains file "/third_party/"))
3447 (define (useless? file)
3448 (any (cute string-suffix? <> file)
3449 '(".zip" ".so" ".dll" ".exe" ".jar")))
3450 (define (parents child)
3451 ;; Return all parent directories of CHILD up to and including
3452 ;; the closest "third_party".
3453 (let loop ((parent (dirname child))
3454 (parents '()))
3455 (if (string=? "third_party" (basename parent))
3456 (cons parent parents)
3457 (loop (dirname parent)
3458 (cons parent parents)))))
3459 (define (remove-loudly file)
3460 (format #t "deleting ~a...~%" file)
3461 (force-output)
3462 (delete-file file))
3463 (define (delete-unwanted-files child stat flag base level)
3464 (match flag
3465 ((or 'regular 'symlink 'stale-symlink)
3466 (when (third-party? child)
3467 (unless (or (member child preserved-club)
3468 (any (cute member <> preserved-club)
3469 (parents child))
3470 (regexp-exec protected child))
3471 (remove-loudly child)))
3472 (when (and (useless? child) (file-exists? child))
3473 (remove-loudly child))
3474 #t)
3475 ('directory-processed
3476 (when (empty? child)
3477 (rmdir child))
3478 #t)
3479 (_ #t)))
3480
3481 (nftw "." delete-unwanted-files 'depth 'physical)
3482
3483 ;; Assert that each preserved item is present to catch
3484 ;; removals.
3485 (for-each (lambda (third-party)
3486 (unless (file-exists? third-party)
3487 (error (format #f "~s does not exist!~%"
3488 third-party))))
3489 preserved-club)))
3490
3491(define-public qtwebengine-5
3492 (package
3493 (inherit qtsvg-5)
3494 (name "qtwebengine")
3495 (version "5.15.17")
3496 (source
3497 (origin
3498 (method url-fetch)
3499 (uri (qt-url name version))
3500 (sha256
3501 (base32
3502 "11hir1dwsfy96jxmsmadcr46m034dpjlnpqw60nqk6wk0qscxvg8"))
3503 (patches (search-patches "qtwebengine5-python312-six-compat.patch"))
3504 (modules '((ice-9 ftw)
3505 (ice-9 match)
3506 (srfi srfi-1)
3507 (srfi srfi-26)
3508 (guix build utils)))
3509 (snippet
3510 #~(begin
3511 (let ((preserved-third-party-files
3512 '("base/third_party/double_conversion"
3513 "base/third_party/cityhash"
3514 "base/third_party/cityhash_v103"
3515 "base/third_party/dynamic_annotations"
3516 "base/third_party/icu"
3517 "base/third_party/libevent"
3518 "base/third_party/nspr"
3519 "base/third_party/superfasthash"
3520 "base/third_party/symbolize"
3521 "base/third_party/xdg_mime"
3522 "base/third_party/xdg_user_dirs"
3523 "net/third_party/mozilla_security_manager"
3524 "net/third_party/nss"
3525 "net/third_party/quiche"
3526 "net/third_party/uri_template"
3527 "third_party/abseil-cpp"
3528 "third_party/angle"
3529 "third_party/angle/src/common/third_party/base"
3530 "third_party/angle/src/common/third_party/smhasher"
3531 "third_party/angle/src/common/third_party/xxhash"
3532 "third_party/angle/src/third_party/compiler"
3533 "third_party/axe-core"
3534 "third_party/blink"
3535 "third_party/boringssl"
3536 "third_party/boringssl/src/third_party/fiat"
3537 "third_party/breakpad"
3538 "third_party/brotli"
3539 "third_party/catapult/common/py_vulcanize/py_vulcanize"
3540 "third_party/catapult/common/py_vulcanize/third_party"
3541 "third_party/catapult/third_party/beautifulsoup4"
3542 "third_party/catapult/third_party/html5lib-python"
3543 "third_party/catapult/third_party/polymer/components"
3544 "third_party/catapult/tracing"
3545 "third_party/catapult/tracing/third_party"
3546 "third_party/ced"
3547 "third_party/cld_3"
3548 "third_party/closure_compiler"
3549 "third_party/crashpad"
3550 "third_party/crashpad/crashpad/third_party/lss"
3551 "third_party/crashpad/crashpad/third_party/zlib"
3552 "third_party/crc32c"
3553 "third_party/dav1d"
3554 "third_party/dawn"
3555 "third_party/devtools-frontend"
3556 "third_party/devtools-frontend/src/front_end/third_party"
3557 "third_party/devtools-frontend/src/third_party/typescript"
3558 "third_party/emoji-segmenter"
3559 "third_party/ffmpeg"
3560 "third_party/googletest"
3561 "third_party/harfbuzz-ng/utils"
3562 "third_party/hunspell"
3563 "third_party/iccjpeg"
3564 "third_party/icu"
3565 "third_party/inspector_protocol"
3566 "third_party/jinja2"
3567 "third_party/jsoncpp"
3568 "third_party/jstemplate"
3569 "third_party/khronos"
3570 "third_party/leveldatabase"
3571 "third_party/libaddressinput"
3572 "third_party/libavif"
3573 "third_party/libgifcodec"
3574 "third_party/libjingle_xmpp"
3575 "third_party/libjpeg_turbo"
3576 "third_party/libpng"
3577 "third_party/libsrtp"
3578 "third_party/libsync"
3579 "third_party/libudev"
3580 "third_party/libvpx"
3581 "third_party/libwebm"
3582 "third_party/libwebp"
3583 "third_party/libxml"
3584 "third_party/libxslt"
3585 "third_party/libyuv"
3586 "third_party/lottie"
3587 "third_party/lss"
3588 "third_party/mako"
3589 "third_party/markupsafe"
3590 "third_party/mesa_headers"
3591 "third_party/metrics_proto"
3592 "third_party/modp_b64"
3593 "third_party/nasm"
3594 "third_party/node"
3595 "third_party/one_euro_filter"
3596 "third_party/openh264"
3597 "third_party/opus"
3598 "third_party/ots"
3599 "third_party/pdfium"
3600 "third_party/pdfium/third_party/agg23"
3601 "third_party/pdfium/third_party/base"
3602 "third_party/pdfium/third_party/freetype"
3603 "third_party/pdfium/third_party/lcms"
3604 "third_party/pdfium/third_party/libopenjpeg20"
3605 "third_party/pdfium/third_party/skia_shared"
3606 "third_party/perfetto"
3607 "third_party/pffft"
3608 "third_party/ply"
3609 "third_party/polymer"
3610 "third_party/protobuf"
3611 "third_party/protobuf/third_party/six"
3612 "third_party/pyjson5"
3613 "third_party/re2"
3614 "third_party/rnnoise"
3615 "third_party/skia"
3616 "third_party/skia/include/third_party/skcms/skcms.h"
3617 "third_party/skia/include/third_party/vulkan"
3618 "third_party/skia/third_party/skcms"
3619 "third_party/smhasher"
3620 "third_party/snappy"
3621 "third_party/sqlite"
3622 "third_party/usb_ids"
3623 "third_party/usrsctp"
3624 "third_party/vulkan_memory_allocator"
3625 "third_party/web-animations-js"
3626 "third_party/webrtc"
3627 "third_party/webrtc/common_audio/third_party/ooura/fft_size_128"
3628 "third_party/webrtc/common_audio/third_party/ooura/fft_size_256"
3629 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
3630 "third_party/webrtc/modules/third_party/fft"
3631 "third_party/webrtc/modules/third_party/g711"
3632 "third_party/webrtc/modules/third_party/g722"
3633 "third_party/webrtc/rtc_base/third_party/base64"
3634 "third_party/webrtc/rtc_base/third_party/sigslot"
3635 "third_party/webrtc_overrides"
3636 "third_party/widevine/cdm/widevine_cdm_common.h"
3637 "third_party/widevine/cdm/widevine_cdm_version.h"
3638 "third_party/woff2"
3639 "third_party/xcbproto"
3640 "third_party/zlib"
3641 "url/third_party/mozilla"
3642 "v8/src/third_party/utf8-decoder"
3643 "v8/src/third_party/valgrind"
3644 "v8/src/third_party/siphash"
3645 "v8/third_party/v8/builtins"
3646 "v8/third_party/inspector_protocol")))
3647
3648 (with-directory-excursion "src/3rdparty"
3649 ;; TODO: Try removing "gn" too for future versions of qtwebengine-5.
3650 (delete-file-recursively "ninja")
3651
3652 (with-directory-excursion "chromium"
3653 ;; Delete bundled software and binaries that were not explicitly
3654 ;; preserved above.
3655 #$remove-third-party-files
3656
3657 ;; For compatibility with python-3.12 remove 'import imp'.
3658 ;; This can be removed with [email protected].
3659 (substitute* '("mojo/public/tools/mojom/mojom/fileutil.py"
3660 "mojo/public/tools/mojom/mojom/parse/lexer.py")
3661 (("import imp\n") ""))
3662
3663 ;; Use relative header locations instead of hard coded ones.
3664 (substitute*
3665 "base/third_party/dynamic_annotations/dynamic_annotations.c"
3666 (("base/third_party/valgrind") "valgrind"))
3667 (substitute* '("third_party/breakpad/breakpad/src/common\
3668/linux/http_upload.cc"
3669 "third_party/breakpad/breakpad/src/common/\
3670linux/libcurl_wrapper.h")
3671 (("third_party/curl") "curl"))
3672 (substitute*
3673 '("components/viz/common/gpu/vulkan_context_provider.h"
3674 "components/viz/common/resources/resource_format_utils.h"
3675 "gpu/config/gpu_info_collector_win.cc"
3676 "gpu/config/gpu_util.cc"
3677 "gpu/config/vulkan_info.h")
3678 (("third_party/vulkan_headers/include/")
3679 ""))
3680
3681 ;; Replace Google Analytics bundle with an empty file and hope
3682 ;; no one notices.
3683 (mkdir-p "third_party/analytics")
3684 (call-with-output-file
3685 "third_party/analytics/google-analytics-bundle.js"
3686 (lambda (port)
3687 (const #t)))))
3688 ;; Do not enable support for loading the Widevine DRM plugin.
3689 (substitute* "src/buildtools/config/common.pri"
3690 (("enable_widevine=true")
3691 "enable_widevine=false")))))))
3692 (build-system gnu-build-system)
3693 (native-inputs
3694 (list bison
3695 flex
3696 gperf
3697 ninja
3698 node-lts
3699 perl
3700 pkg-config
3701 python-beautifulsoup4
3702 python-six
3703 python-wrapper
3704 ruby))
3705 (inputs
3706 (list alsa-lib
3707 at-spi2-core
3708 cups-minimal
3709 curl
3710 dbus
3711 ffmpeg-4
3712 fontconfig
3713 harfbuzz
3714 icu4c
3715 jsoncpp
3716 lcms
3717 libcap
3718 libevent
3719 libgcrypt
3720 libjpeg-turbo
3721 libvpx
3722 libwebp
3723 libx11
3724 libxcb
3725 libxcomposite
3726 libxcursor
3727 libxkbfile
3728 libxi
3729 libxkbcommon
3730 ;; FIXME: libxml2 needs to built with icu support though it links to
3731 ;; libxml2 configure summary still states "Checking for compatible
3732 ;; system libxml2... no"
3733 libxml2
3734 openh264
3735 libxrandr
3736 libxrender
3737 libxslt
3738 libxtst
3739 mesa
3740 minizip
3741 nss
3742 opus
3743 pciutils
3744 protobuf
3745 pulseaudio
3746 qtmultimedia-5
3747 re2
3748 snappy
3749 eudev
3750 valgrind/pinned
3751 vulkan-headers
3752 xcb-util))
3753 (propagated-inputs
3754 ;; Required by Qt5WebEngineCoreConfig.cmake.
3755 (list qtbase-5 qtdeclarative-5 qtwebchannel-5))
3756 (arguments
3757 (substitute-keyword-arguments arguments
3758 ((#:modules modules '())
3759 `((guix build gnu-build-system)
3760 (guix build utils)
3761 (ice-9 textual-ports)))
3762 ((#:phases phases)
3763 #~(modify-phases #$phases
3764 (add-before 'configure 'substitute-source
3765 (lambda* (#:key inputs #:allow-other-keys)
3766 (with-atomic-file-replacement
3767 "src/buildtools/config/linux.pri"
3768 (lambda (in out)
3769 (display (get-string-all in) out)
3770 (display "\ngn_args += use_system_openh264=true\n" out)
3771 (display "\ngn_args += link_pulseaudio = true\n" out)))
3772 ;; Qtwebengine is not installed into the same prefix as
3773 ;; qtbase. Some qtbase QTLibraryInfo constants will not
3774 ;; work. Replace with the full path to the qtwebengine-5
3775 ;; translations and locales in the store.
3776 (substitute* "src/core/web_engine_library_info.cpp"
3777 (("QLibraryInfo::location\\(QLibraryInfo::TranslationsPath\\)")
3778 (string-append "QLatin1String(\"" #$output
3779 "/share/qt5/translations\")"))
3780 (("QLibraryInfo::location\\(QLibraryInfo::DataPath\\)")
3781 (string-append "QLatin1String(\"" #$output
3782 "/share/qt5\")"))
3783 (("QLibraryInfo::location\\(QLibraryInfo::LibraryExecutablesPath)")
3784 (string-append "QLatin1String(\"" #$output
3785 "/lib/qt5/libexec\")")))
3786 ;; Substitute full dynamic library path for nss.
3787 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
3788 (("libnssckbi.so")
3789 (search-input-file inputs "lib/nss/libnssckbi.so")))
3790 ;; Substitute full dynamic library path for udev.
3791 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
3792 (("libudev.so.1")
3793 (search-input-file inputs "lib/libudev.so.1")))))
3794 (add-before 'configure 'set-env
3795 (lambda _
3796 ;; Avoids potential race conditions.
3797 (setenv "PYTHONDONTWRITEBYTECODE" "1")
3798 (setenv "NINJAFLAGS"
3799 (string-append "-k1" ;less verbose build output
3800 ;; Respect the '--cores' option of 'guix build'.
3801 " -j" (number->string (parallel-job-count))))))
3802 (replace 'configure
3803 (lambda _
3804 ;; Valid QT_BUILD_PARTS variables are:
3805 ;; libs tools tests examples demos docs translations
3806 (invoke "qmake"
3807 #$@(if (target-x86-32?)
3808 ;; Don't exhaust memory while linking.
3809 #~("QMAKE_LFLAGS+=-Wl,--no-keep-memory -Wl,-z,now")
3810 #~())
3811 "QT_BUILD_PARTS = libs tools" "--"
3812 "--webengine-printing-and-pdf=no"
3813 "--webengine-ffmpeg=system"
3814 ;; FIXME: Building qtwebengine-5 5.12.2 with
3815 ;; icu4c >= 68 fails.
3816 ;;"--webengine-icu=system"
3817 "--webengine-pepper-plugins=no"
3818 "-webengine-proprietary-codecs")))))
3819 ;; Tests are disabled due to "Could not find QtWebEngineProcess error"
3820 ;; It's possible this can be fixed by setting QTWEBENGINEPROCESS_PATH
3821 ;; before running tests.
3822 ((#:tests? _ #f) #f)))
3823 (home-page "https://wiki.qt.io/QtWebEngine")
3824 (synopsis "Qt WebEngine module")
3825 (description "The Qt5WebEngine module provides support for web applications
3826using the Chromium browser project. The Chromium source code has Google services
3827and binaries removed, and adds modular support for using system libraries.")
3828 (license license:lgpl2.1+)))
3829
3830(define-public qtwebengine
3831 (package
3832 (name "qtwebengine")
3833 (version "6.9.3")
3834 (source
3835 (origin
3836 (method url-fetch)
3837 (uri (qt-url name version))
3838 (sha256
3839 (base32
3840 "0rl9v936sq6spvb3sfkpmc51wwmljrn4ssy3ii0pdn0xsl8kn2ym"))
3841 (modules '((ice-9 ftw)
3842 (ice-9 match)
3843 (srfi srfi-1)
3844 (srfi srfi-26)
3845 (guix build utils)))
3846 ;; This is only needed until 6.10, where it arrived upstream.
3847 ;; https://codereview.qt-project.org/c/qt/qtwebengine/+/675112
3848 (patches (search-patches "qtwebengine-revert-egl.patch"))
3849 (snippet
3850 #~(begin
3851 ;; Note: Anything under a 'third_party/' directory that needs to
3852 ;; be preserved must be explicitly added below, otherwise it gets
3853 ;; removed by the 'remove-third-party-files' code snippet included
3854 ;; below. It is useful to refer to the list used by
3855 ;; ungoogled-chromium when upgrading, but not all of the items
3856 ;; present in it will need to be reported here, as Qt already
3857 ;; removes components its build doesn't use.
3858 (let ((preserved-third-party-files
3859 '("base/third_party/double_conversion"
3860 "base/third_party/cityhash"
3861 "base/third_party/cityhash_v103"
3862 "base/third_party/icu"
3863 "base/third_party/nspr"
3864 "base/third_party/superfasthash"
3865 "base/third_party/symbolize"
3866 "base/third_party/xdg_user_dirs"
3867 "net/third_party/mozilla_security_manager"
3868 "net/third_party/nss"
3869 "net/third_party/quiche"
3870 "net/third_party/uri_template"
3871 "third_party/abseil-cpp"
3872 "third_party/angle"
3873 "third_party/angle/src/common/third_party/xxhash"
3874 "third_party/angle/src/third_party/libXNVCtrl" ;Expat
3875 "third_party/angle/src/third_party/volk"
3876 "third_party/angle/src/third_party/ceval"
3877 "third_party/axe-core"
3878 "third_party/blink"
3879 "third_party/bidimapper"
3880 "third_party/boringssl"
3881 "third_party/boringssl/src/third_party/fiat"
3882 "third_party/breakpad"
3883 "third_party/brotli"
3884 "third_party/catapult"
3885 "third_party/catapult/common/py_vulcanize/third_party/rcssmin"
3886 "third_party/catapult/common/py_vulcanize/third_party/rjsmin"
3887 "third_party/catapult/third_party/polymer"
3888 "third_party/catapult/tracing/third_party/d3/d3.min.js"
3889 "third_party/catapult/tracing/third_party/gl-matrix/dist/gl-matrix-min.js"
3890 "third_party/catapult/tracing/third_party/jpeg-js/jpeg-js-decoder.js"
3891 "third_party/catapult/tracing/third_party/jszip/jszip.min.js"
3892 "third_party/catapult/tracing/third_party/mannwhitneyu/mannwhitneyu.js"
3893 "third_party/catapult/tracing/third_party/oboe/dist"
3894 "third_party/catapult/tracing/third_party/pako/pako.min.js"
3895 "third_party/ced"
3896 "third_party/cld_3"
3897 "third_party/closure_compiler"
3898 "third_party/cpuinfo" ;BSD-2
3899 "third_party/crabbyavif" ;ASL2.0
3900 "third_party/crashpad"
3901 "third_party/crashpad/crashpad/third_party/lss"
3902 "third_party/crashpad/crashpad/third_party/zlib"
3903 "third_party/crc32c"
3904 "third_party/d3"
3905 "third_party/dav1d"
3906 "third_party/dawn"
3907 "third_party/dawn/third_party/gn/webgpu-cts"
3908 "third_party/dawn/third_party/khronos"
3909 "third_party/devtools-frontend"
3910 "third_party/devtools-frontend/src/front_end/third_party/i18n"
3911 "third_party/devtools-frontend/src/front_end/third_party/\
3912additional_readme_paths.json"
3913 "third_party/devtools-frontend/src/front_end/third_party/axe-core"
3914 "third_party/devtools-frontend/src/front_end/third_party/chromium"
3915 "third_party/devtools-frontend/src/front_end/third_party/codemirror"
3916 "third_party/devtools-frontend/src/front_end/third_party/codemirror.next"
3917 "third_party/devtools-frontend/src/front_end/third_party/csp_evaluator"
3918 "third_party/devtools-frontend/src/front_end/third_party/diff"
3919 "third_party/devtools-frontend/src/front_end/third_party/intl-messageformat"
3920 "third_party/devtools-frontend/src/front_end/third_party/lighthouse"
3921 "third_party/devtools-frontend/src/front_end/third_party/lit"
3922 "third_party/devtools-frontend/src/front_end/third_party/acorn"
3923 "third_party/devtools-frontend/src/front_end/third_party/marked"
3924 "third_party/devtools-frontend/src/front_end/third_party/puppeteer"
3925 "third_party/devtools-frontend/src/front_end/third_party/\
3926puppeteer/package/lib/esm/third_party/mitt"
3927 "third_party/devtools-frontend/src/front_end/third_party/\
3928puppeteer/package/lib/esm/third_party/parsel-js" ;Expat
3929 "third_party/devtools-frontend/src/front_end/third_party/\
3930puppeteer/package/lib/esm/third_party/rxjs"
3931 "third_party/devtools-frontend/src/front_end/third_party/\
3932vscode.web-custom-data"
3933 "third_party/devtools-frontend/src/front_end/third_party/puppeteer-replay"
3934 "third_party/devtools-frontend/src/third_party/pyjson5"
3935 "third_party/devtools-frontend/src/front_end/third_party/\
3936third-party-web" ;Expat
3937 "third_party/devtools-frontend/src/front_end/third_party/wasmparser"
3938 "third_party/devtools-frontend/src/front_end/third_party/\
3939web-vitals" ;ASL2.0
3940 "third_party/devtools-frontend/src/scripts/build/typescript"
3941 "third_party/devtools-frontend/src/third_party/i18n"
3942 "third_party/distributed_point_functions"
3943 "third_party/dom_distiller_js"
3944 "third_party/emoji-segmenter"
3945 "third_party/fast_float" ;Expat (or ASL2.0 or Boost)
3946 "third_party/fdlibm"
3947 "third_party/ffmpeg/libavcodec/avcodec.h"
3948 "third_party/ffmpeg/libavcodec/packet.h"
3949 "third_party/ffmpeg/libavformat/avformat.h"
3950 "third_party/ffmpeg/libavformat/avio.h"
3951 "third_party/ffmpeg/libavutil/avutil.h"
3952 "third_party/ffmpeg/libavutil/imgutils.h"
3953 "third_party/ffmpeg/libavutil/log.h"
3954 "third_party/ffmpeg/libavutil/mathematics.h"
3955 "third_party/ffmpeg/libavutil/opt.h"
3956 "third_party/fft2d"
3957 "third_party/flatbuffers"
3958 "third_party/fp16" ;Expat
3959 "third_party/freetype"
3960 "third_party/gemmlowp" ;ASL2.0
3961 "third_party/google_input_tools" ;ASL2.0
3962 "third_party/googletest"
3963 "third_party/harfbuzz-ng"
3964 "third_party/highway"
3965 "third_party/hunspell"
3966 "third_party/iccjpeg"
3967 "third_party/icu" ;TODO: make pdfium use system version
3968 "third_party/inspector_protocol"
3969 "third_party/ipcz" ;BSD-3
3970 "third_party/jinja2"
3971 "third_party/jsoncpp"
3972 "third_party/jstemplate"
3973 "third_party/khronos"
3974 "third_party/leveldatabase"
3975 "third_party/libaddressinput"
3976 "third_party/libaom"
3977 "third_party/libaom/source/libaom/third_party/fastfeat"
3978 "third_party/libaom/source/libaom/third_party/SVT-AV1" ;BSD-3
3979 "third_party/libaom/source/libaom/third_party/vector"
3980 "third_party/libaom/source/libaom/third_party/x86inc"
3981 "third_party/libavif"
3982 "third_party/libavifinfo"
3983 "third_party/libevent"
3984 "third_party/libgav1"
3985 "third_party/libjingle_xmpp"
3986 "third_party/libjpeg_turbo"
3987 "third_party/libpng" ;TODO: make pdfium use system version
3988 "third_party/libsecret" ;LGPL2.1+
3989 "third_party/libsrtp"
3990 "third_party/libsync"
3991 "third_party/liburlpattern"
3992 "third_party/libva_protected_content" ;Expat
3993 "third_party/libvpx"
3994 "third_party/libvpx/source/libvpx/third_party/x86inc" ;Expat
3995 "third_party/libwebm"
3996 "third_party/libwebp"
3997 "third_party/libx11"
3998 "third_party/libxcb-keysyms"
3999 "third_party/libxml"
4000 "third_party/libyuv"
4001 "third_party/libzip" ;BSD-3
4002 "third_party/lit"
4003 "third_party/lottie"
4004 "third_party/lss"
4005 "third_party/mako"
4006 "third_party/markupsafe"
4007 "third_party/material_color_utilities" ;ASL2.0
4008 "third_party/mesa_headers"
4009 "third_party/metrics_proto"
4010 "third_party/minigbm" ;BSD-3
4011 "third_party/modp_b64"
4012 "third_party/nasm"
4013 "third_party/nearby" ;ASL2.0
4014 "third_party/node"
4015 "third_party/omnibox_proto" ;BSD-3
4016 "third_party/one_euro_filter"
4017 "third_party/openscreen" ;BSD-3
4018 "third_party/openscreen/src/third_party/tinycbor" ;Expat
4019 "third_party/openh264"
4020 "third_party/opus/src/include/opus.h"
4021 "third_party/opus/src/include/opus_custom.h"
4022 "third_party/opus/src/include/opus_defines.h"
4023 "third_party/opus/src/include/opus_multistream.h"
4024 "third_party/opus/src/include/opus_types.h"
4025 "third_party/ots"
4026 "third_party/flac"
4027 "third_party/pdfium"
4028 "third_party/pdfium/third_party/agg23"
4029 "third_party/pdfium/third_party/bigint"
4030 "third_party/pdfium/third_party/freetype"
4031 "third_party/pdfium/third_party/lcms"
4032 "third_party/pdfium/third_party/libopenjpeg"
4033 "third_party/pdfium/third_party/libtiff"
4034 "third_party/pdfium/third_party/freetype/include/pstables.h" ;FreeType
4035 "third_party/perfetto"
4036 "third_party/perfetto/protos/third_party/chromium"
4037 "third_party/perfetto/protos/third_party/simpleperf" ;ASL2.0
4038 "third_party/pffft"
4039 "third_party/ply"
4040 "third_party/polymer"
4041 "third_party/private_membership" ;ASL2.0
4042 "third_party/private-join-and-compute" ;ASL2.0
4043 "third_party/protobuf"
4044 "third_party/protobuf-javascript" ;BSD-3
4045 "third_party/pthreadpool" ;BSD-2
4046 "third_party/pyjson5"
4047 "third_party/qcms" ;Expat
4048 "third_party/rapidhash/rapidhash.h" ;BSD-2
4049 "third_party/re2"
4050 "third_party/rnnoise"
4051 "third_party/ruy" ;ASL2.0
4052 "third_party/selenium-atoms"
4053 "third_party/s2cellid" ;ASL2.0
4054 "third_party/securemessage" ;ASL2.0
4055 "third_party/shell-encryption" ;ASL2.0
4056 "third_party/skia"
4057 "third_party/skia/include/third_party/vulkan"
4058 "third_party/skia/modules/skcms"
4059 "third_party/skia/third_party/vulkanmemoryallocator"
4060 "third_party/smhasher"
4061 "third_party/snappy"
4062 "third_party/speech-dispatcher"
4063 "third_party/sqlite"
4064 "third_party/swiftshader" ;ASL2.0
4065 "third_party/swiftshader/third_party/llvm-10.0" ;ASL2.0, with LLVM exception
4066 "third_party/swiftshader/third_party/marl" ;ASL2.0
4067 "third_party/swiftshader/third_party/SPIRV-Headers" ;X11-style
4068 "third_party/swiftshader/third_party/SPIRV-Tools" ;ASL2.0
4069 "third_party/tensorflow-text" ;ASL2.0
4070 "third_party/tflite" ;ASL2.0
4071 "third_party/tflite_support" ;ASL2.0
4072 "third_party/ukey2" ;ASL2.0
4073 "third_party/usb_ids"
4074 "third_party/utf" ;Expat
4075 "third_party/glslang"
4076 "third_party/spirv-headers"
4077 "third_party/spirv-tools"
4078 "third_party/vulkan-headers"
4079 "third_party/vulkan-loader"
4080 "third_party/vulkan-tools"
4081 "third_party/vulkan-validation-layers"
4082 "third_party/vulkan_memory_allocator"
4083 "third_party/webgpu-cts"
4084 "third_party/webrtc"
4085 "third_party/webrtc/common_audio/third_party/ooura"
4086 "third_party/webrtc/common_audio/third_party/spl_sqrt_floor"
4087 "third_party/webrtc/modules/third_party/fft"
4088 "third_party/webrtc/modules/third_party/g711"
4089 "third_party/webrtc/modules/third_party/g722"
4090 "third_party/webrtc/rtc_base/third_party/base64"
4091 "third_party/webrtc/rtc_base/third_party/sigslot"
4092 "third_party/webrtc_overrides"
4093 "third_party/widevine/cdm/widevine_cdm_common.h"
4094 "third_party/widevine/cdm/widevine_cdm_version.h"
4095 "third_party/woff2"
4096 "third_party/wuffs"
4097 "third_party/x11proto"
4098 "third_party/xnnpack" ;BSD-3
4099 "third_party/zstd"
4100 "third_party/zlib" ;TODO: make pdfium use system version
4101 "third_party/zxcvbn-cpp" ;Expat
4102 "url/third_party/mozilla"
4103 "v8/src/third_party/siphash"
4104 "v8/src/third_party/utf8-decoder"
4105 "v8/src/third_party/valgrind"
4106 "v8/third_party/inspector_protocol"
4107 "v8/third_party/glibc/src/sysdeps/ieee754/dbl-64"
4108 "v8/third_party/v8/builtins"
4109 "v8/third_party/v8/codegen/fp16-inl.h"))) ;Expat
4110
4111 (with-directory-excursion "src/3rdparty"
4112 (with-directory-excursion "chromium"
4113 ;; Delete bundled software and binaries that were not
4114 ;; explicitly preserved above.
4115 #$remove-third-party-files
4116
4117 ;; Use relative header locations instead of hard coded ones.
4118 (substitute* '("v8/BUILD.gn"
4119 "v8/src/codegen/ia32/cpu-ia32.cc"
4120 "v8/src/codegen/x64/cpu-x64.cc")
4121 ((".*\"src/third_party/valgrind/valgrind.h\",.*")
4122 "")
4123 (("#include \"src/third_party/valgrind/valgrind.h\"")
4124 ""))
4125 (substitute* "third_party/breakpad/breakpad/src/common/\
4126linux/libcurl_wrapper.h"
4127 (("third_party/curl") "curl"))
4128 (substitute*
4129 '("components/viz/common/gpu/vulkan_context_provider.h"
4130 "gpu/config/gpu_util.cc")
4131 (("third_party/vulkan/include/")
4132 ""))
4133
4134 ;; Replace Google Analytics bundle with an empty file and
4135 ;; hope no one notices.
4136 (mkdir-p "third_party/analytics")
4137 (call-with-output-file
4138 "third_party/analytics/google-analytics-bundle.js"
4139 (lambda (port)
4140 (const #t)))))
4141 (substitute* "src/core/CMakeLists.txt"
4142 (("enable_widevine=true")
4143 (string-join
4144 '(;; Do not enable support for loading the Widevine DRM
4145 ;; plugin.
4146 "enable_widevine=false"
4147 ;; Link pulseaudio directly instead of using dlopen.
4148 "link_pulseaudio=true")
4149 "\n"))))))))
4150 (build-system cmake-build-system)
4151 (arguments
4152 (list
4153 ;; XXX: The test suite is not built by default; leave it off to save
4154 ;; some build time and resources.
4155 #:tests? #f
4156 #:configure-flags
4157 ;; Use the CMake ninja generator, otherwise the build fails.
4158 #~(list "-GNinja"
4159 ;; The PDF renderer plugin fails to build with errors such as
4160 ;; "src/3rdparty/chromium/components/pdf
4161 ;; /renderer/pdf_accessibility_tree.cc:1373:39:
4162 ;; error: use of undeclared identifier 'IDS_PDF_PAGE_INDEX'";
4163 ;; disable it.
4164 "-DQT_FEATURE_webengine_printing_and_pdf=OFF"
4165 "-DQT_FEATURE_webengine_pepper_plugins=OFF" ;widevine
4166
4167 ;; The webenginedriver feature is disabled, otherwise the RUNPATH
4168 ;; validation phase fails.
4169 "-DQT_FEATURE_webenginedriver=OFF"
4170
4171 ;; Do not artificially limit codec support; video decoding is
4172 ;; done by ffmpeg.
4173 "-DQT_FEATURE_webengine_proprietary_codecs=ON"
4174
4175 #$@(if (target-x86-64?)
4176 #~("-DQT_FEATURE_webengine_vaapi=ON")
4177 #~())
4178
4179 ;; Use system libraries where possible (see src/core/CMakeLists.txt).
4180 "-DQT_FEATURE_webengine_system_alsa=ON"
4181 "-DQT_FEATURE_webengine_system_ffmpeg=ON"
4182 "-DQT_FEATURE_webengine_system_freetype=ON"
4183 "-DQT_FEATURE_webengine_system_harfbuzz=ON"
4184 "-DQT_FEATURE_webengine_system_icu=ON"
4185 "-DQT_FEATURE_webengine_system_lcms2=ON"
4186 "-DQT_FEATURE_webengine_system_libevent=ON"
4187 "-DQT_FEATURE_webengine_system_libjpeg=ON"
4188 "-DQT_FEATURE_webengine_system_libpci=ON"
4189 "-DQT_FEATURE_webengine_system_libpng=ON"
4190 "-DQT_FEATURE_webengine_system_libtiff=ON"
4191 "-DQT_FEATURE_webengine_system_libwebp=ON"
4192 "-DQT_FEATURE_webengine_system_libxml=ON"
4193 "-DQT_FEATURE_webengine_system_minizip=ON"
4194 "-DQT_FEATURE_webengine_system_opus=ON"
4195 "-DQT_FEATURE_webengine_system_pulseaudio=ON"
4196 "-DQT_FEATURE_webengine_system_re2=ON"
4197 "-DQT_FEATURE_webengine_system_zlib=ON"
4198 "-DQT_FEATURE_webengine_system_glib=ON"
4199 "-DQT_FEATURE_webengine_system_snappy=ON")
4200 #:phases
4201 #~(modify-phases %standard-phases
4202 (add-after 'unpack 'patch-paths
4203 (lambda* (#:key inputs #:allow-other-keys)
4204 ;; Qtwebengine is not installed into the same prefix as qtbase.
4205 ;; Some qtbase QTLibraryInfo constants will not work. Replace
4206 ;; with the full path to the qtwebengine translations and
4207 ;; locales in the store.
4208 (substitute* "src/core/web_engine_library_info.cpp"
4209 (("QLibraryInfo::path\\(QLibraryInfo::TranslationsPath)")
4210 (string-append "QLatin1String(\"" #$output
4211 "/share/qt6/translations\")"))
4212 (("QLibraryInfo::path\\(QLibraryInfo::DataPath)")
4213 (string-append "QLatin1String(\"" #$output
4214 "/share/qt6\")"))
4215 (("QLibraryInfo::path\\(QLibraryInfo::LibraryExecutablesPath)")
4216 (string-append "QLatin1String(\"" #$output
4217 "/lib/qt6/libexec\")")))
4218 ;; Substitute full dynamic library path for nss.
4219 (substitute* "src/3rdparty/chromium/crypto/nss_util.cc"
4220 (("libnssckbi.so")
4221 (search-input-file inputs "lib/nss/libnssckbi.so")))
4222 ;; Substitute full dynamic library path for udev.
4223 (substitute* "src/3rdparty/chromium/device/udev_linux/udev1_loader.cc"
4224 (("libudev.so.1")
4225 (search-input-file inputs "lib/libudev.so.1")))
4226 ;; Patch the location of the X11 keyboard layouts.
4227 (substitute* "src/3rdparty/chromium/ui/events/ozone/layout/xkb\
4228/xkb_keyboard_layout_engine.cc"
4229 (("/usr/share/X11/xkb")
4230 (search-input-directory inputs "share/X11/xkb")))))
4231 (add-before 'configure 'prepare-build-environment
4232 (lambda _
4233 ;; Avoids potential race conditions.
4234 (setenv "PYTHONDONTWRITEBYTECODE" "1")
4235 (setenv "NINJAFLAGS"
4236 (string-append
4237 "-k1" ;less verbose build output
4238 ;; Respect the '--cores' option of 'guix build'.
4239 " -j" (number->string (parallel-job-count))))
4240 ;; Use Clang/LDD to help tame the memory requirements and hasten
4241 ;; the build.
4242 (setenv "AR" "llvm-ar") (setenv "NM" "llvm-nm")
4243 (setenv "CC" "clang") (setenv "CXX" "clang++")))
4244 (replace 'build
4245 (lambda* (#:key parallel-build? #:allow-other-keys)
4246 (apply invoke "cmake" "--build" "."
4247 (if parallel-build?
4248 `("--parallel" ,(number->string (parallel-job-count)))
4249 '()))))
4250 (replace 'install
4251 (lambda _
4252 (invoke "cmake" "--install" ".")))
4253 (add-after 'install 'delete-installed-tests
4254 (lambda _
4255 (delete-file-recursively
4256 (string-append #$output "/tests")))))))
4257 (native-inputs
4258 (list bison
4259 clang-20
4260 flex
4261 gperf
4262 lld-as-ld-wrapper-18
4263 ninja
4264 node-lts
4265 perl
4266 pkg-config
4267 python-beautifulsoup4
4268 python-html5lib
4269 python-wrapper
4270 ruby))
4271 (inputs
4272 (list alsa-lib
4273 at-spi2-core
4274 cups-minimal
4275 curl
4276 dbus
4277 eudev
4278 ffmpeg-6
4279 fontconfig
4280 fxdiv
4281 harfbuzz
4282 icu4c
4283 jsoncpp
4284 lcms
4285 libcap
4286 libevent
4287 libgcrypt
4288 libjpeg-turbo
4289 libva
4290 libvpx
4291 libwebp
4292 libx11
4293 libxcb
4294 libxcomposite
4295 libxcursor
4296 libxi
4297 libxkbcommon
4298 libxkbfile
4299 ;; FIXME: libxml2 needs to built with icu support though it links to
4300 ;; libxml2 configure summary still states "Checking for compatible
4301 ;; system libxml2... no"
4302 libxml2
4303 libxrandr
4304 libxrender
4305 libxslt
4306 libxtst
4307 mesa
4308 minizip
4309 nss
4310 openh264
4311 opus
4312 pciutils
4313 protobuf
4314 pulseaudio
4315 qtmultimedia
4316 re2-next
4317 snappy
4318 valgrind/pinned
4319 vulkan-headers
4320 xcb-util
4321 xkeyboard-config))
4322 (propagated-inputs
4323 (list qtbase
4324 qtdeclarative
4325 qtwebchannel))
4326 (home-page "https://wiki.qt.io/QtWebEngine")
4327 (synopsis "Qt WebEngine module")
4328 (description "The Qt WebEngine module provides support for web
4329applications using the Chromium browser project. The Chromium source code has
4330Google services and binaries removed, and adds modular support for using
4331system libraries.")
4332 (license license:lgpl2.1+)))
4333
4334(define-public single-application
4335 (package
4336 (name "single-application")
4337 (version "3.5.4")
4338 (source
4339 (origin
4340 (method git-fetch)
4341 (uri
4342 (git-reference
4343 (url "https://github.com/itay-grudev/SingleApplication")
4344 (commit (string-append "v" version))))
4345 (file-name (git-file-name name version))
4346 (sha256
4347 (base32
4348 "0cj3rgsscpm5y5lp0hfsfkfdnm1h5msqw90baqj3zxmh9fh8h9nv"))))
4349 (build-system cmake-build-system)
4350 (arguments
4351 (list
4352 #:tests? #f ; no check target
4353 #:configure-flags
4354 #~(list "-DQT_DEFAULT_MAJOR_VERSION=6"
4355 ;; Projects can decide how to build this library. You might need
4356 ;; to override this flag (QApplication, QGuiApplication or
4357 ;; QCoreApplication).
4358 "-DQAPPLICATION_CLASS=QApplication")
4359 #:phases
4360 #~(modify-phases %standard-phases
4361 ;; No install target, install things manually
4362 (replace 'install
4363 (lambda* (#:key source #:allow-other-keys)
4364 (install-file
4365 "libSingleApplication.a" (string-append #$output "/lib"))
4366 (for-each
4367 (lambda (file)
4368 (install-file (string-append source "/" file)
4369 (string-append #$output "/include")))
4370 '("SingleApplication"
4371 "singleapplication.h"
4372 "singleapplication_p.h")))))))
4373 (inputs (list qtbase))
4374 (home-page "https://github.com/itay-grudev/SingleApplication")
4375 (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6")
4376 (description
4377 "SingleApplication is a replacement of the QtSingleApplication for Qt5 and
4378Qt6.
4379
4380It keeps the Primary Instance of your Application and kills each subsequent
4381instances. It can (if enabled) spawn secondary (non-related to the primary)
4382instances and can send data to the primary instance from secondary instances.")
4383 (license (license:non-copyleft "file:///LICENSE"))))
4384
4385(define-public pyotherside
4386 (package
4387 (name "pyotherside")
4388 (version "1.6.2")
4389 (source (origin
4390 (method git-fetch)
4391 (uri (git-reference
4392 (url "https://github.com/thp/pyotherside")
4393 (commit version)))
4394 (file-name (git-file-name name version))
4395 (sha256
4396 (base32
4397 "1nn0rmdwrxz6j95plzfy4r6s2jfq9ddqj7danbn4rx2nnd81brnq"))))
4398 (build-system qt-build-system)
4399 (arguments
4400 (list
4401 #:qtbase qtbase
4402 #:modules '((guix build qt-build-system)
4403 ((guix build gnu-build-system) #:prefix gnu:)
4404 (guix build utils))
4405 #:phases
4406 #~(modify-phases %standard-phases
4407 (add-after 'unpack 'fix-installation-prefix
4408 (lambda _
4409 ;; The QT_INSTALL_QML property points to the qtbase
4410 ;; installation prefix.
4411 (substitute* "src/src.pro"
4412 (("\\$\\$\\[QT_INSTALL_QML]")
4413 (string-append #$output "/lib/qt"
4414 #$(version-major (package-version qtbase))
4415 "/qml")))))
4416 (replace 'configure
4417 (lambda _
4418 (invoke "qmake")))
4419 (replace 'build (assoc-ref gnu:%standard-phases 'build))
4420 (replace 'check
4421 (lambda* (#:key tests? #:allow-other-keys)
4422 (when tests?
4423 (invoke "./tests/tests"))))
4424 (replace 'install
4425 ;; Specify a specific install target, otherwise the build fails
4426 ;; attempting to install the qtquicktests target to the qtbase
4427 ;; installation prefix.
4428 (lambda _
4429 (invoke "make" "sub-src-install_subtargets"))))))
4430 (inputs (list python qtdeclarative qtsvg))
4431 (home-page "https://thp.io/2011/pyotherside/")
4432 (synopsis "Qt plugin providing access to a Python 3 interpreter from QML")
4433 (description "Pyotherside is a Qt plugin providing access to a Python 3
4434interpreter from QML for creating asynchronous mobile and desktop UIs with
4435Python.")
4436 (license license:isc)))
4437
4438(define-public pyotherside-for-qt5
4439 (package/inherit pyotherside
4440 (name "pyotherside-for-qt5")
4441 (arguments
4442 (substitute-keyword-arguments arguments
4443 ((#:qtbase _ #f)
4444 qtbase-5)
4445 ((#:phases phases '%standard-phases)
4446 #~(modify-phases #$phases
4447 (replace 'fix-installation-prefix
4448 (lambda _
4449 ;; The QT_INSTALL_QML property points to the qtbase
4450 ;; installation prefix.
4451 (substitute* "src/src.pro"
4452 (("\\$\\$\\[QT_INSTALL_QML]")
4453 (string-append #$output "/lib/qt"
4454 #$(version-major (package-version qtbase-5))
4455 "/qml")))))))))
4456 (inputs (modify-inputs inputs
4457 (replace "qtdeclarative" qtdeclarative-5)
4458 (replace "qtquickcontrols2" qtquickcontrols-5)
4459 (replace "qtsvg" qtsvg-5)))))
4460
4461(define-public python-sip
4462 (package
4463 (name "python-sip")
4464 (version "6.12.0")
4465 (source
4466 (origin
4467 (method url-fetch)
4468 (uri (list (pypi-uri "sip" version)
4469 (string-append "https://www.riverbankcomputing.com/static/"
4470 "Downloads/sip/" version
4471 "/sip-" version ".tar.gz")))
4472 (sha256
4473 (base32
4474 "1il938crjap0f05773mk70fjp91b1fbn76hi64r4j5akz2afsg08"))
4475 (modules '((guix build utils)))
4476 (snippet
4477 ;; Relax setuptools dependency
4478 #~(substitute* "pyproject.toml"
4479 (("\"setuptools>=.*\",") "\"setuptools\",")))
4480 (patches (search-patches "python-sip-include-dirs.patch"))))
4481 (build-system pyproject-build-system)
4482 (arguments
4483 (list #:tests? #f)) ; No test system found.
4484 (native-inputs
4485 (list python-setuptools python-setuptools-scm python-wheel))
4486 (propagated-inputs
4487 (list python-packaging python-setuptools python-tomli))
4488 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
4489 (synopsis "Python binding creator for C and C++ libraries")
4490 (description
4491 "SIP is a tool to create Python bindings for C and C++ libraries. It
4492was originally developed to create PyQt, the Python bindings for the Qt
4493toolkit, but can be used to create bindings for any C or C++ library.
4494
4495SIP comprises a code generator and a Python module. The code generator
4496processes a set of specification files and generates C or C++ code, which
4497is then compiled to create the bindings extension module. The SIP Python
4498module provides support functions to the automatically generated code.")
4499 ;; There is a choice between a python like license, gpl2 and gpl3.
4500 ;; For compatibility with pyqt, we need gpl3.
4501 (license license:gpl3)))
4502
4503(define-public python-sip-4
4504 (package
4505 (inherit python-sip)
4506 (name "python-sip")
4507 (version "4.19.25")
4508 (source
4509 (origin
4510 (method url-fetch)
4511 (uri (list (pypi-uri "sip" version)
4512 (string-append "https://www.riverbankcomputing.com/static/"
4513 "Downloads/sip/"
4514 version
4515 "/sip-"
4516 version
4517 ".tar.gz")))
4518 (sha256
4519 (base32 "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"))))
4520 (build-system gnu-build-system)
4521 (arguments
4522 (list
4523 #:tests? #f ;no check target
4524 #:imported-modules %pyproject-build-system-modules
4525 #:modules `((srfi srfi-1)
4526 ((guix build pyproject-build-system) #:prefix py:)
4527 ,@%default-gnu-modules)
4528 #:phases
4529 #~(modify-phases %standard-phases
4530 (add-after 'unpack 'substitute
4531 (lambda _
4532 (substitute* "siplib/siplib.c"
4533 ;; Replaces the internal data-structure usage
4534 ;; that was removed in python 3.11 with the
4535 ;; new official API call so the code will compile
4536 ;; with python > 3.11
4537 (("frame->f_back")
4538 "PyFrame_GetBack(frame)"))))
4539 (replace 'configure
4540 (lambda* (#:key inputs outputs #:allow-other-keys)
4541 (invoke "python" "configure.py"
4542 "--bindir" (string-append #$output "/bin")
4543 "--destdir" (py:site-packages inputs outputs)
4544 "--incdir" (string-append #$output "/include")))))))
4545 (native-inputs (list python-setuptools python-wrapper))
4546 (propagated-inputs (list))
4547 (license license:gpl3)))
4548
4549(define-public python-pyqt
4550 (package
4551 (name "python-pyqt")
4552 (version "5.15.11")
4553 (source
4554 (origin
4555 (method url-fetch)
4556 ;; PyPI is the canonical distribution point of PyQt. Older
4557 ;; releases are available from the web site.
4558 (uri (list (pypi-uri "PyQt5" version)
4559 (string-append "https://www.riverbankcomputing.com/static/"
4560 "Downloads/PyQt5/" version "/PyQt5-"
4561 version ".tar.gz")))
4562 (file-name (string-append "PyQt5-" version ".tar.gz"))
4563 (sha256
4564 (base32
4565 "0lkwap0va0kq9j9x540cc5fink2w8ppxiiji395pp8mlxd1mg97x"))))
4566 (build-system pyproject-build-system)
4567 (arguments
4568 (list
4569 #:tests? #f ; No tests.
4570 #:configure-flags
4571 #~`(("--verbose" . "") ; Print commands run.
4572 ("--confirm-license" . "")
4573 ("--jobs" . ,(number->string (parallel-job-count))))
4574 #:phases
4575 #~(modify-phases %standard-phases
4576 ;; When building python-pyqtwebengine, <qprinter.h> can not be
4577 ;; included. Here we substitute the full path to the header in the
4578 ;; store.
4579 (add-after 'unpack 'substitute-source
4580 (lambda* (#:key inputs #:allow-other-keys)
4581 (let* ((version #$(package-version this-package))
4582 (qt-version (string-take version 1))
4583 (qtprinter.h (string-append "include/qt"
4584 qt-version
4585 "/QtPrintSupport"
4586 "/qprinter.h")))
4587 (substitute* '("sip/QtPrintSupport/qprinter.sip"
4588 "sip/QtPrintSupport/qpyprintsupport_qlist.sip")
4589 (("<qprinter.h>")
4590 (format #f "~s"
4591 (search-input-file inputs qtprinter.h))))))))))
4592 (native-inputs
4593 (list qtbase-5 ; for qmake
4594 python-pyqt-builder))
4595 (propagated-inputs
4596 (list python-sip python-pyqt5-sip))
4597 (inputs
4598 (list python-wrapper
4599 qtbase-5
4600 qtconnectivity-5
4601 qtdeclarative-5
4602 qtlocation-5
4603 qtmultimedia-5
4604 qtsensors-5
4605 qtserialport-5
4606 qtsvg-5
4607 qttools-5
4608 qtwebchannel-5
4609 qtwebsockets-5
4610 qtx11extras
4611 qtxmlpatterns-5))
4612 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
4613 (synopsis "Python bindings for Qt")
4614 (description
4615 "PyQt is a set of Python v2 and v3 bindings for the Qt application
4616framework. The bindings are implemented as a set of Python modules and
4617contain over 620 classes.")
4618 (license license:gpl3)))
4619
4620(define-public python-pyqt-6
4621 (package
4622 (inherit python-pyqt)
4623 (version "6.9.1")
4624 (source
4625 (origin
4626 (method url-fetch)
4627 (uri (pypi-uri "pyqt6" version))
4628 (file-name (string-append "pyqt6-" version ".tar.gz"))
4629 (sha256
4630 (base32 "19n3q6b8mbzswrkq5rqmkh1kx0br1xd1z6m024hiq3xl7zh2nr2h"))))
4631 (inputs ;Qt5 dependencies only in python-pyqt:
4632 ;; (qt)connectivity, location, sensors, serialport, x11extras, xmlpatterns.
4633 (list python-wrapper
4634 qtbase
4635 qtdeclarative
4636 qtmultimedia
4637 qtpositioning
4638 qtspeech
4639 qtsvg
4640 qttools
4641 qtwebchannel
4642 qtwebsockets))
4643 (propagated-inputs (list python-sip python-pyqt6-sip))
4644 (native-inputs (list python-pyqt-builder qtbase)))) ;qtbase is required for qmake.
4645
4646(define-public python-pyqt5-sip
4647 (package
4648 (name "python-pyqt5-sip")
4649 (version "12.17.0")
4650 (source
4651 (origin
4652 (method url-fetch)
4653 (uri (pypi-uri "pyqt5_sip" version))
4654 (sha256
4655 (base32
4656 "0kqbz61fcbv9indv927cic90x0kbfzi2h1hcvjgsyf92pp6ssbb8"))))
4657 (build-system pyproject-build-system)
4658 (arguments
4659 `(#:tests? #f)) ;; No test code.
4660 (native-inputs
4661 (list python-setuptools))
4662 (home-page "https://www.riverbankcomputing.com/software/sip/")
4663 (synopsis "Sip module support for PyQt5")
4664 (description "Sip module support for PyQt5")
4665 (license license:lgpl2.1+)))
4666
4667(define-public python-pyqt6-sip
4668 (package
4669 (inherit python-pyqt5-sip)
4670 (name "python-pyqt6-sip")
4671 (version "13.10.2")
4672 (source
4673 (origin
4674 (method url-fetch)
4675 (uri (pypi-uri "pyqt6_sip" version))
4676 (sha256
4677 (base32 "1zpsarqn56jakdridn3lk4qgc2i8h9xaqp6hdg700rajpxbd2jj6"))))
4678 (synopsis "Sip module support for PyQt6")
4679 (description
4680 "SIP is used to write self contained extension modules, i.e. without a
4681library to be wrapped. This SIP extension module provides support for the
4682PyQt6 package.")))
4683
4684(define-public python-pyqtwebengine
4685 (package
4686 (name "python-pyqtwebengine")
4687 (version "5.15.9")
4688 (source
4689 (origin
4690 (method url-fetch)
4691 ;; The newest releases are only available on PyPI. Older ones
4692 ;; are mirrored at the upstream home page.
4693 (uri (list (pypi-uri "PyQtWebEngine" version)
4694 (string-append "https://www.riverbankcomputing.com/static"
4695 "/Downloads/PyQtWebEngine/" version
4696 "/PyQtWebEngine-" version ".tar.gz")))
4697 (sha256
4698 (base32
4699 "0hdr0g0rzlhsnylhfk826pq1lw8p9dqcr8yma2wy9dgjrj6n0ixb"))))
4700 (build-system pyproject-build-system)
4701 (native-inputs
4702 (list python python-sip
4703 python-pyqt-builder
4704 ;; qtbase is required for qmake
4705 qtbase-5))
4706 (inputs
4707 `(("python" ,python-wrapper)
4708 ("python-sip" ,python-sip)
4709 ("python-pyqt" ,python-pyqt)
4710 ("qtbase" ,qtbase-5)
4711 ("qtsvg-5" ,qtsvg-5)
4712 ("qtdeclarative-5" ,qtdeclarative-5)
4713 ("qtwebchannel-5" ,qtwebchannel-5)
4714 ("qtwebengine-5" ,qtwebengine-5)))
4715 (arguments
4716 (list
4717 #:tests? #f ; No tests.
4718 #:configure-flags
4719 #~`(("--verbose" . "") ; Print commands run.
4720 ("--jobs" . ,(number->string (parallel-job-count))))
4721 #:phases
4722 #~(modify-phases %standard-phases
4723 (add-after 'unpack 'set-include-dirs
4724 (lambda* (#:key inputs outputs #:allow-other-keys)
4725 (let* ((python (assoc-ref inputs "python"))
4726 (python-pyqt (assoc-ref inputs "python-pyqt"))
4727 (sip-include-dirs (string-append
4728 python-pyqt "/lib/python"
4729 (python-version python)
4730 "/site-packages/PyQt5/bindings")))
4731 (setenv "SIP_INCLUDE_DIRS" sip-include-dirs)))))))
4732 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
4733 (synopsis "Python bindings for QtWebEngine")
4734 (description
4735 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
4736WebEngine libraries. The bindings sit on top of PyQt5 and are implemented as a
4737set of three modules. Prior to v5.12 these bindings were part of PyQt
4738itself.")
4739 (license license:gpl3)))
4740
4741(define-public python-pyqtwebengine-6
4742 (package
4743 (name "python-pyqtwebengine")
4744 (version "6.9.0")
4745 (source
4746 (origin
4747 (method url-fetch)
4748 (uri (pypi-uri "pyqt6_webengine" version))
4749 (sha256
4750 (base32 "09dah4cv3jgw86ar4irwah03pg70jwi8br1mcphbh1nspgikgrba"))
4751 (modules '((guix build utils)))
4752 (snippet
4753 ;; Fix missing include for QVariant.
4754 '(substitute* "sip/QtWebEngineCore/qwebengineframe.sip"
4755 (("#include <qwebengineframe\\.h>" all)
4756 (string-append "#include <qvariant.h>\n" all))))))
4757 (build-system pyproject-build-system)
4758 (native-inputs (list python python-sip python-pyqt-builder
4759 ;; qtbase is required for qmake
4760 qtbase))
4761 (inputs (list python-pyqt-6 qtbase qtdeclarative qtwebchannel qtwebengine))
4762 (arguments
4763 (list
4764 #:tests? #f ;No tests.
4765 #:configure-flags #~`(("--verbose" . "") ;Print commands run.
4766 ("--jobs" unquote
4767 (number->string (parallel-job-count))))
4768 #:phases #~(modify-phases %standard-phases
4769 (add-after 'unpack 'set-include-dirs
4770 (lambda* (#:key inputs outputs #:allow-other-keys)
4771 (let* ((python (assoc-ref inputs "python"))
4772 (sip-include-dirs (search-input-directory inputs
4773 (string-append "/lib/python"
4774 (python-version python)
4775 "/site-packages/PyQt6/bindings"))))
4776 (setenv "SIP_INCLUDE_DIRS" sip-include-dirs)))))))
4777 (home-page "https://www.riverbankcomputing.com/software/pyqtwebengine/intro")
4778 (synopsis "Python bindings for QtWebEngine")
4779 (description
4780 "PyQtWebEngine is a set of Python bindings for The Qt Company's Qt
4781WebEngine libraries. The bindings sit on top of PyQt6 and are implemented as a
4782set of three modules.")
4783 (license license:gpl3)))
4784
4785(define-public python-pyqt-builder
4786 (package
4787 (name "python-pyqt-builder")
4788 (version "1.18.2")
4789 (source
4790 (origin
4791 (method url-fetch)
4792 (uri (pypi-uri "pyqt_builder" version))
4793 (sha256
4794 (base32
4795 "1g40j5iyad8bw8113rsxxkbkdi7g1lcjj0lb1j7pma442i3fmpsn"))))
4796 (build-system pyproject-build-system)
4797 (native-inputs (list python-setuptools
4798 python-setuptools-scm
4799 python-wheel))
4800 (inputs
4801 (list python-sip))
4802 (arguments (list #:tests? #f)) ; no test suite
4803 (home-page "https://www.riverbankcomputing.com/static/Docs/PyQt-builder/")
4804 (synopsis "PEP 517 compliant PyQt build system")
4805 (description "PyQt-builder is a tool for generating Python bindings for C++
4806libraries that use the Qt application framework. The bindings are built on
4807top of the PyQt bindings for Qt. PyQt-builder is used to build PyQt itself.")
4808 ;; Either version 2 or 3, but no other version. See the file
4809 ;; 'pyqtbuild/builder.py' in the source distribution for more information.
4810 (license (list license:gpl2 license:gpl3))))
4811
4812(define-public python-qtpy
4813 (package
4814 (name "python-qtpy")
4815 (version "2.4.3")
4816 (source
4817 (origin
4818 (method url-fetch)
4819 (uri (pypi-uri "qtpy" version))
4820 (sha256
4821 (base32 "1fzmrpjgchiiqsxnyg8ci553nazflfycr9lbas8dmlz669w4yx6v"))))
4822 (build-system pyproject-build-system)
4823 (arguments
4824 (list
4825 #:test-flags
4826 ;; Fatal Python error: Aborted
4827 #~(list "--ignore=qtpy/tests/test_compat.py"
4828 "--ignore=qtpy/tests/test_qtcore.py"
4829 "--ignore=qtpy/tests/test_qtgui.py"
4830 "--ignore=qtpy/tests/test_qtprintsupport.py"
4831 "--ignore=qtpy/tests/test_qtwidgets.py"
4832 "--ignore=qtpy/tests/test_uic.py"
4833 ;; ModuleNotFoundError: No module named 'PyQt5.QtTextToSpeech'
4834 "-k" (string-append "not test_qttexttospeech"
4835 ;; Fatal Python error: Segmentation fault
4836 " and not test_qtsql_members_aliases"))))
4837 ;; XXX: Do not include, even supported: Qt5, PySide2 PySide6, only test
4838 ;; against Qt6 to reduce closure size..
4839 (native-inputs
4840 (list python-pyqt-6
4841 python-pytest
4842 python-setuptools))
4843 (propagated-inputs
4844 (list python-packaging))
4845 (home-page "https://github.com/spyder-ide/qtpy")
4846 (synopsis "Uniform layer to support PyQt5, PySide2, PyQt6, PySide6")
4847 (description
4848 "Provides an abstraction layer on top of the various Qt bindings (PyQt5,
4849PySide2, PyQt6, PySide6) and additional custom QWidgets.")
4850 (license license:expat)))
4851
4852(define-public python-qt-py
4853 (package
4854 (name "python-qt-py")
4855 (version "2.0.3")
4856 (source
4857 (origin
4858 (method git-fetch)
4859 (uri (git-reference
4860 (url "https://github.com/mottosso/Qt.py")
4861 (commit version)))
4862 (file-name (git-file-name name version))
4863 (sha256
4864 (base32 "0p3aiskbhy5g9f87mkv1vc0mw155wl5x915lk9ankj6d1djjkfxw"))))
4865 (build-system pyproject-build-system)
4866 (arguments
4867 ;; See: <https://github.com/mottosso/Qt.py/issues/395>.
4868 (list #:tests? #f))
4869 (native-inputs
4870 (list python-pyqt-6
4871 python-setuptools))
4872 (propagated-inputs
4873 (list python-types-pyside6))
4874 (home-page "https://github.com/mottosso/Qt.py")
4875 (synopsis "Abstraction layer for Python Qt bindings")
4876 (description
4877 "This package provides an abstraction layer on top of the various Qt
4878bindings (PySide, PySide2, PyQt4 and PyQt5).")
4879 (license license:expat)))
4880
4881;; XXX: Deprecated on <2026-03-13>.
4882(define-deprecated-package python-qt.py python-qt-py)
4883
4884(define-public python-superqt
4885 ;; XXX: Move to (gnu packages python-graphics) or closer to mantid to
4886 ;; prevent adding python-science module here.
4887 (package
4888 (name "python-superqt")
4889 (version "0.8.1")
4890 (source
4891 (origin
4892 (method git-fetch)
4893 (uri (git-reference
4894 (url "https://github.com/pyapp-kit/superqt")
4895 (commit (string-append "v" version))))
4896 (file-name (git-file-name name version))
4897 (sha256
4898 (base32 "1sxvz1jm1kyd4nlaz6g9p64c0ifj1mmj0qcwpgd0p3b7l7yyvjqz"))))
4899 (build-system pyproject-build-system)
4900 (arguments
4901 (list #:tests? #f)) ;XXX: tets segfaulted
4902 (native-inputs
4903 (list python-pytest
4904 python-hatch-vcs
4905 python-hatchling
4906 python-numpy
4907 python-pytest-qt))
4908 (propagated-inputs
4909 (list python-pygments
4910 python-qtpy
4911 python-typing-extensions
4912 ;; [optional]
4913 python-pyqt-6
4914 python-pyconify))
4915 (home-page "https://github.com/pyapp-kit/superqt")
4916 (synopsis "Extra widgets and components for PyQt/PySide")
4917 (description "This package provides some extra widgets for
4918@code{PyQt/PySide}:
4919@itemize
4920@item Multi-handle slider for float values
4921@item Spinbox with arbitrarily large integers
4922@item Magnitude combined with unit dropdown
4923@item Label that will elide text
4924@item Searchable ComboBox populated from Enum
4925@item Searchable List
4926@item Searchable Tree
4927@item Color ComboBox
4928@item Colormap ComboBox
4929@item Toggle switch
4930@item Collapsible widget to hide and unhide child widgets
4931@item Flow layout
4932@end itemize")
4933 (license license:bsd-3)))
4934
4935(define-public qscintilla-qt6
4936 (package
4937 (name "qscintilla-qt6")
4938 (version "2.14.1")
4939 (source (origin
4940 (method url-fetch)
4941 (uri (string-append "https://www.riverbankcomputing.com/static"
4942 "/Downloads/QScintilla/" version
4943 "/QScintilla_src-" version ".tar.gz"))
4944 (sha256
4945 (base32
4946 "0kfx9hxd9a9h7cs3qby0lrbkj8hswxhq1k3clz5xz1cxrim3rqfz"))))
4947 (build-system gnu-build-system)
4948 (arguments
4949 `(#:phases
4950 (modify-phases %standard-phases
4951 (replace 'configure
4952 (lambda* (#:key outputs #:allow-other-keys)
4953 (let ((out (assoc-ref outputs "out")))
4954 (chdir "src")
4955 (substitute* "qscintilla.pro"
4956 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
4957 (string-append out "/lib"))
4958 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
4959 (string-append out "/include"))
4960 (("\\$\\$\\[QT_INSTALL_TRANSLATIONS\\]")
4961 (string-append out "/translations"))
4962 (("\\$\\$\\[QT_INSTALL_DATA\\]")
4963 (string-append out "/lib/qt$${QT_MAJOR_VERSION}"))
4964 (("\\$\\$\\[QT_HOST_DATA\\]")
4965 (string-append out "/lib/qt$${QT_MAJOR_VERSION}")))
4966 (invoke "qmake")))))))
4967 (native-inputs (list qtbase))
4968 (home-page "https://www.riverbankcomputing.co.uk/software/qscintilla/intro")
4969 (synopsis "Qt port of the Scintilla C++ editor control")
4970 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
4971editor control. QScintilla includes features especially useful when editing
4972and debugging source code. These include support for syntax styling, error
4973indicators, code completion and call tips.")
4974 (license license:gpl3+)))
4975
4976(define-public qscintilla-qt5
4977 (package
4978 (inherit qscintilla-qt6)
4979 (name "qscintilla-qt5")
4980 (native-inputs (list qtbase-5))))
4981
4982;; 2026-07-17
4983(define-deprecated-package qscintilla qscintilla-qt5)
4984
4985(define-public python-qscintilla
4986 (package/inherit qscintilla-qt5
4987 (name "python-qscintilla")
4988 (build-system pyproject-build-system)
4989 (arguments
4990 (list #:tests? #f
4991 #:phases
4992 #~(modify-phases %standard-phases
4993 (add-before 'build 'set-configure-flags
4994 (lambda _
4995 (setenv "CFLAGS" (string-append
4996 "--qsci-include-dir"
4997 #$(this-package-input "qscintilla-qt5")
4998 "/include"
4999 " --qsci-library-dir"
5000 #$(this-package-input "qscintilla-qt5")
5001 "/lib"))))
5002 (add-after 'unpack 'prepare-build
5003 (lambda _
5004 (chdir "Python")
5005 (symlink "pyproject-qt5.toml" "pyproject.toml")))
5006 (add-after 'unpack 'set-include-dirs
5007 (lambda _
5008 (let* ((python-pyqt #$(this-package-input "python-pyqt"))
5009 (sip-include-dirs (string-append
5010 python-pyqt "/lib/python"
5011 #$(version-major+minor
5012 (package-version python))
5013 "/site-packages/PyQt5/bindings")))
5014 (setenv "SIP_INCLUDE_DIRS" sip-include-dirs)))))))
5015 (native-inputs
5016 (list python-pyqt-builder qtbase-5))
5017 (inputs
5018 (list python-pyqt python-sip qscintilla-qt5))
5019 (description "QScintilla is a port to Qt of Neil Hodgson's Scintilla C++
5020editor control. QScintilla includes features especially useful when editing
5021and debugging source code. These include support for syntax styling, error
5022indicators, code completion and call tips.
5023
5024This package provides the Python bindings.")))
5025
5026;; PyQt only looks for modules in its own directory. It ignores environment
5027;; variables such as PYTHONPATH, so we need to build a union package to make
5028;; it work.
5029(define-public python-pyqt+qscintilla
5030 (package/inherit python-pyqt
5031 (name "python-pyqt+qscintilla")
5032 (source #f)
5033 (build-system trivial-build-system)
5034 (arguments
5035 '(#:modules ((guix build union))
5036 #:builder (begin
5037 (use-modules (ice-9 match)
5038 (guix build union))
5039 (match %build-inputs
5040 (((names . directories) ...)
5041 (union-build (assoc-ref %outputs "out")
5042 directories))))))
5043 (inputs
5044 `(("python-pyqt" ,python-pyqt)
5045 ("python-qscintilla" ,python-qscintilla)))
5046 (synopsis "Union of PyQt and the Qscintilla extension")
5047 (description
5048 "This package contains the union of PyQt and the Qscintilla extension.")))
5049
5050(define-public qtkeychain
5051 (package
5052 (name "qtkeychain")
5053 (version "0.15.0")
5054 (source
5055 (origin
5056 (method git-fetch)
5057 (uri (git-reference
5058 (url "https://github.com/frankosterfeld/qtkeychain/")
5059 (commit version)))
5060 (file-name (git-file-name name version))
5061 (sha256
5062 (base32
5063 "0j1mn6vl0zc54b0pcffr20sqa5lbiwyi0l6vfa1ad3av0b66h1zy"))))
5064 (build-system cmake-build-system)
5065 (native-inputs
5066 (list pkg-config qttools-5))
5067 (inputs
5068 (list libsecret qtbase-5))
5069 (arguments
5070 `(#:tests? #f ; No tests included
5071 #:phases
5072 (modify-phases %standard-phases
5073 (add-before 'configure 'set-qt-trans-dir
5074 (lambda _
5075 (substitute* "CMakeLists.txt"
5076 (("\\$\\{qt_translations_dir\\}")
5077 "${CMAKE_INSTALL_PREFIX}/share/qt5/translations")))))))
5078 (home-page "https://github.com/frankosterfeld/qtkeychain")
5079 (synopsis "Qt API to store passwords")
5080 (description
5081 "QtKeychain is a Qt library to store passwords and other secret data
5082securely. It will not store any data unencrypted unless explicitly requested.")
5083 (license license:bsd-3)))
5084
5085(define-public qtkeychain-qt6
5086 (package
5087 (inherit qtkeychain)
5088 (name "qtkeychain-qt6")
5089 (native-inputs
5090 (modify-inputs native-inputs
5091 (replace "qttools" qttools)))
5092 (inputs
5093 (modify-inputs inputs
5094 (replace "qtbase" qtbase)))
5095 (arguments
5096 (substitute-keyword-arguments arguments
5097 ((#:configure-flags flags #~(list))
5098 #~(cons "-DBUILD_WITH_QT6=ON" #$flags))
5099 ((#:phases phases '%standard-phases)
5100 #~(modify-phases #$phases
5101 (replace 'set-qt-trans-dir
5102 (lambda _
5103 (lambda _
5104 (substitute* "CMakeLists.txt"
5105 (("\\$\\{qt_translations_dir\\}")
5106 "${CMAKE_INSTALL_PREFIX}/share/qt6/translations")))))))))))
5107
5108(define-public qtsolutions
5109 (let ((commit "777e95ba69952f11eaec0adfb0cb987fabcdecb3")
5110 (revision "54"))
5111 (package
5112 (name "qtsolutions")
5113 (version (git-version "0" revision commit))
5114 (source
5115 (origin
5116 (method git-fetch)
5117 (uri (git-reference
5118 (url "https://github.com/qtproject/qt-solutions")
5119 (commit commit)))
5120 (file-name (git-file-name name version))
5121 (sha256
5122 (base32 "044dzxxhjldzmxd1pqi7p1ppppjvqjdr42bm60gbl8902rda6qrk"))
5123 (modules '((guix build utils)
5124 (ice-9 ftw)
5125 (srfi srfi-1)))
5126 (snippet
5127 ;; Unvendor QtLockFile from QtSingleApplication.
5128 '(begin
5129 (with-directory-excursion "qtsingleapplication/src"
5130 (for-each delete-file
5131 (find-files "." "qtlockedfile.*\\.(h|cpp)"))
5132 (substitute* "qtsingleapplication.pri"
5133 ;; Add include path of LockedFile.
5134 (("INCLUDEPATH \\+=")
5135 "INCLUDEPATH += ../../qtlockedfile/src")
5136 ;; Link library of LockedFile.
5137 (("LIBS \\+=")
5138 "LIBS += -lQtSolutions_LockedFile"))
5139 (substitute* '("qtlocalpeer.h" "qtlocalpeer.cpp")
5140 (("#include \"qtlockedfile.*\\.cpp\"") "")
5141 ;; Unwrap namespace added in the vendoring process.
5142 (("QtLP_Private::QtLockedFile")
5143 "QtLockedFile")))))))
5144 (build-system gnu-build-system)
5145 (arguments
5146 `(#:tests? #f ; No target
5147 #:imported-modules
5148 ((guix build copy-build-system)
5149 ,@%default-gnu-imported-modules)
5150 #:modules
5151 (((guix build copy-build-system) #:prefix copy:)
5152 (guix build gnu-build-system)
5153 (guix build utils))
5154 #:phases
5155 (modify-phases %standard-phases
5156 (add-after 'unpack 'patch-source
5157 (lambda* (#:key outputs #:allow-other-keys)
5158 (substitute* (find-files "." "common.pri")
5159 ;; Remove unnecessary prefixes/suffixes in library names.
5160 (("qt5") "qt")
5161 (("-head") ""))
5162 ;; Disable building of examples.
5163 (substitute* (find-files "." "\\.pro$")
5164 (("SUBDIRS\\+=examples") ""))
5165 ;; Fix deprecated functions.
5166 (substitute* "qtsoap/src/qtsoap.cpp"
5167 (("toAscii") "toUtf8"))))
5168 (replace 'configure
5169 (lambda _
5170 (for-each (lambda (solution)
5171 (with-directory-excursion solution
5172 (invoke "./configure" "-library")
5173 (invoke "qmake")))
5174 '("qtlockedfile" "qtpropertybrowser" "qtservice"
5175 "qtsingleapplication" "qtsoap"))))
5176 (replace 'build
5177 (lambda _
5178 (for-each (lambda (solution)
5179 (with-directory-excursion solution
5180 (invoke "make")))
5181 '("qtlockedfile" "qtpropertybrowser" "qtservice"
5182 "qtsingleapplication" "qtsoap"))))
5183 (replace 'install
5184 (lambda args
5185 (for-each (lambda (solution)
5186 (with-directory-excursion solution
5187 (apply
5188 (assoc-ref copy:%standard-phases 'install)
5189 #:install-plan
5190 '(("src" "include" #:include-regexp ("\\.h$"))
5191 ("lib" "lib"))
5192 args)))
5193 '("qtlockedfile" "qtpropertybrowser" "qtservice"
5194 "qtsingleapplication" "qtsoap")))))))
5195 (inputs
5196 (list qtbase-5))
5197 (synopsis "Collection of Qt extensions")
5198 (description "QtSolutions is a set of components extending Qt.
5199@itemize
5200@item QtLockedFile: A class that extends QFile with advisory locking functions.
5201@item QtPropertyBrowser: A framework that enables the user to edit a set of
5202properties.
5203@item QtService: A helper for writing services such as Unix daemons.
5204@item QtSingleApplication: A component that provides support for applications
5205that can be only started once per user.
5206@item QtSoap: A component that provides basic web service support with version
52071.1 of the SOAP protocol.
5208@end itemize\n")
5209 (home-page "https://doc.qt.io/archives/qq/qq09-qt-solutions.html")
5210 (license (list license:bsd-3
5211 ;; QScriptParser and QScriptGrammar specifically allow
5212 ;; redistribution under GPL3 or LGPL2.1
5213 license:gpl3 license:lgpl2.1)))))
5214
5215(define-public qwindowkit
5216 (package
5217 (name "qwindowkit")
5218 (version "1.5.0")
5219 (source (origin
5220 (method git-fetch)
5221 (uri (git-reference
5222 (url "https://github.com/stdware/qwindowkit")
5223 (commit version)))
5224 (file-name (git-file-name name version))
5225 (sha256
5226 (base32
5227 "1h9w6abdnf5yyyga54caxwn4vihim1400gw3rv8bgf2b7w53chpw"))))
5228 (build-system cmake-build-system)
5229 (arguments
5230 (list #:tests? #f ;no test suite
5231 #:configure-flags
5232 #~(list "-DQWINDOWKIT_BUILD_QUICK=ON"))) ;required by Jami
5233 (native-inputs (list qmsetup))
5234 (inputs (list qtbase qtdeclarative))
5235 (home-page "https://github.com/stdware/qwindowkit")
5236 (synopsis "Frameless window framework for Qt")
5237 (description "QWindowKit is a cross-platform window customization
5238framework for Qt Widgets and Qt Quick.")
5239 (license license:asl2.0)))
5240
5241(define-public qwt
5242 (package
5243 (name "qwt")
5244 (version "6.1.5")
5245 (source
5246 (origin
5247 (method url-fetch)
5248 (uri
5249 (string-append "mirror://sourceforge/qwt/qwt/"
5250 version "/qwt-" version ".tar.bz2"))
5251 (sha256
5252 (base32 "0hf0mpca248xlqn7xnzkfj8drf19gdyg5syzklvq8pibxiixwxj0"))))
5253 (build-system gnu-build-system)
5254 (inputs
5255 (list qtbase-5 qtsvg-5 qttools-5))
5256 (arguments
5257 `(#:phases
5258 (modify-phases %standard-phases
5259 (replace 'configure
5260 (lambda* (#:key outputs #:allow-other-keys)
5261 (let* ((out (assoc-ref outputs "out"))
5262 (docdir (string-append out "/share/doc/qwt"))
5263 (incdir (string-append out "/include/qwt"))
5264 (pluginsdir (string-append out "/lib/qt5/plugins/designer"))
5265 (featuresdir (string-append out "/lib/qt5/mkspecs/features")))
5266 (substitute* '("qwtconfig.pri")
5267 (("^(\\s*QWT_INSTALL_PREFIX)\\s*=.*" _ x)
5268 (format #f "~a = ~a\n" x out))
5269 (("^(QWT_INSTALL_DOCS)\\s*=.*" _ x)
5270 (format #f "~a = ~a\n" x docdir))
5271 (("^(QWT_INSTALL_HEADERS)\\s*=.*" _ x)
5272 (format #f "~a = ~a\n" x incdir))
5273 (("^(QWT_INSTALL_PLUGINS)\\s*=.*" _ x)
5274 (format #f "~a = ~a\n" x pluginsdir))
5275 (("^(QWT_INSTALL_FEATURES)\\s*=.*" _ x)
5276 (format #f "~a = ~a\n" x featuresdir)))
5277 (substitute* '("doc/doc.pro")
5278 ;; We'll install them in the 'install-man-pages' phase.
5279 (("^unix:doc\\.files.*") ""))
5280 (invoke "qmake"))))
5281 (add-after 'install 'install-man-pages
5282 (lambda* (#:key outputs #:allow-other-keys)
5283 (let* ((out (assoc-ref outputs "out"))
5284 (man (string-append out "/share/man")))
5285 ;; Remove some incomplete manual pages.
5286 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
5287 (mkdir-p man)
5288 (copy-recursively "doc/man" man)))))))
5289 (home-page "https://qwt.sourceforge.net")
5290 (synopsis "Qt widgets for plots, scales, dials and other technical software
5291GUI components")
5292 (description
5293 "The Qwt library contains widgets and components which are primarily useful
5294for technical and scientific purposes. It includes a 2-D plotting widget,
5295different kinds of sliders, and much more.")
5296 (license
5297 (list
5298 ;; The Qwt license is LGPL2.1 with some exceptions.
5299 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
5300 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
5301 license:lgpl2.1 license:gpl3))))
5302
5303(define-public jkqtplotter
5304 (let ((revision "0")
5305 ;; This is the tag v5.0.0-beta2.
5306 (commit "b8cc2909f2498f7bb3ee1830151b3dc71bcf6375"))
5307 (package
5308 (name "jkqtplotter")
5309 (version (git-version "4.0.3" revision commit))
5310 (source
5311 (origin
5312 (method git-fetch)
5313 (uri (git-reference
5314 (url "https://github.com/jkriege2/JKQtPlotter")
5315 (commit commit)))
5316 (file-name (git-file-name name version))
5317 (sha256
5318 (base32 "0lv202l9jg80z9ddn3ylkvgh4v3kwg8g0f4r1ydvd0xnnl6rijpq"))))
5319 (build-system qt-build-system)
5320 (inputs (list opencv qtsvg))
5321 (arguments
5322 (list
5323 #:qtbase qtbase
5324 #:tests? #f ;no tests
5325 #:phases
5326 #~(modify-phases %standard-phases
5327 (add-after 'install 'delete-broken-binaries
5328 (lambda _
5329 (delete-file-recursively (string-append #$output "/bin")))))))
5330 (home-page "https://jkriege2.github.io/JKQtPlotter/index.html")
5331 (synopsis "Qt Plotting Library")
5332 (description
5333 "JKQTPlotter is a library of function and data plotter classes for Qt.
5334It includes a plotter widget and a LaTeX equation renderer and supports
5335a variety of graphs and charts.")
5336 (license license:lgpl2.1+))))
5337
5338(define-public dotherside
5339 (package
5340 (name "dotherside")
5341 (version "0.9.0")
5342 (source
5343 (origin
5344 (method git-fetch)
5345 (uri (git-reference
5346 (url "https://github.com/filcuc/DOtherSide")
5347 (commit (string-append "v" version))))
5348 (file-name (git-file-name name version))
5349 (sha256
5350 (base32
5351 "13n2qb8q9jz4ihwlbs7y15lw90w9113gb1bgnb1dggpxkj64r953"))))
5352 (build-system cmake-build-system)
5353 (arguments (list #:tests? #f))
5354 (native-inputs
5355 (list qttools-5))
5356 (inputs
5357 ;; TODO: Support Qt 6 (requires qtdeclarative of Qt6).
5358 (list qtbase-5 qtdeclarative-5))
5359 (home-page "https://filcuc.github.io/DOtherSide/index.html")
5360 (synopsis "C language library for creating bindings for the Qt QML language")
5361 (description
5362 "DOtherSide is a C language library for creating bindings for the
5363QT QML language. The following features are implementable from
5364a binding language:
5365@itemize
5366@item Creating custom QObject
5367@item Creating custom QAbstractListModels
5368@item Creating custom properties, signals and slots
5369@item Creating from QML QObject defined in the binded language
5370@item Creating from Singleton QML QObject defined in the binded language
5371@end itemize\n")
5372 (license license:lgpl3))) ;version 3 only (+ exception)
5373
5374(define-public qcodeeditor
5375 (let ((commit "dc644d41b68978ab9a5591ba891a223221570e74") ;no tags
5376 (revision "0"))
5377 (package
5378 (name "qcodeeditor")
5379 (version (git-version "0" revision commit))
5380 (source (origin
5381 (method git-fetch)
5382 (uri (git-reference
5383 (url "https://github.com/Megaxela/QCodeEditor")
5384 (commit commit)))
5385 (file-name (git-file-name name version))
5386 (sha256
5387 (base32
5388 "1bpvfwbgp275w79dzrd7d9k3md1ch7n88rh59mxdfj8s911n42j8"))
5389 (patches
5390 (search-patches
5391 "qcodeeditor-qt6.patch"
5392 "qcodeeditor-fix-build-with-c++17.patch"))))
5393 (build-system qt-build-system)
5394 (arguments
5395 (list #:qtbase qtbase
5396 #:tests? #f ;no tests
5397 #:configure-flags
5398 #~(list "-DBUILD_EXAMPLE=ON"
5399 (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
5400 #$output "/lib"))
5401 #:phases
5402 #~(modify-phases %standard-phases
5403 (add-after 'unpack 'build-shared-library
5404 (lambda _
5405 (substitute* "CMakeLists.txt"
5406 (("STATIC") "SHARED"))))
5407 ;; Install rule does not exist.
5408 (replace 'install
5409 (lambda _
5410 (install-file "example/QCodeEditorExample"
5411 (string-append #$output "/bin"))
5412 (install-file "libQCodeEditor.so"
5413 (string-append #$output "/lib"))
5414 (for-each
5415 (lambda (file)
5416 (install-file file
5417 (string-append #$output
5418 "/include/QCodeEditor")))
5419 (find-files "../source/include/internal" "\\.hpp")))))))
5420 (inputs
5421 (list qtwayland))
5422 (home-page "https://github.com/Megaxela/QCodeEditor")
5423 (synopsis "Qt code editor widget")
5424 (description
5425 "QCodeEditor is a Qt widget for editing/viewing code.")
5426 (license license:expat))))
5427
5428(define-public qt-advanced-docking-system
5429 (package
5430 (name "qt-advanced-docking-system")
5431 (version "4.4.1")
5432 (source
5433 (origin
5434 (method git-fetch)
5435 (uri
5436 (git-reference
5437 (url "https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System")
5438 (commit version)))
5439 (file-name (git-file-name name version))
5440 (sha256
5441 (base32 "07qhvhz4cmkrpxpfmybva57ddshkwf993jiryxg3lkj24p1rlh7d"))))
5442 (build-system qt-build-system)
5443 (arguments
5444 (list #:qtbase qtbase
5445 #:tests? #f ;no tests
5446 #:configure-flags
5447 #~(list ;; Examples require qtdeclarative.
5448 "-DBUILD_EXAMPLES=OFF"
5449 (string-append "-DADS_VERSION=" #$version))))
5450 (home-page "https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System")
5451 (synopsis "Advanced docking system for Qt")
5452 (description
5453 "Qt Advanced Docking System lets you create customizable layouts using a
5454window docking system.")
5455 (license license:lgpl2.1+)))
5456
5457(define-public qtpromise
5458 (package
5459 (name "qtpromise")
5460 (version "0.7.0")
5461 (source (origin
5462 (method git-fetch)
5463 (uri (git-reference
5464 (url "https://github.com/simonbrunel/qtpromise")
5465 (commit (string-append "v" version))))
5466 (file-name (git-file-name name version))
5467 (sha256
5468 (base32
5469 "0nsh6v5k4kdrrhcd6adz947n0dka4rrbx8f8rvm1175545nbi67s"))))
5470 (build-system qt-build-system)
5471 (arguments
5472 (list #:phases
5473 #~(modify-phases %standard-phases
5474 (add-before 'install 'fix-include-path
5475 (lambda _
5476 (chdir "../source")
5477 (substitute* "../source/include/QtPromise"
5478 (("../src/") ""))))
5479 (replace 'install
5480 (lambda _
5481 (let ((include (string-append #$output "/include")))
5482 (with-directory-excursion "../source"
5483 (install-file "include/QtPromise"
5484 (string-append include))
5485 (copy-recursively "src/qtpromise"
5486 (string-append include
5487 "/qtpromise")))))))))
5488 (home-page "https://qtpromise.netlify.app/")
5489 (synopsis "Promises/A+ implementation for Qt/C++")
5490 (description
5491 "This package provides a Qt/C++ implementation of
5492@url{Promises/A+,https://promisesaplus.com/} standard for the ``promises''
5493programming paradigm.")
5494 (license license:expat)))
5495
5496(define-public qtwidgetanimationframework
5497 (let ((commit "b07ab59cee7a21eb29d29cb67c160681f13ac5ae") ;no tags
5498 (revision "0"))
5499 (package
5500 (name "qtwidgetanimationframework")
5501 (version (git-version "0" revision commit))
5502 (source
5503 (origin
5504 (method git-fetch)
5505 (uri
5506 (git-reference
5507 (url "https://github.com/dimkanovikov/WidgetAnimationFramework")
5508 (commit commit)))
5509 (file-name (git-file-name name version))
5510 (sha256
5511 (base32 "1smbdrzk05vvbf6lpjdq82k4y2kc4yv1gk5388qbslbzlb6ihls6"))))
5512 (build-system qt-build-system)
5513 (arguments
5514 (list #:qtbase qtbase
5515 #:tests? #f ;no tests
5516 #:modules '((guix build qt-build-system)
5517 ((guix build gnu-build-system) #:prefix gnu:)
5518 (guix build utils))
5519 #:phases
5520 #~(modify-phases %standard-phases
5521 ;; This project does not have any build rule but its demo has
5522 ;; one.
5523 (add-after 'unpack 'pre-configure
5524 (lambda _
5525 (copy-file "demo/waf-demo.pro" "src/waf.pro")
5526 (substitute* "src/waf.pro"
5527 (("main.cpp ") "")
5528 (("app") "lib")
5529 (("waf-demo") "waf"))
5530 (chdir "src")))
5531 ;; No configure script exists.
5532 (replace 'configure
5533 (lambda _
5534 (invoke "qmake")))
5535 (replace 'build (assoc-ref gnu:%standard-phases 'build))
5536 ;; No install rule exists.
5537 (replace 'install
5538 (lambda _
5539 ;; Install library files.
5540 (for-each
5541 (lambda (file)
5542 (install-file file
5543 (string-append #$output "/lib/"
5544 (dirname file))))
5545 (find-files "." "\\.so"))
5546 ;; Install header files.
5547 (for-each
5548 (lambda (file)
5549 (install-file file
5550 (string-append #$output "/include/WAF/"
5551 (dirname file))))
5552 (find-files "." "\\.h$")))))))
5553 (home-page "https://github.com/dimkanovikov/WidgetAnimationFramework")
5554 (synopsis "Extension for animating Qt widgets")
5555 (description
5556 "@acronym{WAF,Widget Animation Framework} is an extension for animating
5557Qt widgets.")
5558 (license license:lgpl3+))))
5559
5560(define-public qtcolorwidgets
5561 (let ((commit "8491078434b24cba295b5e41cc0d2a94c7049a5b")
5562 (revision "1"))
5563 (package
5564 (name "qtcolorwidgets")
5565 (version (git-version "2.2.0" revision commit))
5566 (source
5567 (origin
5568 (method git-fetch)
5569 (uri (git-reference
5570 (url "https://gitlab.com/mattbas/Qt-Color-Widgets")
5571 (commit commit)))
5572 (file-name (git-file-name name version))
5573 (sha256
5574 (base32
5575 "1ixb2v5mjdszkxqq51knaj1pcivnihwlj9qlm9pxmvzl9qsvbcgg"))))
5576 (build-system cmake-build-system)
5577 (arguments
5578 (list #:tests? #f ;there are no tests
5579 #:configure-flags #~(list "-DQT_VERSION_MAJOR=6")))
5580 (native-inputs (list qttools))
5581 (inputs (list qtbase))
5582 (home-page "https://gitlab.com/mattbas/Qt-Color-Widgets")
5583 (synopsis "Color management widgets")
5584 (description "QtColorWidgets provides a Qt color dialog that is more
5585user-friendly than the default @code{QColorDialog} and several other
5586color-related widgets.")
5587 ;; Includes a license exception for combining with GPL2 code.
5588 (license license:lgpl3+))))
5589
5590(define-public qcustomplot
5591 (package
5592 (name "qcustomplot")
5593 (version "2.1.1")
5594 (source
5595 (origin
5596 (method url-fetch)
5597 (uri (string-append "https://www.qcustomplot.com/release/"
5598 version "/QCustomPlot.tar.gz"))
5599 (sha256
5600 (base32 "0aiixk36v1534429yndn2phn7q7m2rvkh81hn7awin4b1vkidz4s"))))
5601 (native-inputs
5602 `(("qcustomplot-sharedlib"
5603 ,(origin
5604 (method url-fetch)
5605 (uri (string-append "https://www.qcustomplot.com/release/"
5606 version "/QCustomPlot-sharedlib.tar.gz"))
5607 (sha256
5608 (base32 "1h5l29q82grz94z5ch95vq6hs5clcymbcb3yngqfsh47gsffmmim"))))))
5609 (inputs
5610 (list qtbase))
5611 (build-system gnu-build-system)
5612 (arguments
5613 `(#:phases
5614 (modify-phases %standard-phases
5615 (add-after 'unpack 'unpack-extra-files
5616 (lambda* (#:key inputs #:allow-other-keys)
5617 (invoke "tar" "-xvf" (assoc-ref inputs "qcustomplot-sharedlib"))))
5618 (replace 'configure
5619 (lambda* (#:key outputs #:allow-other-keys)
5620 (chdir "qcustomplot-sharedlib/sharedlib-compilation")
5621 (substitute* "sharedlib-compilation.pro"
5622 ;; Don't build debug library.
5623 (("debug_and_release")
5624 "release"))
5625 (invoke "qmake"
5626 (string-append "DESTDIR="
5627 (assoc-ref outputs "out")
5628 "/lib"))))
5629 (add-after 'install 'install-header
5630 (lambda* (#:key outputs #:allow-other-keys)
5631 (install-file "../../qcustomplot.h"
5632 (string-append (assoc-ref outputs "out")
5633 "/include")))))))
5634 (home-page "https://www.qcustomplot.com/")
5635 (synopsis "Qt widget for plotting and data visualization")
5636 (description
5637 "QCustomPlot is a Qt C++ widget providing 2D plots, graphs and charts.")
5638 (license license:gpl3+)))
5639
5640(define-public qcustomplot-qt5
5641 (package/inherit qcustomplot
5642 (name "qcustomplot-qt5")
5643 (inputs
5644 (modify-inputs inputs
5645 (replace "qtbase" qtbase-5)))))
5646
5647(define-public python-shiboken-6
5648 (package
5649 (name "python-shiboken-6")
5650 (version "6.9.2")
5651 (source (origin
5652 (method url-fetch)
5653 (uri (string-append "mirror://qt/QtForPython/pyside6/PySide6-"
5654 version "-src/pyside-setup-everywhere-src-"
5655 version ".tar.xz"))
5656 (sha256
5657 (base32
5658 "0b92b4zi5rqg5acgbb6yan349idvzmc0x8wjwkdwkga2ad38gh4y"))))
5659 (build-system cmake-build-system)
5660 (inputs
5661 (list clang-18
5662 libxml2
5663 libxslt
5664 python-wrapper
5665 qtbase))
5666 (properties `((upstream-name . "pyside-setup")))
5667 (arguments
5668 (list
5669 #:tests? #f
5670 ;; FIXME: Building tests fails
5671 #:imported-modules (append %cmake-build-system-modules
5672 %pyproject-build-system-modules)
5673 #:modules '((guix build cmake-build-system)
5674 ((guix build pyproject-build-system) #:prefix py:)
5675 (guix build utils))
5676 #:configure-flags #~(list
5677 ;; The RUNPATH of shibokenmodule contains the entry
5678 ;; in build directory instead of install directory.
5679 "-DCMAKE_SKIP_RPATH=TRUE"
5680 (string-append "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath="
5681 #$output "/lib")
5682 "-DBUILD_TESTS=off")
5683 #:phases
5684 #~(modify-phases %standard-phases
5685 (add-after 'unpack 'use-shiboken-dir-only
5686 (lambda _ (chdir "sources/shiboken6")))
5687 ;; .dist-info in site-packages is necessary for sanity-check.
5688 (add-after 'install 'install-distinfo
5689 (lambda* (#:key inputs outputs #:allow-other-keys)
5690 (with-directory-excursion (py:site-packages inputs outputs)
5691 (for-each
5692 (lambda (name)
5693 (let ((dir (string-append name "-" #$version ".dist-info")))
5694 (mkdir-p dir)
5695 (call-with-output-file (string-append dir "/METADATA")
5696 (lambda (port)
5697 (format port "\
5698Metadata-Version: 1.1
5699Name: ~a
5700Version: ~a~%" name #$version)))))
5701 (list "shiboken6" "shiboken6_generator")))))
5702 ;; The build scripts need to modify some files in
5703 ;; the read-only source directory.
5704 (add-before 'configure 'make-files-writable
5705 (lambda _
5706 (for-each make-file-writable (find-files "."))))
5707 ;; the Zip format does not support timestamps before 1980.
5708 (add-after 'make-files-writable 'ensure-no-mtimes-pre-1980
5709 (assoc-ref py:%standard-phases 'ensure-no-mtimes-pre-1980))
5710 (add-before 'configure 'set-build-env
5711 (lambda _
5712 (let ((llvm #$(this-package-input "clang")))
5713 (setenv "CLANG_INSTALL_DIR" llvm))
5714 ;; Use Clang instead of GCC.
5715 (setenv "AR" "llvm-ar")
5716 (setenv "NM" "llvm-nm")
5717 (setenv "CC" "clang")
5718 (setenv "CXX" "clang++"))))))
5719 (home-page "https://wiki.qt.io/Qt_for_Python")
5720 (synopsis
5721 "Shiboken generates bindings for C++ libraries using CPython source code")
5722 (description
5723 "Shiboken generates bindings for C++ libraries using CPython source code")
5724 (license
5725 (list
5726 ;; The main code is GPL3 or LGPL3.
5727 ;; Examples are BSD-3.
5728 license:gpl3
5729 license:lgpl3
5730 license:bsd-3))))
5731
5732(define-public python-pyside-6
5733 (package
5734 (name "python-pyside-6")
5735 (version (package-version python-shiboken-6))
5736 (source (package-source python-shiboken-6))
5737 (build-system cmake-build-system)
5738 ;; TODO: Add more Qt components if available.
5739 (inputs
5740 (list qtbase
5741 qtdeclarative
5742 qtmultimedia
5743 qtnetworkauth
5744 qtpositioning
5745 qtsvg
5746 qttools
5747 qtwebchannel
5748 qtwebengine
5749 qtwebsockets))
5750 (propagated-inputs
5751 (list python-shiboken-6))
5752 (native-inputs
5753 (list python-wrapper))
5754 (arguments
5755 (list
5756 #:tests? #f
5757 #:imported-modules (append %cmake-build-system-modules
5758 %pyproject-build-system-modules)
5759 #:modules '((guix build cmake-build-system)
5760 ((guix build pyproject-build-system) #:prefix py:)
5761 (guix build utils)
5762 (ice-9 match)
5763 (srfi srfi-1))
5764 #:configure-flags
5765 #~(list "-DBUILD_TESTS=FALSE"
5766 (string-append "-DPYTHON_EXECUTABLE="
5767 (search-input-file %build-inputs "/bin/python")))
5768 #:phases
5769 #~(modify-phases %standard-phases
5770 (add-after 'unpack 'go-to-source-dir
5771 (lambda _ (chdir "sources/pyside6")))
5772 ;; .dist-info in site-packages is necessary for sanity-check.
5773 (add-after 'install 'install-distinfo
5774 (lambda* (#:key inputs outputs #:allow-other-keys)
5775 (with-directory-excursion (py:site-packages inputs outputs)
5776 (let ((dir (string-append "PySide6-" #$version ".dist-info")))
5777 (mkdir-p dir)
5778 (call-with-output-file (string-append dir "/METADATA")
5779 (lambda (port)
5780 (format port "\
5781Metadata-Version: 1.1
5782Name: PySide6
5783Version: ~a
5784Requires-Dist: shiboken6==~a~%" #$version #$version)))))))
5785 (add-after 'go-to-source-dir 'set-rpath
5786 (lambda _
5787 (substitute* "CMakeLists.txt"
5788 (("CMAKE_INSTALL_RPATH")
5789 (string-append "CMAKE_INSTALL_RPATH " #$output "/lib")))))
5790 (add-after 'go-to-source-dir 'fix-qt-module-detection
5791 (lambda* (#:key inputs #:allow-other-keys)
5792 (substitute* "cmake/PySideHelpers.cmake"
5793 (("\\(\"\\$\\{found_basepath\\}\" GREATER \"0\"\\)")
5794 "true"))
5795 (define (search-input-directories dir)
5796 (filter-map
5797 (match-lambda
5798 ((name . directory)
5799 (and (directory-exists? directory)
5800 (string-append directory "/" dir))))
5801 inputs))
5802 (let ((dirs (search-input-directories "include/qt6")))
5803 (substitute* "cmake/Macros/PySideModules.cmake"
5804 (("set\\(shiboken_include_dir_list " all)
5805 (string-append all (string-join dirs ";") " ")))
5806 (setenv "CXXFLAGS"
5807 (string-join
5808 (map (lambda (dir)
5809 (string-append "-I" dir))
5810 dirs)
5811 " "))))))))
5812 (home-page "https://wiki.qt.io/Qt_for_Python")
5813 (synopsis
5814 "The Qt for Python product enables the use of Qt6 APIs in Python applications")
5815 (description
5816 "The Qt for Python product enables the use of Qt6 APIs in Python
5817applications. It lets Python developers utilize the full potential of Qt,
5818using the PySide6 module. The PySide6 module provides access to the
5819individual Qt modules such as QtCore, QtGui,and so on. Qt for Python also
5820comes with the Shiboken6 CPython binding code generator, which can be used to
5821generate Python bindings for your C or C++ code.")
5822 (license (list
5823 license:lgpl3
5824 ;;They state that:
5825 ;; this file may be used under the terms of the GNU General
5826 ;; Public License version 2.0 or (at your option) the GNU
5827 ;; General Public license version 3 or any later version
5828 ;; approved by the KDE Free Qt Foundation.
5829 ;; Thus, it is currently v2 or v3, but no "+".
5830 license:gpl3
5831 license:gpl2))))
5832
5833(define-public libqglviewer
5834 (package
5835 (name "libqglviewer")
5836 (version "2.7.2")
5837 (source (origin
5838 (method url-fetch)
5839 (uri
5840 (string-append "http://libqglviewer.com/src/libQGLViewer-"
5841 version ".tar.gz"))
5842 (sha256
5843 (base32
5844 "023w7da1fyn2z69nbkp2rndiv886zahmc5cmira79zswxjfpklp2"))))
5845 (build-system gnu-build-system)
5846 (arguments
5847 '(#:tests? #f ; no check target
5848 #:make-flags
5849 (list (string-append "PREFIX="
5850 (assoc-ref %outputs "out")))
5851 #:phases
5852 (modify-phases %standard-phases
5853 (replace 'configure
5854 (lambda* (#:key make-flags #:allow-other-keys)
5855 (apply invoke (cons "qmake" make-flags)))))))
5856 (native-inputs
5857 (list qtbase-5 qttools-5))
5858 (inputs
5859 (list glu))
5860 (home-page "https://libqglviewer.com")
5861 (synopsis "Qt-based C++ library for the creation of OpenGL 3D viewers")
5862 (description
5863 "@code{libQGLViewer} is a C++ library based on Qt that eases the creation
5864of OpenGL 3D viewers.
5865
5866It provides some of the typical 3D viewer functionalities, such as the
5867possibility to move the camera using the mouse, which lacks in most of the
5868other APIs. Other features include mouse manipulated frames, interpolated
5869keyFrames, object selection, stereo display, screenshot saving and much more.
5870It can be used by OpenGL beginners as well as to create complex applications,
5871being fully customizable and easy to extend.")
5872 ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
5873 ;; be used.
5874 (license (list license:gpl2 license:gpl3))))
5875
5876(define-public qhexedit
5877 (package
5878 (name "qhexedit")
5879 (version "0.8.9")
5880 (source
5881 (origin
5882 (method git-fetch)
5883 (uri (git-reference
5884 (url "https://github.com/Simsys/qhexedit2")
5885 (commit (string-append "v" version))))
5886 (file-name (git-file-name name version))
5887 (sha256
5888 (base32 "1j333kiwhbidphdx86yilkaivgl632spfh6fqx93bc80gk4is3xa"))))
5889 (build-system gnu-build-system)
5890 (arguments
5891 `(#:phases
5892 (modify-phases %standard-phases
5893 (add-after 'unpack 'fix-path
5894 (lambda* (#:key outputs #:allow-other-keys)
5895 (substitute* "src/qhexedit.pro"
5896 (("^unix:DESTDIR = /usr/lib")
5897 (string-append "unix:DESTDIR = "
5898 (assoc-ref outputs "out") "/lib")))))
5899 (replace 'configure
5900 (lambda _
5901 (chdir "src")
5902 (invoke "qmake" "qhexedit.pro")))
5903 (add-after 'install 'install-headers
5904 (lambda* (#:key outputs #:allow-other-keys)
5905 (let* ((out (assoc-ref outputs "out"))
5906 (include-dir (string-append out "/include")))
5907 (mkdir-p include-dir)
5908 (for-each (lambda (file)
5909 (install-file file include-dir))
5910 (find-files "." "\\.h$"))))))))
5911 (inputs (list qtbase-5))
5912 (native-inputs (list qttools-5))
5913 (home-page "https://simsys.github.io")
5914 (synopsis "Binary editor widget for Qt")
5915 (description
5916 "@code{QHexEdit} is a hex editor widget for the Qt framework. It is a
5917simple editor for binary data, just like @code{QPlainTextEdit} is for text
5918data.")
5919 (license license:lgpl2.1)))
5920
5921(define-public qhotkey
5922 (package
5923 (name "qhotkey")
5924 (version "1.5.0")
5925 (source
5926 (origin
5927 (method git-fetch)
5928 (uri (git-reference
5929 (url "https://github.com/Skycoder42/QHotkey")
5930 (commit version)))
5931 (file-name (git-file-name name version))
5932 (sha256
5933 (base32 "0glzh4l532xk4v9mphsdf96v1557pyvg5al3ha0vr3244bfh9hcf"))))
5934 (build-system cmake-build-system)
5935 (arguments
5936 (list #:tests? #f ;no tests
5937 #:configure-flags
5938 #~(list "-DQT_DEFAULT_MAJOR_VERSION=6"
5939 "-DBUILD_SHARED_LIBS=ON"
5940 "-DQHOTKEY_EXAMPLES=ON")))
5941 (inputs (list libx11 qtbase))
5942 (home-page "https://github.com/Skycoder42/QHotkey")
5943 (synopsis "Global shortcut key for Qt desktop applications")
5944 (description
5945 "This package provides @code{QHotKey} class that can be used to create
5946hotkeys/global shortcuts, aka shortcuts that work everywhere, independent of
5947the application state.")
5948 (license license:bsd-3)))
5949
5950(define-public qthttpserver
5951 (package
5952 (name "qthttpserver")
5953 (version "6.9.2")
5954 (source (origin
5955 (method url-fetch)
5956 (uri (qt-url name version))
5957 (sha256
5958 (base32
5959 "06a0f7j1b309xffw3rwydz8lpzxnf5jg67savswskzbd3lfzlhqk"))))
5960 (build-system cmake-build-system)
5961 (inputs (list qtbase))
5962 (propagated-inputs (list qtwebsockets)) ;dependency of cmake module
5963 (home-page (package-home-page qtbase))
5964 (synopsis "HTTP server module for Qt")
5965 (description "Qt HTTP Server supports building HTTP server functionality
5966into an application. Common use cases are exposing the application's
5967functionality through REST APIs, or making devices in a trusted environment
5968configurable also via HTTP.")
5969 (license license:gpl3+)))
5970
5971(define-public soqt
5972 (package
5973 (name "soqt")
5974 (version "1.6.2")
5975 (source
5976 (origin
5977 (method git-fetch)
5978 (uri (git-reference
5979 (url "https://github.com/coin3d/soqt")
5980 (commit (string-append "v" version))
5981 (recursive? #t)))
5982 (file-name (git-file-name name version))
5983 (sha256
5984 (base32 "0rsfc4wmghl9fr4bwh9rpzjwzsmx00k4ki5gyvy85nb4kbmr9dwv"))))
5985 (build-system cmake-build-system)
5986 (arguments '(#:tests? #f)) ; There are no tests
5987 (native-inputs
5988 (list pkg-config cmake-minimal))
5989 (inputs
5990 (list qtbase-5 coin3d))
5991 (home-page "https://github.com/coin3d/soqt")
5992 (synopsis "Qt GUI component toolkit library for Coin")
5993 (description "SoQt is a Qt GUI component toolkit library for Coin. It is
5994also compatible with SGI and TGS Open Inventor, and the API is based on the API
5995of the InventorXt GUI component toolkit.")
5996 (license license:bsd-3)))
5997
5998(define-public hyprland-qtutils
5999 (package
6000 (name "hyprland-qtutils")
6001 (version "0.1.5")
6002 (source (origin
6003 (method git-fetch)
6004 (uri (git-reference
6005 (url "https://github.com/hyprwm/hyprland-qtutils")
6006 (commit (string-append "v" version))))
6007 (file-name (git-file-name name version))
6008 (sha256
6009 (base32
6010 "09q8nacsxfih2px78bnallxvgr7g2z4b2dhy090sbah5siv1wdkd"))))
6011 (build-system qt-build-system)
6012 (arguments
6013 (list #:tests? #f ;There are no tests.
6014 #:qtbase qtbase))
6015 (native-inputs (list gcc-15 pkg-config))
6016 (inputs
6017 (list bash-minimal
6018 hyprutils
6019 kirigami
6020 libxkbcommon
6021 qqc2-desktop-style
6022 qtbase
6023 qtdeclarative
6024 qtwayland
6025 wayland))
6026 (home-page "https://github.com/hyprwm/hyprland-qtutils")
6027 (synopsis "Hyprland QT/QML utility apps")
6028 (description
6029 "This package provides some QT/QML utilities that might be used by
6030various hypr* apps.")
6031 (license license:bsd-3)))
6032
6033(define-public hyprland-qt-support
6034 (package
6035 (name "hyprland-qt-support")
6036 (version "0.1.0")
6037 (source
6038 (origin
6039 (method git-fetch)
6040 (uri (git-reference
6041 (url "https://github.com/hyprwm/hyprland-qt-support")
6042 (commit (string-append "v" version))))
6043 (file-name (git-file-name name version))
6044 (sha256
6045 (base32 "0rxdj8l985bvsg3gca79jb4rf0dy066x5cmxsyyavlcp7yz6irps"))))
6046 (build-system qt-build-system)
6047 (arguments
6048 (list
6049 #:tests? #f ;There are no tests.
6050 #:qtbase qtbase
6051 #:configure-flags
6052 #~(list "-DINSTALL_QML_PREFIX=lib/qt6/qml")))
6053 (native-inputs (list pkg-config))
6054 (inputs (list qtbase qtdeclarative hyprlang))
6055 (home-page "https://github.com/hyprwm/hyprland-qt-support")
6056 (synopsis "QML style provider for Hyprland applications")
6057 (description
6058 "This package provides a QML style that can be used by setting the
6059@code{QT_QUICK_CONTROLS_STYLE} variable to the string
6060@code{org.hyprland.style} (or passing it to @code{QQuickStyle::setStyle}).")
6061 (license license:bsd-3)))
6062
6063(define-public libdbusmenu-qt
6064 (package
6065 (name "libdbusmenu-qt")
6066 (version "0.9.3+16.04.20160218-0ubuntu1")
6067 (source
6068 (origin
6069 (method git-fetch)
6070 ;; Download from github rather than launchpad because launchpad trunk
6071 ;; tarball hash is not deterministic.
6072 (uri (git-reference
6073 (url "https://github.com/unity8-team/libdbusmenu-qt")
6074 (commit version)))
6075 (file-name (git-file-name name version))
6076 (sha256
6077 (base32 "0b7ii1cvmpcyl79gqal9c3va9m55h055s4hx7fpxkhhqs9463ggg"))))
6078 (build-system cmake-build-system)
6079 (arguments
6080 ;; XXX: Tests require a dbus session and some icons.
6081 '(#:tests? #f))
6082 (native-inputs
6083 (list doxygen))
6084 (inputs
6085 (list qtbase-5))
6086 (home-page "https://launchpad.net/libdbusmenu-qt")
6087 (synopsis "Qt implementation of the DBusMenu spec")
6088 (description "This library provides a Qt implementation of the DBusMenu
6089protocol. The DBusMenu protocol makes it possible for applications to export
6090and import their menus over DBus.")
6091 (license license:lgpl2.1+)))
6092
6093(define-public kdsingleapplication
6094 (package
6095 (name "kdsingleapplication")
6096 (version "1.1.0")
6097 (source
6098 (origin
6099 (method git-fetch)
6100 (uri (git-reference
6101 (url "https://github.com/KDAB/KDSingleApplication")
6102 (commit (string-append "v" version))))
6103 (file-name (git-file-name name version))
6104 (sha256
6105 (base32 "1w7wg9w4mifrkpn7hhw1nnnwh1vhnf8i4wgfxvh44nacwslbwsb2"))))
6106 (build-system qt-build-system)
6107 (arguments
6108 (list
6109 #:qtbase qtbase
6110 #:configure-flags
6111 #~(list "-DKDSingleApplication_QT6=ON" "-DKDSingleApplication_TESTS=ON")))
6112 (inputs (list libxkbcommon vulkan-headers))
6113 (home-page "https://github.com/KDAB/KDSingleApplication")
6114 (synopsis "Qt helper class for single-instance policy applications")
6115 (description "KD SingleApplication is a helper class for single-instance
6116policy applications.")
6117 (license
6118 (list license:bsd-3 ; cmake/*
6119 license:expat)))) ; everything else
6120
6121
6122(define libkode
6123 (origin
6124 (method git-fetch)
6125 (uri (git-reference
6126 (url "https://github.com/cornelius/libkode")
6127 (commit "2891c9eec984e423bfb56e0284784c85a6e6bb14")))
6128 (file-name "libkode")
6129 (sha256
6130 (base32 "08wvxmk77zrixll8wfhwd7ixvpvj2wbisvq8lqw2b8ym77sbbyz4"))))
6131
6132(define-public kdsoap
6133 (let ((commit "b23dcc1b554d98a4b77fb56fff0d0f0714c8f0bf")
6134 (revision "0"))
6135 (package
6136 (name "kdsoap")
6137 (version (git-version "2.2.0" revision commit))
6138 (source
6139 (origin
6140 (method git-fetch)
6141 (uri (git-reference
6142 (url "https://github.com/KDAB/KDSoap")
6143 (commit commit)))
6144 (file-name (git-file-name name version))
6145 (sha256
6146 (base32 "1invsvadfz3l6cf453j4ad4dkg3gas3h85nxvvlif6h7xfx73qhi"))))
6147 (build-system qt-build-system)
6148 (arguments
6149 (list #:qtbase qtbase
6150 #:configure-flags
6151 #~(list "-DKDSoap_TESTS=true")
6152 #:phases
6153 #~(modify-phases %standard-phases
6154 (add-after 'unpack 'add-libkode
6155 (lambda* (#:key native-inputs inputs #:allow-other-keys)
6156 (copy-recursively #$(this-package-native-input "libkode")
6157 "kdwsdl2cpp/libkode")))
6158 (replace 'check
6159 (lambda* (#:key native-inputs inputs tests? #:allow-other-keys)
6160 (when tests?
6161 (setenv "TZDIR" (search-input-directory
6162 (or native-inputs inputs) "share/zoneinfo"))
6163 (setenv "TZ" "Etc/UTC")
6164 (invoke "ctest" "-E" ;; These tests try connect to the internet.
6165 "(kdsoap-test_webcalls|kdsoap-test_webcalls_wsdl|kdsoap-test_calc)")))))))
6166 (native-inputs (list libkode tzdata-for-tests))
6167 (home-page "https://www.kdab.com/development-resources/qt-tools/kd-soap/")
6168 (synopsis "Qt SOAP component")
6169 (description "KD SOAP is a tool for creating client applications for web
6170services using the XML based SOAP protocol and without the need for a dedicated
6171web server.")
6172 (license (list license:gpl2 license:gpl3)))))
6173
6174(define-public libaccounts-qt6
6175 (package
6176 (name "libaccounts-qt6")
6177 (version "1.17")
6178 (source (origin
6179 (method git-fetch)
6180 (uri (git-reference
6181 (url "https://gitlab.com/accounts-sso/libaccounts-qt")
6182 (commit (string-append "VERSION_" version))))
6183 (file-name (git-file-name name version))
6184 (sha256
6185 (base32
6186 "0859nsksgfrj6ynj74awj1fr6slwcjavs989xc7mbgpvi87n1xlq"))))
6187 (build-system gnu-build-system)
6188 (arguments
6189 (list #:tests? #f ;TODO
6190 #:phases
6191 #~(modify-phases %standard-phases
6192 (replace 'configure
6193 (lambda _
6194 (substitute* "tests/tst_libaccounts.pro"
6195 (("QMAKE_RPATHDIR = \\$\\$\\{QMAKE_LIBDIR\\}")
6196 (string-append "QMAKE_RPATHDIR ="
6197 #$output "/lib")))
6198 (invoke "qmake"
6199 (string-append "PREFIX=" #$output)
6200 (string-append "LIBDIR=" #$output "/lib")))))))
6201 ;; * SignOnQt5 (required version >= 8.55), D-Bus service which performs
6202 ;; user authentication on behalf of its clients,
6203 ;; <https://gitlab.com/accounts-sso/signond>
6204 (native-inputs (list doxygen pkg-config qtbase qttools))
6205 (inputs (list glib signond-qt6 libaccounts-glib))
6206 (home-page "https://accounts-sso.gitlab.io/")
6207 (synopsis "Qt6 bindings for libaccounts-glib")
6208 (description
6209 "Accounts SSO is a framework for application developers who
6210wish to acquire, use and store web account details and credentials. It
6211handles the authentication process of an account and securely stores the
6212credentials and service-specific settings.")
6213 (license license:lgpl2.1+)))
6214
6215(define-public packagekit-qt6
6216 (package
6217 (name "packagekit-qt6")
6218 (version "1.1.2")
6219 (source (origin
6220 (method git-fetch)
6221 (uri (git-reference
6222 (url "https://github.com/PackageKit/PackageKit-Qt")
6223 (commit (string-append "v" version))))
6224 (file-name (git-file-name name version))
6225 (sha256
6226 (base32
6227 "1nx8xfhz9v4pc0mz1ir0pq47skpc3w3yj8wqa4m5yky87ib5xcxc"))))
6228 (build-system cmake-build-system)
6229 (arguments
6230 (list
6231 #:tests? #f ;no test suite
6232 #:configure-flags #~(list "-DBUILD_WITH_QT6=ON")))
6233 (inputs (list packagekit qtbase))
6234 (home-page "https://www.freedesktop.org/software/PackageKit/pk-intro.html")
6235 (synopsis "Qt6 bindings for PackageKit")
6236 (description "Provides Qt6 bindings to PackageKit which is a DBUS
6237abstraction layer that allows the session user to manage packages in
6238a secure way.")
6239 (license license:lgpl2.1+)))
6240
6241;; fork for support qt6
6242(define-public signond-qt6
6243 (let ((commit "c8ad98249af541514ff7a81634d3295e712f1a39")
6244 (revision "0"))
6245 (package
6246 (name "signond-qt6")
6247 (version (git-version "8.61" revision commit))
6248 (source (origin
6249 (method git-fetch)
6250 (uri (git-reference
6251 (url "https://gitlab.com/nicolasfella/signond")
6252 (commit commit)))
6253 (file-name (git-file-name name version))
6254 (sha256
6255 (base32
6256 "13cgdf6hhi2z3c8sax79dwi7450n8h228kpyl2w5lx0xglb2savq"))))
6257 (build-system qt-build-system)
6258 (native-inputs (list doxygen pkg-config qttools))
6259 (inputs (list dbus glib libaccounts-glib))
6260 (arguments
6261 (list #:qtbase qtbase
6262 #:tests? #f ; Figure out how to run tests
6263 #:modules '((guix build qt-build-system)
6264 ((guix build gnu-build-system) #:prefix gnu:)
6265 (guix build utils))
6266 #:phases
6267 #~(modify-phases %standard-phases
6268 (replace 'configure
6269 (lambda _
6270 (substitute* "src/signond/signond.pro"
6271 (("/etc/")
6272 (string-append #$output "/etc/")))
6273 (substitute*
6274 '("tests/extensions/extensions.pri"
6275 "tests/signond-tests/mock-ac-plugin/plugin.pro"
6276 "tests/signond-tests/identity-tool.pro"
6277 "tests/signond-tests/mock-ac-plugin/identity-ac-helper.pro"
6278 "tests/libsignon-qt-tests/libsignon-qt-tests.pro"
6279 "tests/signond-tests/signond-tests.pri")
6280 (("QMAKE_RPATHDIR = \\$\\$\\{QMAKE_LIBDIR\\}")
6281 (string-append "QMAKE_RPATHDIR = "
6282 #$output "/lib:"
6283 #$output "/lib/signon")))
6284 (invoke "qmake"
6285 (string-append "PREFIX=" #$output)
6286 (string-append "LIBDIR=" #$output "/lib")
6287 (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath,"
6288 #$output "/lib -Wl,-rpath,"))))
6289 (replace 'build (assoc-ref gnu:%standard-phases 'build))
6290 (replace 'install (assoc-ref gnu:%standard-phases 'install)))))
6291 (home-page "https://accounts-sso.gitlab.io/signond/index.html")
6292 (synopsis "Perform user authentication over D-Bus")
6293 (description "This package provides a D-Bus service which performs user
6294authentication on behalf of its clients.")
6295 (license license:lgpl2.1+))))
6296
6297(define-public clazy
6298 (package
6299 (name "clazy")
6300 (version "1.12")
6301 (source (origin
6302 (method git-fetch)
6303 (uri (git-reference
6304 (url "https://github.com/KDE/clazy")
6305 (commit (string-append "v" version))))
6306 (file-name (git-file-name name version))
6307 (sha256
6308 (base32
6309 "1y0g1j9ib1b0likjizw70hibky20gxxirqls6hf4crc214279v0m"))))
6310 (build-system cmake-build-system)
6311 (native-inputs (list python))
6312 (inputs (list clang-13 llvm-13))
6313 (home-page "https://github.com/KDE/clazy/")
6314 (synopsis "Qt-oriented static code analyzer")
6315 (description "clazy is a compiler plugin which allows @command{clang} to
6316understand Qt semantics. It can emit more than fifty (50) Qt-related compiler
6317warnings, ranging from unneeded memory allocations to misuses of the API,
6318including @i{fix-its} for automatic refactoring.")
6319 (license license:lgpl2.0+)))
6320
6321(define-public qt-creator
6322 (package
6323 (name "qt-creator")
6324 (version "18.0.2")
6325 (source (origin
6326 (method url-fetch)
6327 (uri (string-append
6328 "mirror://qt/qtcreator/"
6329 (version-major+minor version) "/" version
6330 "/qt-creator-opensource-src-" version ".tar.gz"))
6331 (modules '((guix build utils)))
6332 (snippet '(begin
6333 (for-each
6334 delete-file-recursively
6335 ;; Remove bundled libraries, where supported.
6336 ;; TODO: package and unbundle litehtml
6337 '("src/libs/3rdparty/yaml-cpp"))
6338 ;; qt-creator installation attempts to install the
6339 ;; yaml-cpp LICENSE file, but we removed the bundled
6340 ;; yaml-cpp, so create an empty file to allow it to
6341 ;; install properly.
6342 (mkdir-p "src/libs/3rdparty/yaml-cpp")
6343 (call-with-output-file "src/libs/3rdparty/yaml-cpp/LICENSE"
6344 (lambda (port)
6345 (const #t)))))
6346 (sha256
6347 (base32
6348 "13v9ysaaiyccz6anjva7mlifgls013c3s0n5gm443w6v4ssrjdz7"))))
6349 (outputs '("out" "debug"))
6350 (build-system qt-build-system)
6351 (arguments
6352 (list
6353 #:qtbase qtbase
6354 #:configure-flags
6355 #~(list "-DWITH_DOCS=ON"
6356 "-DBUILD_DEVELOPER_DOCS=ON"
6357 "-DBUILD_EXECUTABLE_CMDBRIDGE=OFF" ;requires Go libraries
6358 "-DCMAKE_VERBOSE_MAKEFILE=ON"
6359 "-DCLANGTOOLING_LINK_CLANG_DYLIB=ON"
6360 "-DWITH_TESTS=ON"
6361 ;; Extend the RUNPATH with lib/qtcreator, which contains
6362 ;; multiple shared objects.
6363 (string-append "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath="
6364 #$output "/lib/qtcreator"))
6365 #:phases
6366 #~(modify-phases %standard-phases
6367 (add-after 'unpack 'fix-yaml-cpp-duplicate-alias-error
6368 (lambda _
6369 ;; The CMake module attempts to create the 'yaml-cpp' alias, but
6370 ;; it already exists in the yaml-cpp native config file (see:
6371 ;; https://bugreports.qt.io/browse/QTCREATORBUG-33457).
6372 (substitute* "cmake/Findyaml-cpp.cmake"
6373 (("add_library\\(yaml-cpp ALIAS yaml-cpp::yaml-cpp)")
6374 ""))))
6375 (add-after 'unpack 'patch-perfparser
6376 ;; XXX: The 'patch-perfparser' phase is also used by the 'hotspot'
6377 ;; package; keep its copy in sync (paying attention to the
6378 ;; different demangler.cpp file name).
6379 (lambda* (#:key inputs #:allow-other-keys)
6380 ;; perfparser attempts to dynamically load the demangle
6381 ;; libraries; use their absolute file name to avoid having to
6382 ;; set LD_LIBRARY_PATH.
6383 (let ((librustc_demangle.so
6384 (with-exception-handler (lambda (ex)
6385 (if (search-error? ex)
6386 #f
6387 (raise-exception ex)))
6388 (lambda ()
6389 (search-input-file inputs "lib/librustc_demangle.so"))
6390 #:unwind? #t)))
6391 (substitute* "src/tools/perfparser/app/demangler.cpp"
6392 (("loadDemangleLib\\(QStringLiteral\\(\"rustc_demangle\")"
6393 all)
6394 (if librustc_demangle.so
6395 (format #f "loadDemangleLib(QStringLiteral(~s)"
6396 librustc_demangle.so)
6397 all)) ;no rustc_demangle; leave unchanged
6398 (("loadDemangleLib\\(QStringLiteral\\(\"d_demangle\")")
6399 (format #f "loadDemangleLib(QStringLiteral(~s)"
6400 (search-input-file inputs
6401 "lib/libd_demangle.so")))))))
6402 (add-after 'unpack 'patch-paths
6403 (lambda* (#:key inputs #:allow-other-keys)
6404 (substitute* '("src/libs/utils/commandline.cpp"
6405 "src/libs/utils/deviceshell.cpp")
6406 (("/bin/sh")
6407 (search-input-file inputs "bin/sh")))
6408 (substitute* "src/libs/utils/qtcprocess.cpp"
6409 (("/usr/bin/env")
6410 (search-input-file inputs "bin/env")))
6411 (substitute* '("tests/auto/utils/process/tst_process.cpp"
6412 "tests/auto/utils/commandline/tst_commandline.cpp")
6413 (("/bin/sh")
6414 (which "sh")))))
6415 (add-before 'build 'build-doc
6416 (lambda _
6417 (invoke "cmake" "--build" "." "--target=docs" "-v")))
6418 (add-after 'build-doc 'install-doc
6419 (lambda _
6420 (invoke "cmake" "--install" "." "--prefix" #$output
6421 "--component=qch_docs")
6422 (invoke "cmake" "--install" "." "--prefix" #$output
6423 "--component=html_docs")))
6424 (replace 'check
6425 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
6426 (when tests?
6427 (invoke "xvfb-run" ;for the 'renderpass' tests
6428 "ctest" "-j" (if parallel-tests?
6429 (number->string (parallel-job-count))
6430 "1")
6431 "--label-exclude" "exclude_from_precheck"
6432 "-E"
6433 (string-append
6434 "("
6435 (string-join
6436 (list
6437 ;; The performance data tests require external
6438 ;; data.
6439 "tst_perfdata") "|")
6440 ")")))))
6441 (add-after 'qt-wrap 'wrap-bin
6442 ;; Make a few well-integrated tools readily available.
6443 (lambda* (#:key inputs outputs #:allow-other-keys)
6444 (wrap-program (search-input-file outputs "bin/qtcreator")
6445 `("PATH" suffix ,(map (lambda (c)
6446 (dirname (search-input-file inputs c)))
6447 '("bin/clang-tidy"
6448 "bin/clazy-standalone"
6449 "bin/gdb"
6450 "bin/kcachegrind"
6451 "bin/perf"
6452 "bin/valgrind")))))))))
6453 (native-inputs
6454 (list googletest
6455 pkg-config
6456 python
6457 qttools
6458 qttranslations
6459 vulkan-headers
6460 xvfb-run))
6461 (inputs
6462 (append
6463 (list bash-minimal
6464 coreutils-minimal
6465 clang-20
6466 clazy
6467 d-demangler
6468 elfutils
6469 gdb
6470 kcachegrind
6471 libarchive
6472 libsecret
6473 libxkbcommon
6474 llvm-20
6475 perf
6476 qt5compat
6477 qtcharts
6478 qtdeclarative
6479 qtquick3d
6480 qtquick3dphysics
6481 qtserialport
6482 qtshadertools
6483 qtsvg
6484 yaml-cpp
6485 valgrind/pinned
6486 vulkan-loader
6487 `(,zstd "lib"))
6488 (if (supported-package? rust-rustc-demangle-capi-0.1)
6489 (list rust-rustc-demangle-capi-0.1)
6490 '())))
6491 (home-page "https://www.qt.io/")
6492 (synopsis "Integrated development environment (IDE) for Qt")
6493 (description "Qt Creator is an IDE tailored to the needs of Qt developers.
6494It includes features such as an advanced code editor, a visual debugger and a
6495@acronym{GUI, Graphical User Interface} designer.")
6496 (license license:gpl3+))) ;with the Qt Company GPL Exception 1.0
6497
6498;;;
6499;;; Avoid adding new packages to the end of this file. To reduce the chances
6500;;; of a merge conflict, place them above by existing packages with similar
6501;;; functionality or similar names.
6502;;;