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