1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015, 2018 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014, 2018 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, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017 ng0 <ng0@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 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
16 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
17 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
18 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages gnupg)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages adns)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages curl)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages emacs)
44 #:use-module (gnu packages enlightenment)
45 #:use-module (gnu packages gettext)
46 #:use-module (gnu packages guile)
47 #:use-module (gnu packages openldap)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages perl-check)
50 #:use-module (gnu packages pth)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages python-xyz)
53 #:use-module (gnu packages qt)
54 #:use-module (gnu packages readline)
55 #:use-module (gnu packages compression)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages security-token)
62 #:use-module (gnu packages sqlite)
63 #:use-module (gnu packages swig)
64 #:use-module (gnu packages texinfo)
65 #:use-module (gnu packages tls)
66 #:use-module (gnu packages tor)
67 #:use-module (gnu packages web)
68 #:use-module (gnu packages xml)
69 #:use-module (guix packages)
70 #:use-module (guix download)
71 #:use-module (guix git-download)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system perl)
74 #:use-module (guix build-system python)
75 #:use-module (srfi srfi-1))
77 (define-public libgpg-error
84 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
88 "0z696dmhfxm2n6pmr8b857wwljq9h633yi99bhbn7h88f91rigds"))
89 (patches (search-patches "libgpg-error-gawk-compat.patch"))
90 ;; XXX: Remove this snippet with the gawk patch above. It avoids having
91 ;; to call autoreconf for the Makefile.am change to take effect.
92 (modules '((guix build utils)))
95 (substitute* "src/Makefile.in"
96 (("namespace=errnos") "pkg_namespace=errnos"))
98 (build-system gnu-build-system)
99 (home-page "https://gnupg.org")
100 (synopsis "Library of error values for GnuPG components")
102 "Libgpg-error is a small library that defines common error values
103 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
104 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
105 Daemon and possibly more in the future.")
106 (license license:lgpl2.0+)
107 (properties '((ftp-server . "ftp.gnupg.org")
108 (ftp-directory . "/gcrypt/libgpg-error")))))
110 (define-public libgcrypt
116 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
120 "09r27ywj9zplq6n9qw3mn7zmvf6y2jdmwx5d1kg8yqkj0qx18f7n"))))
121 (build-system gnu-build-system)
123 `(("libgpg-error-host" ,libgpg-error)))
125 ;; Needed here for the 'gpg-error' program.
126 `(("libgpg-error-native" ,libgpg-error)))
128 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
129 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
130 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
132 (list (string-append "--with-gpg-error-prefix="
133 (assoc-ref %build-inputs "libgpg-error-host")))))
134 (outputs '("out" "debug"))
135 (home-page "https://gnupg.org/")
136 (synopsis "Cryptographic function library")
138 "Libgcrypt is a general-purpose cryptographic library. It provides the
139 standard cryptographic building blocks such as symmetric ciphers, hash
140 algorithms, public key algorithms, large integer functions and random number
142 (license license:lgpl2.0+)
143 (properties '((ftp-server . "ftp.gnupg.org")
144 (ftp-directory . "/gcrypt/libgcrypt")))))
146 (define-public libassuan
153 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
157 "00p7cpvzf0q3qwcgg51r9d0vbab4qga2xi8wpk2fgd36710b1g4i"))))
158 (build-system gnu-build-system)
160 `(("libgpg-error" ,libgpg-error)
162 (home-page "https://gnupg.org")
164 "IPC library used by GnuPG and related software")
166 "Libassuan is a small library implementing the so-called Assuan
167 protocol. This protocol is used for IPC between most newer
168 GnuPG components. Both, server and client side functions are
170 (license license:lgpl2.0+)
171 (properties '((ftp-server . "ftp.gnupg.org")
172 (ftp-directory . "/gcrypt/libassuan")))))
174 (define-public libksba
182 "mirror://gnupg/libksba/libksba-"
186 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
187 (build-system gnu-build-system)
189 `(("libgpg-error" ,libgpg-error)))
191 `(("libgpg-error" ,libgpg-error)))
194 (list ,@(if (%current-target-system)
195 '("CC_FOR_BUILD=gcc")
197 (string-append "--with-gpg-error-prefix="
198 (assoc-ref %build-inputs "libgpg-error")))))
199 (home-page "https://www.gnupg.org")
200 (synopsis "CMS and X.509 access library")
202 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
203 as well as the CMS easily accessible by other applications. Both
204 specifications are building blocks of S/MIME and TLS.")
205 (license license:gpl3+)
206 (properties '((ftp-server . "ftp.gnupg.org")
207 (ftp-directory . "/gcrypt/libksba")))))
216 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
218 (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
219 (build-system gnu-build-system)
220 (home-page "https://www.gnupg.org")
221 (synopsis "Non-preemptive thread library")
223 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
224 threads implementation.
226 In contrast to GNU Pth is is based on the system's standard threads
227 implementation. This allows the use of libraries which are not
228 compatible to GNU Pth.")
229 (license (list license:lgpl3+ license:gpl2+)) ; dual license
230 (properties '((ftp-server . "ftp.gnupg.org")
231 (ftp-directory . "/gcrypt/npth")))))
239 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
243 "056mgy09lvsi03531a437qj58la1j2x1y1scvfi53diris3658mg"))))
244 (build-system gnu-build-system)
246 `(("pkg-config" ,pkg-config)))
249 ("libassuan" ,libassuan)
250 ("libgcrypt" ,libgcrypt)
251 ("libgpg-error" ,libgpg-error)
254 ("openldap" ,openldap)
255 ("pcsc-lite" ,pcsc-lite)
256 ("readline" ,readline)
260 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
261 ;; executable in its installation directory in
262 ;; /gnu/store before it has been installed.
263 "--enable-gnupg-builddir-envvar"
264 "--enable-all-tests")
266 (modify-phases %standard-phases
267 (add-before 'configure 'patch-paths
268 (lambda* (#:key inputs #:allow-other-keys)
269 (substitute* "scd/scdaemon.c"
270 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
271 (string-append "\"" (assoc-ref inputs "pcsc-lite")
274 (add-after 'build 'patch-scheme-tests
276 (substitute* (find-files "tests" ".\\.scm$")
277 (("/usr/bin/env gpgscm")
278 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
280 (add-before 'build 'patch-test-paths
282 (substitute* '("tests/inittests"
283 "tests/pkits/inittests"
285 "tests/pkits/common.sh"
286 "tests/pkits/Makefile")
287 (("/bin/pwd") (which "pwd")))
288 (substitute* "common/t-exectool.c"
289 (("/bin/cat") (which "cat"))
290 (("/bin/true") (which "true"))
291 (("/bin/false") (which "false")))
293 (home-page "https://gnupg.org/")
294 (synopsis "GNU Privacy Guard")
296 "The GNU Privacy Guard is a complete implementation of the OpenPGP
297 standard. It is used to encrypt and sign data and communication. It
298 features powerful key management and the ability to access public key
299 servers. It includes several libraries: libassuan (IPC between GnuPG
300 components), libgpg-error (centralized GnuPG error values), and
301 libskba (working with X.509 certificates and CMS data).")
302 (license license:gpl3+)
303 (properties '((ftp-server . "ftp.gnupg.org")
304 (ftp-directory . "/gcrypt/gnupg")))))
306 (define-public gnupg-2.0
307 (package (inherit gnupg)
311 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
315 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
321 ("libassuan" ,libassuan)
322 ("libgcrypt" ,libgcrypt)
323 ("libgpg-error" ,libgpg-error)
326 ("openldap" ,openldap)
328 ("readline" ,readline)))
331 (modify-phases %standard-phases
332 (add-before 'configure 'patch-config-files
334 (substitute* "tests/openpgp/Makefile.in"
335 (("/bin/sh") (which "sh")))
337 (add-after 'install 'rename-v2-commands
338 (lambda* (#:key outputs #:allow-other-keys)
339 ;; Upstream suggests removing the trailing '2' from command names:
340 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
341 (let ((out (assoc-ref outputs "out")))
342 (with-directory-excursion (string-append out "/bin")
343 (rename-file "gpgv2" "gpgv")
344 (rename-file "gpg2" "gpg")
346 ;; Keep the old name around to ease transition.
347 (symlink "gpgv" "gpgv2")
348 (symlink "gpg" "gpg2")
350 (properties `((superseded . ,gnupg)))))
352 (define-public gnupg-1
353 (package (inherit gnupg)
357 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
361 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
367 ("readline" ,readline)
368 ("libgpg-error" ,libgpg-error)))
371 (modify-phases %standard-phases
372 (add-after 'unpack 'patch-check-sh
374 (substitute* "checks/Makefile.in"
375 (("/bin/sh") (which "sh")))
385 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
387 (base32 "0imyjfryvvjdbai454p70zcr95m94j9xnzywrlilqdw2fqi0pqy4"))))
388 (build-system gnu-build-system)
392 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
393 `(("libgpg-error" ,libgpg-error)))
395 `(("libassuan" ,libassuan)))
396 (home-page "https://www.gnupg.org/related_software/gpgme/")
397 (synopsis "Library providing simplified access to GnuPG functionality")
399 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
400 easier for applications. It provides a High-Level Crypto API for encryption,
401 decryption, signing, signature verification and key management. Currently
402 it uses GnuPG as its backend but the API isn't restricted to this engine.
404 Because the direct use of GnuPG from an application can be a complicated
405 programming task, it is suggested that all software should try to use GPGME
406 instead. This way bug fixes or improvements can be done at a central place
407 and every application benefits from this.")
408 (license license:lgpl2.1+)
409 (properties '((ftp-server . "ftp.gnupg.org")
410 (ftp-directory . "/gcrypt/gpgme")))))
412 (define-public qgpgme
418 (modify-phases %standard-phases
419 (add-before 'build 'chdir-and-symlink
420 (lambda* (#:key inputs #:allow-other-keys)
421 (let ((gpgme (assoc-ref inputs "gpgme")))
422 (symlink (string-append gpgme "/lib/libgpgmepp.la")
423 "lang/cpp/src/libgpgmepp.la")
424 (symlink (string-append gpgme "/lib/libgpgme.la")
429 `(("pkg-config" ,pkg-config)
430 ,@(package-native-inputs gpgme)))
434 ,@(package-inputs gpgme)))
435 (synopsis "Qt API bindings for gpgme")
436 (description "QGpgme provides a very high level Qt API around GpgMEpp.
438 QGpgME was originally developed as part of libkleo and incorporated into
439 gpgpme starting with version 1.7.")
440 (license license:gpl2+))) ;; Note: this differs from gpgme
442 (define-public guile-gcrypt
444 (name "guile-gcrypt")
446 (home-page "https://notabug.org/cwebber/guile-gcrypt")
450 (url (string-append home-page ".git"))
451 (commit (string-append "v" version))))
454 "1mhc5m4xygkfj7x18f8apiqpfdn9mrql0am5sk13cf5xn8x1r63z"))
455 (file-name (string-append name "-" version "-checkout"))))
456 (build-system gnu-build-system)
458 `(("pkg-config" ,pkg-config)
459 ("autoconf" ,autoconf)
460 ("automake" ,automake)
461 ("texinfo" ,texinfo)))
463 `(("guile" ,guile-2.2)
464 ("libgcrypt" ,libgcrypt)))
465 (synopsis "Cryptography library for Guile using Libgcrypt")
467 "Guile-Gcrypt provides a Guile 2.x interface to a subset of the
468 GNU Libgcrypt crytographic library. It provides modules for cryptographic
469 hash functions, message authentication codes (MAC), public-key cryptography,
470 strong randomness, and more. It is implemented using the foreign function
471 interface (FFI) of Guile.")
472 (license license:gpl3+)))
474 (define-public guile2.0-gcrypt
475 (package (inherit guile-gcrypt)
476 (name "guile2.0-gcrypt")
478 `(("guile" ,guile-2.0)
479 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
481 (define-public python-gpg
487 (uri (pypi-uri "gpg" version))
490 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
491 (build-system python-build-system)
494 (modify-phases %standard-phases
495 (add-before 'build 'set-environment
497 (substitute* "setup.py"
498 (("cc") (which "gcc")))
500 #:tests? #f)) ; No test suite.
505 (home-page (package-home-page gpgme))
506 (synopsis "Python bindings for GPGME GnuPG cryptography library")
507 (description "This package provides Python bindings to the GPGME GnuPG
508 cryptographic library. It is developed in the GPGME source code, and then
509 distributed separately.")
510 (license license:lgpl2.1+)))
512 (define-public python2-gpg
513 (package-with-python2 python-gpg))
515 (define-public python-pygpgme
517 (name "python-pygpgme")
522 (uri (pypi-uri "pygpgme" version))
525 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
526 ;; Unfortunately, we have to disable some tests due to some gpg-agent
528 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
529 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
530 "python-pygpgme-fix-pinentry-tests.patch"))))
533 (modify-phases %standard-phases
534 (add-before 'build 'make-build
535 (lambda _ (invoke "make" "build")))
537 (lambda _ (invoke "make" "check"))))))
538 (build-system python-build-system)
540 `(("gnupg" ,gnupg-1)))
543 (home-page "https://launchpad.net/pygpgme")
544 (synopsis "Python module for working with OpenPGP messages")
546 "PyGPGME is a Python module that lets you sign, verify, encrypt and
547 decrypt messages using the OpenPGP format by making use of GPGME.")
548 (license license:lgpl2.1+)))
550 (define-public python2-pygpgme
551 (package-with-python2 python-pygpgme))
553 (define-public python-gnupg
555 (name "python-gnupg")
560 (uri (pypi-uri "python-gnupg" version))
563 "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
564 (build-system python-build-system)
567 (modify-phases %standard-phases
570 (substitute* "test_gnupg.py"
571 ;; Unsure why this test fails.
572 (("'test_search_keys'") "True")
573 (("def test_search_keys") "def disabled__search_keys"))
574 (setenv "USERNAME" "guixbuilder")
575 ;; The doctests are extremely slow and sometimes time out,
576 ;; so we disable them.
578 "test_gnupg.py" "--no-doctests"))))))
580 `(("gnupg" ,gnupg-1)))
581 (home-page "https://packages.python.org/python-gnupg/index.html")
582 (synopsis "Wrapper for the GNU Privacy Guard")
584 "This module allows easy access to GnuPG’s key management, encryption
585 and signature functionality from Python programs.")
586 (license license:bsd-3)))
588 (define-public python2-gnupg
589 (package-with-python2 python-gnupg))
591 (define-public perl-gnupg-interface
593 (name "perl-gnupg-interface")
597 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
598 "GnuPG-Interface-" version ".tar.gz"))
601 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
602 (build-system perl-build-system)
605 (modify-phases %standard-phases
606 ;; FIXME: This test fails for unknown reasons
607 (add-after 'unpack 'delete-broken-test
609 (delete-file "t/encrypt_symmetrically.t")
612 `(("gnupg" ,gnupg-1)))
614 `(("perl-moo" ,perl-moo)
615 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
616 ("perl-moox-late" ,perl-moox-late)))
619 ("perl-module-install" ,perl-module-install)))
620 (home-page "https://metacpan.org/release/GnuPG-Interface")
621 (synopsis "Perl interface to GnuPG")
622 (description "@code{GnuPG::Interface} and its associated modules are
623 designed to provide an object-oriented method for interacting with GnuPG,
624 being able to perform functions such as but not limited to encrypting,
625 signing, decryption, verification, and key-listing parsing.")
626 (license license:perl-license)))
635 "https://github.com/jaymzh/pius/releases/download/v"
636 version "/pius-" version ".tar.bz2"))
639 "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
640 (build-system python-build-system)
641 (inputs `(("perl" ,perl) ; for 'pius-party-worksheet'
643 ("python-six" ,python2-six)))
646 #:python ,python-2 ; uses the Python 2 'print' syntax
648 (modify-phases %standard-phases
650 'build 'set-gpg-file-name
651 (lambda* (#:key inputs outputs #:allow-other-keys)
652 (let* ((gpg (string-append (assoc-ref inputs "gpg")
654 (substitute* "libpius/constants.py"
655 (("/usr/bin/gpg2") gpg))
657 (synopsis "Programs to simplify GnuPG key signing")
659 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
660 parties. It is the main utility and makes it possible to quickly and easily
661 sign each UID on a set of PGP keys. It is designed to take the pain out of
662 the sign-all-the-keys part of PGP Keysigning Party while adding security
665 pius-keyring-mgr and pius-party-worksheet help organisers of
666 PGP keysigning parties.")
667 (license license:gpl2)
668 (home-page "https://www.phildev.net/pius/index.shtml")))
670 (define-public signing-party
672 (name "signing-party")
674 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
679 (commit (string-append "v" version))))
680 (file-name (git-file-name name version))
683 "0lq8nmwjmysry0n4jg6vb7bh0lagbyb9pa11ii3s41p1mhzchf2r"))))
684 (build-system gnu-build-system)
686 `(("autoconf" ,autoconf-wrapper)
687 ("automake" ,automake)))
688 (inputs `(("perl" ,perl)
689 ("perl-text-template" ,perl-text-template)
690 ("perl-mime-tools" ,perl-mime-tools)
691 ("perl-gnupg-interface" ,perl-gnupg-interface)
692 ("perl-net-idn-encode" ,perl-net-idn-encode)
695 `(#:tests? #f ; no test suite
697 (modify-phases %standard-phases
699 (lambda* (#:key outputs #:allow-other-keys)
700 (let ((out (assoc-ref outputs "out")))
701 (substitute* "keyanalyze/Makefile"
702 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
703 (substitute* "keyanalyze/Makefile"
704 (("\\./configure") (string-append "./configure --prefix=" out)))
705 (substitute* "gpgwrap/Makefile"
707 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
708 out "/bin/gpgwrap\n")))
709 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
710 "keylookup/Makefile" "sig2dot/Makefile"
711 "springgraph/Makefile")
713 (setenv "CONFIG_SHELL" (which "sh")))
716 (lambda* (#:key outputs #:allow-other-keys #:rest args)
717 (let ((out (assoc-ref outputs "out"))
718 (install (assoc-ref %standard-phases 'install)))
722 (copy-file (string-append dir "/" file)
723 (string-append out "/bin/" file)))
724 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
725 "gpglist" "gpg-mailkeys" "gpgparticipants")
726 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
727 "gpglist" "gpg-mailkeys" "gpgparticipants"))
730 (copy-file (string-append dir "/" file)
731 (string-append out "/share/man/man1/" file)))
732 '("caff" "caff" "caff" "gpgdir"
733 "gpg-key2ps" "gpglist" "gpg-mailkeys"
734 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
735 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
736 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
737 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
738 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
739 "process_keys.1" "pgpring.1" "keyanalyze.1")))
741 (add-after 'install 'wrap-programs
742 (lambda* (#:key outputs #:allow-other-keys)
743 (let* ((out (assoc-ref outputs "out")))
745 (string-append out "/bin/caff")
746 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
748 (synopsis "Collection of scripts for simplifying gnupg key signing")
750 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
751 including tools for signing keys, keyring analysis, and party preparation.
753 @item caff: CA - Fire and Forget signs and mails a key
754 @item pgp-clean: removes all non-self signatures from key
755 @item pgp-fixkey: removes broken packets from keys
756 @item gpg-mailkeys: simply mail out a signed key to its owner
757 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
758 @item gpgdir: recursive directory encryption tool
759 @item gpglist: show who signed which of your UIDs
760 @item gpgsigs: annotates list of GnuPG keys with already done signatures
761 @item gpgparticipants: create list of party participants for the organiser
762 @item gpgwrap: a passphrase wrapper
763 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
764 @item keylookup: ncurses wrapper around gpg --search
765 @item sig2dot: converts a list of GnuPG signatures to a .dot file
766 @item springgraph: creates a graph from a .dot file
768 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
769 ;; and caff and gpgsigs: bsd-3, see
770 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
771 (license license:gpl2)))
773 (define-public pinentry-tty
775 (name "pinentry-tty")
779 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
783 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
784 (build-system gnu-build-system)
786 `(#:configure-flags '("--enable-pinentry-tty")))
788 `(("ncurses" ,ncurses)
789 ("libassuan" ,libassuan)
790 ("libsecret" ,libsecret "out")))
792 `(("pkg-config" ,pkg-config)))
793 (home-page "https://gnupg.org/aegypten2/")
794 (synopsis "GnuPG's interface to passphrase input")
796 "Pinentry provides a console that allows users to enter a passphrase when
797 @code{gpg} is run and needs it.")
798 (license license:gpl2+)
799 (properties '((ftp-server . "ftp.gnupg.org")
800 (ftp-directory . "/gcrypt/pinentry")
801 (upstream-name . "pinentry")))))
803 (define-public pinentry-emacs
805 (inherit pinentry-tty)
806 (name "pinentry-emacs")
808 `(#:configure-flags '("--enable-pinentry-emacs")))
810 "Pinentry provides a console and an Emacs interface that allows users to
811 enter a passphrase when required by @code{gpg} or other software.")))
813 (define-public pinentry-gtk2
815 (inherit pinentry-tty)
816 (name "pinentry-gtk2")
820 ,@(package-inputs pinentry-tty)))
822 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
823 passphrase when @code{gpg} is run and needs it.")))
825 (define-public pinentry-gnome3
827 (inherit pinentry-tty)
828 (name "pinentry-gnome3")
833 ,@(package-inputs pinentry-tty)))
835 `(#:configure-flags '("--enable-pinentry-gnome3")))
837 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
838 that allows users to enter a passphrase when required by @code{gpg} or other
841 (define-public pinentry-qt
843 (inherit pinentry-tty)
847 ,@(package-inputs pinentry-tty)))
849 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
851 "Pinentry provides a console and a Qt GUI that allows users to enter a
852 passphrase when @code{gpg} is run and needs it.")))
854 (define-public pinentry-efl
856 (inherit pinentry-tty)
857 (name "pinentry-efl")
860 (inherit (package-source pinentry-tty))
861 (patches (search-patches "pinentry-efl.patch"))))
863 '(#:configure-flags '("--enable-pinentry-efl")
865 (modify-phases %standard-phases
868 (invoke "sh" "autogen.sh"))))))
870 `(("autoconf" ,autoconf)
871 ("automake" ,automake)
872 ("gettext" ,gettext-minimal)
873 ,@(package-native-inputs pinentry-tty)))
876 ,@(package-inputs pinentry-tty)))
878 "Pinentry provides a console and a graphical interface for the
879 @dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a
880 passphrase when @code{gpg} is run and needs it.")))
882 (define-public pinentry
883 (package (inherit pinentry-gtk2)
886 (define-public paperkey
892 (uri (string-append "http://www.jabberwocky.com/"
893 "software/paperkey/paperkey-"
897 "1prd2jaf4zjad3xhv160hmi5n408ssljfg7iz90jxs9w111pjwy4"))))
898 (build-system gnu-build-system)
901 (modify-phases %standard-phases
902 (add-before 'check 'patch-check-scripts
904 (substitute* '("checks/roundtrip.sh"
905 "checks/roundtrip-raw.sh")
906 (("/bin/echo") "echo"))
908 (home-page "http://www.jabberwocky.com/software/paperkey/")
909 (synopsis "Backup OpenPGP keys to paper")
911 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
912 for printing with paper and ink, which have amazingly long retention
913 qualities. To reconstruct a secret key, you re-enter those
914 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
915 them to transform your existing public key into a secret key.")
916 (license license:gpl2+)))
918 (define-public pgpdump
925 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
928 (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
929 (build-system gnu-build-system)
931 `(#:tests? #f ; no make check
932 #:configure-flags (list "--prefix=/")
933 #:make-flags (list "CC=gcc"
934 (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
937 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
938 (synopsis "PGP packet visualizer")
939 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
942 The output of this command is similar to GnuPG's list packets command,
943 however, pgpdump produces more detailed and easier to understand output.")
944 (license license:bsd-3)))
952 (uri (string-append "mirror://gnupg/gpa/"
953 name "-" version ".tar.bz2"))
956 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
957 (build-system gnu-build-system)
959 `(("pkg-config" ,pkg-config)))
963 ("libassuan" ,libassuan)
964 ("libgpg-error" ,libgpg-error)
966 (home-page "https://gnupg.org/software/gpa/")
967 (synopsis "Graphical user interface for GnuPG")
969 "GPA, the GNU Privacy Assistant, is a graphical user interface for
970 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
971 files, to verify signatures, and to manage the private and public keys.")
972 (license license:gpl3+)
973 (properties '((ftp-server . "ftp.gnupg.org")
974 (ftp-directory . "/gcrypt/gpa")))))
976 (define-public parcimonie
982 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
983 "parcimonie/App-Parcimonie-"
987 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
988 (build-system perl-build-system)
990 `(("gnupg" ,gnupg-1) ; This is the version used by perl-gnupg-interface
991 ("perl-config-general" ,perl-config-general)
992 ("perl-clone" ,perl-clone)
993 ("perl-data" ,perl-data)
994 ("perl-exporter-tiny" ,perl-exporter-tiny)
995 ("perl-file-homedir" ,perl-file-homedir)
996 ("perl-file-sharedir" ,perl-file-sharedir)
997 ("perl-file-which" ,perl-file-which)
998 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
999 ("perl-gnupg-interface" ,perl-gnupg-interface)
1000 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1001 ("perl-list-moreutils" ,perl-list-moreutils)
1002 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
1003 ("perl-lwp-online" ,perl-lwp-online)
1004 ("perl-module-build" ,perl-module-build)
1005 ("perl-module-pluggable-object" ,perl-module-pluggable)
1006 ("perl-moo" ,perl-moo)
1007 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
1008 ("perl-moox-late" ,perl-moox-late)
1009 ("perl-moox-options" ,perl-moox-options)
1010 ("perl-namespace-clean" ,perl-namespace-clean)
1011 ("perl-net-dbus" ,perl-net-dbus)
1012 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
1013 ("perl-path-tiny" ,perl-path-tiny)
1014 ("perl-test-most" ,perl-test-most)
1015 ("perl-test-trap" ,perl-test-trap)
1016 ("perl-time-duration" ,perl-time-duration)
1017 ("perl-time-duration-parse" ,perl-time-duration-parse)
1018 ("perl-try-tiny" ,perl-try-tiny)
1019 ("perl-type-tiny" ,perl-type-tiny)
1020 ("perl-types-path-tiny" ,perl-types-path-tiny)
1021 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1022 ("perl-xml-parser" ,perl-xml-parser)
1023 ("perl-xml-twig" ,perl-xml-twig)
1024 ("torsocks" ,torsocks)))
1027 (modify-phases %standard-phases
1028 ;; Needed for using gpg-connect-agent during tests.
1029 (add-before 'check 'set-HOME
1030 (lambda _ (setenv "HOME" "/tmp") #t))
1031 (add-before 'install 'fix-references
1032 (lambda* (#:key inputs outputs #:allow-other-keys)
1033 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
1035 ;; Skip check whether dependencies are in the PATH
1036 (("defined which.*") "")
1037 (("call\\('parcimonie-torified-gpg'\\)")
1038 (string-append "call('" (assoc-ref outputs "out")
1039 "/bin/parcimonie-torified-gpg')")))
1040 (substitute* "bin/parcimonie-torified-gpg"
1041 (("torsocks") (string-append (assoc-ref inputs "torsocks")
1044 (add-after 'install 'wrap-program
1045 (lambda* (#:key inputs outputs #:allow-other-keys)
1046 (let* ((out (assoc-ref outputs "out"))
1047 (perllib (string-append out "/lib/perl5/site_perl/"
1048 ,(package-version perl))))
1049 (wrap-program (string-append out "/bin/parcimonie")
1051 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1053 (home-page "https://gaffer.boum.org/intrigeri/code/parcimonie/")
1054 (synopsis "Incrementally refreshes a GnuPG keyring")
1055 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1056 that makes it hard to correlate the keyring content to an individual, and
1057 makes it hard to locate an individual based on an identifying subset of her
1058 keyring content. Parcimonie is a daemon that fetches one key at a time using
1059 the Tor network, waits a bit, changes the Tor circuit being used, and starts
1061 (license license:gpl1+)))
1063 (define-public jetring
1070 (uri (string-append "mirror://debian/pool/main/j/" name "/"
1071 name "_" version ".tar.xz"))
1074 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
1075 (build-system gnu-build-system)
1078 (modify-phases %standard-phases
1079 (delete 'configure) ; no configure script
1080 (add-before 'install 'hardlink-gnupg
1081 (lambda* (#:key inputs #:allow-other-keys)
1082 (let ((gpg (string-append (assoc-ref inputs "gnupg")
1084 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1085 (("gpg -") (string-append gpg " -"))
1086 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1089 (lambda* (#:key outputs #:allow-other-keys)
1090 (let* ((out (assoc-ref outputs "out"))
1091 (man (string-append out "/share/man")))
1092 (for-each (lambda (file)
1093 (install-file file (string-append out "/bin/")))
1094 (find-files "." "jetring-[[:alpha:]]+$"))
1095 (for-each (lambda (file)
1096 (install-file file (string-append man "/man1/")))
1097 (find-files "." ".*\\.1$"))
1098 (install-file "jetring.7" (string-append man "/man7/"))
1100 #:tests? #f)) ; no test phase
1104 (home-page "https://joeyh.name/code/jetring/")
1105 (synopsis "GnuPG keyring maintenance using changesets")
1107 "Jetring is a collection of tools that allow for gpg keyrings to be
1108 maintained using changesets. It was developed with the Debian keyring in mind,
1109 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1110 for multiple people to collaboratively edit.
1112 With jetring, changesets can be submitted, reviewed to see exactly what they
1113 will do, applied, and used to build a keyring. The origin of every change made
1114 to the keyring is available for auditing, and gpg signatures can be used for
1115 integrity guarantees.")
1116 (license license:gpl2+)))