gnu: python-sip: Update to 4.18.
[jackhill/guix/guix.git] / gnu / packages / qt.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
4 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
5 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages qt)
23 #:use-module ((guix licenses) #:select (bsd-3 gpl2 gpl3 lgpl2.1 lgpl2.1+ lgpl3 x11-style))
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build utils)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix packages)
30 #:use-module (guix utils)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages bison)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages cups)
35 #:use-module (gnu packages databases)
36 #:use-module (gnu packages fontutils)
37 #:use-module (gnu packages flex)
38 #:use-module (gnu packages gl)
39 #:use-module (gnu packages glib)
40 #:use-module (gnu packages gnuzilla)
41 #:use-module (gnu packages gperf)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages icu4c)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages databases)
47 #:use-module (gnu packages pciutils)
48 #:use-module (gnu packages pcre)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages pulseaudio)
52 #:use-module (gnu packages python)
53 #:use-module (gnu packages ruby)
54 #:use-module (gnu packages tls)
55 #:use-module (gnu packages xdisorg)
56 #:use-module (gnu packages xorg)
57 #:use-module (gnu packages xml))
58
59 (define-public qt
60 (package
61 (name "qt")
62 (version "5.5.1")
63 (source (origin
64 (method url-fetch)
65 (uri
66 (string-append
67 "http://download.qt.io/official_releases/qt/"
68 (version-major+minor version)
69 "/" version
70 "/single/qt-everywhere-opensource-src-"
71 version ".tar.xz"))
72 (sha256
73 (base32
74 "0615cn4n3n78v48lnmapqz2jizm2pzrjwvsjlnsf4awrsiiqw0kg"))
75 (modules '((guix build utils)))
76 (snippet
77 '(begin
78 ;; Remove qtwebengine, which relies on a bundled copy of
79 ;; chromium. Not only does it fail compilation in qt 5.5:
80 ;; 3rdparty/chromium/ui/gfx/codec/jpeg_codec.cc:362:10:
81 ;; error: cannot convert ‘bool’ to ‘boolean’ in return
82 ;; it might also pose security problems.
83 ;; Alternatively, we could use the "-skip qtwebengine"
84 ;; configuration option.
85 (delete-file-recursively "qtwebengine")
86 ;; Remove one of the two bundled harfbuzz copies in addition
87 ;; to passing "-system-harfbuzz".
88 (delete-file-recursively "qtbase/src/3rdparty/harfbuzz-ng")
89 ;; Remove the bundled sqlite copy in addition to
90 ;; passing "-system-sqlite".
91 (delete-file-recursively "qtbase/src/3rdparty/sqlite")))))
92 (build-system gnu-build-system)
93 (propagated-inputs
94 `(("mesa" ,mesa)))
95 (inputs
96 `(("alsa-lib" ,alsa-lib)
97 ("dbus" ,dbus)
98 ("cups" ,cups)
99 ("expat" ,expat)
100 ("fontconfig" ,fontconfig)
101 ("freetype" ,freetype)
102 ("glib" ,glib)
103 ("harfbuzz" ,harfbuzz)
104 ("icu4c" ,icu4c)
105 ("libjpeg" ,libjpeg)
106 ("libmng" ,libmng)
107 ("libpci" ,pciutils)
108 ("libpng" ,libpng)
109 ("libx11" ,libx11)
110 ("libxcomposite" ,libxcomposite)
111 ("libxcursor" ,libxcursor)
112 ("libxfixes" ,libxfixes)
113 ("libxi" ,libxi)
114 ("libxinerama" ,libxinerama)
115 ("libxkbcommon" ,libxkbcommon)
116 ("libxml2" ,libxml2)
117 ("libxrandr" ,libxrandr)
118 ("libxrender" ,libxrender)
119 ("libxslt" ,libxslt)
120 ("libxtst" ,libxtst)
121 ("mtdev" ,mtdev)
122 ("mysql" ,mysql)
123 ("nss" ,nss)
124 ("openssl" ,openssl)
125 ("postgresql" ,postgresql)
126 ("pulseaudio" ,pulseaudio)
127 ("pcre" ,pcre)
128 ("sqlite" ,sqlite)
129 ("udev" ,eudev)
130 ("unixodbc" ,unixodbc)
131 ("xcb-util" ,xcb-util)
132 ("xcb-util-image" ,xcb-util-image)
133 ("xcb-util-keysyms" ,xcb-util-keysyms)
134 ("xcb-util-renderutil" ,xcb-util-renderutil)
135 ("xcb-util-wm" ,xcb-util-wm)
136 ("zlib" ,zlib)))
137 (native-inputs
138 `(("bison" ,bison)
139 ("flex" ,flex)
140 ("gperf" ,gperf)
141 ("perl" ,perl)
142 ("pkg-config" ,pkg-config)
143 ("python" ,python-2)
144 ("ruby" ,ruby)
145 ("which" ,(@ (gnu packages base) which))))
146 (arguments
147 `(;; FIXME: Disabling parallel building is a quick hack to avoid the
148 ;; failure described in
149 ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
150 ;; A more structural fix is needed.
151 #:parallel-build? #f
152 #:phases
153 (alist-replace
154 'configure
155 (lambda* (#:key outputs #:allow-other-keys)
156 (let ((out (assoc-ref outputs "out")))
157 (substitute* '("configure" "qtbase/configure")
158 (("/bin/pwd") (which "pwd")))
159 (substitute* "qtbase/src/corelib/global/global.pri"
160 (("/bin/ls") (which "ls")))
161 ;; do not pass "--enable-fast-install", which makes the
162 ;; configure process fail
163 (zero? (system*
164 "./configure"
165 "-verbose"
166 "-prefix" out
167 "-opensource"
168 "-confirm-license"
169 ;; Most "-system-..." are automatic, but some use
170 ;; the bundled copy by default.
171 "-system-sqlite"
172 "-system-harfbuzz"
173 ;; explicitly link with openssl instead of dlopening it
174 "-openssl-linked"
175 ;; explicitly link with dbus instead of dlopening it
176 "-dbus-linked"
177 ;; drop special machine instructions not supported
178 ;; on all instances of the target
179 ,@(if (string-prefix? "x86_64"
180 (or (%current-target-system)
181 (%current-system)))
182 '()
183 '("-no-sse2"))
184 "-no-sse3"
185 "-no-ssse3"
186 "-no-sse4.1"
187 "-no-sse4.2"
188 "-no-avx"
189 "-no-avx2"
190 "-no-mips_dsp"
191 "-no-mips_dspr2"))))
192 %standard-phases)))
193 (home-page "http://qt-project.org/")
194 (synopsis "Cross-platform GUI library")
195 (description "Qt is a cross-platform application and UI framework for
196 developers using C++ or QML, a CSS & JavaScript like language.")
197 (license lgpl2.1)
198
199 ;; Qt 4: 'QBasicAtomicPointer' leads to build failures on MIPS;
200 ;; see <http://hydra.gnu.org/build/112828>.
201 ;; Qt 5: assembler error; see <http://hydra.gnu.org/build/112526>.
202 (supported-systems (delete "mips64el-linux" %supported-systems))))
203
204 (define-public qt-4
205 (package (inherit qt)
206 (version "4.8.7")
207 (source (origin
208 (method url-fetch)
209 (uri (string-append "http://download.qt-project.org/official_releases/qt/"
210 (string-copy version 0 (string-rindex version #\.))
211 "/" version
212 "/qt-everywhere-opensource-src-"
213 version ".tar.gz"))
214 (sha256
215 (base32
216 "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272"))
217 (patches (search-patches "qt4-ldflags.patch"))
218 (modules '((guix build utils)))
219 (snippet
220 ;; Remove webkit module, which is not built.
221 '(delete-file-recursively "src/3rdparty/webkit"))))
222 (inputs `(,@(alist-delete "harfbuzz"
223 (alist-delete "libjpeg" (package-inputs qt)))
224 ("libjepg" ,libjpeg-8)
225 ("libsm" ,libsm)))
226
227 ;; Note: there are 37 MiB of examples and a '-exampledir' configure flags,
228 ;; but we can't make them a separate output because "out" and "examples"
229 ;; would refer to each other.
230 (outputs '("out" ;112MiB core + 37MiB examples
231 "doc")) ;280MiB of HTML + code
232 (arguments
233 `(#:phases
234 (modify-phases %standard-phases
235 (replace
236 'configure
237 (lambda* (#:key outputs #:allow-other-keys)
238 (let ((out (assoc-ref outputs "out"))
239 (doc (assoc-ref outputs "doc")))
240 (substitute* '("configure")
241 (("/bin/pwd") (which "pwd")))
242
243 (zero? (system*
244 "./configure"
245 "-verbose"
246 "-prefix" out
247 ;; Note: Don't pass '-docdir' since 'qmake' and
248 ;; libQtCore would record its value, thereby defeating
249 ;; the whole point of having a separate output.
250 "-datadir" (string-append out "/share/qt-" ,version
251 "/data")
252 "-importdir" (string-append out "/lib/qt-4"
253 "/imports")
254 "-plugindir" (string-append out "/lib/qt-4"
255 "/plugins")
256 "-translationdir" (string-append out "/share/qt-" ,version
257 "/translations")
258 "-demosdir" (string-append out "/share/qt-" ,version
259 "/demos")
260 "-examplesdir" (string-append out "/share/qt-" ,version
261 "/examples")
262 "-opensource"
263 "-confirm-license"
264 ;; explicitly link with dbus instead of dlopening it
265 "-dbus-linked"
266 ;; Skip the webkit module; it fails to build on armhf
267 ;; and, apart from that, may pose security risks.
268 "-no-webkit"
269 ;; drop special machine instructions not supported
270 ;; on all instances of the target
271 ,@(if (string-prefix? "x86_64"
272 (or (%current-target-system)
273 (%current-system)))
274 '()
275 '("-no-mmx"
276 "-no-3dnow"
277 "-no-sse"
278 "-no-sse2"))
279 "-no-sse3"
280 "-no-ssse3"
281 "-no-sse4.1"
282 "-no-sse4.2"
283 "-no-avx")))))
284 (add-after
285 'install 'move-doc
286 (lambda* (#:key outputs #:allow-other-keys)
287 ;; Because of qt4-documentation-path.patch, documentation ends up
288 ;; being installed in OUT. Move it to the right place.
289 (let* ((out (assoc-ref outputs "out"))
290 (doc (assoc-ref outputs "doc"))
291 (olddoc (string-append out "/doc"))
292 (docdir (string-append doc "/share/doc/qt-" ,version)))
293 (mkdir-p (dirname docdir))
294
295 ;; Note: We can't use 'rename-file' here because OUT and DOC are
296 ;; different "devices" due to bind-mounts.
297 (copy-recursively olddoc docdir)
298 (delete-file-recursively olddoc)
299 #t))))))))
300
301 (define-public qtbase
302 (package
303 (name "qtbase")
304 (version "5.6.0")
305 (source (origin
306 (method url-fetch)
307 (uri (string-append "https://download.qt.io/official_releases/qt/"
308 (version-major+minor version) "/" version
309 "/submodules/" name "-opensource-src-"
310 version ".tar.xz"))
311 (sha256
312 (base32
313 "0ynnvcs5idivzldsq5ciqg9myg82b3l3906l4vjv54lyamf8mykf"))
314 (modules '((guix build utils)))
315 (snippet
316 '(begin
317 ;; Remove one of the two bundled harfbuzz copies in addition
318 ;; to passing "-system-harfbuzz".
319 (delete-file-recursively "src/3rdparty/harfbuzz-ng")
320 ;; Remove the bundled sqlite copy in addition to
321 ;; passing "-system-sqlite".
322 (delete-file-recursively "src/3rdparty/sqlite")))))
323 (build-system gnu-build-system)
324 (propagated-inputs
325 `(("mesa" ,mesa)))
326 (inputs
327 `(("alsa-lib" ,alsa-lib)
328 ("cups" ,cups)
329 ("dbus" ,dbus)
330 ("expat" ,expat)
331 ("fontconfig" ,fontconfig)
332 ("freetype" ,freetype)
333 ("glib" ,glib)
334 ("harfbuzz" ,harfbuzz)
335 ("icu4c" ,icu4c)
336 ("libjpeg" ,libjpeg)
337 ("libmng" ,libmng)
338 ("libpng" ,libpng)
339 ("libx11" ,libx11)
340 ("libxcomposite" ,libxcomposite)
341 ("libxcursor" ,libxcursor)
342 ("libxfixes" ,libxfixes)
343 ("libxi" ,libxi)
344 ("libxinerama" ,libxinerama)
345 ("libxkbcommon" ,libxkbcommon)
346 ("libxml2" ,libxml2)
347 ("libxrandr" ,libxrandr)
348 ("libxrender" ,libxrender)
349 ("libxslt" ,libxslt)
350 ("libxtst" ,libxtst)
351 ("mtdev" ,mtdev)
352 ("mysql" ,mysql)
353 ("nss" ,nss)
354 ("openssl" ,openssl)
355 ("pcre" ,pcre)
356 ("postgresql" ,postgresql)
357 ("pulseaudio" ,pulseaudio)
358 ("sqlite" ,sqlite)
359 ("unixodbc" ,unixodbc)
360 ("xcb-util" ,xcb-util)
361 ("xcb-util-image" ,xcb-util-image)
362 ("xcb-util-keysyms" ,xcb-util-keysyms)
363 ("xcb-util-renderutil" ,xcb-util-renderutil)
364 ("xcb-util-wm" ,xcb-util-wm)
365 ("zlib" ,zlib)))
366 (native-inputs
367 `(("bison" ,bison)
368 ("flex" ,flex)
369 ("gperf" ,gperf)
370 ("perl" ,perl)
371 ("pkg-config" ,pkg-config)
372 ("python" ,python-2)
373 ("ruby" ,ruby)
374 ("which" ,(@ (gnu packages base) which))))
375 (arguments
376 `(#:phases
377 (modify-phases %standard-phases
378 (add-after 'configure 'patch-bin-sh
379 (lambda _
380 (substitute* '("config.status"
381 "configure"
382 "mkspecs/features/qt_functions.prf"
383 "qmake/library/qmakebuiltins.cpp")
384 (("/bin/sh") (which "sh")))
385 #t))
386 (replace 'configure
387 (lambda* (#:key outputs #:allow-other-keys)
388 (let ((out (assoc-ref outputs "out")))
389 (substitute* "configure"
390 (("/bin/pwd") (which "pwd")))
391 (substitute* "src/corelib/global/global.pri"
392 (("/bin/ls") (which "ls")))
393 ;; do not pass "--enable-fast-install", which makes the
394 ;; configure process fail
395 (zero? (system*
396 "./configure"
397 "-verbose"
398 "-prefix" out
399 "-opensource"
400 "-confirm-license"
401 ;; Do not build examples; if desired, these could go
402 ;; into a separate output, but for the time being, we
403 ;; prefer to save the space and build time.
404 "-nomake" "examples"
405 ;; Most "-system-..." are automatic, but some use
406 ;; the bundled copy by default.
407 "-system-sqlite"
408 "-system-harfbuzz"
409 ;; explicitly link with openssl instead of dlopening it
410 "-openssl-linked"
411 ;; explicitly link with dbus instead of dlopening it
412 "-dbus-linked"
413 ;; drop special machine instructions not supported
414 ;; on all instances of the target
415 ,@(if (string-prefix? "x86_64"
416 (or (%current-target-system)
417 (%current-system)))
418 '()
419 '("-no-sse2"))
420 "-no-sse3"
421 "-no-ssse3"
422 "-no-sse4.1"
423 "-no-sse4.2"
424 "-no-avx"
425 "-no-avx2"
426 "-no-mips_dsp"
427 "-no-mips_dspr2"))))))))
428 (home-page "https://www.qt.io/")
429 (synopsis "Cross-platform GUI library")
430 (description "Qt is a cross-platform application and UI framework for
431 developers using C++ or QML, a CSS & JavaScript like language.")
432 (license (list lgpl2.1 lgpl3))))
433
434 (define-public qjson
435 (package
436 (name "qjson")
437 (version "0.8.1")
438 (source (origin
439 (method url-fetch)
440 (uri (string-append "https://github.com/flavio/qjson/archive/"
441 version ".tar.gz"))
442 (file-name (string-append name "-" version ".tar.gz"))
443 (sha256
444 (base32
445 "163fspi0xc705irv79qw861fmh68pjyla9vx3kqiq6xrdhb9834j"))))
446 (build-system cmake-build-system)
447 (inputs
448 `(("qt" ,qt-4)))
449 (arguments
450 `(#:tests? #f)) ; no test target
451 (home-page "http://qjson.sourceforge.net/")
452 (synopsis "Qt-based library for handling JSON")
453 (description "QJson is a Qt-based library that maps JSON data to QVariant
454 objects and vice versa. JSON arrays are mapped to QVariantList instances,
455 while JSON objects are mapped to QVariantMap.")
456 (license lgpl2.1+)))
457
458 (define-public python-sip
459 (package
460 (name "python-sip")
461 (version "4.18")
462 (source
463 (origin
464 (method url-fetch)
465 (uri
466 (string-append "mirror://sourceforge/pyqt/sip/"
467 "sip-" version "/sip-" version ".tar.gz"))
468 (sha256
469 (base32
470 "1dlw4kyiwd9bzmd1djm79c121r219abaz86lvizdk6ksq20mrp7i"))))
471 (build-system gnu-build-system)
472 (native-inputs
473 `(("python" ,python-wrapper)))
474 (arguments
475 `(#:tests? #f ; no check target
476 #:modules ((srfi srfi-1)
477 ,@%gnu-build-system-modules)
478 #:phases
479 (alist-replace
480 'configure
481 (lambda* (#:key inputs outputs #:allow-other-keys)
482 (let* ((out (assoc-ref outputs "out"))
483 (bin (string-append out "/bin"))
484 (include (string-append out "/include"))
485 (python (assoc-ref inputs "python"))
486 (python-version
487 (last (string-split python #\-)))
488 (python-major+minor
489 (string-join
490 (take (string-split python-version #\.) 2)
491 "."))
492 (lib (string-append out "/lib/python"
493 python-major+minor
494 "/site-packages")))
495 (zero?
496 (system* "python" "configure.py"
497 "--bindir" bin
498 "--destdir" lib
499 "--incdir" include))))
500 %standard-phases)))
501 (home-page "http://www.riverbankcomputing.com/software/sip/intro")
502 (synopsis "Python binding creator for C and C++ libraries")
503 (description
504 "SIP is a tool to create Python bindings for C and C++ libraries. It
505 was originally developed to create PyQt, the Python bindings for the Qt
506 toolkit, but can be used to create bindings for any C or C++ library.
507
508 SIP comprises a code generator and a Python module. The code generator
509 processes a set of specification files and generates C or C++ code, which
510 is then compiled to create the bindings extension module. The SIP Python
511 module provides support functions to the automatically generated code.")
512 ;; There is a choice between a python like license, gpl2 and gpl3.
513 ;; For compatibility with pyqt, we need gpl3.
514 (license gpl3)))
515
516 (define-public python2-sip
517 (package (inherit python-sip)
518 (name "python2-sip")
519 (native-inputs
520 `(("python" ,python-2)))))
521
522 (define-public python-pyqt
523 (package
524 (name "python-pyqt")
525 (version "5.5")
526 (source
527 (origin
528 (method url-fetch)
529 (uri
530 (string-append "mirror://sourceforge/pyqt/PyQt5/"
531 "PyQt-" version "/PyQt-gpl-"
532 version ".tar.gz"))
533 (sha256
534 (base32
535 "056qmkv02wdcfblqdaxiswrgn4wa88sz22i1x58dpb1iniavplfd"))
536 (patches (search-patches "pyqt-configure.patch"))))
537 (build-system gnu-build-system)
538 (native-inputs
539 `(("python-sip" ,python-sip)
540 ("qt" ,qt))) ; for qmake
541 (inputs
542 `(("python" ,python-wrapper)))
543 (arguments
544 `(#:modules ((srfi srfi-1)
545 ,@%gnu-build-system-modules)
546 #:phases
547 (alist-replace
548 'configure
549 (lambda* (#:key inputs outputs #:allow-other-keys)
550 (let* ((out (assoc-ref outputs "out"))
551 (bin (string-append out "/bin"))
552 (sip (string-append out "/share/sip"))
553 (plugins (string-append out "/plugins"))
554 (designer (string-append plugins "/designer"))
555 (qml (string-append plugins "/PyQt5"))
556 (python (assoc-ref inputs "python"))
557 (python-version
558 (last (string-split python #\-)))
559 (python-major+minor
560 (string-join
561 (take (string-split python-version #\.) 2)
562 "."))
563 (lib (string-append out "/lib/python"
564 python-major+minor
565 "/site-packages")))
566 (zero? (system* "python" "configure.py"
567 "--confirm-license"
568 "--bindir" bin
569 "--destdir" lib
570 "--designer-plugindir" designer
571 "--qml-plugindir" qml
572 "--sipdir" sip))))
573 %standard-phases)))
574 (home-page "http://www.riverbankcomputing.com/software/pyqt/intro")
575 (synopsis "Python bindings for Qt")
576 (description
577 "PyQt is a set of Python v2 and v3 bindings for the Qt application
578 framework. The bindings are implemented as a set of Python modules and
579 contain over 620 classes.")
580 (license gpl3)))
581
582 (define-public python2-pyqt
583 (package (inherit python-pyqt)
584 (name "python2-pyqt")
585 (native-inputs
586 `(("python-sip" ,python2-sip)
587 ("qt" ,qt)))
588 (inputs
589 `(("python" ,python-2)))))
590
591 (define-public python-pyqt-4
592 (package (inherit python-pyqt)
593 (name "python-pyqt")
594 (version "4.11.4")
595 (source
596 (origin
597 (method url-fetch)
598 (uri
599 (string-append "mirror://sourceforge/pyqt/PyQt4/"
600 "PyQt-" version "/PyQt-x11-gpl-"
601 version ".tar.gz"))
602 (sha256
603 (base32
604 "01zlviy5lq8g6db84wnvvpsrfnip9lbcpxagsyqa6as3jmsff7zw"))))
605 (native-inputs
606 `(("python-sip" ,python-sip)
607 ("qt" ,qt-4)))
608 (arguments
609 `(#:tests? #f ; no check target
610 #:modules ((srfi srfi-1)
611 ,@%gnu-build-system-modules)
612 #:phases
613 (alist-replace
614 'configure
615 (lambda* (#:key inputs outputs #:allow-other-keys)
616 (let* ((out (assoc-ref outputs "out"))
617 (bin (string-append out "/bin"))
618 (sip (string-append out "/share/sip"))
619 (python (assoc-ref inputs "python"))
620 (python-version
621 (last (string-split python #\-)))
622 (python-major+minor
623 (string-join
624 (take (string-split python-version #\.) 2)
625 "."))
626 (lib (string-append out "/lib/python"
627 python-major+minor
628 "/site-packages")))
629 (zero? (system* "python" "configure.py"
630 "--confirm-license"
631 "--bindir" bin
632 "--destdir" lib
633 "--sipdir" sip))))
634 %standard-phases)))
635 (license (list gpl2 gpl3)))) ; choice of either license
636
637 (define-public qtkeychain
638 (package
639 (name "qtkeychain")
640 (version "0.6.2")
641 (source
642 (origin
643 (method url-fetch)
644 (uri (string-append "https://github.com/frankosterfeld/qtkeychain/"
645 "archive/v" version ".tar.gz"))
646 (file-name (string-append name "-" version ".tar.gz"))
647 (sha256
648 (base32 "0g76pa786mg0fxy52hrljw09dvi6kffk2ms42lxapvpy6j94a4xf"))))
649 (build-system cmake-build-system)
650 (inputs
651 `(("qt" ,qt)))
652 (arguments
653 `(#:tests? #f ; No tests included
654 #:phases
655 (modify-phases %standard-phases
656 (add-before
657 'configure 'set-qt-trans-dir
658 (lambda _
659 (substitute* "CMakeLists.txt"
660 (("\\$\\{qt_translations_dir\\}")
661 "${CMAKE_INSTALL_PREFIX}/share/qt/translations")))))))
662 (home-page "https://github.com/frankosterfeld/qtkeychain")
663 (synopsis "Qt API to store passwords")
664 (description
665 "QtKeychain is a Qt library to store passwords and other secret data
666 securely. It will not store any data unencrypted unless explicitly requested.")
667 (license bsd-3)))