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 "1smihcrhkfy58kazjaigmfbagy52rw98fqfsv1x7ml8razx2dsgc"))))
82 (build-system gnu-build-system)
83 (home-page "https://gnupg.org")
84 (synopsis "Library of error values for GnuPG components")
86 "Libgpg-error is a small library that defines common error values
87 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
88 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
89 Daemon and possibly more in the future.")
90 (license license:lgpl2.0+)
91 (properties '((ftp-server . "ftp.gnupg.org")
92 (ftp-directory . "/gcrypt/libgpg-error")))))
94 ;; Some packages (e.g. GPGME) require a newer libgpg-error to deal with
95 ;; error codes from recent GnuPG. Remove this in the next rebuild cycle.
96 (define-public libgpg-error-1.31
98 (inherit libgpg-error)
102 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
106 "1vx4nw6rxh2biy3h8n96fyr86q29h8gjl6837437i51jr4isil20"))))))
108 (define-public libgcrypt
114 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
118 "01sca9m8hm6b5v8hmqsfdjhyz013869p1f0fxw9ln52qfnp4q1n8"))))
119 (build-system gnu-build-system)
121 `(("libgpg-error-host" ,libgpg-error)))
123 ;; Needed here for the 'gpg-error' program.
124 `(("libgpg-error-native" ,libgpg-error)))
126 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
127 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
128 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
130 (list (string-append "--with-gpg-error-prefix="
131 (assoc-ref %build-inputs "libgpg-error-host")))))
132 (outputs '("out" "debug"))
133 (home-page "https://gnupg.org/")
134 (synopsis "Cryptographic function library")
136 "Libgcrypt is a general-purpose cryptographic library. It provides the
137 standard cryptographic building blocks such as symmetric ciphers, hash
138 algorithms, public key algorithms, large integer functions and random number
140 (license license:lgpl2.0+)
141 (properties '((ftp-server . "ftp.gnupg.org")
142 (ftp-directory . "/gcrypt/libgcrypt")))))
144 (define-public libassuan
151 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
155 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"))))
156 (build-system gnu-build-system)
158 `(("libgpg-error" ,libgpg-error)
160 (home-page "https://gnupg.org")
162 "IPC library used by GnuPG and related software")
164 "Libassuan is a small library implementing the so-called Assuan
165 protocol. This protocol is used for IPC between most newer
166 GnuPG components. Both, server and client side functions are
168 (license license:lgpl2.0+)
169 (properties '((ftp-server . "ftp.gnupg.org")
170 (ftp-directory . "/gcrypt/libassuan")))))
172 (define-public libksba
180 "mirror://gnupg/libksba/libksba-"
184 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
185 (build-system gnu-build-system)
187 `(("libgpg-error" ,libgpg-error)))
189 `(("libgpg-error" ,libgpg-error)))
192 (list ,@(if (%current-target-system)
193 '("CC_FOR_BUILD=gcc")
195 (string-append "--with-gpg-error-prefix="
196 (assoc-ref %build-inputs "libgpg-error")))))
197 (home-page "https://www.gnupg.org")
198 (synopsis "CMS and X.509 access library")
200 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
201 as well as the CMS easily accessible by other applications. Both
202 specifications are building blocks of S/MIME and TLS.")
203 (license license:gpl3+)
204 (properties '((ftp-server . "ftp.gnupg.org")
205 (ftp-directory . "/gcrypt/libksba")))))
214 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
217 "1hmkkp6vzyrh8v01c2ynzf9vwikyagp7p1lxhbnr4ysk3w66jji9"))))
218 (build-system gnu-build-system)
219 (home-page "https://www.gnupg.org")
220 (synopsis "Non-preemptive thread library")
222 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
223 threads implementation.
225 In contrast to GNU Pth is is based on the system's standard threads
226 implementation. This allows the use of libraries which are not
227 compatible to GNU Pth.")
228 (license (list license:lgpl3+ license:gpl2+)))) ; dual license
236 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
240 "0vlpis0q7gvq9mhdc43hkyn3cdriz4mwgj20my3gyzpgwqg3cnyr"))))
241 (build-system gnu-build-system)
243 `(("pkg-config" ,pkg-config)))
246 ("libassuan" ,libassuan)
247 ("libgcrypt" ,libgcrypt)
248 ("libgpg-error" ,libgpg-error)
251 ("openldap" ,openldap)
252 ("pcsc-lite" ,pcsc-lite)
253 ("readline" ,readline)
257 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
258 ;; executable in its installation directory in
259 ;; /gnu/store before it has been installed.
260 "--enable-gnupg-builddir-envvar"
261 "--enable-all-tests")
263 (modify-phases %standard-phases
264 (add-before 'configure 'patch-paths
265 (lambda* (#:key inputs #:allow-other-keys)
266 (substitute* "scd/scdaemon.c"
267 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
268 (string-append "\"" (assoc-ref inputs "pcsc-lite")
271 (add-after 'build 'patch-scheme-tests
273 (substitute* (find-files "tests" ".\\.scm$")
274 (("/usr/bin/env gpgscm")
275 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
277 (add-before 'build 'patch-test-paths
279 (substitute* '("tests/inittests"
280 "tests/pkits/inittests"
282 "tests/pkits/common.sh"
283 "tests/pkits/Makefile")
284 (("/bin/pwd") (which "pwd")))
285 (substitute* "common/t-exectool.c"
286 (("/bin/cat") (which "cat"))
287 (("/bin/true") (which "true"))
288 (("/bin/false") (which "false")))
290 (home-page "https://gnupg.org/")
291 (synopsis "GNU Privacy Guard")
293 "The GNU Privacy Guard is a complete implementation of the OpenPGP
294 standard. It is used to encrypt and sign data and communication. It
295 features powerful key management and the ability to access public key
296 servers. It includes several libraries: libassuan (IPC between GnuPG
297 components), libgpg-error (centralized GnuPG error values), and
298 libskba (working with X.509 certificates and CMS data).")
299 (license license:gpl3+)
300 (properties '((ftp-server . "ftp.gnupg.org")
301 (ftp-directory . "/gcrypt/gnupg")))))
303 (define-public gnupg-2.0
304 (package (inherit gnupg)
308 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
312 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
318 ("libassuan" ,libassuan)
319 ("libgcrypt" ,libgcrypt)
320 ("libgpg-error" ,libgpg-error)
323 ("openldap" ,openldap)
325 ("readline" ,readline)))
328 (modify-phases %standard-phases
329 (add-before 'configure 'patch-config-files
331 (substitute* "tests/openpgp/Makefile.in"
332 (("/bin/sh") (which "sh")))
334 (add-after 'install 'rename-v2-commands
335 (lambda* (#:key outputs #:allow-other-keys)
336 ;; Upstream suggests removing the trailing '2' from command names:
337 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
338 (let ((out (assoc-ref outputs "out")))
339 (with-directory-excursion (string-append out "/bin")
340 (rename-file "gpgv2" "gpgv")
341 (rename-file "gpg2" "gpg")
343 ;; Keep the old name around to ease transition.
344 (symlink "gpgv" "gpgv2")
345 (symlink "gpg" "gpg2")
347 (properties `((superseded . ,gnupg)))))
349 (define-public gnupg-1
350 (package (inherit gnupg)
354 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
358 "1d1hz4szh1kvwhsw7w2zxa6q5ndrk3qy6hj289l1b8k3xi5s554m"))))
364 ("readline" ,readline)
365 ("libgpg-error" ,libgpg-error)))
368 (modify-phases %standard-phases
369 (add-after 'unpack 'patch-check-sh
371 (substitute* "checks/Makefile.in"
372 (("/bin/sh") (which "sh")))
382 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
386 "0vxx5xaag3rhp4g2arp5qm77gvz4kj0m3hnpvhkdvqyjfhbi26rd"))))
387 (build-system gnu-build-system)
391 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
392 `(("libgpg-error" ,libgpg-error-1.31)))
394 `(("libassuan" ,libassuan)))
395 (home-page "https://www.gnupg.org/related_software/gpgme/")
396 (synopsis "Library providing simplified access to GnuPG functionality")
398 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
399 easier for applications. It provides a High-Level Crypto API for encryption,
400 decryption, signing, signature verification and key management. Currently
401 it uses GnuPG as its backend but the API isn't restricted to this engine.
403 Because the direct use of GnuPG from an application can be a complicated
404 programming task, it is suggested that all software should try to use GPGME
405 instead. This way bug fixes or improvements can be done at a central place
406 and every application benefits from this.")
407 (license license:lgpl2.1+)))
409 (define-public qgpgme
415 (modify-phases %standard-phases
416 (add-before 'build 'chdir-and-symlink
417 (lambda* (#:key inputs #:allow-other-keys)
418 (let ((gpgme (assoc-ref inputs "gpgme")))
419 (symlink (string-append gpgme "/lib/libgpgmepp.la")
420 "lang/cpp/src/libgpgmepp.la")
421 (symlink (string-append gpgme "/lib/libgpgme.la")
426 `(("pkg-config" ,pkg-config)
427 ,@(package-native-inputs gpgme)))
431 ,@(package-inputs gpgme)))
432 (synopsis "Qt API bindings for gpgme")
433 (description "QGpgme provides a very high level Qt API around GpgMEpp.
435 QGpgME was originally developed as part of libkleo and incorporated into
436 gpgpme starting with version 1.7.")
437 (license license:gpl2+))) ;; Note: this differs from gpgme
439 (define-public python-gpg
445 (uri (pypi-uri "gpg" version))
448 "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
449 (build-system python-build-system)
451 '(#:tests? #f)) ; No test suite.
456 (home-page (package-home-page gpgme))
457 (synopsis "Python bindings for GPGME GnuPG cryptography library")
458 (description "This package provides Python bindings to the GPGME GnuPG
459 cryptographic library. It is developed in the GPGME source code, and then
460 distributed separately.")
461 (license license:lgpl2.1+)))
463 (define-public python2-gpg
464 (package-with-python2 python-gpg))
466 (define-public python-pygpgme
468 (name "python-pygpgme")
473 (uri (pypi-uri "pygpgme" version))
476 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
477 ;; Unfortunately, we have to disable some tests due to some gpg-agent
479 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
480 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
481 "python-pygpgme-fix-pinentry-tests.patch"))))
484 (modify-phases %standard-phases
485 (add-before 'build 'make-build
487 (zero? (system* "make" "build"))))
490 (zero? (system* "make" "check")))))))
491 (build-system python-build-system)
493 `(("gnupg" ,gnupg-1)))
496 (home-page "https://launchpad.net/pygpgme")
497 (synopsis "Python module for working with OpenPGP messages")
499 "PyGPGME is a Python module that lets you sign, verify, encrypt and
500 decrypt messages using the OpenPGP format by making use of GPGME.")
501 (license license:lgpl2.1+)))
503 (define-public python2-pygpgme
504 (package-with-python2 python-pygpgme))
506 (define-public python-gnupg
508 (name "python-gnupg")
513 (uri (pypi-uri "python-gnupg" version))
516 "0nkbs9c8f30lra7ca39kg91x8cyxn0jb61vih4qky839gpbwwwiq"))))
517 (build-system python-build-system)
520 (modify-phases %standard-phases
523 (substitute* "test_gnupg.py"
524 ;; Exported keys don't have a version line!
525 (("del k1\\[1\\]") "#")
526 ;; Unsure why this test fails.
527 (("'test_search_keys'") "True")
528 (("def test_search_keys") "def disabled__search_keys"))
529 (setenv "USERNAME" "guixbuilder")
530 ;; The doctests are extremely slow and sometimes time out,
531 ;; so we disable them.
532 (zero? (system* "python"
533 "test_gnupg.py" "--no-doctests")))))))
535 `(("gnupg" ,gnupg-1)))
536 (home-page "https://packages.python.org/python-gnupg/index.html")
537 (synopsis "Wrapper for the GNU Privacy Guard")
539 "This module allows easy access to GnuPG’s key management, encryption
540 and signature functionality from Python programs.")
541 (license license:bsd-3)))
543 (define-public python2-gnupg
544 (package-with-python2 python-gnupg))
546 (define-public perl-gnupg-interface
548 (name "perl-gnupg-interface")
552 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
553 "GnuPG-Interface-" version ".tar.gz"))
556 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
557 (build-system perl-build-system)
560 (modify-phases %standard-phases
561 ;; FIXME: This test fails for unknown reasons
562 (add-after 'unpack 'delete-broken-test
564 (delete-file "t/encrypt_symmetrically.t")
567 `(("gnupg" ,gnupg-1)))
569 `(("perl-moo" ,perl-moo)
570 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
571 ("perl-moox-late" ,perl-moox-late)))
574 ("perl-module-install" ,perl-module-install)))
575 (home-page "http://search.cpan.org/dist/GnuPG-Interface/")
576 (synopsis "Perl interface to GnuPG")
577 (description "@code{GnuPG::Interface} and its associated modules are
578 designed to provide an object-oriented method for interacting with GnuPG,
579 being able to perform functions such as but not limited to encrypting,
580 signing, decryption, verification, and key-listing parsing.")
581 (license license:perl-license)))
590 "https://github.com/jaymzh/pius/releases/download/v"
591 version "/pius-" version ".tar.bz2"))
594 "1893hzpx3zv724drqv48csrn0cm98xw4ymb1zmhs2jvjj1778zfj"))
595 (patches (search-patches "pius.patch"))))
596 (build-system python-build-system)
597 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
599 ("python-six" ,python2-six)))
602 #:python ,python-2 ;uses the Python 2 'print' syntax
604 (modify-phases %standard-phases
606 'build 'set-gpg-file-name
607 (lambda* (#:key inputs outputs #:allow-other-keys)
608 (let* ((gpg (string-append (assoc-ref inputs "gpg")
610 (substitute* "libpius/constants.py"
611 (("/usr/bin/gpg2") gpg))
613 (synopsis "Programs to simplify GnuPG key signing")
615 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
616 parties. It is the main utility and makes it possible to quickly and easily
617 sign each UID on a set of PGP keys. It is designed to take the pain out of
618 the sign-all-the-keys part of PGP Keysigning Party while adding security
621 pius-keyring-mgr and pius-party-worksheet help organisers of
622 PGP keysigning parties.")
623 (license license:gpl2)
624 (home-page "https://www.phildev.net/pius/index.shtml")))
626 (define-public signing-party
627 ;; Upstream moved from alioth.debian.org to salsa.debian.org but the
628 ;; automatic svn import did not preserve tags apparently, so there's no real
630 (let ((commit "d6f2296325605ee96ddf9f5b156e5e3f667a6df3")
633 (name "signing-party")
634 (version (git-version "2.6" revision commit))
635 (home-page "https://salsa.debian.org/stappers/pgp-tools")
643 "00f7zasbwcbjzd92br2j10pyjxv0aw1qb4540qfz2dxzxgmdscrz"))))
644 (build-system gnu-build-system)
646 `(("autoconf" ,autoconf-wrapper)
647 ("automake" ,automake)))
648 (inputs `(("perl" ,perl)
649 ("perl-text-template" ,perl-text-template)
650 ("perl-mime-tools" ,perl-mime-tools)
651 ("perl-gnupg-interface" ,perl-gnupg-interface)
652 ("perl-net-idn-encode" ,perl-net-idn-encode)
657 (modify-phases %standard-phases
659 (lambda* (#:key outputs #:allow-other-keys)
660 (let ((out (assoc-ref outputs "out")))
661 (substitute* "keyanalyze/Makefile"
662 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
663 (substitute* "keyanalyze/Makefile"
664 (("\\./configure") (string-append "./configure --prefix=" out)))
665 (substitute* "gpgwrap/Makefile"
667 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
668 out "/bin/gpgwrap\n")))
669 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
670 "keylookup/Makefile" "sig2dot/Makefile"
671 "springgraph/Makefile")
673 (setenv "CONFIG_SHELL" (which "sh")))))
675 (lambda* (#:key outputs #:allow-other-keys #:rest args)
676 (let ((out (assoc-ref outputs "out"))
677 (install (assoc-ref %standard-phases 'install)))
681 (copy-file (string-append dir "/" file)
682 (string-append out "/bin/" file)))
683 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
684 "gpglist" "gpg-mailkeys" "gpgparticipants")
685 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
686 "gpglist" "gpg-mailkeys" "gpgparticipants"))
689 (copy-file (string-append dir "/" file)
690 (string-append out "/share/man/man1/" file)))
691 '("caff" "caff" "caff" "gpgdir"
692 "gpg-key2ps" "gpglist" "gpg-mailkeys"
693 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
694 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
695 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
696 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
697 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
698 "process_keys.1" "pgpring.1" "keyanalyze.1")))))
699 (add-after 'install 'wrap-programs
700 (lambda* (#:key outputs #:allow-other-keys)
701 (let* ((out (assoc-ref outputs "out")))
703 (string-append out "/bin/caff")
704 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))))))
705 (synopsis "Collection of scripts for simplifying gnupg key signing")
707 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
708 including tools for signing keys, keyring analysis, and party preparation.
710 @item caff: CA - Fire and Forget signs and mails a key
711 @item pgp-clean: removes all non-self signatures from key
712 @item pgp-fixkey: removes broken packets from keys
713 @item gpg-mailkeys: simply mail out a signed key to its owner
714 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
715 @item gpgdir: recursive directory encryption tool
716 @item gpglist: show who signed which of your UIDs
717 @item gpgsigs: annotates list of GnuPG keys with already done signatures
718 @item gpgparticipants: create list of party participants for the organiser
719 @item gpgwrap: a passphrase wrapper
720 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
721 @item keylookup: ncurses wrapper around gpg --search
722 @item sig2dot: converts a list of GnuPG signatures to a .dot file
723 @item springgraph: creates a graph from a .dot file
725 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
726 ;; and caff and gpgsigs: bsd-3, see
727 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
728 (license license:gpl2))))
730 (define-public pinentry-tty
732 (name "pinentry-tty")
736 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
740 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
741 (build-system gnu-build-system)
743 `(#:configure-flags '("--enable-pinentry-tty")))
745 `(("ncurses" ,ncurses)
746 ("libassuan" ,libassuan)
747 ("libsecret" ,libsecret "out")))
749 `(("pkg-config" ,pkg-config)))
750 (home-page "https://gnupg.org/aegypten2/")
751 (synopsis "GnuPG's interface to passphrase input")
753 "Pinentry provides a console that allows users to enter a passphrase when
754 @code{gpg} is run and needs it.")
755 (license license:gpl2+)
756 (properties '((ftp-server . "ftp.gnupg.org")
757 (ftp-directory . "/gcrypt/pinentry")
758 (upstream-name . "pinentry")))))
760 (define-public pinentry-emacs
762 (inherit pinentry-tty)
763 (name "pinentry-emacs")
765 `(#:configure-flags '("--enable-pinentry-emacs")))
767 "Pinentry provides a console and an Emacs interface that allows users to
768 enter a passphrase when required by @code{gpg} or other software.")))
770 (define-public pinentry-gtk2
772 (inherit pinentry-tty)
773 (name "pinentry-gtk2")
777 ,@(package-inputs pinentry-tty)))
779 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
780 passphrase when @code{gpg} is run and needs it.")))
782 (define-public pinentry-gnome3
784 (inherit pinentry-tty)
785 (name "pinentry-gnome3")
790 ,@(package-inputs pinentry-tty)))
792 `(#:configure-flags '("--enable-pinentry-gnome3")))
794 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
795 that allows users to enter a passphrase when required by @code{gpg} or other
798 (define-public pinentry-qt
800 (inherit pinentry-tty)
804 ,@(package-inputs pinentry-tty)))
806 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
808 "Pinentry provides a console and a Qt GUI that allows users to enter a
809 passphrase when @code{gpg} is run and needs it.")))
811 (define-public pinentry
812 (package (inherit pinentry-gtk2)
815 (define-public paperkey
821 (uri (string-append "http://www.jabberwocky.com/"
822 "software/paperkey/paperkey-"
826 "1prd2jaf4zjad3xhv160hmi5n408ssljfg7iz90jxs9w111pjwy4"))))
827 (build-system gnu-build-system)
830 (modify-phases %standard-phases
831 (add-before 'check 'patch-check-scripts
833 (substitute* '("checks/roundtrip.sh"
834 "checks/roundtrip-raw.sh")
835 (("/bin/echo") "echo"))
837 (home-page "http://www.jabberwocky.com/software/paperkey/")
838 (synopsis "Backup OpenPGP keys to paper")
840 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
841 for printing with paper and ink, which have amazingly long retention
842 qualities. To reconstruct a secret key, you re-enter those
843 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
844 them to transform your existing public key into a secret key.")
845 (license license:gpl2+)))
853 (uri (string-append "mirror://gnupg/gpa/"
854 name "-" version ".tar.bz2"))
857 "09xphbi2456qynwqq5n0yh0zdmdi2ggrj3wk4hsyh5lrzlvcrff3"))))
858 (build-system gnu-build-system)
860 `(("pkg-config" ,pkg-config)))
864 ("libassuan" ,libassuan)
865 ("libgpg-error" ,libgpg-error)
867 (home-page "https://gnupg.org/software/gpa/")
868 (synopsis "Graphical user interface for GnuPG")
870 "GPA, the GNU Privacy Assistant, is a graphical user interface for
871 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
872 files, to verify signatures, and to manage the private and public keys.")
873 (license license:gpl3+)))
875 (define-public parcimonie
881 (uri (string-append "https://gaffer.ptitcanardnoir.org/"
882 "intrigeri/files/parcimonie/App-Parcimonie-"
886 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
887 (build-system perl-build-system)
889 `(("gnupg" ,gnupg-1) ; This is the version used by perl-gnupg-interface
890 ("perl-config-general" ,perl-config-general)
891 ("perl-clone" ,perl-clone)
892 ("perl-data" ,perl-data)
893 ("perl-exporter-tiny" ,perl-exporter-tiny)
894 ("perl-file-homedir" ,perl-file-homedir)
895 ("perl-file-sharedir" ,perl-file-sharedir)
896 ("perl-file-which" ,perl-file-which)
897 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
898 ("perl-gnupg-interface" ,perl-gnupg-interface)
899 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
900 ("perl-list-moreutils" ,perl-list-moreutils)
901 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
902 ("perl-lwp-online" ,perl-lwp-online)
903 ("perl-module-build" ,perl-module-build)
904 ("perl-module-pluggable-object" ,perl-module-pluggable)
905 ("perl-moo" ,perl-moo)
906 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
907 ("perl-moox-late" ,perl-moox-late)
908 ("perl-moox-options" ,perl-moox-options)
909 ("perl-namespace-clean" ,perl-namespace-clean)
910 ("perl-net-dbus" ,perl-net-dbus)
911 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
912 ("perl-path-tiny" ,perl-path-tiny)
913 ("perl-test-most" ,perl-test-most)
914 ("perl-test-trap" ,perl-test-trap)
915 ("perl-time-duration" ,perl-time-duration)
916 ("perl-time-duration-parse" ,perl-time-duration-parse)
917 ("perl-try-tiny" ,perl-try-tiny)
918 ("perl-type-tiny" ,perl-type-tiny)
919 ("perl-types-path-tiny" ,perl-types-path-tiny)
920 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
921 ("perl-xml-parser" ,perl-xml-parser)
922 ("perl-xml-twig" ,perl-xml-twig)
923 ("torsocks" ,torsocks)))
926 (modify-phases %standard-phases
927 ;; Needed for using gpg-connect-agent during tests.
928 (add-before 'check 'set-HOME
929 (lambda _ (setenv "HOME" "/tmp") #t))
930 (add-before 'install 'fix-references
931 (lambda* (#:key inputs outputs #:allow-other-keys)
932 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
934 ;; Skip check whether dependencies are in the PATH
935 (("defined which.*") "")
936 (("call\\('parcimonie-torified-gpg'\\)")
937 (string-append "call('" (assoc-ref outputs "out")
938 "/bin/parcimonie-torified-gpg')")))
939 (substitute* "bin/parcimonie-torified-gpg"
940 (("torsocks") (string-append (assoc-ref inputs "torsocks")
943 (add-after 'install 'wrap-program
944 (lambda* (#:key inputs outputs #:allow-other-keys)
945 (let* ((out (assoc-ref outputs "out"))
946 (perllib (string-append out "/lib/perl5/site_perl/"
947 ,(package-version perl))))
948 (wrap-program (string-append out "/bin/parcimonie")
950 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
952 (home-page "https://gaffer.ptitcanardnoir.org/intrigeri/code/parcimonie/")
953 (synopsis "Incrementally refreshes a GnuPG keyring")
954 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
955 that makes it hard to correlate the keyring content to an individual, and
956 makes it hard to locate an individual based on an identifying subset of her
957 keyring content. Parcimonie is a daemon that fetches one key at a time using
958 the Tor network, waits a bit, changes the Tor circuit being used, and starts
960 (license license:gpl1+)))
962 (define-public jetring
969 (uri (string-append "mirror://debian/pool/main/j/" name "/"
970 name "_" version ".tar.xz"))
973 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
974 (build-system gnu-build-system)
977 (modify-phases %standard-phases
978 (delete 'configure) ; no configure script
979 (add-before 'install 'hardlink-gnupg
980 (lambda* (#:key inputs #:allow-other-keys)
981 (let ((gpg (string-append (assoc-ref inputs "gnupg")
983 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
984 (("gpg -") (string-append gpg " -"))
985 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
988 (lambda* (#:key outputs #:allow-other-keys)
989 (let* ((out (assoc-ref outputs "out"))
990 (man (string-append out "/share/man")))
991 (for-each (lambda (file)
992 (install-file file (string-append out "/bin/")))
993 (find-files "." "jetring-[[:alpha:]]+$"))
994 (for-each (lambda (file)
995 (install-file file (string-append man "/man1/")))
996 (find-files "." ".*\\.1$"))
997 (install-file "jetring.7" (string-append man "/man7/"))
999 #:tests? #f)) ; no test phase
1003 (home-page "https://joeyh.name/code/jetring/")
1004 (synopsis "GnuPG keyring maintenance using changesets")
1006 "Jetring is a collection of tools that allow for gpg keyrings to be
1007 maintained using changesets. It was developed with the Debian keyring in mind,
1008 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1009 for multiple people to collaboratively edit.
1011 With jetring, changesets can be submitted, reviewed to see exactly what they
1012 will do, applied, and used to build a keyring. The origin of every change made
1013 to the keyring is available for auditing, and gpg signatures can be used for
1014 integrity guarantees.")
1015 (license license:gpl2+)))