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 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 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017 Nils Gillmann <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 Tobias Geerinckx-Rice <me@tobias.gr>
17 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages gnupg)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages adns)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages curl)
41 #:use-module (gnu packages crypto)
42 #:use-module (gnu packages emacs)
43 #:use-module (gnu packages openldap)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages perl-check)
46 #:use-module (gnu packages pth)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages qt)
49 #:use-module (gnu packages readline)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages databases)
52 #:use-module (gnu packages gtk)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnome)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages security-token)
58 #:use-module (gnu packages swig)
59 #:use-module (gnu packages tls)
60 #:use-module (gnu packages tor)
61 #:use-module (gnu packages web)
62 #:use-module (gnu packages xml)
63 #:use-module (guix packages)
64 #:use-module (guix download)
65 #:use-module (guix git-download)
66 #:use-module (guix build-system gnu)
67 #:use-module (guix build-system perl)
68 #:use-module (guix build-system python))
70 (define-public libgpg-error
77 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
81 "0jfsfnh9bxlxiwxws60yah4ybjw2hshmvqp31pri4m4h8ivrbnry"))
82 (patches (search-patches "libgpg-error-aarch64-logging-fix.patch"))))
83 (build-system gnu-build-system)
84 (home-page "https://gnupg.org")
85 (synopsis "Library of error values for GnuPG components")
87 "Libgpg-error is a small library that defines common error values
88 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
89 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
90 Daemon and possibly more in the future.")
91 (license license:lgpl2.0+)
92 (properties '((ftp-server . "ftp.gnupg.org")
93 (ftp-directory . "/gcrypt/libgpg-error")))))
95 ;; Some packages (e.g. GPGME) require a newer libgpg-error to deal with
96 ;; error codes from recent GnuPG. Remove this in the next rebuild cycle.
97 (define-public libgpg-error-1.31
99 (inherit libgpg-error)
103 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
107 "1vx4nw6rxh2biy3h8n96fyr86q29h8gjl6837437i51jr4isil20"))))))
109 (define-public libgcrypt
111 (replacement libgcrypt/fixed)
116 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
120 "01sca9m8hm6b5v8hmqsfdjhyz013869p1f0fxw9ln52qfnp4q1n8"))))
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 libgcrypt/fixed
153 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
157 "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36"))))))
159 (define-public libassuan
166 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
170 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"))))
171 (build-system gnu-build-system)
173 `(("libgpg-error" ,libgpg-error)
175 (home-page "https://gnupg.org")
177 "IPC library used by GnuPG and related software")
179 "Libassuan is a small library implementing the so-called Assuan
180 protocol. This protocol is used for IPC between most newer
181 GnuPG components. Both, server and client side functions are
183 (license license:lgpl2.0+)
184 (properties '((ftp-server . "ftp.gnupg.org")
185 (ftp-directory . "/gcrypt/libassuan")))))
187 (define-public libksba
195 "mirror://gnupg/libksba/libksba-"
199 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
200 (build-system gnu-build-system)
202 `(("libgpg-error" ,libgpg-error)))
204 `(("libgpg-error" ,libgpg-error)))
207 (list ,@(if (%current-target-system)
208 '("CC_FOR_BUILD=gcc")
210 (string-append "--with-gpg-error-prefix="
211 (assoc-ref %build-inputs "libgpg-error")))))
212 (home-page "https://www.gnupg.org")
213 (synopsis "CMS and X.509 access library")
215 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
216 as well as the CMS easily accessible by other applications. Both
217 specifications are building blocks of S/MIME and TLS.")
218 (license license:gpl3+)
219 (properties '((ftp-server . "ftp.gnupg.org")
220 (ftp-directory . "/gcrypt/libksba")))))
229 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
232 "1hmkkp6vzyrh8v01c2ynzf9vwikyagp7p1lxhbnr4ysk3w66jji9"))))
233 (build-system gnu-build-system)
234 (home-page "https://www.gnupg.org")
235 (synopsis "Non-preemptive thread library")
237 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
238 threads implementation.
240 In contrast to GNU Pth is is based on the system's standard threads
241 implementation. This allows the use of libraries which are not
242 compatible to GNU Pth.")
243 (license (list license:lgpl3+ license:gpl2+)))) ; dual license
251 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
255 "1k8dnnfs9888yp713l7kg2jg110lw47s4krx0njna6fjrsw4qyvp"))))
256 (build-system gnu-build-system)
258 `(("pkg-config" ,pkg-config)))
261 ("libassuan" ,libassuan)
262 ("libgcrypt" ,libgcrypt)
263 ("libgpg-error" ,libgpg-error)
266 ("openldap" ,openldap)
267 ("pcsc-lite" ,pcsc-lite)
268 ("readline" ,readline)
272 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
273 ;; executable in its installation directory in
274 ;; /gnu/store before it has been installed.
275 "--enable-gnupg-builddir-envvar"
276 "--enable-all-tests")
278 (modify-phases %standard-phases
279 (add-before 'configure 'patch-paths
280 (lambda* (#:key inputs #:allow-other-keys)
281 (substitute* "scd/scdaemon.c"
282 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
283 (string-append "\"" (assoc-ref inputs "pcsc-lite")
286 (add-after 'build 'patch-scheme-tests
288 (substitute* (find-files "tests" ".\\.scm$")
289 (("/usr/bin/env gpgscm")
290 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
292 (add-before 'build 'patch-test-paths
294 (substitute* '("tests/inittests"
295 "tests/pkits/inittests"
297 "tests/pkits/common.sh"
298 "tests/pkits/Makefile")
299 (("/bin/pwd") (which "pwd")))
300 (substitute* "common/t-exectool.c"
301 (("/bin/cat") (which "cat"))
302 (("/bin/true") (which "true"))
303 (("/bin/false") (which "false")))
305 (home-page "https://gnupg.org/")
306 (synopsis "GNU Privacy Guard")
308 "The GNU Privacy Guard is a complete implementation of the OpenPGP
309 standard. It is used to encrypt and sign data and communication. It
310 features powerful key management and the ability to access public key
311 servers. It includes several libraries: libassuan (IPC between GnuPG
312 components), libgpg-error (centralized GnuPG error values), and
313 libskba (working with X.509 certificates and CMS data).")
314 (license license:gpl3+)
315 (properties '((ftp-server . "ftp.gnupg.org")
316 (ftp-directory . "/gcrypt/gnupg")))))
318 (define-public gnupg-2.0
319 (package (inherit gnupg)
323 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
327 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
333 ("libassuan" ,libassuan)
334 ("libgcrypt" ,libgcrypt)
335 ("libgpg-error" ,libgpg-error)
338 ("openldap" ,openldap)
340 ("readline" ,readline)))
343 (modify-phases %standard-phases
344 (add-before 'configure 'patch-config-files
346 (substitute* "tests/openpgp/Makefile.in"
347 (("/bin/sh") (which "sh")))
349 (add-after 'install 'rename-v2-commands
350 (lambda* (#:key outputs #:allow-other-keys)
351 ;; Upstream suggests removing the trailing '2' from command names:
352 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
353 (let ((out (assoc-ref outputs "out")))
354 (with-directory-excursion (string-append out "/bin")
355 (rename-file "gpgv2" "gpgv")
356 (rename-file "gpg2" "gpg")
358 ;; Keep the old name around to ease transition.
359 (symlink "gpgv" "gpgv2")
360 (symlink "gpg" "gpg2")
362 (properties `((superseded . ,gnupg)))))
364 (define-public gnupg-1
365 (package (inherit gnupg)
369 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
373 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
379 ("readline" ,readline)
380 ("libgpg-error" ,libgpg-error)))
383 (modify-phases %standard-phases
384 (add-after 'unpack 'patch-check-sh
386 (substitute* "checks/Makefile.in"
387 (("/bin/sh") (which "sh")))
397 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
401 "0vxx5xaag3rhp4g2arp5qm77gvz4kj0m3hnpvhkdvqyjfhbi26rd"))))
402 (build-system gnu-build-system)
406 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
407 `(("libgpg-error" ,libgpg-error-1.31)))
409 `(("libassuan" ,libassuan)))
410 (home-page "https://www.gnupg.org/related_software/gpgme/")
411 (synopsis "Library providing simplified access to GnuPG functionality")
413 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
414 easier for applications. It provides a High-Level Crypto API for encryption,
415 decryption, signing, signature verification and key management. Currently
416 it uses GnuPG as its backend but the API isn't restricted to this engine.
418 Because the direct use of GnuPG from an application can be a complicated
419 programming task, it is suggested that all software should try to use GPGME
420 instead. This way bug fixes or improvements can be done at a central place
421 and every application benefits from this.")
422 (license license:lgpl2.1+)))
424 (define-public qgpgme
430 (modify-phases %standard-phases
431 (add-before 'build 'chdir-and-symlink
432 (lambda* (#:key inputs #:allow-other-keys)
433 (let ((gpgme (assoc-ref inputs "gpgme")))
434 (symlink (string-append gpgme "/lib/libgpgmepp.la")
435 "lang/cpp/src/libgpgmepp.la")
436 (symlink (string-append gpgme "/lib/libgpgme.la")
441 `(("pkg-config" ,pkg-config)
442 ,@(package-native-inputs gpgme)))
446 ,@(package-inputs gpgme)))
447 (synopsis "Qt API bindings for gpgme")
448 (description "QGpgme provides a very high level Qt API around GpgMEpp.
450 QGpgME was originally developed as part of libkleo and incorporated into
451 gpgpme starting with version 1.7.")
452 (license license:gpl2+))) ;; Note: this differs from gpgme
454 (define-public python-gpg
460 (uri (pypi-uri "gpg" version))
463 "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
464 (build-system python-build-system)
466 '(#:tests? #f)) ; No test suite.
471 (home-page (package-home-page gpgme))
472 (synopsis "Python bindings for GPGME GnuPG cryptography library")
473 (description "This package provides Python bindings to the GPGME GnuPG
474 cryptographic library. It is developed in the GPGME source code, and then
475 distributed separately.")
476 (license license:lgpl2.1+)))
478 (define-public python2-gpg
479 (package-with-python2 python-gpg))
481 (define-public python-pygpgme
483 (name "python-pygpgme")
488 (uri (pypi-uri "pygpgme" version))
491 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
492 ;; Unfortunately, we have to disable some tests due to some gpg-agent
494 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
495 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
496 "python-pygpgme-fix-pinentry-tests.patch"))))
499 (modify-phases %standard-phases
500 (add-before 'build 'make-build
502 (zero? (system* "make" "build"))))
505 (zero? (system* "make" "check")))))))
506 (build-system python-build-system)
508 `(("gnupg" ,gnupg-1)))
511 (home-page "https://launchpad.net/pygpgme")
512 (synopsis "Python module for working with OpenPGP messages")
514 "PyGPGME is a Python module that lets you sign, verify, encrypt and
515 decrypt messages using the OpenPGP format by making use of GPGME.")
516 (license license:lgpl2.1+)))
518 (define-public python2-pygpgme
519 (package-with-python2 python-pygpgme))
521 (define-public python-gnupg
523 (name "python-gnupg")
528 (uri (pypi-uri "python-gnupg" version))
531 "03dc8whhvk7ccspbk8vzfhkxli8cd9zfbss5p597g4jldgy8s59d"))))
532 (build-system python-build-system)
535 (modify-phases %standard-phases
538 (substitute* "test_gnupg.py"
539 ;; Unsure why this test fails.
540 (("'test_search_keys'") "True")
541 (("def test_search_keys") "def disabled__search_keys"))
542 (setenv "USERNAME" "guixbuilder")
543 ;; The doctests are extremely slow and sometimes time out,
544 ;; so we disable them.
546 "test_gnupg.py" "--no-doctests"))))))
548 `(("gnupg" ,gnupg-1)))
549 (home-page "https://packages.python.org/python-gnupg/index.html")
550 (synopsis "Wrapper for the GNU Privacy Guard")
552 "This module allows easy access to GnuPG’s key management, encryption
553 and signature functionality from Python programs.")
554 (license license:bsd-3)))
556 (define-public python2-gnupg
557 (package-with-python2 python-gnupg))
559 (define-public perl-gnupg-interface
561 (name "perl-gnupg-interface")
565 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
566 "GnuPG-Interface-" version ".tar.gz"))
569 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
570 (build-system perl-build-system)
573 (modify-phases %standard-phases
574 ;; FIXME: This test fails for unknown reasons
575 (add-after 'unpack 'delete-broken-test
577 (delete-file "t/encrypt_symmetrically.t")
580 `(("gnupg" ,gnupg-1)))
582 `(("perl-moo" ,perl-moo)
583 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
584 ("perl-moox-late" ,perl-moox-late)))
587 ("perl-module-install" ,perl-module-install)))
588 (home-page "http://search.cpan.org/dist/GnuPG-Interface/")
589 (synopsis "Perl interface to GnuPG")
590 (description "@code{GnuPG::Interface} and its associated modules are
591 designed to provide an object-oriented method for interacting with GnuPG,
592 being able to perform functions such as but not limited to encrypting,
593 signing, decryption, verification, and key-listing parsing.")
594 (license license:perl-license)))
603 "https://github.com/jaymzh/pius/releases/download/v"
604 version "/pius-" version ".tar.bz2"))
607 "1893hzpx3zv724drqv48csrn0cm98xw4ymb1zmhs2jvjj1778zfj"))
608 (patches (search-patches "pius.patch"))))
609 (build-system python-build-system)
610 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
612 ("python-six" ,python2-six)))
615 #:python ,python-2 ;uses the Python 2 'print' syntax
617 (modify-phases %standard-phases
619 'build 'set-gpg-file-name
620 (lambda* (#:key inputs outputs #:allow-other-keys)
621 (let* ((gpg (string-append (assoc-ref inputs "gpg")
623 (substitute* "libpius/constants.py"
624 (("/usr/bin/gpg2") gpg))
626 (synopsis "Programs to simplify GnuPG key signing")
628 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
629 parties. It is the main utility and makes it possible to quickly and easily
630 sign each UID on a set of PGP keys. It is designed to take the pain out of
631 the sign-all-the-keys part of PGP Keysigning Party while adding security
634 pius-keyring-mgr and pius-party-worksheet help organisers of
635 PGP keysigning parties.")
636 (license license:gpl2)
637 (home-page "https://www.phildev.net/pius/index.shtml")))
639 (define-public signing-party
640 ;; Upstream moved from alioth.debian.org to salsa.debian.org but the
641 ;; automatic svn import did not preserve tags apparently, so there's no real
643 (let ((commit "d6f2296325605ee96ddf9f5b156e5e3f667a6df3")
646 (name "signing-party")
647 (version (git-version "2.6" revision commit))
648 (home-page "https://salsa.debian.org/stappers/pgp-tools")
656 "00f7zasbwcbjzd92br2j10pyjxv0aw1qb4540qfz2dxzxgmdscrz"))))
657 (build-system gnu-build-system)
659 `(("autoconf" ,autoconf-wrapper)
660 ("automake" ,automake)))
661 (inputs `(("perl" ,perl)
662 ("perl-text-template" ,perl-text-template)
663 ("perl-mime-tools" ,perl-mime-tools)
664 ("perl-gnupg-interface" ,perl-gnupg-interface)
665 ("perl-net-idn-encode" ,perl-net-idn-encode)
670 (modify-phases %standard-phases
672 (lambda* (#:key outputs #:allow-other-keys)
673 (let ((out (assoc-ref outputs "out")))
674 (substitute* "keyanalyze/Makefile"
675 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
676 (substitute* "keyanalyze/Makefile"
677 (("\\./configure") (string-append "./configure --prefix=" out)))
678 (substitute* "gpgwrap/Makefile"
680 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
681 out "/bin/gpgwrap\n")))
682 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
683 "keylookup/Makefile" "sig2dot/Makefile"
684 "springgraph/Makefile")
686 (setenv "CONFIG_SHELL" (which "sh")))))
688 (lambda* (#:key outputs #:allow-other-keys #:rest args)
689 (let ((out (assoc-ref outputs "out"))
690 (install (assoc-ref %standard-phases 'install)))
694 (copy-file (string-append dir "/" file)
695 (string-append out "/bin/" file)))
696 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
697 "gpglist" "gpg-mailkeys" "gpgparticipants")
698 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
699 "gpglist" "gpg-mailkeys" "gpgparticipants"))
702 (copy-file (string-append dir "/" file)
703 (string-append out "/share/man/man1/" file)))
704 '("caff" "caff" "caff" "gpgdir"
705 "gpg-key2ps" "gpglist" "gpg-mailkeys"
706 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
707 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
708 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
709 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
710 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
711 "process_keys.1" "pgpring.1" "keyanalyze.1")))))
712 (add-after 'install 'wrap-programs
713 (lambda* (#:key outputs #:allow-other-keys)
714 (let* ((out (assoc-ref outputs "out")))
716 (string-append out "/bin/caff")
717 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))))))
718 (synopsis "Collection of scripts for simplifying gnupg key signing")
720 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
721 including tools for signing keys, keyring analysis, and party preparation.
723 @item caff: CA - Fire and Forget signs and mails a key
724 @item pgp-clean: removes all non-self signatures from key
725 @item pgp-fixkey: removes broken packets from keys
726 @item gpg-mailkeys: simply mail out a signed key to its owner
727 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
728 @item gpgdir: recursive directory encryption tool
729 @item gpglist: show who signed which of your UIDs
730 @item gpgsigs: annotates list of GnuPG keys with already done signatures
731 @item gpgparticipants: create list of party participants for the organiser
732 @item gpgwrap: a passphrase wrapper
733 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
734 @item keylookup: ncurses wrapper around gpg --search
735 @item sig2dot: converts a list of GnuPG signatures to a .dot file
736 @item springgraph: creates a graph from a .dot file
738 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
739 ;; and caff and gpgsigs: bsd-3, see
740 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
741 (license license:gpl2))))
743 (define-public pinentry-tty
745 (name "pinentry-tty")
749 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
753 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
754 (build-system gnu-build-system)
756 `(#:configure-flags '("--enable-pinentry-tty")))
758 `(("ncurses" ,ncurses)
759 ("libassuan" ,libassuan)
760 ("libsecret" ,libsecret "out")))
762 `(("pkg-config" ,pkg-config)))
763 (home-page "https://gnupg.org/aegypten2/")
764 (synopsis "GnuPG's interface to passphrase input")
766 "Pinentry provides a console that allows users to enter a passphrase when
767 @code{gpg} is run and needs it.")
768 (license license:gpl2+)
769 (properties '((ftp-server . "ftp.gnupg.org")
770 (ftp-directory . "/gcrypt/pinentry")
771 (upstream-name . "pinentry")))))
773 (define-public pinentry-emacs
775 (inherit pinentry-tty)
776 (name "pinentry-emacs")
778 `(#:configure-flags '("--enable-pinentry-emacs")))
780 "Pinentry provides a console and an Emacs interface that allows users to
781 enter a passphrase when required by @code{gpg} or other software.")))
783 (define-public pinentry-gtk2
785 (inherit pinentry-tty)
786 (name "pinentry-gtk2")
790 ,@(package-inputs pinentry-tty)))
792 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
793 passphrase when @code{gpg} is run and needs it.")))
795 (define-public pinentry-gnome3
797 (inherit pinentry-tty)
798 (name "pinentry-gnome3")
803 ,@(package-inputs pinentry-tty)))
805 `(#:configure-flags '("--enable-pinentry-gnome3")))
807 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
808 that allows users to enter a passphrase when required by @code{gpg} or other
811 (define-public pinentry-qt
813 (inherit pinentry-tty)
817 ,@(package-inputs pinentry-tty)))
819 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
821 "Pinentry provides a console and a Qt GUI that allows users to enter a
822 passphrase when @code{gpg} is run and needs it.")))
824 (define-public pinentry
825 (package (inherit pinentry-gtk2)
828 (define-public paperkey
834 (uri (string-append "http://www.jabberwocky.com/"
835 "software/paperkey/paperkey-"
839 "1prd2jaf4zjad3xhv160hmi5n408ssljfg7iz90jxs9w111pjwy4"))))
840 (build-system gnu-build-system)
843 (modify-phases %standard-phases
844 (add-before 'check 'patch-check-scripts
846 (substitute* '("checks/roundtrip.sh"
847 "checks/roundtrip-raw.sh")
848 (("/bin/echo") "echo"))
850 (home-page "http://www.jabberwocky.com/software/paperkey/")
851 (synopsis "Backup OpenPGP keys to paper")
853 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
854 for printing with paper and ink, which have amazingly long retention
855 qualities. To reconstruct a secret key, you re-enter those
856 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
857 them to transform your existing public key into a secret key.")
858 (license license:gpl2+)))
866 (uri (string-append "mirror://gnupg/gpa/"
867 name "-" version ".tar.bz2"))
870 "09xphbi2456qynwqq5n0yh0zdmdi2ggrj3wk4hsyh5lrzlvcrff3"))))
871 (build-system gnu-build-system)
873 `(("pkg-config" ,pkg-config)))
877 ("libassuan" ,libassuan)
878 ("libgpg-error" ,libgpg-error)
880 (home-page "https://gnupg.org/software/gpa/")
881 (synopsis "Graphical user interface for GnuPG")
883 "GPA, the GNU Privacy Assistant, is a graphical user interface for
884 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
885 files, to verify signatures, and to manage the private and public keys.")
886 (license license:gpl3+)))
888 (define-public parcimonie
894 (uri (string-append "https://gaffer.ptitcanardnoir.org/"
895 "intrigeri/files/parcimonie/App-Parcimonie-"
899 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
900 (build-system perl-build-system)
902 `(("gnupg" ,gnupg-1) ; This is the version used by perl-gnupg-interface
903 ("perl-config-general" ,perl-config-general)
904 ("perl-clone" ,perl-clone)
905 ("perl-data" ,perl-data)
906 ("perl-exporter-tiny" ,perl-exporter-tiny)
907 ("perl-file-homedir" ,perl-file-homedir)
908 ("perl-file-sharedir" ,perl-file-sharedir)
909 ("perl-file-which" ,perl-file-which)
910 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
911 ("perl-gnupg-interface" ,perl-gnupg-interface)
912 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
913 ("perl-list-moreutils" ,perl-list-moreutils)
914 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
915 ("perl-lwp-online" ,perl-lwp-online)
916 ("perl-module-build" ,perl-module-build)
917 ("perl-module-pluggable-object" ,perl-module-pluggable)
918 ("perl-moo" ,perl-moo)
919 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
920 ("perl-moox-late" ,perl-moox-late)
921 ("perl-moox-options" ,perl-moox-options)
922 ("perl-namespace-clean" ,perl-namespace-clean)
923 ("perl-net-dbus" ,perl-net-dbus)
924 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
925 ("perl-path-tiny" ,perl-path-tiny)
926 ("perl-test-most" ,perl-test-most)
927 ("perl-test-trap" ,perl-test-trap)
928 ("perl-time-duration" ,perl-time-duration)
929 ("perl-time-duration-parse" ,perl-time-duration-parse)
930 ("perl-try-tiny" ,perl-try-tiny)
931 ("perl-type-tiny" ,perl-type-tiny)
932 ("perl-types-path-tiny" ,perl-types-path-tiny)
933 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
934 ("perl-xml-parser" ,perl-xml-parser)
935 ("perl-xml-twig" ,perl-xml-twig)
936 ("torsocks" ,torsocks)))
939 (modify-phases %standard-phases
940 ;; Needed for using gpg-connect-agent during tests.
941 (add-before 'check 'set-HOME
942 (lambda _ (setenv "HOME" "/tmp") #t))
943 (add-before 'install 'fix-references
944 (lambda* (#:key inputs outputs #:allow-other-keys)
945 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
947 ;; Skip check whether dependencies are in the PATH
948 (("defined which.*") "")
949 (("call\\('parcimonie-torified-gpg'\\)")
950 (string-append "call('" (assoc-ref outputs "out")
951 "/bin/parcimonie-torified-gpg')")))
952 (substitute* "bin/parcimonie-torified-gpg"
953 (("torsocks") (string-append (assoc-ref inputs "torsocks")
956 (add-after 'install 'wrap-program
957 (lambda* (#:key inputs outputs #:allow-other-keys)
958 (let* ((out (assoc-ref outputs "out"))
959 (perllib (string-append out "/lib/perl5/site_perl/"
960 ,(package-version perl))))
961 (wrap-program (string-append out "/bin/parcimonie")
963 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
965 (home-page "https://gaffer.ptitcanardnoir.org/intrigeri/code/parcimonie/")
966 (synopsis "Incrementally refreshes a GnuPG keyring")
967 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
968 that makes it hard to correlate the keyring content to an individual, and
969 makes it hard to locate an individual based on an identifying subset of her
970 keyring content. Parcimonie is a daemon that fetches one key at a time using
971 the Tor network, waits a bit, changes the Tor circuit being used, and starts
973 (license license:gpl1+)))
975 (define-public jetring
982 (uri (string-append "mirror://debian/pool/main/j/" name "/"
983 name "_" version ".tar.xz"))
986 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
987 (build-system gnu-build-system)
990 (modify-phases %standard-phases
991 (delete 'configure) ; no configure script
992 (add-before 'install 'hardlink-gnupg
993 (lambda* (#:key inputs #:allow-other-keys)
994 (let ((gpg (string-append (assoc-ref inputs "gnupg")
996 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
997 (("gpg -") (string-append gpg " -"))
998 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1001 (lambda* (#:key outputs #:allow-other-keys)
1002 (let* ((out (assoc-ref outputs "out"))
1003 (man (string-append out "/share/man")))
1004 (for-each (lambda (file)
1005 (install-file file (string-append out "/bin/")))
1006 (find-files "." "jetring-[[:alpha:]]+$"))
1007 (for-each (lambda (file)
1008 (install-file file (string-append man "/man1/")))
1009 (find-files "." ".*\\.1$"))
1010 (install-file "jetring.7" (string-append man "/man7/"))
1012 #:tests? #f)) ; no test phase
1016 (home-page "https://joeyh.name/code/jetring/")
1017 (synopsis "GnuPG keyring maintenance using changesets")
1019 "Jetring is a collection of tools that allow for gpg keyrings to be
1020 maintained using changesets. It was developed with the Debian keyring in mind,
1021 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1022 for multiple people to collaboratively edit.
1024 With jetring, changesets can be submitted, reviewed to see exactly what they
1025 will do, applied, and used to build a keyring. The origin of every change made
1026 to the keyring is available for auditing, and gpg signatures can be used for
1027 integrity guarantees.")
1028 (license license:gpl2+)))