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 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>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages gnupg)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages adns)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages curl)
40 #:use-module (gnu packages crypto)
41 #:use-module (gnu packages emacs)
42 #:use-module (gnu packages openldap)
43 #:use-module (gnu packages perl)
44 #:use-module (gnu packages perl-check)
45 #:use-module (gnu packages pth)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages qt)
48 #:use-module (gnu packages readline)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages databases)
51 #:use-module (gnu packages gtk)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages ncurses)
56 #:use-module (gnu packages security-token)
57 #:use-module (gnu packages swig)
58 #:use-module (gnu packages tls)
59 #:use-module (gnu packages tor)
60 #:use-module (gnu packages web)
61 #:use-module (gnu packages xml)
62 #:use-module (guix packages)
63 #:use-module (guix download)
64 #:use-module (guix git-download)
65 #:use-module (guix build-system gnu)
66 #:use-module (guix build-system perl)
67 #:use-module (guix build-system python))
69 (define-public libgpg-error
76 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
80 "1li95ni122fzinzlmxbln63nmgij63irxfvi52ws4zfbzv3am4sg"))))
81 (build-system gnu-build-system)
82 (home-page "https://gnupg.org")
83 (synopsis "Library of error values for GnuPG components")
85 "Libgpg-error is a small library that defines common error values
86 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
87 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
88 Daemon and possibly more in the future.")
89 (license license:lgpl2.0+)
90 (properties '((ftp-server . "ftp.gnupg.org")
91 (ftp-directory . "/gcrypt/libgpg-error")))))
93 (define-public libgcrypt
99 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
103 "1cvqd9jk5qshbh48yh3ixw4zyr4n5k50r3475rrh20xfn7w7aa3s"))))
104 (build-system gnu-build-system)
106 `(("libgpg-error-host" ,libgpg-error)))
108 ;; Needed here for the 'gpg-error' program.
109 `(("libgpg-error-native" ,libgpg-error)))
111 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
112 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
113 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
115 (list (string-append "--with-gpg-error-prefix="
116 (assoc-ref %build-inputs "libgpg-error-host")))))
117 (outputs '("out" "debug"))
118 (home-page "https://gnupg.org/")
119 (synopsis "Cryptographic function library")
121 "Libgcrypt is a general-purpose cryptographic library. It provides the
122 standard cryptographic building blocks such as symmetric ciphers, hash
123 algorithms, public key algorithms, large integer functions and random number
125 (license license:lgpl2.0+)
126 (properties '((ftp-server . "ftp.gnupg.org")
127 (ftp-directory . "/gcrypt/libgcrypt")))))
129 (define-public libassuan
136 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
140 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"))))
141 (build-system gnu-build-system)
143 `(("libgpg-error" ,libgpg-error)
145 (home-page "https://gnupg.org")
147 "IPC library used by GnuPG and related software")
149 "Libassuan is a small library implementing the so-called Assuan
150 protocol. This protocol is used for IPC between most newer
151 GnuPG components. Both, server and client side functions are
153 (license license:lgpl2.0+)
154 (properties '((ftp-server . "ftp.gnupg.org")
155 (ftp-directory . "/gcrypt/libassuan")))))
157 (define-public libksba
165 "mirror://gnupg/libksba/libksba-"
169 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
170 (build-system gnu-build-system)
172 `(("libgpg-error" ,libgpg-error)))
174 `(("libgpg-error" ,libgpg-error)))
177 (list ,@(if (%current-target-system)
178 '("CC_FOR_BUILD=gcc")
180 (string-append "--with-gpg-error-prefix="
181 (assoc-ref %build-inputs "libgpg-error")))))
182 (home-page "https://www.gnupg.org")
183 (synopsis "CMS and X.509 access library")
185 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
186 as well as the CMS easily accessible by other applications. Both
187 specifications are building blocks of S/MIME and TLS.")
188 (license license:gpl3+)
189 (properties '((ftp-server . "ftp.gnupg.org")
190 (ftp-directory . "/gcrypt/libksba")))))
199 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
202 "1hmkkp6vzyrh8v01c2ynzf9vwikyagp7p1lxhbnr4ysk3w66jji9"))))
203 (build-system gnu-build-system)
204 (home-page "https://www.gnupg.org")
205 (synopsis "Non-preemptive thread library")
207 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
208 threads implementation.
210 In contrast to GNU Pth is is based on the system's standard threads
211 implementation. This allows the use of libraries which are not
212 compatible to GNU Pth.")
213 (license (list license:lgpl3+ license:gpl2+)))) ; dual license
221 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
225 "0mzgibq4dpxh3i9anmwg12xdjry28y83icafhx3j3djg5niqk89z"))))
226 (build-system gnu-build-system)
228 `(("pkg-config" ,pkg-config)))
233 ("libassuan" ,libassuan)
234 ("libgcrypt" ,libgcrypt)
235 ("libgpg-error" ,libgpg-error)
238 ("openldap" ,openldap)
239 ("pcsc-lite" ,pcsc-lite)
240 ("readline" ,readline)
244 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
245 ;; executable in its installation directory in
246 ;; /gnu/store before it has been installed.
247 "--enable-gnupg-builddir-envvar"
248 "--enable-all-tests")
250 (modify-phases %standard-phases
251 (add-before 'configure 'patch-paths
252 (lambda* (#:key inputs #:allow-other-keys)
253 (substitute* "scd/scdaemon.c"
254 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
255 (string-append "\"" (assoc-ref inputs "pcsc-lite")
258 (add-after 'build 'patch-scheme-tests
260 (substitute* (find-files "tests" ".\\.scm$")
261 (("/usr/bin/env gpgscm")
262 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
264 (add-before 'build 'patch-test-paths
266 (substitute* '("tests/inittests"
267 "tests/pkits/inittests"
269 "tests/pkits/common.sh"
270 "tests/pkits/Makefile")
271 (("/bin/pwd") (which "pwd")))
272 (substitute* "common/t-exectool.c"
273 (("/bin/cat") (which "cat"))
274 (("/bin/true") (which "true"))
275 (("/bin/false") (which "false")))
277 (home-page "https://gnupg.org/")
278 (synopsis "GNU Privacy Guard")
280 "The GNU Privacy Guard is a complete implementation of the OpenPGP
281 standard. It is used to encrypt and sign data and communication. It
282 features powerful key management and the ability to access public key
283 servers. It includes several libraries: libassuan (IPC between GnuPG
284 components), libgpg-error (centralized GnuPG error values), and
285 libskba (working with X.509 certificates and CMS data).")
286 (license license:gpl3+)
287 (properties '((ftp-server . "ftp.gnupg.org")
288 (ftp-directory . "/gcrypt/gnupg")))))
290 (define-public gnupg-2.0
291 (package (inherit gnupg)
295 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
299 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
305 ("libassuan" ,libassuan)
306 ("libgcrypt" ,libgcrypt)
307 ("libgpg-error" ,libgpg-error)
310 ("openldap" ,openldap)
312 ("readline" ,readline)))
315 (modify-phases %standard-phases
316 (add-before 'configure 'patch-config-files
318 (substitute* "tests/openpgp/Makefile.in"
319 (("/bin/sh") (which "sh")))
321 (add-after 'install 'rename-v2-commands
322 (lambda* (#:key outputs #:allow-other-keys)
323 ;; Upstream suggests removing the trailing '2' from command names:
324 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
325 (let ((out (assoc-ref outputs "out")))
326 (with-directory-excursion (string-append out "/bin")
327 (rename-file "gpgv2" "gpgv")
328 (rename-file "gpg2" "gpg")
330 ;; Keep the old name around to ease transition.
331 (symlink "gpgv" "gpgv2")
332 (symlink "gpg" "gpg2")
334 (properties `((superseded . ,gnupg)))))
336 (define-public gnupg-1
337 (package (inherit gnupg)
341 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
345 "1d1hz4szh1kvwhsw7w2zxa6q5ndrk3qy6hj289l1b8k3xi5s554m"))))
351 ("readline" ,readline)
352 ("libgpg-error" ,libgpg-error)))
355 (modify-phases %standard-phases
356 (add-after 'unpack 'patch-check-sh
358 (substitute* "checks/Makefile.in"
359 (("/bin/sh") (which "sh"))))))))))
368 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
372 "14q619lxbk64vz7lih5gjb928qm28jrnn1h3yhsrrff3jw8yv3qs"))))
373 (build-system gnu-build-system)
377 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
378 `(("libgpg-error" ,libgpg-error)))
380 `(("libassuan" ,libassuan)))
381 (home-page "https://www.gnupg.org/related_software/gpgme/")
382 (synopsis "Library providing simplified access to GnuPG functionality")
384 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
385 easier for applications. It provides a High-Level Crypto API for encryption,
386 decryption, signing, signature verification and key management. Currently
387 it uses GnuPG as its backend but the API isn't restricted to this engine.
389 Because the direct use of GnuPG from an application can be a complicated
390 programming task, it is suggested that all software should try to use GPGME
391 instead. This way bug fixes or improvements can be done at a central place
392 and every application benefits from this.")
393 (license license:lgpl2.1+)))
395 (define-public qgpgme
401 (modify-phases %standard-phases
402 (add-before 'build 'chdir-and-symlink
403 (lambda* (#:key inputs #:allow-other-keys)
404 (let ((gpgme (assoc-ref inputs "gpgme")))
405 (symlink (string-append gpgme "/lib/libgpgmepp.la")
406 "lang/cpp/src/libgpgmepp.la")
407 (symlink (string-append gpgme "/lib/libgpgme.la")
412 `(("pkg-config" ,pkg-config)
413 ,@(package-native-inputs gpgme)))
417 ,@(package-inputs gpgme)))
418 (synopsis "Qt API bindings for gpgme")
419 (description "QGpgme provides a very high level Qt API around GpgMEpp.
421 QGpgME was originally developed as part of libkleo and incorporated into
422 gpgpme starting with version 1.7.")
423 (license license:gpl2+))) ;; Note: this differs from gpgme
425 (define-public python-gpg
431 (uri (pypi-uri "gpg" version))
434 "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
435 (build-system python-build-system)
437 '(#:tests? #f)) ; No test suite.
442 (home-page (package-home-page gpgme))
443 (synopsis "Python bindings for GPGME GnuPG cryptography library")
444 (description "This package provides Python bindings to the GPGME GnuPG
445 cryptographic library. It is developed in the GPGME source code, and then
446 distributed separately.")
447 (license license:lgpl2.1+)))
449 (define-public python2-gpg
450 (package-with-python2 python-gpg))
452 (define-public python-pygpgme
454 (name "python-pygpgme")
459 (uri (pypi-uri "pygpgme" version))
462 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
463 ;; Unfortunately, we have to disable some tests due to some gpg-agent
465 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
466 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
467 "python-pygpgme-fix-pinentry-tests.patch"))))
470 (modify-phases %standard-phases
471 (add-before 'build 'make-build
473 (zero? (system* "make" "build"))))
476 (zero? (system* "make" "check")))))))
477 (build-system python-build-system)
479 `(("gnupg" ,gnupg-1)))
482 (home-page "https://launchpad.net/pygpgme")
483 (synopsis "Python module for working with OpenPGP messages")
485 "PyGPGME is a Python module that lets you sign, verify, encrypt and
486 decrypt messages using the OpenPGP format by making use of GPGME.")
487 (license license:lgpl2.1+)))
489 (define-public python2-pygpgme
490 (package-with-python2 python-pygpgme))
492 (define-public python-gnupg
494 (name "python-gnupg")
499 (uri (pypi-uri "python-gnupg" version))
502 "0nkbs9c8f30lra7ca39kg91x8cyxn0jb61vih4qky839gpbwwwiq"))))
503 (build-system python-build-system)
506 (modify-phases %standard-phases
509 (substitute* "test_gnupg.py"
510 ;; Exported keys don't have a version line!
511 (("del k1\\[1\\]") "#")
512 ;; Unsure why this test fails.
513 (("'test_search_keys'") "True")
514 (("def test_search_keys") "def disabled__search_keys"))
515 (setenv "USERNAME" "guixbuilder")
516 ;; The doctests are extremely slow and sometimes time out,
517 ;; so we disable them.
518 (zero? (system* "python"
519 "test_gnupg.py" "--no-doctests")))))))
521 `(("gnupg" ,gnupg-1)))
522 (home-page "https://packages.python.org/python-gnupg/index.html")
523 (synopsis "Wrapper for the GNU Privacy Guard")
525 "This module allows easy access to GnuPG’s key management, encryption
526 and signature functionality from Python programs.")
527 (license license:bsd-3)))
529 (define-public python2-gnupg
530 (package-with-python2 python-gnupg))
532 (define-public perl-gnupg-interface
534 (name "perl-gnupg-interface")
538 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
539 "GnuPG-Interface-" version ".tar.gz"))
542 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
543 (build-system perl-build-system)
546 (modify-phases %standard-phases
547 ;; FIXME: This test fails for unknown reasons
548 (add-after 'unpack 'delete-broken-test
550 (delete-file "t/encrypt_symmetrically.t")
553 `(("gnupg" ,gnupg-1)))
555 `(("perl-moo" ,perl-moo)
556 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
557 ("perl-moox-late" ,perl-moox-late)))
560 ("perl-module-install" ,perl-module-install)))
561 (home-page "http://search.cpan.org/dist/GnuPG-Interface/")
562 (synopsis "Perl interface to GnuPG")
563 (description "@code{GnuPG::Interface} and its associated modules are
564 designed to provide an object-oriented method for interacting with GnuPG,
565 being able to perform functions such as but not limited to encrypting,
566 signing, decryption, verification, and key-listing parsing.")
567 (license license:perl-license)))
576 "https://github.com/jaymzh/pius/releases/download/v"
577 version "/pius-" version ".tar.bz2"))
580 "1893hzpx3zv724drqv48csrn0cm98xw4ymb1zmhs2jvjj1778zfj"))))
581 (build-system python-build-system)
582 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
586 #:python ,python-2 ;uses the Python 2 'print' syntax
588 (modify-phases %standard-phases
590 'build 'set-gpg-file-name
591 (lambda* (#:key inputs outputs #:allow-other-keys)
592 (let* ((gpg (string-append (assoc-ref inputs "gpg")
594 (substitute* "libpius/constants.py"
595 (("/usr/bin/gpg2") gpg))
597 (synopsis "Programs to simplify GnuPG key signing")
599 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
600 parties. It is the main utility and makes it possible to quickly and easily
601 sign each UID on a set of PGP keys. It is designed to take the pain out of
602 the sign-all-the-keys part of PGP Keysigning Party while adding security
605 pius-keyring-mgr and pius-party-worksheet help organisers of
606 PGP keysigning parties.")
607 (license license:gpl2)
608 (home-page "https://www.phildev.net/pius/index.shtml")))
610 (define-public signing-party
612 (name "signing-party")
616 (uri (string-append "mirror://debian/pool/main/s/signing-party/"
617 "signing-party_" version ".orig.tar.gz"))
619 "1n5bpcfpl9vg1xp6r1jhbyahrgdyxp05b5pria1rh4m0qnv8sifr"))))
620 (build-system gnu-build-system)
622 `(("autoconf" ,autoconf-wrapper)
623 ("automake" ,automake)))
624 (inputs `(("perl" ,perl)
625 ("perl-text-template" ,perl-text-template)
626 ("perl-mime-tools" ,perl-mime-tools)
627 ("perl-gnupg-interface" ,perl-gnupg-interface)
628 ("perl-net-idn-encode" ,perl-net-idn-encode)
633 (modify-phases %standard-phases
634 (add-before 'configure 'change-directory
636 ;; The build system in the unpack phase changes to a less useful
637 ;; subdirectory, so move up one level
638 (chdir (dirname (getcwd)))))
640 (lambda* (#:key outputs #:allow-other-keys)
641 (let ((out (assoc-ref outputs "out")))
642 (substitute* "keyanalyze/Makefile"
643 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
644 (substitute* "keyanalyze/Makefile"
645 (("\\./configure") (string-append "./configure --prefix=" out)))
646 (substitute* "gpgwrap/src/Makefile"
648 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
649 out "/bin/gpgwrap\n")))
650 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
651 "keylookup/Makefile" "sig2dot/Makefile"
652 "springgraph/Makefile")
654 (setenv "CONFIG_SHELL" (which "sh")))))
656 (lambda* (#:key outputs #:allow-other-keys #:rest args)
657 (let ((out (assoc-ref outputs "out"))
658 (install (assoc-ref %standard-phases 'install)))
662 (copy-file (string-append dir "/" file)
663 (string-append out "/bin/" file)))
664 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
665 "gpglist" "gpg-mailkeys" "gpgparticipants")
666 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
667 "gpglist" "gpg-mailkeys" "gpgparticipants"))
670 (copy-file (string-append dir "/" file)
671 (string-append out "/share/man/man1/" file)))
672 '("caff" "caff" "caff" "gpgdir"
673 "gpg-key2ps" "gpglist" "gpg-mailkeys"
674 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
675 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
676 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
677 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
678 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
679 "process_keys.1" "pgpring.1" "keyanalyze.1")))))
680 (add-after 'install 'wrap-programs
681 (lambda* (#:key outputs #:allow-other-keys)
682 (let* ((out (assoc-ref outputs "out")))
684 (string-append out "/bin/caff")
685 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))))))
686 (synopsis "Collection of scripts for simplifying gnupg key signing")
688 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
689 including tools for signing keys, keyring analysis, and party preparation.
691 @item caff: CA - Fire and Forget signs and mails a key
692 @item pgp-clean: removes all non-self signatures from key
693 @item pgp-fixkey: removes broken packets from keys
694 @item gpg-mailkeys: simply mail out a signed key to its owner
695 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
696 @item gpgdir: recursive directory encryption tool
697 @item gpglist: show who signed which of your UIDs
698 @item gpgsigs: annotates list of GnuPG keys with already done signatures
699 @item gpgparticipants: create list of party participants for the organiser
700 @item gpgwrap: a passphrase wrapper
701 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
702 @item keylookup: ncurses wrapper around gpg --search
703 @item sig2dot: converts a list of GnuPG signatures to a .dot file
704 @item springgraph: creates a graph from a .dot file
706 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
707 ;; and caff and gpgsigs: bsd-3, see
708 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
709 (license license:gpl2)
710 (home-page "https://pgp-tools.alioth.debian.org/")))
712 (define-public pinentry-tty
714 (name "pinentry-tty")
718 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
722 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
723 (build-system gnu-build-system)
725 `(#:configure-flags '("--enable-pinentry-tty")))
727 `(("ncurses" ,ncurses)
728 ("libassuan" ,libassuan)
729 ("libsecret" ,libsecret "out")))
731 `(("pkg-config" ,pkg-config)))
732 (home-page "https://gnupg.org/aegypten2/")
733 (synopsis "GnuPG's interface to passphrase input")
735 "Pinentry provides a console that allows users to enter a passphrase when
736 @code{gpg} is run and needs it.")
737 (license license:gpl2+)
738 (properties '((ftp-server . "ftp.gnupg.org")
739 (ftp-directory . "/gcrypt/pinentry")
740 (upstream-name . "pinentry")))))
742 (define-public pinentry-emacs
744 (inherit pinentry-tty)
745 (name "pinentry-emacs")
747 `(#:configure-flags '("--enable-pinentry-emacs")))
749 "Pinentry provides a console and an Emacs interface that allows users to
750 enter a passphrase when required by @code{gpg} or other software.")))
752 (define-public pinentry-gtk2
754 (inherit pinentry-tty)
755 (name "pinentry-gtk2")
759 ,@(package-inputs pinentry-tty)))
761 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
762 passphrase when @code{gpg} is run and needs it.")))
764 (define-public pinentry-gnome3
766 (inherit pinentry-tty)
767 (name "pinentry-gnome3")
772 ,@(package-inputs pinentry-tty)))
774 `(#:configure-flags '("--enable-pinentry-gnome3")))
776 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
777 that allows users to enter a passphrase when required by @code{gpg} or other
780 (define-public pinentry-qt
782 (inherit pinentry-tty)
786 ,@(package-inputs pinentry-tty)))
788 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
790 "Pinentry provides a console and a Qt GUI that allows users to enter a
791 passphrase when @code{gpg} is run and needs it.")))
793 (define-public pinentry
794 (package (inherit pinentry-gtk2)
797 (define-public paperkey
803 (uri (string-append "http://www.jabberwocky.com/"
804 "software/paperkey/paperkey-"
808 "1yybj8bj68v4lxwpn596b6ismh2fyixw5vlqqg26byrn4d9dfmsv"))))
809 (build-system gnu-build-system)
812 (modify-phases %standard-phases
813 (add-before 'check 'patch-check-scripts
815 (substitute* '("checks/roundtrip.sh"
816 "checks/roundtrip-raw.sh")
817 (("/bin/echo") "echo"))
819 (home-page "http://www.jabberwocky.com/software/paperkey/")
820 (synopsis "Backup OpenPGP keys to paper")
822 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
823 for printing with paper and ink, which have amazingly long retention
824 qualities. To reconstruct a secret key, you re-enter those
825 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
826 them to transform your existing public key into a secret key.")
827 (license license:gpl2+)))
835 (uri (string-append "mirror://gnupg/gpa/"
836 name "-" version ".tar.bz2"))
839 "09xphbi2456qynwqq5n0yh0zdmdi2ggrj3wk4hsyh5lrzlvcrff3"))))
840 (build-system gnu-build-system)
842 `(("pkg-config" ,pkg-config)))
846 ("libassuan" ,libassuan)
847 ("libgpg-error" ,libgpg-error)
849 (home-page "https://gnupg.org/software/gpa/")
850 (synopsis "Graphical user interface for GnuPG")
852 "GPA, the GNU Privacy Assistant, is a graphical user interface for
853 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
854 files, to verify signatures, and to manage the private and public keys.")
855 (license license:gpl3+)))
857 (define-public parcimonie
863 (uri (string-append "https://gaffer.ptitcanardnoir.org/"
864 "intrigeri/files/parcimonie/App-Parcimonie-"
868 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
869 (build-system perl-build-system)
871 `(("gnupg" ,gnupg-1) ; This is the version used by perl-gnupg-interface
872 ("perl-config-general" ,perl-config-general)
873 ("perl-clone" ,perl-clone)
874 ("perl-data" ,perl-data)
875 ("perl-exporter-tiny" ,perl-exporter-tiny)
876 ("perl-file-homedir" ,perl-file-homedir)
877 ("perl-file-sharedir" ,perl-file-sharedir)
878 ("perl-file-which" ,perl-file-which)
879 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
880 ("perl-gnupg-interface" ,perl-gnupg-interface)
881 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
882 ("perl-list-moreutils" ,perl-list-moreutils)
883 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
884 ("perl-lwp-online" ,perl-lwp-online)
885 ("perl-module-build" ,perl-module-build)
886 ("perl-module-pluggable-object" ,perl-module-pluggable)
887 ("perl-moo" ,perl-moo)
888 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
889 ("perl-moox-late" ,perl-moox-late)
890 ("perl-moox-options" ,perl-moox-options)
891 ("perl-namespace-clean" ,perl-namespace-clean)
892 ("perl-net-dbus" ,perl-net-dbus)
893 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
894 ("perl-path-tiny" ,perl-path-tiny)
895 ("perl-test-most" ,perl-test-most)
896 ("perl-test-trap" ,perl-test-trap)
897 ("perl-time-duration" ,perl-time-duration)
898 ("perl-time-duration-parse" ,perl-time-duration-parse)
899 ("perl-try-tiny" ,perl-try-tiny)
900 ("perl-type-tiny" ,perl-type-tiny)
901 ("perl-types-path-tiny" ,perl-types-path-tiny)
902 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
903 ("perl-xml-parser" ,perl-xml-parser)
904 ("perl-xml-twig" ,perl-xml-twig)
905 ("torsocks" ,torsocks)))
908 (modify-phases %standard-phases
909 ;; Needed for using gpg-connect-agent during tests.
910 (add-before 'check 'set-HOME
911 (lambda _ (setenv "HOME" "/tmp") #t))
912 (add-before 'install 'fix-references
913 (lambda* (#:key inputs outputs #:allow-other-keys)
914 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
916 ;; Skip check whether dependencies are in the PATH
917 (("defined which.*") "")
918 (("call\\('parcimonie-torified-gpg'\\)")
919 (string-append "call('" (assoc-ref outputs "out")
920 "/bin/parcimonie-torified-gpg')")))
921 (substitute* "bin/parcimonie-torified-gpg"
922 (("torsocks") (string-append (assoc-ref inputs "torsocks")
925 (add-after 'install 'wrap-program
926 (lambda* (#:key inputs outputs #:allow-other-keys)
927 (let* ((out (assoc-ref outputs "out"))
928 (perllib (string-append out "/lib/perl5/site_perl/"
929 ,(package-version perl))))
930 (wrap-program (string-append out "/bin/parcimonie")
932 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
934 (home-page "https://gaffer.ptitcanardnoir.org/intrigeri/code/parcimonie/")
935 (synopsis "Incrementally refreshes a GnuPG keyring")
936 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
937 that makes it hard to correlate the keyring content to an individual, and
938 makes it hard to locate an individual based on an identifying subset of her
939 keyring content. Parcimonie is a daemon that fetches one key at a time using
940 the Tor network, waits a bit, changes the Tor circuit being used, and starts
942 (license license:gpl1+)))
944 (define-public jetring
951 (uri (string-append "mirror://debian/pool/main/j/" name "/"
952 name "_" version ".tar.xz"))
955 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
956 (build-system gnu-build-system)
959 (modify-phases %standard-phases
960 (delete 'configure) ; no configure script
961 (add-before 'install 'hardlink-gnupg
962 (lambda* (#:key inputs #:allow-other-keys)
963 (let ((gpg (string-append (assoc-ref inputs "gnupg")
965 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
966 (("gpg -") (string-append gpg " -"))
967 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
970 (lambda* (#:key outputs #:allow-other-keys)
971 (let* ((out (assoc-ref outputs "out"))
972 (man (string-append out "/share/man")))
973 (for-each (lambda (file)
974 (install-file file (string-append out "/bin/")))
975 (find-files "." "jetring-[[:alpha:]]+$"))
976 (for-each (lambda (file)
977 (install-file file (string-append man "/man1/")))
978 (find-files "." ".*\\.1$"))
979 (install-file "jetring.7" (string-append man "/man7/"))
981 #:tests? #f)) ; no test phase
985 (home-page "https://joeyh.name/code/jetring/")
986 (synopsis "GnuPG keyring maintenance using changesets")
988 "Jetring is a collection of tools that allow for gpg keyrings to be
989 maintained using changesets. It was developed with the Debian keyring in mind,
990 and aims to solve the problem that a gpg keyring is a binary blob that's hard
991 for multiple people to collaboratively edit.
993 With jetring, changesets can be submitted, reviewed to see exactly what they
994 will do, applied, and used to build a keyring. The origin of every change made
995 to the keyring is available for auditing, and gpg signatures can be used for
996 integrity guarantees.")
997 (license license:gpl2+)))