Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
7 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016 Nils Gillmann <ng0@libertad.pw>
11 ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages gnupg)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages adns)
32 #:use-module (gnu packages curl)
33 #:use-module (gnu packages openldap)
34 #:use-module (gnu packages perl)
35 #:use-module (gnu packages pth)
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages qt)
38 #:use-module (gnu packages readline)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages databases)
41 #:use-module (gnu packages gtk)
42 #:use-module (gnu packages glib)
43 #:use-module (gnu packages gnome)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages ncurses)
46 #:use-module (gnu packages tls)
47 #:use-module (guix packages)
48 #:use-module (guix download)
49 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system python))
51
52 (define-public libgpg-error
53 (package
54 (name "libgpg-error")
55 (version "1.24")
56 (source
57 (origin
58 (method url-fetch)
59 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
60 version ".tar.bz2"))
61 (sha256
62 (base32
63 "0h75sf1ngr750c3fjfn4583q7wz40qm63jhg8vjfdrbx936f2s4j"))))
64 (build-system gnu-build-system)
65 (home-page "https://gnupg.org")
66 (synopsis "Library of error values for GnuPG components")
67 (description
68 "Libgpg-error is a small library that defines common error values
69 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
70 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
71 Daemon and possibly more in the future.")
72 (license license:lgpl2.0+)
73 (properties '((ftp-server . "ftp.gnupg.org")
74 (ftp-directory . "/gcrypt/libgpg-error")))))
75
76 (define-public libgcrypt
77 (package
78 (name "libgcrypt")
79 (version "1.7.3")
80 (source (origin
81 (method url-fetch)
82 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
83 version ".tar.bz2"))
84 (sha256
85 (base32
86 "0wbh6fq5zi9wg2xcfvfpwh7dv52jihivx1vm4h91c2kx0w8n3b6x"))))
87 (build-system gnu-build-system)
88 (propagated-inputs
89 `(("libgpg-error-host" ,libgpg-error)))
90 (native-inputs
91 ;; Needed here for the 'gpg-error' program.
92 `(("libgpg-error-native" ,libgpg-error)))
93 (arguments
94 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
95 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
96 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
97 `(#:configure-flags
98 (list (string-append "--with-gpg-error-prefix="
99 (assoc-ref %build-inputs "libgpg-error-host")))))
100 (outputs '("out" "debug"))
101 (home-page "https://gnupg.org/")
102 (synopsis "Cryptographic function library")
103 (description
104 "Libgcrypt is a general-purpose cryptographic library. It provides the
105 standard cryptographic building blocks such as symmetric ciphers, hash
106 algorithms, public key algorithms, large integer functions and random number
107 generation.")
108 (license license:lgpl2.0+)
109 (properties '((ftp-server . "ftp.gnupg.org")
110 (ftp-directory . "/gcrypt/libgcrypt")))))
111
112 (define-public libgcrypt-1.5
113 (package (inherit libgcrypt)
114 (version "1.5.6")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
119 version ".tar.bz2"))
120 (sha256
121 (base32
122 "0ydy7bgra5jbq9mxl5x031nif3m6y3balc6ndw2ngj11wnsjc61h"))))))
123
124 (define-public libassuan
125 (package
126 (name "libassuan")
127 (version "2.4.3")
128 (source
129 (origin
130 (method url-fetch)
131 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
132 version ".tar.bz2"))
133 (sha256
134 (base32
135 "0w9bmasln4z8mn16s1is55a06w3nv8jbyal496z5jvr5vcxkm112"))))
136 (build-system gnu-build-system)
137 (propagated-inputs
138 `(("libgpg-error" ,libgpg-error) ("pth" ,pth)))
139 (home-page "https://gnupg.org")
140 (synopsis
141 "IPC library used by GnuPG and related software")
142 (description
143 "Libassuan is a small library implementing the so-called Assuan
144 protocol. This protocol is used for IPC between most newer
145 GnuPG components. Both, server and client side functions are
146 provided.")
147 (license license:lgpl2.0+)
148 (properties '((ftp-server . "ftp.gnupg.org")
149 (ftp-directory . "/gcrypt/libassuan")))))
150
151 (define-public libksba
152 (package
153 (name "libksba")
154 (version "1.3.5")
155 (source
156 (origin
157 (method url-fetch)
158 (uri (string-append
159 "mirror://gnupg/libksba/libksba-"
160 version ".tar.bz2"))
161 (sha256
162 (base32
163 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
164 (build-system gnu-build-system)
165 (propagated-inputs
166 `(("libgpg-error" ,libgpg-error)))
167 (native-inputs
168 `(("libgpg-error" ,libgpg-error)))
169 (arguments
170 `(#:configure-flags
171 (list ,@(if (%current-target-system)
172 '("CC_FOR_BUILD=gcc")
173 '())
174 (string-append "--with-gpg-error-prefix="
175 (assoc-ref %build-inputs "libgpg-error")))))
176 (home-page "https://www.gnupg.org")
177 (synopsis "CMS and X.509 access library")
178 (description
179 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
180 as well as the CMS easily accessible by other applications. Both
181 specifications are building blocks of S/MIME and TLS.")
182 (license license:gpl3+)
183 (properties '((ftp-server . "ftp.gnupg.org")
184 (ftp-directory . "/gcrypt/libksba")))))
185
186 (define-public npth
187 (package
188 (name "npth")
189 (version "1.2")
190 (source
191 (origin
192 (method url-fetch)
193 (uri (string-append
194 "mirror://gnupg/npth/npth-"
195 version ".tar.bz2"))
196 (sha256
197 (base32
198 "12n0nvhw4fzwp0k7gjv3rc6pdml0qiinbbfiz4ilg6pl5kdxvnvd"))))
199 (build-system gnu-build-system)
200 (home-page "https://www.gnupg.org")
201 (synopsis "Non-preemptive thread library")
202 (description
203 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
204 threads implementation.
205
206 In contrast to GNU Pth is is based on the system's standard threads
207 implementation. This allows the use of libraries which are not
208 compatible to GNU Pth.")
209 (license (list license:lgpl3+ license:gpl2+)))) ; dual license
210
211 (define-public gnupg
212 (package
213 (name "gnupg")
214 (version "2.1.15")
215 (source (origin
216 (method url-fetch)
217 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
218 ".tar.bz2"))
219 (sha256
220 (base32
221 "1pgz02gd84ab94w4xdg67p9z8kvkyr9d523bvcxxd2hviwh1m362"))))
222 (build-system gnu-build-system)
223 (native-inputs
224 `(("pkg-config" ,pkg-config)))
225 (inputs
226 `(("adns" ,adns)
227 ("bzip2" ,bzip2)
228 ("curl" ,curl)
229 ("gnutls" ,gnutls)
230 ("libassuan" ,libassuan)
231 ("libgcrypt" ,libgcrypt)
232 ("libgpg-error" ,libgpg-error)
233 ("libksba" ,libksba)
234 ("npth" ,npth)
235 ("openldap" ,openldap)
236 ("readline" ,readline)
237 ("sqlite" ,sqlite)
238 ("zlib" ,zlib)))
239 (arguments
240 `(#:configure-flags '("--enable-gpg2-is-gpg")
241 #:phases
242 (modify-phases %standard-phases
243 (add-before 'configure 'patch-config-files
244 (lambda _
245 (substitute* "tests/openpgp/defs.inc"
246 (("/bin/pwd") (which "pwd")))
247 #t))
248 (add-after 'build 'patch-scheme-tests
249 (lambda _
250 (substitute* (find-files "tests" ".\\.scm$")
251 (("/usr/bin/env gpgscm")
252 (string-append (getcwd) "/tests/gpgscm/gpgscm")))))
253 (add-before 'check 'set-home
254 ;; Some tests require write access to $HOME, otherwise leading to
255 ;; 'failed to create directory /homeless-shelter/.asy' error.
256 (lambda _
257 (setenv "HOME" "/tmp")
258 #t)))))
259 (home-page "https://gnupg.org/")
260 (synopsis "GNU Privacy Guard")
261 (description
262 "The GNU Privacy Guard is a complete implementation of the OpenPGP
263 standard. It is used to encrypt and sign data and communication. It
264 features powerful key management and the ability to access public key
265 servers. It includes several libraries: libassuan (IPC between GnuPG
266 components), libgpg-error (centralized GnuPG error values), and
267 libskba (working with X.509 certificates and CMS data).")
268 (license license:gpl3+)
269 (properties '((ftp-server . "ftp.gnupg.org")
270 (ftp-directory . "/gcrypt/gnupg")))))
271
272 (define-public gnupg-2.0
273 (package (inherit gnupg)
274 (version "2.0.30")
275 (source (origin
276 (method url-fetch)
277 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
278 ".tar.bz2"))
279 (sha256
280 (base32
281 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
282 (native-inputs '())
283 (inputs
284 `(("adns" ,adns)
285 ("bzip2" ,bzip2)
286 ("curl" ,curl)
287 ("libassuan" ,libassuan)
288 ("libgcrypt" ,libgcrypt)
289 ("libgpg-error" ,libgpg-error)
290 ("libksba" ,libksba)
291 ("pth" ,pth)
292 ("openldap" ,openldap)
293 ("zlib" ,zlib)
294 ("readline" ,readline)))
295 (arguments
296 `(#:phases
297 (modify-phases %standard-phases
298 (add-before 'configure 'patch-config-files
299 (lambda _
300 (substitute* "tests/openpgp/Makefile.in"
301 (("/bin/sh") (which "bash")))
302 #t))
303 (add-after 'install 'rename-v2-commands
304 (lambda* (#:key outputs #:allow-other-keys)
305 ;; Upstream suggests removing the trailing '2' from command names:
306 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
307 (let ((out (assoc-ref outputs "out")))
308 (with-directory-excursion (string-append out "/bin")
309 (rename-file "gpgv2" "gpgv")
310 (rename-file "gpg2" "gpg")
311
312 ;; Keep the old name around to ease transition.
313 (symlink "gpgv" "gpgv2")
314 (symlink "gpg" "gpg2")
315 #t)))))))))
316
317 (define-public gnupg-1
318 (package (inherit gnupg)
319 (version "1.4.21")
320 (source (origin
321 (method url-fetch)
322 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
323 ".tar.bz2"))
324 (sha256
325 (base32
326 "0xi2mshq8f6zbarb5f61c9w2qzwrdbjm4q8fqsrwlzc51h8a6ivb"))))
327 (native-inputs '())
328 (inputs
329 `(("zlib" ,zlib)
330 ("bzip2" ,bzip2)
331 ("curl" ,curl)
332 ("readline" ,readline)
333 ("libgpg-error" ,libgpg-error)))
334 (arguments
335 `(#:phases
336 (modify-phases %standard-phases
337 (add-after 'unpack 'patch-check-sh
338 (lambda _
339 (substitute* "checks/Makefile.in"
340 (("/bin/sh") (which "bash"))))))))))
341
342 (define-public gpgme
343 (package
344 (name "gpgme")
345 (version "1.6.0")
346 (source
347 (origin
348 (method url-fetch)
349 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
350 ".tar.bz2"))
351 (sha256
352 (base32
353 "17892sclz3yg45wbyqqrzzpq3l0icbnfl28f101b3062g8cy97dh"))))
354 (build-system gnu-build-system)
355 (propagated-inputs
356 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
357 `(("libgpg-error" ,libgpg-error)))
358 (inputs
359 `(("gnupg" ,gnupg-2.0)
360 ("libassuan" ,libassuan)))
361 (arguments '(#:make-flags '("GPG=gpg2")))
362 (home-page "https://www.gnupg.org/related_software/gpgme/")
363 (synopsis "Library providing simplified access to GnuPG functionality")
364 (description
365 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
366 easier for applications. It provides a High-Level Crypto API for encryption,
367 decryption, signing, signature verification and key management. Currently
368 it uses GnuPG as its backend but the API isn't restricted to this engine.
369
370 Because the direct use of GnuPG from an application can be a complicated
371 programming task, it is suggested that all software should try to use GPGME
372 instead. This way bug fixes or improvements can be done at a central place
373 and every application benefits from this.")
374 (license license:lgpl2.1+)))
375
376 (define-public python-pygpgme
377 (package
378 (name "python-pygpgme")
379 (version "0.3")
380 (source
381 (origin
382 (method url-fetch)
383 (uri (pypi-uri "pygpgme" version))
384 (sha256
385 (base32
386 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
387 ;; Unfortunately, we have to disable some tests due to some gpg-agent
388 ;; goofiness... see:
389 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
390 (patches (search-patches "pygpgme-disable-problematic-tests.patch"))))
391 (arguments
392 `(#:phases
393 (modify-phases %standard-phases
394 (add-before 'build 'make-build
395 (lambda _
396 (zero? (system* "make" "build"))))
397 (replace 'check
398 (lambda _
399 (zero? (system* "make" "check")))))))
400 (build-system python-build-system)
401 (inputs
402 `(("gnupg" ,gnupg-2.0)
403 ("gpgme" ,gpgme)))
404 (home-page "https://launchpad.net/pygpgme")
405 (synopsis "Python module for working with OpenPGP messages")
406 (description
407 "PyGPGME is a Python module that lets you sign, verify, encrypt and
408 decrypt messages using the OpenPGP format by making use of GPGME.")
409 (license license:lgpl2.1+)))
410
411 (define-public python2-pygpgme
412 (let ((base (package-with-python2 python-pygpgme)))
413 (package
414 (inherit base)
415 (native-inputs
416 `(("python2-setuptools" ,python2-setuptools)
417 ,@(package-native-inputs base))))))
418
419 (define-public python-gnupg
420 (package
421 (name "python-gnupg")
422 (version "0.3.8")
423 (source
424 (origin
425 (method url-fetch)
426 (uri (pypi-uri "python-gnupg" version))
427 (sha256
428 (base32
429 "0nkbs9c8f30lra7ca39kg91x8cyxn0jb61vih4qky839gpbwwwiq"))))
430 (build-system python-build-system)
431 (arguments
432 `(#:phases
433 (modify-phases %standard-phases
434 (replace 'check
435 (lambda _
436 (substitute* "test_gnupg.py"
437 ;; Exported keys don't have a version line!
438 (("del k1\\[1\\]") "#")
439 ;; Unsure why this test fails.
440 (("'test_search_keys'") "True")
441 (("def test_search_keys") "def disabled__search_keys"))
442 (setenv "USERNAME" "guixbuilder")
443 ;; The doctests are extremely slow and sometimes time out,
444 ;; so we disable them.
445 (zero? (system* "python"
446 "test_gnupg.py" "--no-doctests")))))))
447 (native-inputs
448 `(("gnupg" ,gnupg-1)))
449 (home-page "https://packages.python.org/python-gnupg/index.html")
450 (synopsis "Wrapper for the GNU Privacy Guard")
451 (description
452 "This module allows easy access to GnuPG’s key management, encryption
453 and signature functionality from Python programs.")
454 (license license:bsd-3)))
455
456 (define-public python2-gnupg
457 (package-with-python2 python-gnupg))
458
459 (define-public pius
460 (package
461 (name "pius")
462 (version "2.2.2")
463 (source (origin
464 (method url-fetch)
465 (uri (string-append
466 "https://github.com/jaymzh/pius/releases/download/v"
467 version "/pius-" version ".tar.bz2"))
468 (sha256
469 (base32
470 "0k94mlr7l12mplph7pdgjbampqha47d8mfjq69n4xm80qwbn1rq1"))))
471 (build-system python-build-system)
472 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
473 ("gpg" ,gnupg-2.0))) ;2.1 fails to talk to gpg-agent 2.0
474 (arguments
475 `(#:tests? #f
476 #:python ,python-2 ;uses the Python 2 'print' syntax
477 #:phases
478 (modify-phases %standard-phases
479 (add-before
480 'build 'set-gpg-file-name
481 (lambda* (#:key inputs outputs #:allow-other-keys)
482 (let* ((gpg (string-append (assoc-ref inputs "gpg")
483 "/bin/gpg")))
484 (substitute* "libpius/constants.py"
485 (("/usr/bin/gpg2") gpg))))))))
486 (synopsis "Programs to simplify GnuPG key signing")
487 (description
488 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
489 parties. It is the main utility and makes it possible to quickly and easily
490 sign each UID on a set of PGP keys. It is designed to take the pain out of
491 the sign-all-the-keys part of PGP Keysigning Party while adding security
492 to the process.
493
494 pius-keyring-mgr and pius-party-worksheet help organisers of
495 PGP keysigning parties.")
496 (license license:gpl2)
497 (home-page "https://www.phildev.net/pius/index.shtml")))
498
499 (define-public signing-party
500 (package
501 (name "signing-party")
502 (version "1.1.4")
503 (source (origin
504 (method url-fetch)
505 (uri (string-append "mirror://debian/pool/main/s/signing-party/"
506 "signing-party_" version ".orig.tar.gz"))
507 (sha256 (base32
508 "188gp0prbh8qs29lq3pbf0qibfd6jq4fk7i0pfrybl8aahvm84rx"))))
509 (build-system gnu-build-system)
510 (inputs `(("perl" ,perl)))
511 (arguments
512 `(#:tests? #f
513 #:phases
514 (modify-phases %standard-phases
515 (add-after 'unpack 'remove-spurious-links
516 (lambda _ (delete-file "keyanalyze/pgpring/depcomp")))
517 (replace 'configure
518 (lambda* (#:key outputs #:allow-other-keys)
519 (let ((out (assoc-ref outputs "out")))
520 (substitute* "keyanalyze/Makefile"
521 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
522 (substitute* "keyanalyze/Makefile"
523 (("./configure") (string-append "./configure --prefix=" out)))
524 (substitute* "keyanalyze/pgpring/configure"
525 (("/bin/sh") (which "bash")))
526 (substitute* "gpgwrap/Makefile"
527 (("\\} clean")
528 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
529 out "/bin/gpgwrap\n")))
530 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
531 "keylookup/Makefile" "sig2dot/Makefile"
532 "springgraph/Makefile")
533 (("/usr") out)))))
534 (replace 'install
535 (lambda* (#:key outputs #:allow-other-keys #:rest args)
536 (let ((out (assoc-ref outputs "out"))
537 (install (assoc-ref %standard-phases 'install)))
538 (apply install args)
539 (for-each
540 (lambda (dir file)
541 (copy-file (string-append dir "/" file)
542 (string-append out "/bin/" file)))
543 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
544 "gpglist" "gpg-mailkeys" "gpgparticipants")
545 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
546 "gpglist" "gpg-mailkeys" "gpgparticipants"))
547 (for-each
548 (lambda (dir file)
549 (copy-file (string-append dir "/" file)
550 (string-append out "/share/man/man1/" file)))
551 '("caff" "caff" "caff" "gpgdir"
552 "gpg-key2ps" "gpglist" "gpg-mailkeys"
553 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
554 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
555 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
556 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
557 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
558 "process_keys.1" "pgpring.1" "keyanalyze.1"))))))))
559 (synopsis "Collection of scripts for simplifying gnupg key signing")
560 (description
561 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
562 including tools for signing keys, keyring analysis, and party preparation.
563 @enumerate
564 @item caff: CA - Fire and Forget signs and mails a key
565 @item pgp-clean: removes all non-self signatures from key
566 @item pgp-fixkey: removes broken packets from keys
567 @item gpg-mailkeys: simply mail out a signed key to its owner
568 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
569 @item gpgdir: recursive directory encryption tool
570 @item gpglist: show who signed which of your UIDs
571 @item gpgsigs: annotates list of GnuPG keys with already done signatures
572 @item gpgparticipants: create list of party participants for the organiser
573 @item gpgwrap: a passphrase wrapper
574 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
575 @item keylookup: ncurses wrapper around gpg --search
576 @item sig2dot: converts a list of GnuPG signatures to a .dot file
577 @item springgraph: creates a graph from a .dot file
578 @end enumerate")
579 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
580 ;; and caff and gpgsigs: bsd-3, see
581 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
582 (license license:gpl2)
583 (home-page "https://pgp-tools.alioth.debian.org/")))
584
585 (define-public pinentry-tty
586 (package
587 (name "pinentry-tty")
588 (version "0.9.7")
589 (source (origin
590 (method url-fetch)
591 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
592 version ".tar.bz2"))
593 (sha256
594 (base32
595 "1cp7wjqr6nx31mdclr61s2h84ijqjl0ph99kgj4vyawpjj1j1633"))))
596 (build-system gnu-build-system)
597 (arguments
598 `(#:configure-flags '("--enable-pinentry-tty")))
599 (inputs
600 `(("ncurses" ,ncurses)
601 ("libassuan" ,libassuan)
602 ("libsecret" ,libsecret "out")))
603 (native-inputs
604 `(("pkg-config" ,pkg-config)))
605 (home-page "https://gnupg.org/aegypten2/")
606 (synopsis "GnuPG's interface to passphrase input")
607 (description
608 "Pinentry provides a console that allows users to enter a passphrase when
609 @code{gpg} is run and needs it.")
610 (license license:gpl2+)))
611
612 (define-public pinentry-gtk2
613 (package
614 (inherit pinentry-tty)
615 (name "pinentry-gtk2")
616 (inputs
617 `(("gtk+" ,gtk+-2)
618 ("glib" ,glib)
619 ,@(package-inputs pinentry-tty)))
620 (description
621 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
622 passphrase when @code{gpg} is run and needs it.")))
623
624 (define-public pinentry-gnome3
625 (package
626 (inherit pinentry-tty)
627 (name "pinentry-gnome3")
628 (inputs
629 `(("gtk+" ,gtk+-2)
630 ("gcr" ,gcr)
631 ("glib" ,glib)
632 ,@(package-inputs pinentry-tty)))
633 (arguments
634 `(#:configure-flags '("--enable-pinentry-gnome3")))
635 (description
636 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
637 that allows users to enter a passphrase when required by @code{gpg} or other
638 software.")))
639
640 (define-public pinentry-qt
641 (package
642 (inherit pinentry-tty)
643 (name "pinentry-qt")
644 (inputs
645 `(("qtbase" ,qtbase)
646 ,@(package-inputs pinentry-tty)))
647 (arguments
648 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
649 (description
650 "Pinentry provides a console and a Qt GUI that allows users to enter a
651 passphrase when @code{gpg} is run and needs it.")))
652
653 (define-public pinentry
654 (package (inherit pinentry-gtk2)
655 (name "pinentry")))
656
657 (define-public paperkey
658 (package
659 (name "paperkey")
660 (version "1.3")
661 (source (origin
662 (method url-fetch)
663 (uri (string-append "http://www.jabberwocky.com/"
664 "software/paperkey/paperkey-"
665 version ".tar.gz"))
666 (sha256
667 (base32
668 "1yybj8bj68v4lxwpn596b6ismh2fyixw5vlqqg26byrn4d9dfmsv"))))
669 (build-system gnu-build-system)
670 (arguments
671 `(#:phases
672 (modify-phases %standard-phases
673 (add-before 'check 'patch-check-scripts
674 (lambda _
675 (substitute* '("checks/roundtrip.sh"
676 "checks/roundtrip-raw.sh")
677 (("/bin/echo") "echo"))
678 #t)))))
679 (home-page "http://www.jabberwocky.com/software/paperkey/")
680 (synopsis "Backup OpenPGP keys to paper")
681 (description
682 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
683 for printing with paper and ink, which have amazingly long retention
684 qualities. To reconstruct a secret key, you re-enter those
685 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
686 them to transform your existing public key into a secret key.")
687 (license license:gpl2+)))