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