gnu: Add qtcharts.
[jackhill/guix/guix.git] / gnu / packages / qt.scm
CommitLineData
bd677c2d 1;;; GNU Guix --- Functional package management for GNU
84ef83dd 2;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
5b490ab5 3;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
31580979 4;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
843bdfb7 5;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
f048f12b 6;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
fc381a33 7;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
bd677c2d
AE
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages qt)
225941b0 25 #:use-module ((guix licenses) #:prefix license:)
bd677c2d
AE
26 #:use-module (guix packages)
27 #:use-module (guix download)
f198ffd0 28 #:use-module (guix build utils)
9e81af9e 29 #:use-module (guix build-system cmake)
bd677c2d 30 #:use-module (guix build-system gnu)
84ef83dd
AE
31 #:use-module (guix packages)
32 #:use-module (guix utils)
1e9ed0e3 33 #:use-module (gnu packages)
b332e366
AE
34 #:use-module (gnu packages bison)
35 #:use-module (gnu packages compression)
2cba3d6f
SB
36 #:use-module (gnu packages cups)
37 #:use-module (gnu packages databases)
aa8c0ada 38 #:use-module (gnu packages documentation)
b332e366 39 #:use-module (gnu packages fontutils)
0009ed71 40 #:use-module (gnu packages flex)
bc8ede01 41 #:use-module (gnu packages freedesktop)
8b6a5e0f 42 #:use-module (gnu packages gl)
b332e366 43 #:use-module (gnu packages glib)
0009ed71
SB
44 #:use-module (gnu packages gnuzilla)
45 #:use-module (gnu packages gperf)
f7fb0ccb 46 #:use-module (gnu packages gtk)
b332e366 47 #:use-module (gnu packages icu4c)
e55354b8 48 #:use-module (gnu packages image)
b332e366 49 #:use-module (gnu packages linux)
5f96f303 50 #:use-module (gnu packages databases)
0009ed71
SB
51 #:use-module (gnu packages pciutils)
52 #:use-module (gnu packages pcre)
b332e366
AE
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages pkg-config)
39fa8f6c 55 #:use-module (gnu packages pulseaudio)
b332e366 56 #:use-module (gnu packages python)
8b6a5e0f 57 #:use-module (gnu packages ruby)
51519fd3 58 #:use-module (gnu packages sdl)
cc2b77df 59 #:use-module (gnu packages tls)
0009ed71
SB
60 #:use-module (gnu packages xdisorg)
61 #:use-module (gnu packages xorg)
62 #:use-module (gnu packages xml))
bd677c2d 63
aa8c0ada
TD
64(define-public grantlee
65 (package
66 (name "grantlee")
67 (version "5.1.0")
68 (source
69 (origin
70 (method url-fetch)
71 (uri (string-append "https://github.com/steveire/grantlee/archive/v"
72 version ".tar.gz"))
73 (file-name (string-append name "-" version ".tar.gz"))
74 (sha256
75 (base32 "1lf9rkv0i0kd7fvpgg5l8jb87zw8dzcwd1liv6hji7g4wlpmfdiq"))))
76 (native-inputs
77 `(("doxygen" ,doxygen)))
78 (inputs
79 `(("qtbase" ,qtbase)
80 ("qtscript" ,qtscript)))
81 (build-system cmake-build-system)
82 (arguments
83 `(#:phases
84 (modify-phases %standard-phases
85 (replace 'check
86 (lambda _
87 (zero? (system* "ctest" ;; exclude 2 tests which require a display
88 "-E" "htmlbuildertest|plainmarkupbuildertest")))))))
89 (home-page "https://github.com/steveire/grantlee")
90 (synopsis "Libraries for text templating with Qt")
91 (description "Grantlee Templates can be used for theming and generation of
92other text such as code. The syntax uses the syntax of the Django template
93system, and the core design of Django is reused in Grantlee.")
94 (license license:lgpl2.0+)))
95
b332e366
AE
96(define-public qt
97 (package
98 (name "qt")
2e36f7e6 99 (version "5.6.2")
b332e366
AE
100 (source (origin
101 (method url-fetch)
f7fb0ccb
AE
102 (uri
103 (string-append
104 "http://download.qt.io/official_releases/qt/"
105 (version-major+minor version)
106 "/" version
107 "/single/qt-everywhere-opensource-src-"
108 version ".tar.xz"))
b332e366 109 (sha256
f7fb0ccb 110 (base32
2e36f7e6 111 "1cw93mrlkqbwndfqyjpsvjzkpzi39px2is040xvk18mvg3y1prl3"))
14bcc1e1
AE
112 (modules '((guix build utils)))
113 (snippet
bc554b43
AE
114 '(begin
115 ;; Remove qtwebengine, which relies on a bundled copy of
116 ;; chromium. Not only does it fail compilation in qt 5.5:
117 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
118 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
119 ;; it might also pose security problems.
120 ;; Alternatively, we could use the "-skip qtwebengine"
121 ;; configuration option.
122 (delete-file-recursively "qtwebengine")
123 ;; Remove one of the two bundled harfbuzz copies in addition
124 ;; to passing "-system-harfbuzz".
9c32e1fe
AE
125 (delete-file-recursively "qtbase/src/3rdparty/harfbuzz-ng")
126 ;; Remove the bundled sqlite copy in addition to
127 ;; passing "-system-sqlite".
128 (delete-file-recursively "qtbase/src/3rdparty/sqlite")))))
b332e366 129 (build-system gnu-build-system)
ef0cf53e
AE
130 (propagated-inputs
131 `(("mesa" ,mesa)))
b332e366 132 (inputs
b332e366
AE
133 `(("alsa-lib" ,alsa-lib)
134 ("dbus" ,dbus)
2cba3d6f 135 ("cups" ,cups)
0009ed71 136 ("expat" ,expat)
b332e366
AE
137 ("fontconfig" ,fontconfig)
138 ("freetype" ,freetype)
139 ("glib" ,glib)
f7fb0ccb 140 ("harfbuzz" ,harfbuzz)
b332e366 141 ("icu4c" ,icu4c)
f198ffd0 142 ("libjpeg" ,libjpeg)
2cba3d6f 143 ("libmng" ,libmng)
0009ed71 144 ("libpci" ,pciutils)
b332e366
AE
145 ("libpng" ,libpng)
146 ("libx11" ,libx11)
0009ed71
SB
147 ("libxcomposite" ,libxcomposite)
148 ("libxcursor" ,libxcursor)
149 ("libxfixes" ,libxfixes)
b332e366 150 ("libxi" ,libxi)
0009ed71 151 ("libxinerama" ,libxinerama)
b332e366 152 ("libxkbcommon" ,libxkbcommon)
0009ed71
SB
153 ("libxml2" ,libxml2)
154 ("libxrandr" ,libxrandr)
b332e366 155 ("libxrender" ,libxrender)
0009ed71
SB
156 ("libxslt" ,libxslt)
157 ("libxtst" ,libxtst)
158 ("mtdev" ,mtdev)
b332e366 159 ("mysql" ,mysql)
0009ed71 160 ("nss" ,nss)
b332e366 161 ("openssl" ,openssl)
2cba3d6f 162 ("postgresql" ,postgresql)
39fa8f6c 163 ("pulseaudio" ,pulseaudio)
0009ed71
SB
164 ("pcre" ,pcre)
165 ("sqlite" ,sqlite)
166 ("udev" ,eudev)
2cba3d6f 167 ("unixodbc" ,unixodbc)
b332e366
AE
168 ("xcb-util" ,xcb-util)
169 ("xcb-util-image" ,xcb-util-image)
170 ("xcb-util-keysyms" ,xcb-util-keysyms)
171 ("xcb-util-renderutil" ,xcb-util-renderutil)
172 ("xcb-util-wm" ,xcb-util-wm)
173 ("zlib" ,zlib)))
c4c4cc05 174 (native-inputs
0009ed71
SB
175 `(("bison" ,bison)
176 ("flex" ,flex)
177 ("gperf" ,gperf)
0009ed71
SB
178 ("perl" ,perl)
179 ("pkg-config" ,pkg-config)
180 ("python" ,python-2)
181 ("ruby" ,ruby)
ce0614dd 182 ("which" ,(@ (gnu packages base) which))))
b332e366 183 (arguments
46854e99
AE
184 `(;; FIXME: Disabling parallel building is a quick hack to avoid the
185 ;; failure described in
186 ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
187 ;; A more structural fix is needed.
188 #:parallel-build? #f
189 #:phases
cce28b0c 190 (modify-phases %standard-phases
2470d779
AE
191 (add-after 'configure 'patch-bin-sh
192 (lambda _
193 (substitute* '("qtbase/config.status"
194 "qtbase/configure"
195 "qtbase/mkspecs/features/qt_functions.prf"
196 "qtbase/qmake/library/qmakebuiltins.cpp")
197 (("/bin/sh") (which "sh")))
198 #t))
cce28b0c
AE
199 (replace 'configure
200 (lambda* (#:key outputs #:allow-other-keys)
201 (let ((out (assoc-ref outputs "out")))
202 (substitute* '("configure" "qtbase/configure")
203 (("/bin/pwd") (which "pwd")))
204 (substitute* "qtbase/src/corelib/global/global.pri"
205 (("/bin/ls") (which "ls")))
206 ;; do not pass "--enable-fast-install", which makes the
207 ;; configure process fail
208 (zero? (system*
209 "./configure"
210 "-verbose"
211 "-prefix" out
212 "-opensource"
213 "-confirm-license"
4dd0a8b6
EF
214 ;; Do not build examples; if desired, these could go
215 ;; into a separate output, but for the time being, we
216 ;; prefer to save the space and build time.
217 "-nomake" "examples"
cce28b0c
AE
218 ;; Most "-system-..." are automatic, but some use
219 ;; the bundled copy by default.
220 "-system-sqlite"
221 "-system-harfbuzz"
222 ;; explicitly link with openssl instead of dlopening it
223 "-openssl-linked"
224 ;; explicitly link with dbus instead of dlopening it
225 "-dbus-linked"
226 ;; drop special machine instructions not supported
227 ;; on all instances of the target
228 ,@(if (string-prefix? "x86_64"
229 (or (%current-target-system)
230 (%current-system)))
231 '()
232 '("-no-sse2"))
233 "-no-sse3"
234 "-no-ssse3"
235 "-no-sse4.1"
236 "-no-sse4.2"
237 "-no-avx"
238 "-no-avx2"
239 "-no-mips_dsp"
240 "-no-mips_dspr2"))))))))
2e36f7e6 241 (home-page "https://www.qt.io/")
b332e366
AE
242 (synopsis "Cross-platform GUI library")
243 (description "Qt is a cross-platform application and UI framework for
244developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 245 (license license:lgpl2.1)
f47638a3
LC
246
247 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
248 ;; see <http://hydra.gnu.org/build/112828>.
249 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
250 (supported-systems (delete "mips64el-linux" %supported-systems))))
1e9ed0e3
AE
251
252(define-public qt-4
253 (package (inherit qt)
d22b9397 254 (version "4.8.7")
1e9ed0e3
AE
255 (source (origin
256 (method url-fetch)
257 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
258 (string-copy version 0 (string-rindex version #\.))
259 "/" version
89059aa1 260 "/qt-everywhere-opensource-src-"
1e9ed0e3
AE
261 version ".tar.gz"))
262 (sha256
263 (base32
d22b9397 264 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
fc1adab1 265 (patches (search-patches "qt4-ldflags.patch"))
7431edea
AE
266 (modules '((guix build utils)))
267 (snippet
268 ;; Remove webkit module, which is not built.
269 '(delete-file-recursively "src/3rdparty/webkit"))))
f7fb0ccb
AE
270 (inputs `(,@(alist-delete "harfbuzz"
271 (alist-delete "libjpeg" (package-inputs qt)))
e7e5a4f8
AE
272 ("libjepg" ,libjpeg-8)
273 ("libsm" ,libsm)))
31580979
LC
274
275 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
276 ;; but we can't make them a separate output because "out" and "examples"
277 ;; would refer to each other.
278 (outputs '("out" ;112MiB core + 37MiB examples
279 "doc")) ;280MiB of HTML + code
1e9ed0e3
AE
280 (arguments
281 `(#:phases
cba632c4
LC
282 (modify-phases %standard-phases
283 (replace
1e9ed0e3
AE
284 'configure
285 (lambda* (#:key outputs #:allow-other-keys)
31580979
LC
286 (let ((out (assoc-ref outputs "out"))
287 (doc (assoc-ref outputs "doc")))
1e9ed0e3 288 (substitute* '("configure")
d2984346
LC
289 (("/bin/pwd") (which "pwd")))
290
206a5208
AE
291 (zero? (system*
292 "./configure"
293 "-verbose"
294 "-prefix" out
4b0f2ef7
LC
295 ;; Note: Don't pass '-docdir' since 'qmake' and
296 ;; libQtCore would record its value, thereby defeating
297 ;; the whole point of having a separate output.
ff1989a5
LC
298 "-datadir" (string-append out "/share/qt-" ,version
299 "/data")
300 "-importdir" (string-append out "/lib/qt-4"
301 "/imports")
302 "-plugindir" (string-append out "/lib/qt-4"
303 "/plugins")
304 "-translationdir" (string-append out "/share/qt-" ,version
305 "/translations")
31580979
LC
306 "-demosdir" (string-append out "/share/qt-" ,version
307 "/demos")
308 "-examplesdir" (string-append out "/share/qt-" ,version
309 "/examples")
206a5208
AE
310 "-opensource"
311 "-confirm-license"
ff0a8c59
AE
312 ;; explicitly link with dbus instead of dlopening it
313 "-dbus-linked"
7431edea
AE
314 ;; Skip the webkit module; it fails to build on armhf
315 ;; and, apart from that, may pose security risks.
316 "-no-webkit"
206a5208
AE
317 ;; drop special machine instructions not supported
318 ;; on all instances of the target
319 ,@(if (string-prefix? "x86_64"
320 (or (%current-target-system)
321 (%current-system)))
322 '()
323 '("-no-mmx"
1e9ed0e3
AE
324 "-no-3dnow"
325 "-no-sse"
206a5208
AE
326 "-no-sse2"))
327 "-no-sse3"
328 "-no-ssse3"
329 "-no-sse4.1"
330 "-no-sse4.2"
84811c22 331 "-no-avx")))))
4b0f2ef7
LC
332 (add-after
333 'install 'move-doc
334 (lambda* (#:key outputs #:allow-other-keys)
335 ;; Because of qt4-documentation-path.patch, documentation ends up
336 ;; being installed in OUT. Move it to the right place.
337 (let* ((out (assoc-ref outputs "out"))
338 (doc (assoc-ref outputs "doc"))
339 (olddoc (string-append out "/doc"))
340 (docdir (string-append doc "/share/doc/qt-" ,version)))
341 (mkdir-p (dirname docdir))
342
343 ;; Note: We can't use 'rename-file' here because OUT and DOC are
344 ;; different "devices" due to bind-mounts.
345 (copy-recursively olddoc docdir)
346 (delete-file-recursively olddoc)
347 #t))))))))
84ef83dd 348
7868000f
AE
349(define-public qtbase
350 (package
351 (name "qtbase")
daa481f5 352 (version "5.7.1")
7868000f
AE
353 (source (origin
354 (method url-fetch)
355 (uri (string-append "https://download.qt.io/official_releases/qt/"
356 (version-major+minor version) "/" version
357 "/submodules/" name "-opensource-src-"
358 version ".tar.xz"))
359 (sha256
c7386f4e 360 (base32
daa481f5 361 "0zjmcrmnnmaz1lr9wc5i6y565hsvl8ycn790ivqaz62dv54zbkgd"))
7868000f
AE
362 (modules '((guix build utils)))
363 (snippet
364 '(begin
365 ;; Remove one of the two bundled harfbuzz copies in addition
366 ;; to passing "-system-harfbuzz".
367 (delete-file-recursively "src/3rdparty/harfbuzz-ng")
368 ;; Remove the bundled sqlite copy in addition to
369 ;; passing "-system-sqlite".
370 (delete-file-recursively "src/3rdparty/sqlite")))))
371 (build-system gnu-build-system)
48d4ce6e
EF
372 (propagated-inputs
373 `(("mesa" ,mesa)))
7868000f
AE
374 (inputs
375 `(("alsa-lib" ,alsa-lib)
376 ("cups" ,cups)
377 ("dbus" ,dbus)
f66970a7 378 ("eudev" ,eudev)
7868000f
AE
379 ("expat" ,expat)
380 ("fontconfig" ,fontconfig)
381 ("freetype" ,freetype)
382 ("glib" ,glib)
383 ("harfbuzz" ,harfbuzz)
384 ("icu4c" ,icu4c)
f66970a7 385 ("libinput" ,libinput)
7868000f
AE
386 ("libjpeg" ,libjpeg)
387 ("libmng" ,libmng)
388 ("libpng" ,libpng)
389 ("libx11" ,libx11)
390 ("libxcomposite" ,libxcomposite)
391 ("libxcursor" ,libxcursor)
392 ("libxfixes" ,libxfixes)
393 ("libxi" ,libxi)
394 ("libxinerama" ,libxinerama)
395 ("libxkbcommon" ,libxkbcommon)
396 ("libxml2" ,libxml2)
397 ("libxrandr" ,libxrandr)
398 ("libxrender" ,libxrender)
399 ("libxslt" ,libxslt)
400 ("libxtst" ,libxtst)
401 ("mtdev" ,mtdev)
402 ("mysql" ,mysql)
403 ("nss" ,nss)
404 ("openssl" ,openssl)
405 ("pcre" ,pcre)
406 ("postgresql" ,postgresql)
407 ("pulseaudio" ,pulseaudio)
408 ("sqlite" ,sqlite)
409 ("unixodbc" ,unixodbc)
410 ("xcb-util" ,xcb-util)
411 ("xcb-util-image" ,xcb-util-image)
412 ("xcb-util-keysyms" ,xcb-util-keysyms)
413 ("xcb-util-renderutil" ,xcb-util-renderutil)
414 ("xcb-util-wm" ,xcb-util-wm)
415 ("zlib" ,zlib)))
416 (native-inputs
417 `(("bison" ,bison)
418 ("flex" ,flex)
419 ("gperf" ,gperf)
420 ("perl" ,perl)
421 ("pkg-config" ,pkg-config)
422 ("python" ,python-2)
423 ("ruby" ,ruby)
424 ("which" ,(@ (gnu packages base) which))))
425 (arguments
426 `(#:phases
427 (modify-phases %standard-phases
428 (add-after 'configure 'patch-bin-sh
429 (lambda _
430 (substitute* '("config.status"
431 "configure"
432 "mkspecs/features/qt_functions.prf"
433 "qmake/library/qmakebuiltins.cpp")
434 (("/bin/sh") (which "sh")))
435 #t))
436 (replace 'configure
437 (lambda* (#:key outputs #:allow-other-keys)
438 (let ((out (assoc-ref outputs "out")))
439 (substitute* "configure"
440 (("/bin/pwd") (which "pwd")))
441 (substitute* "src/corelib/global/global.pri"
442 (("/bin/ls") (which "ls")))
7972d8a2
AE
443 ;; The configuration files for other Qt5 packages are searched
444 ;; through a call to "find_package" in Qt5Config.cmake, which
445 ;; disables the use of CMAKE_PREFIX_PATH via the parameter
446 ;; "NO_DEFAULT_PATH". Re-enable it so that the different
447 ;; components can be installed in different places.
448 (substitute* (find-files "." ".*\\.cmake")
449 (("NO_DEFAULT_PATH") ""))
7868000f
AE
450 ;; do not pass "--enable-fast-install", which makes the
451 ;; configure process fail
452 (zero? (system*
453 "./configure"
454 "-verbose"
455 "-prefix" out
456 "-opensource"
457 "-confirm-license"
458 ;; Do not build examples; if desired, these could go
459 ;; into a separate output, but for the time being, we
460 ;; prefer to save the space and build time.
461 "-nomake" "examples"
462 ;; Most "-system-..." are automatic, but some use
463 ;; the bundled copy by default.
464 "-system-sqlite"
465 "-system-harfbuzz"
466 ;; explicitly link with openssl instead of dlopening it
467 "-openssl-linked"
468 ;; explicitly link with dbus instead of dlopening it
469 "-dbus-linked"
470 ;; drop special machine instructions not supported
471 ;; on all instances of the target
472 ,@(if (string-prefix? "x86_64"
473 (or (%current-target-system)
474 (%current-system)))
475 '()
476 '("-no-sse2"))
477 "-no-sse3"
478 "-no-ssse3"
479 "-no-sse4.1"
480 "-no-sse4.2"
481 "-no-avx"
482 "-no-avx2"
483 "-no-mips_dsp"
5ca6ef95
SB
484 "-no-mips_dspr2")))))
485 (add-after 'install 'patch-qt_config.prf
486 (lambda* (#:key outputs #:allow-other-keys)
487 (let* ((out (assoc-ref outputs "out"))
488 (qt_config.prf (string-append
489 out "/mkspecs/features/qt_config.prf")))
490 ;; For each Qt module, let `qmake' uses search paths in the
491 ;; module directory instead of all in QT_INSTALL_PREFIX.
492 (substitute* qt_config.prf
493 (("\\$\\$\\[QT_INSTALL_HEADERS\\]")
494 "$$replace(dir, mkspecs/modules, include)")
495 (("\\$\\$\\[QT_INSTALL_LIBS\\]")
496 "$$replace(dir, mkspecs/modules, lib)")
497 (("\\$\\$\\[QT_HOST_LIBS\\]")
498 "$$replace(dir, mkspecs/modules, lib)")
499 (("\\$\\$\\[QT_INSTALL_PLUGINS\\]")
500 "$$replace(dir, mkspecs/modules, plugins)")
501 (("\\$\\$\\[QT_INSTALL_LIBEXECS\\]")
502 "$$replace(dir, mkspecs/modules, libexec)")
503 (("\\$\\$\\[QT_INSTALL_BINS\\]")
504 "$$replace(dir, mkspecs/modules, bin)")
505 (("\\$\\$\\[QT_INSTALL_IMPORTS\\]")
506 "$$replace(dir, mkspecs/modules, imports)")
507 (("\\$\\$\\[QT_INSTALL_QML\\]")
508 "$$replace(dir, mkspecs/modules, qml)"))
509 #t))))))
510 (native-search-paths
511 (list (search-path-specification
512 (variable "QMAKEPATH")
ed02e1fe
DC
513 (files '("")))
514 (search-path-specification
515 (variable "QML2_IMPORT_PATH")
516 (files '("qml")))
517 (search-path-specification
518 (variable "QT_PLUGIN_PATH")
519 (files '("plugins")))
520 (search-path-specification
521 (variable "XDG_DATA_DIRS")
522 (files '("share")))
523 (search-path-specification
524 (variable "XDG_CONFIG_DIRS")
525 (files '("etc/xdg")))))
7868000f
AE
526 (home-page "https://www.qt.io/")
527 (synopsis "Cross-platform GUI library")
528 (description "Qt is a cross-platform application and UI framework for
529developers using C++ or QML, a CSS & JavaScript like language.")
225941b0 530 (license (list license:lgpl2.1 license:lgpl3))))
7868000f 531
19c17631
EF
532(define-public qtsvg
533 (package (inherit qtbase)
534 (name "qtsvg")
daa481f5 535 (version "5.7.1")
19c17631
EF
536 (source (origin
537 (method url-fetch)
538 (uri (string-append "https://download.qt.io/official_releases/qt/"
539 (version-major+minor version) "/" version
540 "/submodules/" name "-opensource-src-"
541 version ".tar.xz"))
542 (sha256
543 (base32
daa481f5 544 "0irr9h566hl9nx8p919rz276zbfvvd6vqdb6i9g6b3piikdigw5h"))))
48d4ce6e 545 (propagated-inputs `())
19c17631
EF
546 (native-inputs `(("perl" ,perl)))
547 (inputs
548 `(("mesa" ,mesa)
549 ("qtbase" ,qtbase)
550 ("zlib" ,zlib)))
551 (arguments
552 `(#:phases
553 (modify-phases %standard-phases
554 (replace 'configure
555 (lambda* (#:key outputs #:allow-other-keys)
556 (let ((out (assoc-ref outputs "out")))
557 (zero? (system* "qmake" (string-append "PREFIX=" out))))))
558 (add-before 'install 'fix-Makefiles
559 (lambda* (#:key inputs outputs #:allow-other-keys)
560 (let ((out (assoc-ref outputs "out"))
561 (qtbase (assoc-ref inputs "qtbase")))
562 (substitute* (find-files "." "Makefile")
563 (((string-append "INSTALL_ROOT)" qtbase))
564 (string-append "INSTALL_ROOT)" out)))))))))))
565
9b694210
EF
566(define-public qtimageformats
567 (package (inherit qtsvg)
568 (name "qtimageformats")
daa481f5 569 (version "5.7.1")
9b694210
EF
570 (source (origin
571 (method url-fetch)
572 (uri (string-append "https://download.qt.io/official_releases/qt/"
573 (version-major+minor version) "/" version
574 "/submodules/" name "-opensource-src-"
575 version ".tar.xz"))
576 (sha256
577 (base32
daa481f5 578 "1x3p1xmw7spxa4bwriyrwsfrq31jabsdjsi5fras9y39naia55sg"))
c04854da
EF
579 (modules '((guix build utils)))
580 (snippet
581 '(begin
582 (delete-file-recursively "src/3rdparty")))))
9b694210
EF
583 (native-inputs `())
584 (inputs
a532a671
EF
585 `(("jasper" ,jasper)
586 ("libmng" ,libmng)
9b694210
EF
587 ("libtiff" ,libtiff)
588 ("libwebp" ,libwebp)
589 ("mesa" ,mesa)
590 ("qtbase" ,qtbase)
591 ("zlib" ,zlib)))))
592
f6c13613
EF
593(define-public qtx11extras
594 (package (inherit qtsvg)
595 (name "qtx11extras")
daa481f5 596 (version "5.7.1")
f6c13613
EF
597 (source (origin
598 (method url-fetch)
599 (uri (string-append "https://download.qt.io/official_releases/qt/"
600 (version-major+minor version) "/" version
601 "/submodules/" name "-opensource-src-"
602 version ".tar.xz"))
603 (sha256
604 (base32
daa481f5 605 "09z49jm70f5i0gcdz9a16z00pg96x8pz7vri5wpirh3fqqn0qnjz"))))
f6c13613
EF
606 (native-inputs `(("perl" ,perl)))
607 (inputs
608 `(("mesa" ,mesa)
609 ("qtbase" ,qtbase)))))
610
98eec712
EF
611(define-public qtxmlpatterns
612 (package (inherit qtsvg)
613 (name "qtxmlpatterns")
daa481f5 614 (version "5.7.1")
98eec712
EF
615 (source (origin
616 (method url-fetch)
617 (uri (string-append "https://download.qt.io/official_releases/qt/"
618 (version-major+minor version) "/" version
619 "/submodules/" name "-opensource-src-"
620 version ".tar.xz"))
621 (sha256
622 (base32
daa481f5 623 "1rgqnpg64gn5agmvjwy0am8hp5fpxl3cdkixr1yrsdxi5a6961d8"))))
98eec712
EF
624 (native-inputs `(("perl" ,perl)))
625 (inputs `(("qtbase" ,qtbase)))))
626
e3a2ed81
EF
627(define-public qtdeclarative
628 (package (inherit qtsvg)
629 (name "qtdeclarative")
daa481f5 630 (version "5.7.1")
e3a2ed81
EF
631 (source (origin
632 (method url-fetch)
633 (uri (string-append "https://download.qt.io/official_releases/qt/"
634 (version-major+minor version) "/" version
635 "/submodules/" name "-opensource-src-"
636 version ".tar.xz"))
637 (sha256
638 (base32
daa481f5 639 "0mjxfwnplpx60jc6y94krg00isddl9bfwc7dayl981njb4qds4zx"))))
e3a2ed81
EF
640 (native-inputs
641 `(("perl" ,perl)
642 ("pkg-config" ,pkg-config)
643 ("python" ,python-2)
644 ("qtsvg" ,qtsvg)
645 ("qtxmlpatterns" ,qtxmlpatterns)))
646 (inputs
647 `(("mesa" ,mesa)
648 ("qtbase" ,qtbase)))))
649
e98cb96d
EF
650(define-public qtconnectivity
651 (package (inherit qtsvg)
652 (name "qtconnectivity")
daa481f5 653 (version "5.7.1")
e98cb96d
EF
654 (source (origin
655 (method url-fetch)
656 (uri (string-append "https://download.qt.io/official_releases/qt/"
657 (version-major+minor version) "/" version
658 "/submodules/" name "-opensource-src-"
659 version ".tar.xz"))
660 (sha256
661 (base32
daa481f5 662 "0rmr7bd4skby7bax9hpj2sid2bq3098nkw7xm02mdp04hc3bks5k"))))
e98cb96d
EF
663 (native-inputs
664 `(("perl" ,perl)
665 ("pkg-config" ,pkg-config)
666 ("qtdeclarative" ,qtdeclarative)))
667 (inputs
668 `(("bluez" ,bluez)
669 ("qtbase" ,qtbase)))))
670
cac893ec
EF
671(define-public qtwebsockets
672 (package (inherit qtsvg)
673 (name "qtwebsockets")
daa481f5 674 (version "5.7.1")
cac893ec
EF
675 (source (origin
676 (method url-fetch)
677 (uri (string-append "https://download.qt.io/official_releases/qt/"
678 (version-major+minor version) "/" version
679 "/submodules/" name "-opensource-src-"
680 version ".tar.xz"))
681 (sha256
682 (base32
daa481f5 683 "1laj0slwibs0bg69kgrdhc9k1s6yisq3pcsr0r9rhbkzisv7aajw"))))
cac893ec
EF
684 (native-inputs
685 `(("perl" ,perl)
686 ("qtdeclarative" ,qtdeclarative)))
687 (inputs `(("qtbase" ,qtbase)))))
688
3474767c
EF
689(define-public qtsensors
690 (package (inherit qtsvg)
691 (name "qtsensors")
daa481f5 692 (version "5.7.1")
3474767c
EF
693 (source (origin
694 (method url-fetch)
695 (uri (string-append "https://download.qt.io/official_releases/qt/"
696 (version-major+minor version) "/" version
697 "/submodules/" name "-opensource-src-"
698 version ".tar.xz"))
699 (sha256
700 (base32
daa481f5 701 "041v1x8pwfzpyk6y0sy5zgm915pi15xdhiy18fd5wqayvcp99cyc"))))
3474767c
EF
702 (native-inputs
703 `(("perl" ,perl)
704 ("qtdeclarative" ,qtdeclarative)))
705 (inputs `(("qtbase" ,qtbase)))))
706
15378f93
EF
707(define-public qtmultimedia
708 (package (inherit qtsvg)
709 (name "qtmultimedia")
daa481f5 710 (version "5.7.1")
15378f93
EF
711 (source (origin
712 (method url-fetch)
713 (uri (string-append "https://download.qt.io/official_releases/qt/"
714 (version-major+minor version) "/" version
715 "/submodules/" name "-opensource-src-"
716 version ".tar.xz"))
717 (sha256
718 (base32
daa481f5 719 "1vvxmgmvjnz9w1h2ph1j2fy77ij141ycx5fric60lq02pxzifax5"))
63d8f08f
EF
720 (modules '((guix build utils)))
721 (snippet
722 '(begin
723 (delete-file-recursively
724 "examples/multimedia/spectrum/3rdparty")))))
15378f93
EF
725 (native-inputs
726 `(("perl" ,perl)
727 ("pkg-config" ,pkg-config)
728 ("python" ,python-2)
729 ("qtdeclarative" ,qtdeclarative)))
730 (inputs
731 `(("alsa-lib" ,alsa-lib)
732 ("mesa" ,mesa)
733 ("pulseaudio" ,pulseaudio)
734 ("qtbase" ,qtbase)))))
735
bc8ede01
EF
736(define-public qtwayland
737 (package (inherit qtsvg)
738 (name "qtwayland")
daa481f5 739 (version "5.7.1")
bc8ede01
EF
740 (source (origin
741 (method url-fetch)
742 (uri (string-append "https://download.qt.io/official_releases/qt/"
743 (version-major+minor version) "/" version
744 "/submodules/" name "-opensource-src-"
745 version ".tar.xz"))
746 (sha256
747 (base32
daa481f5 748 "1iq1c89y4ggq0dxjlf62jyhh8a9l3x7y914x84w5pby8h3hwagzj"))))
bc8ede01
EF
749 (native-inputs
750 `(("glib" ,glib)
751 ("perl" ,perl)
752 ("pkg-config" ,pkg-config)
753 ("qtdeclarative" ,qtdeclarative)))
754 (inputs
755 `(("fontconfig" ,fontconfig)
756 ("freetype" ,freetype)
757 ("libx11" ,libx11)
758 ("libxcomposite" ,libxcomposite)
759 ("libxext" ,libxext)
760 ("libxkbcommon" ,libxkbcommon)
761 ("libxrender" ,libxrender)
762 ("mesa" ,mesa)
763 ("mtdev" ,mtdev)
764 ("qtbase" ,qtbase)
765 ("wayland" ,wayland)))))
766
00806f2b
EF
767(define-public qtserialport
768 (package (inherit qtsvg)
769 (name "qtserialport")
daa481f5 770 (version "5.7.1")
00806f2b
EF
771 (source (origin
772 (method url-fetch)
773 (uri (string-append "https://download.qt.io/official_releases/qt/"
774 (version-major+minor version) "/" version
775 "/submodules/" name "-opensource-src-"
776 version ".tar.xz"))
777 (sha256
778 (base32
daa481f5 779 "09jsryc0z49cz9783kq48rkn42f10c6krzivp812ddwjsfdy3mbn"))))
00806f2b 780 (native-inputs `(("perl" ,perl)))
33741e16
EF
781 (inputs
782 `(("qtbase" ,qtbase)
783 ("eudev" ,eudev)))))
00806f2b 784
a98ffab5
EF
785(define-public qtserialbus
786 (package (inherit qtsvg)
787 (name "qtserialbus")
788 (version "5.7.1")
789 (source (origin
790 (method url-fetch)
791 (uri (string-append "https://download.qt.io/official_releases/qt/"
792 (version-major+minor version) "/" version
793 "/submodules/" name "-opensource-src-"
794 version ".tar.xz"))
795 (sha256
796 (base32
797 "0mxi43l2inpbar8rmg21qjg33bv3f1ycxjgvzjf12ncnybhdnzkj"))))
798 (inputs
799 `(("qtbase" ,qtbase)
800 ("qtserialport" ,qtserialport)))))
801
f5377013
EF
802(define-public qtwebchannel
803 (package (inherit qtsvg)
804 (name "qtwebchannel")
daa481f5 805 (version "5.7.1")
f5377013
EF
806 (source (origin
807 (method url-fetch)
808 (uri (string-append "https://download.qt.io/official_releases/qt/"
809 (version-major+minor version) "/" version
810 "/submodules/" name "-opensource-src-"
811 version ".tar.xz"))
812 (sha256
813 (base32
daa481f5 814 "16rij92dxy4k5231l3dpmhy7cnz0cjkn50cpzaf014zrdz3kmav3"))))
f5377013
EF
815 (native-inputs
816 `(("perl" ,perl)
817 ("qtdeclarative" ,qtdeclarative)
818 ("qtwebsockets" ,qtwebsockets)))
819 (inputs `(("qtbase" ,qtbase)))))
820
d5ca54ce
EF
821(define-public qtlocation
822 (package (inherit qtsvg)
823 (name "qtlocation")
daa481f5 824 (version "5.7.1")
d5ca54ce
EF
825 (source (origin
826 (method url-fetch)
827 (uri (string-append "https://download.qt.io/official_releases/qt/"
828 (version-major+minor version) "/" version
829 "/submodules/" name "-opensource-src-"
830 version ".tar.xz"))
831 (sha256
832 (base32
daa481f5 833 "17zkzffzwbg6aqhsggs23cmwzq4y45m938842lsc423hfm7fdsgr"))))
d5ca54ce
EF
834 (native-inputs
835 `(("perl" ,perl)
836 ("qtdeclarative" ,qtdeclarative)
9a935ef2 837 ("qtquickcontrols" ,qtquickcontrols)
d5ca54ce
EF
838 ("qtserialport" ,qtserialport)))
839 (inputs `(("qtbase" ,qtbase)))))
840
d438c968
EF
841(define-public qttools
842 (package (inherit qtsvg)
843 (name "qttools")
daa481f5 844 (version "5.7.1")
d438c968
EF
845 (source (origin
846 (method url-fetch)
847 (uri (string-append "https://download.qt.io/official_releases/qt/"
848 (version-major+minor version) "/" version
849 "/submodules/" name "-opensource-src-"
850 version ".tar.xz"))
851 (sha256
852 (base32
daa481f5 853 "1b6zqa5690b8lqms7rrhb8rcq0xg5hp117v3m08qngbcd0i706b4"))))
d438c968
EF
854 (native-inputs
855 `(("perl" ,perl)
856 ("qtdeclarative" ,qtdeclarative)))
857 (inputs
858 `(("mesa" ,mesa)
859 ("qtbase" ,qtbase)))))
860
4742c4de
EF
861(define-public qtscript
862 (package (inherit qtsvg)
863 (name "qtscript")
daa481f5 864 (version "5.7.1")
4742c4de
EF
865 (source (origin
866 (method url-fetch)
867 (uri (string-append "https://download.qt.io/official_releases/qt/"
868 (version-major+minor version) "/" version
869 "/submodules/" name "-opensource-src-"
870 version ".tar.xz"))
871 (sha256
872 (base32
daa481f5 873 "09m41n95448pszr7inlg03ycb66s1a9hzfylaka92382acf1myav"))))
4742c4de
EF
874 (native-inputs
875 `(("perl" ,perl)
876 ("qttools" ,qttools)))
877 (inputs
878 `(("qtbase" ,qtbase)))))
879
ae0e5133
DC
880(define-public qtquickcontrols
881 (package (inherit qtsvg)
882 (name "qtquickcontrols")
daa481f5 883 (version "5.7.1")
ae0e5133
DC
884 (source (origin
885 (method url-fetch)
886 (uri (string-append "https://download.qt.io/official_releases/qt/"
887 (version-major+minor version) "/" version
888 "/submodules/" name "-opensource-src-"
889 version ".tar.xz"))
890 (sha256
891 (base32
daa481f5 892 "17cyfyqzjbm9dhq9pjscz36y84y16rmxwk6h826gjfprddrimsvg"))))
ae0e5133
DC
893 (inputs
894 `(("qtbase" ,qtbase)
895 ("qtdeclarative" ,qtdeclarative)))))
896
42da1492
DC
897(define-public qtquickcontrols2
898 (package (inherit qtsvg)
899 (name "qtquickcontrols2")
daa481f5 900 (version "5.7.1")
42da1492
DC
901 (source (origin
902 (method url-fetch)
903 (uri (string-append "https://download.qt.io/official_releases/qt/"
904 (version-major+minor version) "/" version
905 "/submodules/" name "-opensource-src-"
906 version ".tar.xz"))
907 (sha256
908 (base32
daa481f5 909 "1v77ydy4k15lksp3bi2kgha2h7m79g4n7c2qhbr09xnvpb8ars7j"))))
42da1492
DC
910 (inputs
911 `(("qtbase" ,qtbase)
912 ("qtdeclarative" ,qtdeclarative)))))
913
4e4ed0ee
DC
914(define-public qtgraphicaleffects
915 (package (inherit qtsvg)
916 (name "qtgraphicaleffects")
daa481f5 917 (version "5.7.1")
4e4ed0ee
DC
918 (source (origin
919 (method url-fetch)
920 (uri (string-append "https://download.qt.io/official_releases/qt/"
921 (version-major+minor version) "/" version
922 "/submodules/" name "-opensource-src-"
923 version ".tar.xz"))
924 (sha256
925 (base32
daa481f5 926 "1j2drnx7zp3w6cgvy7bn00fyk5v7vw1j1hidaqcg78lzb6zgls1c"))))
4e4ed0ee
DC
927 (inputs
928 `(("qtbase" ,qtbase)
929 ("qtdeclarative" ,qtdeclarative)))))
930
843bdfb7
EF
931(define-public qtdeclarative-render2d
932 (package (inherit qtsvg)
933 (name "qtdeclarative-render2d")
934 (version "5.7.1")
935 (source (origin
936 (method url-fetch)
937 (uri (string-append "https://download.qt.io/official_releases/qt/"
938 (version-major+minor version) "/" version
939 "/submodules/" name "-opensource-src-"
940 version ".tar.xz"))
941 (sha256
942 (base32
943 "0zwch9vn17f3bpy300jcfxx6cx9qymk5j7khx0x9k1xqid4166c3"))
944 (modules '((guix build utils)))
945 (snippet
946 '(delete-file-recursively "tools/opengldummy/3rdparty"))))
947 (native-inputs `())
948 (inputs
949 `(("qtbase" ,qtbase)
950 ("qtdeclarative" ,qtdeclarative)))))
951
51519fd3
EF
952(define-public qtgamepad
953 (package (inherit qtsvg)
954 (name "qtgamepad")
955 (version "5.7.1")
956 (source (origin
957 (method url-fetch)
958 (uri (string-append "https://download.qt.io/official_releases/qt/"
959 (version-major+minor version) "/" version
960 "/submodules/" name "-opensource-src-"
961 version ".tar.xz"))
962 (sha256
963 (base32
964 "10lijbsg9xx5ddbbjymdgl41nxz99yn1qgiww2kkggxwwdjj2axv"))))
965 (native-inputs
966 `(("perl" ,perl)
967 ("pkg-config" ,pkg-config)))
968 (inputs
969 `(("fontconfig" ,fontconfig)
970 ("freetype" ,freetype)
971 ("libxrender" ,libxrender)
972 ("sdl2" ,sdl2)
973 ("qtbase" ,qtbase)
974 ("qtdeclarative" ,qtdeclarative)))))
975
56cd88fd
EF
976(define-public qtscxml
977 (package (inherit qtsvg)
978 (name "qtscxml")
979 (version "5.7.1")
980 (source (origin
981 (method url-fetch)
982 (uri (string-append "https://download.qt.io/official_releases/qt/"
983 (version-major+minor version) "/" version
984 "/submodules/" name "-opensource-src-"
985 version ".tar.xz"))
986 (sha256
987 (base32
988 "135kknqdmib2cjryfmvfgv7a2qx9pyba3m7i7nkbc5d742r4mbcx"))
989 (modules '((guix build utils)))
990 (snippet
991 '(delete-file-recursively "tests/3rdparty"))))
992 (inputs
993 `(("qtbase" ,qtbase)
994 ("qtdeclarative" ,qtdeclarative)))))
995
de5e0180
EF
996(define-public qtpurchasing
997 (package (inherit qtsvg)
998 (name "qtpurchasing")
999 (version "5.7.1")
1000 (source (origin
1001 (method url-fetch)
1002 (uri (string-append "https://download.qt.io/official_releases/qt/"
1003 (version-major+minor version) "/" version
1004 "/submodules/" name "-opensource-src-"
1005 version ".tar.xz"))
1006 (sha256
1007 (base32
1008 "0hkvrgafz1hx9q4yc3nskv3pd3fszghvvd5a7mj33ynf55wpb57n"))))
1009 (inputs
1010 `(("qtbase" ,qtbase)
1011 ("qtdeclarative" ,qtdeclarative)))))
1012
173b54b9
EF
1013(define-public qtcanvas3d
1014 (package (inherit qtsvg)
1015 (name "qtcanvas3d")
1016 (version "5.7.1")
1017 (source (origin
1018 (method url-fetch)
1019 (uri (string-append "https://download.qt.io/official_releases/qt/"
1020 (version-major+minor version) "/" version
1021 "/submodules/" name "-opensource-src-"
1022 version ".tar.xz"))
1023 (sha256
1024 (base32
1025 "1d5xpq3mhjg4ipxzap7s2vnlfcd02d3yq720npv10xxp2ww0i1x8"))
1026 (modules '((guix build utils)))
1027 (snippet
1028 '(delete-file-recursively "examples/canvas3d/3rdparty"))))
1029 (native-inputs `())
1030 (inputs
1031 `(("qtbase" ,qtbase)
1032 ("qtdeclarative" ,qtdeclarative)))))
1033
68bbe14b
EF
1034(define-public qtcharts
1035 (package (inherit qtsvg)
1036 (name "qtcharts")
1037 (version "5.7.1")
1038 (source (origin
1039 (method url-fetch)
1040 (uri (string-append "https://download.qt.io/official_releases/qt/"
1041 (version-major+minor version) "/" version
1042 "/submodules/" name "-opensource-src-"
1043 version ".tar.xz"))
1044 (sha256
1045 (base32
1046 "1qrzcddwff2hxsbxrraff16j4abah2zkra2756s1mvydj9lyxzl5"))))
1047 (inputs
1048 `(("qtbase" ,qtbase)
1049 ("qtdeclarative" ,qtdeclarative)))))
1050
84ef83dd
AE
1051(define-public python-sip
1052 (package
1053 (name "python-sip")
0468edda 1054 (version "4.18.1")
84ef83dd
AE
1055 (source
1056 (origin
1057 (method url-fetch)
1058 (uri
1059 (string-append "mirror://sourceforge/pyqt/sip/"
8fa7f8d9 1060 "sip-" version "/sip-" version ".tar.gz"))
84ef83dd
AE
1061 (sha256
1062 (base32
0468edda 1063 "1452zy3g0qv4fpd9c0y4gq437kn0xf7bbfniibv5n43zpwnpmklv"))))
84ef83dd
AE
1064 (build-system gnu-build-system)
1065 (native-inputs
1066 `(("python" ,python-wrapper)))
1067 (arguments
1068 `(#:tests? #f ; no check target
e8bdd73a
AE
1069 #:modules ((srfi srfi-1)
1070 ,@%gnu-build-system-modules)
84ef83dd 1071 #:phases
39766868
EF
1072 (modify-phases %standard-phases
1073 (replace 'configure
1074 (lambda* (#:key inputs outputs #:allow-other-keys)
1075 (let* ((out (assoc-ref outputs "out"))
1076 (bin (string-append out "/bin"))
1077 (include (string-append out "/include"))
1078 (python (assoc-ref inputs "python"))
1079 (python-version
1080 (last (string-split python #\-)))
1081 (python-major+minor
1082 (string-join
1083 (take (string-split python-version #\.) 2)
1084 "."))
1085 (lib (string-append out "/lib/python"
1086 python-major+minor
1087 "/site-packages")))
1088 (zero?
1089 (system* "python" "configure.py"
1090 "--bindir" bin
1091 "--destdir" lib
1092 "--incdir" include))))))))
1093 (home-page "https://www.riverbankcomputing.com/software/sip/intro")
84ef83dd
AE
1094 (synopsis "Python binding creator for C and C++ libraries")
1095 (description
1096 "SIP is a tool to create Python bindings for C and C++ libraries. It
1097was originally developed to create PyQt, the Python bindings for the Qt
1098toolkit, but can be used to create bindings for any C or C++ library.
1099
1100SIP comprises a code generator and a Python module. The code generator
1101processes a set of specification files and generates C or C++ code, which
1102is then compiled to create the bindings extension module. The SIP Python
1103module provides support functions to the automatically generated code.")
1104 ;; There is a choice between a python like license, gpl2 and gpl3.
1105 ;; For compatibility with pyqt, we need gpl3.
225941b0 1106 (license license:gpl3)))
84ef83dd
AE
1107
1108(define-public python2-sip
1109 (package (inherit python-sip)
1110 (name "python2-sip")
1111 (native-inputs
1112 `(("python" ,python-2)))))
014e7dd8
AE
1113
1114(define-public python-pyqt
1115 (package
1116 (name "python-pyqt")
1d081467 1117 (version "5.7")
014e7dd8
AE
1118 (source
1119 (origin
1120 (method url-fetch)
1121 (uri
1122 (string-append "mirror://sourceforge/pyqt/PyQt5/"
2be06813 1123 "PyQt-" version "/PyQt5_gpl-"
014e7dd8
AE
1124 version ".tar.gz"))
1125 (sha256
1126 (base32
1d081467 1127 "01avscn1bir0h8zzfh1jvpljgwg6qkax5nk142xrm63rbyx969l9"))
fc1adab1 1128 (patches (search-patches "pyqt-configure.patch"))))
014e7dd8
AE
1129 (build-system gnu-build-system)
1130 (native-inputs
1131 `(("python-sip" ,python-sip)
2be06813 1132 ("qtbase" ,qtbase))) ; for qmake
014e7dd8 1133 (inputs
e9adcd81
EF
1134 `(("python" ,python-wrapper)
1135 ("qtbase" ,qtbase)
1136 ("qtconnectivity" ,qtconnectivity)
1137 ("qtdeclarative" ,qtdeclarative)
1138 ("qtlocation" ,qtlocation)
1139 ("qtmultimedia" ,qtmultimedia)
1140 ("qtsensors" ,qtsensors)
1141 ("qtserialport" ,qtserialport)
1142 ("qtsvg" ,qtsvg)
1143 ("qttools" ,qttools)
1144 ("qtwebchannel" ,qtwebchannel)
1145 ("qtwebkit" ,qtwebkit)
1146 ("qtwebsockets" ,qtwebsockets)
1147 ("qtx11extras" ,qtx11extras)
1148 ("qtxmlpatterns" ,qtxmlpatterns)))
014e7dd8 1149 (arguments
e8bdd73a
AE
1150 `(#:modules ((srfi srfi-1)
1151 ,@%gnu-build-system-modules)
1152 #:phases
eef988c8
EF
1153 (modify-phases %standard-phases
1154 (replace 'configure
1155 (lambda* (#:key inputs outputs #:allow-other-keys)
1156 (let* ((out (assoc-ref outputs "out"))
1157 (bin (string-append out "/bin"))
1158 (sip (string-append out "/share/sip"))
1159 (plugins (string-append out "/plugins"))
1160 (designer (string-append plugins "/designer"))
1161 (qml (string-append plugins "/PyQt5"))
1162 (python (assoc-ref inputs "python"))
1163 (python-version
1164 (last (string-split python #\-)))
1165 (python-major+minor
1166 (string-join
1167 (take (string-split python-version #\.) 2)
1168 "."))
1169 (lib (string-append out "/lib/python"
1170 python-major+minor
43e8824d
HG
1171 "/site-packages"))
1172 (stubs (string-append lib "/PyQt5")))
eef988c8
EF
1173 (zero? (system* "python" "configure.py"
1174 "--confirm-license"
1175 "--bindir" bin
1176 "--destdir" lib
1177 "--designer-plugindir" designer
1178 "--qml-plugindir" qml
43e8824d
HG
1179 ; Where to install the PEP 484 Type Hints stub
1180 ; files. Without this the stubs are tried to be
1181 ; installed into the python package's
1182 ; site-package directory, which is read-only.
1183 "--stubsdir" stubs
eef988c8
EF
1184 "--sipdir" sip))))))))
1185 (home-page "https://www.riverbankcomputing.com/software/pyqt/intro")
014e7dd8
AE
1186 (synopsis "Python bindings for Qt")
1187 (description
1188 "PyQt is a set of Python v2 and v3 bindings for the Qt application
1189framework. The bindings are implemented as a set of Python modules and
1190contain over 620 classes.")
225941b0 1191 (license license:gpl3)))
014e7dd8
AE
1192
1193(define-public python2-pyqt
1194 (package (inherit python-pyqt)
1195 (name "python2-pyqt")
1196 (native-inputs
1197 `(("python-sip" ,python2-sip)
2be06813 1198 ("qtbase" ,qtbase)))
014e7dd8 1199 (inputs
e9adcd81
EF
1200 `(("python" ,python-2)
1201 ,@(alist-delete "python" (package-inputs python-pyqt))))))
3e291958
AE
1202
1203(define-public python-pyqt-4
1204 (package (inherit python-pyqt)
1205 (name "python-pyqt")
99755491 1206 (version "4.11.4")
3e291958
AE
1207 (source
1208 (origin
1209 (method url-fetch)
1210 (uri
1211 (string-append "mirror://sourceforge/pyqt/PyQt4/"
1212 "PyQt-" version "/PyQt-x11-gpl-"
1213 version ".tar.gz"))
1214 (sha256
1215 (base32
99755491 1216 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
3e291958
AE
1217 (native-inputs
1218 `(("python-sip" ,python-sip)
1219 ("qt" ,qt-4)))
e9adcd81 1220 (inputs `(("python" ,python-wrapper)))
3e291958
AE
1221 (arguments
1222 `(#:tests? #f ; no check target
e8bdd73a
AE
1223 #:modules ((srfi srfi-1)
1224 ,@%gnu-build-system-modules)
3e291958 1225 #:phases
f9513086
EF
1226 (modify-phases %standard-phases
1227 (replace 'configure
1228 (lambda* (#:key inputs outputs #:allow-other-keys)
1229 (let* ((out (assoc-ref outputs "out"))
1230 (bin (string-append out "/bin"))
1231 (sip (string-append out "/share/sip"))
1232 (python (assoc-ref inputs "python"))
1233 (python-version
1234 (last (string-split python #\-)))
1235 (python-major+minor
1236 (string-join
1237 (take (string-split python-version #\.) 2)
1238 "."))
1239 (lib (string-append out "/lib/python"
1240 python-major+minor
1241 "/site-packages")))
1242 (zero? (system* "python" "configure.py"
1243 "--confirm-license"
1244 "--bindir" bin
1245 "--destdir" lib
1246 "--sipdir" sip))))))))
225941b0 1247 (license (list license:gpl2 license:gpl3)))) ; choice of either license
3e291958 1248
6d8e14d0 1249(define-public python2-pyqt-4
1250 (package (inherit python-pyqt-4)
9fde8778 1251 (name "python2-pyqt")
6d8e14d0 1252 (native-inputs
1253 `(("python-sip" ,python2-sip)
1254 ("qt" ,qt-4)))
1255 (inputs
1256 `(("python" ,python-2)))))
1257
9e81af9e
EF
1258(define-public qtkeychain
1259 (package
1260 (name "qtkeychain")
6e8dee98 1261 (version "0.7.0")
9e81af9e
EF
1262 (source
1263 (origin
1264 (method url-fetch)
1265 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
1266 "archive/v" version ".tar.gz"))
1267 (file-name (string-append name "-" version ".tar.gz"))
1268 (sha256
6e8dee98 1269 (base32 "0fka5q5cdzlf79igcjgbnb2smvwbwfasqawkzkbr34whispgm6lz"))))
9e81af9e 1270 (build-system cmake-build-system)
18174d8a
DC
1271 (native-inputs
1272 `(("qttools" ,qttools)))
9e81af9e 1273 (inputs
18174d8a 1274 `(("qtbase" ,qtbase)))
9e81af9e
EF
1275 (arguments
1276 `(#:tests? #f ; No tests included
1277 #:phases
1278 (modify-phases %standard-phases
1279 (add-before
1280 'configure 'set-qt-trans-dir
1281 (lambda _
1282 (substitute* "CMakeLists.txt"
1283 (("\\$\\{qt_translations_dir\\}")
1284 "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
1285 (home-page "https://github.com/frankosterfeld/qtkeychain")
1286 (synopsis "Qt API to store passwords")
1287 (description
1288 "QtKeychain is a Qt library to store passwords and other secret data
1289securely. It will not store any data unencrypted unless explicitly requested.")
225941b0 1290 (license license:bsd-3)))
fc381a33
TD
1291
1292(define-public qwt
1293 (package
1294 (name "qwt")
1295 (version "6.1.3")
1296 (source
1297 (origin
1298 (method url-fetch)
1299 (uri
1300 (string-append "mirror://sourceforge/qwt/qwt/"
1301 version "/qwt-" version ".tar.bz2"))
1302 (sha256
1303 (base32 "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"))))
1304 (build-system gnu-build-system)
1305 (inputs
1306 `(("qtbase" ,qtbase)
1307 ("qtsvg" ,qtsvg)
1308 ("qttools" ,qttools)))
1309 (arguments
1310 `(#:phases
1311 (modify-phases %standard-phases
1312 (replace 'configure
1313 (lambda* (#:key outputs #:allow-other-keys)
1314 (let ((out (assoc-ref outputs "out")))
1315 (substitute* '("qwtconfig.pri")
1316 (("/usr/local/qwt-\\$\\$QWT\\_VERSION") out))
1317 (zero? (system* "qmake")))))
1318 (add-after 'install 'install-documentation
1319 (lambda* (#:key outputs #:allow-other-keys)
1320 (let* ((out (assoc-ref outputs "out"))
1321 (man (string-append out "/share/man")))
1322 ;; Remove some incomplete manual pages.
1323 (for-each delete-file (find-files "doc/man/man3" "^_tmp.*"))
1324 (mkdir-p man)
1325 (copy-recursively "doc/man" man)
1326 #t))))))
1327 (home-page "http://qwt.sourceforge.net")
1328 (synopsis "Qt widgets for plots, scales, dials and other technical software
1329GUI components")
1330 (description
1331 "The Qwt library contains widgets and components which are primarily useful
1332for technical and scientific purposes. It includes a 2-D plotting widget,
1333different kinds of sliders, and much more.")
1334 (license
1335 (list
1336 ;; The Qwt license is LGPL2.1 with some exceptions.
1337 (license:non-copyleft "http://qwt.sourceforge.net/qwtlicense.html")
1338 ;; textengines/mathml/qwt_mml_document.{cpp,h} is dual LGPL2.1/GPL3 (either).
1339 license:lgpl2.1 license:gpl3))))
47e1d280
TD
1340
1341(define-public qtwebkit
1342 (package
1343 (name "qtwebkit")
daa481f5 1344 (version "5.7.1")
47e1d280
TD
1345 (source
1346 (origin
1347 (method url-fetch)
1348 (uri (string-append "http://download.qt.io/community_releases/"
1349 (version-major+minor version)
1350 "/" version "/qtwebkit-opensource-src-" version
1351 ".tar.xz"))
1352 ;; Note: since Qt 5.6, Qt no longer officially supports qtwebkit:
1353 ;; <http://lists.qt-project.org/pipermail/development/2016-May/025923.html>.
1354 (sha256
1355 (base32
daa481f5 1356 "00szgcra6pf2myfjrdbsr1gmrxycpbjqlzkplna5yr1rjg4gfv54"))))
47e1d280
TD
1357 (build-system gnu-build-system)
1358 (native-inputs
1359 `(("perl" ,perl)
1360 ("python" ,python-2.7)
1361 ("ruby" ,ruby)
1362 ("bison" ,bison)
1363 ("flex" ,flex)
1364 ("gperf" ,gperf)
1365 ("pkg-config" ,pkg-config)))
1366 (inputs
1367 `(("icu" ,icu4c)
1368 ("libjpeg" ,libjpeg)
1369 ("libpng" ,libpng)
1370 ("libwebp" ,libwebp)
1371 ("sqlite" ,sqlite)
1372 ("fontconfig" ,fontconfig)
1373 ("libxrender", libxrender)
1374 ("qtbase" ,qtbase)
1375 ("qtdeclarative" ,qtdeclarative)
1376 ("qtmultimedia" ,qtmultimedia)
1377 ("libxml2" ,libxml2)
1378 ("libxslt" ,libxslt)
1379 ("libx11" ,libx11)
1380 ("libxcomposite" ,libxcomposite)))
1381 (arguments
1382 `(#:phases
1383 (modify-phases %standard-phases
1384 (replace 'configure
1385 (lambda* (#:key outputs #:allow-other-keys)
1386 (let ((out (assoc-ref outputs "out")))
1387 (setenv "QMAKEPATH"
1388 (string-append (getcwd) "/Tools/qmake:"
1389 (getenv "QMAKEPATH")))
1390 (system* "qmake"))))
1391 ;; prevent webkit from trying to install into the qtbase store directory,
1392 ;; and replace references to the build directory in linker options:
1393 (add-before 'build 'patch-installpaths
1394 (lambda* (#:key outputs inputs #:allow-other-keys)
1395 (let* ((out (assoc-ref outputs "out"))
1396 (qtbase (assoc-ref inputs "qtbase"))
1397 (builddir (getcwd))
1398 (linkbuild (string-append "-L" builddir))
1399 (linkout (string-append "-L" out))
1400 (makefiles
1401 (map-in-order
1402 (lambda (i)
1403 (let* ((in (car i))
1404 (mf (string-append (dirname in) "/"
1405 (cdr i))))
1406 ;; by default, these Makefiles are
1407 ;; generated during install, but we need
1408 ;; to generate them now
1409 (system* "qmake" in "-o" mf)
1410 mf))
1411 '(("Source/api.pri" . "Makefile.api")
1412 ("Source/widgetsapi.pri"
1413 . "Makefile.widgetsapi")
1414 ("Source/WebKit2/WebProcess.pro"
1415 . "Makefile.WebProcess")
1416 ("Source/WebKit2/PluginProcess.pro"
1417 . "Makefile.PluginProcess")
1418 ("Source/WebKit/qt/declarative/public.pri"
1419 . "Makefile.declarative.public")
1420 ("Source/WebKit/qt/declarative/experimental/experimental.pri"
1421 . "Makefile.declarative.experimental")
1422 ("Source/WebKit/qt/examples/platformplugin/platformplugin.pro"
1423 . "Makefile")))))
1424 ;; Order of qmake calls and substitutions matters here.
1425 (system* "qmake" "-prl" "Source/widgetsapi.pri"
1426 "-o" "Source/Makefile")
1427 (substitute* (find-files "lib" "libQt5.*\\.prl")
1428 ((linkbuild) linkout))
1429 (substitute* (find-files "lib"
1430 "libQt5WebKit.*\\.la")
1431 (("libdir='.*'")
1432 (string-append "libdir='" out "/lib'"))
1433 ((linkbuild) linkout))
1434 (substitute* (find-files "lib/pkgconfig"
1435 "Qt5WebKit.*\\.pc")
1436 (((string-append "prefix=" qtbase))
1437 (string-append "prefix=" out))
1438 ((linkbuild) linkout))
1439 ;; Makefiles must be modified after .prl/.la/.pc
1440 ;; files, lest they get rebuilt:
1441 (substitute* makefiles
1442 (((string-append "\\$\\(INSTALL_ROOT\\)" qtbase))
1443 out )
1444 (((string-append "-Wl,-rpath," builddir))
1445 (string-append "-Wl,-rpath," out)))))))))
1446 (home-page "https://www.webkit.org")
1447 (synopsis "Web browser engine and classes to render and interact with web
1448content")
1449 (description "QtWebKit provides a Web browser engine that makes it easy to
1450embed content from the World Wide Web into your Qt application. At the same
1451time Web content can be enhanced with native controls.")
1452
1453 (license license:lgpl2.1+)))
f048f12b 1454
1455(define-public dotherside
1456 (package
1457 (name "dotherside")
1458 (version "0.5.2")
1459 (source
1460 (origin
1461 (method url-fetch)
1462 (uri (string-append "https://github.com/filcuc/DOtherSide/"
1463 "archive/v" version ".tar.gz"))
1464 (file-name (string-append name "-" version ".tar.gz"))
1465 (sha256
1466 (base32
1467 "0pqlrvy4ajjir80ra79ka3n0rjj0ir0f0m91cq86iz3nnw8w148z"))))
1468 (build-system cmake-build-system)
1469 (native-inputs
1470 `(("qttools" ,qttools)))
1471 (inputs
1472 `(("qtbase" ,qtbase)
1473 ("qtdeclarative" ,qtdeclarative)))
1474 (home-page "https://github.com/frankosterfeld/qtkeychain")
1475 (synopsis "C language library for creating bindings for the Qt QML language")
1476 (description
1477 "DOtherSide is a C language library for creating bindings for the
1478QT QML language. The following features are implementable from
1479a binding language:
1480@itemize
1481@item Creating custom QObject
1482@item Creating custom QAbstractListModels
1483@item Creating custom properties, signals and slots
1484@item Creating from QML QObject defined in the binded language
1485@item Creating from Singleton QML QObject defined in the binded language
1486@end itemize\n")
1487 (license license:lgpl3))) ;version 3 only (+ exception)