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