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 "110rf476l3cgn52gh9ia5y0y06y2ialq9dqc12jkhnfhl9gqqkg6"))))
226 (build-system gnu-build-system)
228 `(("pkg-config" ,pkg-config)))
231 ("libassuan" ,libassuan)
232 ("libgcrypt" ,libgcrypt)
233 ("libgpg-error" ,libgpg-error)
236 ("openldap" ,openldap)
237 ("pcsc-lite" ,pcsc-lite)
238 ("readline" ,readline)
242 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
243 ;; executable in its installation directory in
244 ;; /gnu/store before it has been installed.
245 "--enable-gnupg-builddir-envvar"
246 "--enable-all-tests")
248 (modify-phases %standard-phases
249 (add-before 'configure 'patch-paths
250 (lambda* (#:key inputs #:allow-other-keys)
251 (substitute* "scd/scdaemon.c"
252 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
253 (string-append "\"" (assoc-ref inputs "pcsc-lite")
256 (add-after 'build 'patch-scheme-tests
258 (substitute* (find-files "tests" ".\\.scm$")
259 (("/usr/bin/env gpgscm")
260 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
262 (add-before 'build 'patch-test-paths
264 (substitute* '("tests/inittests"
265 "tests/pkits/inittests"
267 "tests/pkits/common.sh"
268 "tests/pkits/Makefile")
269 (("/bin/pwd") (which "pwd")))
270 (substitute* "common/t-exectool.c"
271 (("/bin/cat") (which "cat"))
272 (("/bin/true") (which "true"))
273 (("/bin/false") (which "false")))
275 (home-page "https://gnupg.org/")
276 (synopsis "GNU Privacy Guard")
278 "The GNU Privacy Guard is a complete implementation of the OpenPGP
279 standard. It is used to encrypt and sign data and communication. It
280 features powerful key management and the ability to access public key
281 servers. It includes several libraries: libassuan (IPC between GnuPG
282 components), libgpg-error (centralized GnuPG error values), and
283 libskba (working with X.509 certificates and CMS data).")
284 (license license:gpl3+)
285 (properties '((ftp-server . "ftp.gnupg.org")
286 (ftp-directory . "/gcrypt/gnupg")))))
288 (define-public gnupg-2.0
289 (package (inherit gnupg)
293 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
297 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
303 ("libassuan" ,libassuan)
304 ("libgcrypt" ,libgcrypt)
305 ("libgpg-error" ,libgpg-error)
308 ("openldap" ,openldap)
310 ("readline" ,readline)))
313 (modify-phases %standard-phases
314 (add-before 'configure 'patch-config-files
316 (substitute* "tests/openpgp/Makefile.in"
317 (("/bin/sh") (which "sh")))
319 (add-after 'install 'rename-v2-commands
320 (lambda* (#:key outputs #:allow-other-keys)
321 ;; Upstream suggests removing the trailing '2' from command names:
322 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
323 (let ((out (assoc-ref outputs "out")))
324 (with-directory-excursion (string-append out "/bin")
325 (rename-file "gpgv2" "gpgv")
326 (rename-file "gpg2" "gpg")
328 ;; Keep the old name around to ease transition.
329 (symlink "gpgv" "gpgv2")
330 (symlink "gpg" "gpg2")
332 (properties `((superseded . ,gnupg)))))
334 (define-public gnupg-1
335 (package (inherit gnupg)
339 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
343 "1d1hz4szh1kvwhsw7w2zxa6q5ndrk3qy6hj289l1b8k3xi5s554m"))))
349 ("readline" ,readline)
350 ("libgpg-error" ,libgpg-error)))
353 (modify-phases %standard-phases
354 (add-after 'unpack 'patch-check-sh
356 (substitute* "checks/Makefile.in"
357 (("/bin/sh") (which "sh"))))))))))
366 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
370 "14q619lxbk64vz7lih5gjb928qm28jrnn1h3yhsrrff3jw8yv3qs"))))
371 (build-system gnu-build-system)
375 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
376 `(("libgpg-error" ,libgpg-error)))
378 `(("libassuan" ,libassuan)))
379 (home-page "https://www.gnupg.org/related_software/gpgme/")
380 (synopsis "Library providing simplified access to GnuPG functionality")
382 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
383 easier for applications. It provides a High-Level Crypto API for encryption,
384 decryption, signing, signature verification and key management. Currently
385 it uses GnuPG as its backend but the API isn't restricted to this engine.
387 Because the direct use of GnuPG from an application can be a complicated
388 programming task, it is suggested that all software should try to use GPGME
389 instead. This way bug fixes or improvements can be done at a central place
390 and every application benefits from this.")
391 (license license:lgpl2.1+)))
393 (define-public qgpgme
399 (modify-phases %standard-phases
400 (add-before 'build 'chdir-and-symlink
401 (lambda* (#:key inputs #:allow-other-keys)
402 (let ((gpgme (assoc-ref inputs "gpgme")))
403 (symlink (string-append gpgme "/lib/libgpgmepp.la")
404 "lang/cpp/src/libgpgmepp.la")
405 (symlink (string-append gpgme "/lib/libgpgme.la")
410 `(("pkg-config" ,pkg-config)
411 ,@(package-native-inputs gpgme)))
415 ,@(package-inputs gpgme)))
416 (synopsis "Qt API bindings for gpgme")
417 (description "QGpgme provides a very high level Qt API around GpgMEpp.
419 QGpgME was originally developed as part of libkleo and incorporated into
420 gpgpme starting with version 1.7.")
421 (license license:gpl2+))) ;; Note: this differs from gpgme
423 (define-public python-gpg
429 (uri (pypi-uri "gpg" version))
432 "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
433 (build-system python-build-system)
435 '(#:tests? #f)) ; No test suite.
440 (home-page (package-home-page gpgme))
441 (synopsis "Python bindings for GPGME GnuPG cryptography library")
442 (description "This package provides Python bindings to the GPGME GnuPG
443 cryptographic library. It is developed in the GPGME source code, and then
444 distributed separately.")
445 (license license:lgpl2.1+)))
447 (define-public python2-gpg
448 (package-with-python2 python-gpg))
450 (define-public python-pygpgme
452 (name "python-pygpgme")
457 (uri (pypi-uri "pygpgme" version))
460 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
461 ;; Unfortunately, we have to disable some tests due to some gpg-agent
463 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
464 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
465 "python-pygpgme-fix-pinentry-tests.patch"))))
468 (modify-phases %standard-phases
469 (add-before 'build 'make-build
471 (zero? (system* "make" "build"))))
474 (zero? (system* "make" "check")))))))
475 (build-system python-build-system)
477 `(("gnupg" ,gnupg-1)))
480 (home-page "https://launchpad.net/pygpgme")
481 (synopsis "Python module for working with OpenPGP messages")
483 "PyGPGME is a Python module that lets you sign, verify, encrypt and
484 decrypt messages using the OpenPGP format by making use of GPGME.")
485 (license license:lgpl2.1+)))
487 (define-public python2-pygpgme
488 (package-with-python2 python-pygpgme))
490 (define-public python-gnupg
492 (name "python-gnupg")
497 (uri (pypi-uri "python-gnupg" version))
500 "0nkbs9c8f30lra7ca39kg91x8cyxn0jb61vih4qky839gpbwwwiq"))))
501 (build-system python-build-system)
504 (modify-phases %standard-phases
507 (substitute* "test_gnupg.py"
508 ;; Exported keys don't have a version line!
509 (("del k1\\[1\\]") "#")
510 ;; Unsure why this test fails.
511 (("'test_search_keys'") "True")
512 (("def test_search_keys") "def disabled__search_keys"))
513 (setenv "USERNAME" "guixbuilder")
514 ;; The doctests are extremely slow and sometimes time out,
515 ;; so we disable them.
516 (zero? (system* "python"
517 "test_gnupg.py" "--no-doctests")))))))
519 `(("gnupg" ,gnupg-1)))
520 (home-page "https://packages.python.org/python-gnupg/index.html")
521 (synopsis "Wrapper for the GNU Privacy Guard")
523 "This module allows easy access to GnuPG’s key management, encryption
524 and signature functionality from Python programs.")
525 (license license:bsd-3)))
527 (define-public python2-gnupg
528 (package-with-python2 python-gnupg))
530 (define-public perl-gnupg-interface
532 (name "perl-gnupg-interface")
536 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
537 "GnuPG-Interface-" version ".tar.gz"))
540 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
541 (build-system perl-build-system)
544 (modify-phases %standard-phases
545 ;; FIXME: This test fails for unknown reasons
546 (add-after 'unpack 'delete-broken-test
548 (delete-file "t/encrypt_symmetrically.t")
551 `(("gnupg" ,gnupg-1)))
553 `(("perl-moo" ,perl-moo)
554 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
555 ("perl-moox-late" ,perl-moox-late)))
558 ("perl-module-install" ,perl-module-install)))
559 (home-page "http://search.cpan.org/dist/GnuPG-Interface/")
560 (synopsis "Perl interface to GnuPG")
561 (description "@code{GnuPG::Interface} and its associated modules are
562 designed to provide an object-oriented method for interacting with GnuPG,
563 being able to perform functions such as but not limited to encrypting,
564 signing, decryption, verification, and key-listing parsing.")
565 (license license:perl-license)))
574 "https://github.com/jaymzh/pius/releases/download/v"
575 version "/pius-" version ".tar.bz2"))
578 "1893hzpx3zv724drqv48csrn0cm98xw4ymb1zmhs2jvjj1778zfj"))))
579 (build-system python-build-system)
580 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
584 #:python ,python-2 ;uses the Python 2 'print' syntax
586 (modify-phases %standard-phases
588 'build 'set-gpg-file-name
589 (lambda* (#:key inputs outputs #:allow-other-keys)
590 (let* ((gpg (string-append (assoc-ref inputs "gpg")
592 (substitute* "libpius/constants.py"
593 (("/usr/bin/gpg2") gpg))
595 (synopsis "Programs to simplify GnuPG key signing")
597 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
598 parties. It is the main utility and makes it possible to quickly and easily
599 sign each UID on a set of PGP keys. It is designed to take the pain out of
600 the sign-all-the-keys part of PGP Keysigning Party while adding security
603 pius-keyring-mgr and pius-party-worksheet help organisers of
604 PGP keysigning parties.")
605 (license license:gpl2)
606 (home-page "https://www.phildev.net/pius/index.shtml")))
608 (define-public signing-party
610 (name "signing-party")
614 (uri (string-append "mirror://debian/pool/main/s/signing-party/"
615 "signing-party_" version ".orig.tar.gz"))
617 "1n5bpcfpl9vg1xp6r1jhbyahrgdyxp05b5pria1rh4m0qnv8sifr"))))
618 (build-system gnu-build-system)
620 `(("autoconf" ,autoconf-wrapper)
621 ("automake" ,automake)))
622 (inputs `(("perl" ,perl)
623 ("perl-text-template" ,perl-text-template)
624 ("perl-mime-tools" ,perl-mime-tools)
625 ("perl-gnupg-interface" ,perl-gnupg-interface)
626 ("perl-net-idn-encode" ,perl-net-idn-encode)
631 (modify-phases %standard-phases
632 (add-before 'configure 'change-directory
634 ;; The build system in the unpack phase changes to a less useful
635 ;; subdirectory, so move up one level
636 (chdir (dirname (getcwd)))))
638 (lambda* (#:key outputs #:allow-other-keys)
639 (let ((out (assoc-ref outputs "out")))
640 (substitute* "keyanalyze/Makefile"
641 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
642 (substitute* "keyanalyze/Makefile"
643 (("\\./configure") (string-append "./configure --prefix=" out)))
644 (substitute* "gpgwrap/src/Makefile"
646 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
647 out "/bin/gpgwrap\n")))
648 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
649 "keylookup/Makefile" "sig2dot/Makefile"
650 "springgraph/Makefile")
652 (setenv "CONFIG_SHELL" (which "sh")))))
654 (lambda* (#:key outputs #:allow-other-keys #:rest args)
655 (let ((out (assoc-ref outputs "out"))
656 (install (assoc-ref %standard-phases 'install)))
660 (copy-file (string-append dir "/" file)
661 (string-append out "/bin/" file)))
662 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
663 "gpglist" "gpg-mailkeys" "gpgparticipants")
664 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
665 "gpglist" "gpg-mailkeys" "gpgparticipants"))
668 (copy-file (string-append dir "/" file)
669 (string-append out "/share/man/man1/" file)))
670 '("caff" "caff" "caff" "gpgdir"
671 "gpg-key2ps" "gpglist" "gpg-mailkeys"
672 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
673 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
674 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
675 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
676 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
677 "process_keys.1" "pgpring.1" "keyanalyze.1")))))
678 (add-after 'install 'wrap-programs
679 (lambda* (#:key outputs #:allow-other-keys)
680 (let* ((out (assoc-ref outputs "out")))
682 (string-append out "/bin/caff")
683 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))))))
684 (synopsis "Collection of scripts for simplifying gnupg key signing")
686 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
687 including tools for signing keys, keyring analysis, and party preparation.
689 @item caff: CA - Fire and Forget signs and mails a key
690 @item pgp-clean: removes all non-self signatures from key
691 @item pgp-fixkey: removes broken packets from keys
692 @item gpg-mailkeys: simply mail out a signed key to its owner
693 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
694 @item gpgdir: recursive directory encryption tool
695 @item gpglist: show who signed which of your UIDs
696 @item gpgsigs: annotates list of GnuPG keys with already done signatures
697 @item gpgparticipants: create list of party participants for the organiser
698 @item gpgwrap: a passphrase wrapper
699 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
700 @item keylookup: ncurses wrapper around gpg --search
701 @item sig2dot: converts a list of GnuPG signatures to a .dot file
702 @item springgraph: creates a graph from a .dot file
704 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
705 ;; and caff and gpgsigs: bsd-3, see
706 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
707 (license license:gpl2)
708 (home-page "https://pgp-tools.alioth.debian.org/")))
710 (define-public pinentry-tty
712 (name "pinentry-tty")
716 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
720 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
721 (build-system gnu-build-system)
723 `(#:configure-flags '("--enable-pinentry-tty")))
725 `(("ncurses" ,ncurses)
726 ("libassuan" ,libassuan)
727 ("libsecret" ,libsecret "out")))
729 `(("pkg-config" ,pkg-config)))
730 (home-page "https://gnupg.org/aegypten2/")
731 (synopsis "GnuPG's interface to passphrase input")
733 "Pinentry provides a console that allows users to enter a passphrase when
734 @code{gpg} is run and needs it.")
735 (license license:gpl2+)
736 (properties '((ftp-server . "ftp.gnupg.org")
737 (ftp-directory . "/gcrypt/pinentry")
738 (upstream-name . "pinentry")))))
740 (define-public pinentry-emacs
742 (inherit pinentry-tty)
743 (name "pinentry-emacs")
745 `(#:configure-flags '("--enable-pinentry-emacs")))
747 "Pinentry provides a console and an Emacs interface that allows users to
748 enter a passphrase when required by @code{gpg} or other software.")))
750 (define-public pinentry-gtk2
752 (inherit pinentry-tty)
753 (name "pinentry-gtk2")
757 ,@(package-inputs pinentry-tty)))
759 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
760 passphrase when @code{gpg} is run and needs it.")))
762 (define-public pinentry-gnome3
764 (inherit pinentry-tty)
765 (name "pinentry-gnome3")
770 ,@(package-inputs pinentry-tty)))
772 `(#:configure-flags '("--enable-pinentry-gnome3")))
774 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
775 that allows users to enter a passphrase when required by @code{gpg} or other
778 (define-public pinentry-qt
780 (inherit pinentry-tty)
784 ,@(package-inputs pinentry-tty)))
786 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
788 "Pinentry provides a console and a Qt GUI that allows users to enter a
789 passphrase when @code{gpg} is run and needs it.")))
791 (define-public pinentry
792 (package (inherit pinentry-gtk2)
795 (define-public paperkey
801 (uri (string-append "http://www.jabberwocky.com/"
802 "software/paperkey/paperkey-"
806 "1yybj8bj68v4lxwpn596b6ismh2fyixw5vlqqg26byrn4d9dfmsv"))))
807 (build-system gnu-build-system)
810 (modify-phases %standard-phases
811 (add-before 'check 'patch-check-scripts
813 (substitute* '("checks/roundtrip.sh"
814 "checks/roundtrip-raw.sh")
815 (("/bin/echo") "echo"))
817 (home-page "http://www.jabberwocky.com/software/paperkey/")
818 (synopsis "Backup OpenPGP keys to paper")
820 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
821 for printing with paper and ink, which have amazingly long retention
822 qualities. To reconstruct a secret key, you re-enter those
823 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
824 them to transform your existing public key into a secret key.")
825 (license license:gpl2+)))
833 (uri (string-append "mirror://gnupg/gpa/"
834 name "-" version ".tar.bz2"))
837 "09xphbi2456qynwqq5n0yh0zdmdi2ggrj3wk4hsyh5lrzlvcrff3"))))
838 (build-system gnu-build-system)
840 `(("pkg-config" ,pkg-config)))
844 ("libassuan" ,libassuan)
845 ("libgpg-error" ,libgpg-error)
847 (home-page "https://gnupg.org/software/gpa/")
848 (synopsis "Graphical user interface for GnuPG")
850 "GPA, the GNU Privacy Assistant, is a graphical user interface for
851 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
852 files, to verify signatures, and to manage the private and public keys.")
853 (license license:gpl3+)))
855 (define-public parcimonie
861 (uri (string-append "https://gaffer.ptitcanardnoir.org/"
862 "intrigeri/files/parcimonie/App-Parcimonie-"
866 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
867 (build-system perl-build-system)
869 `(("gnupg" ,gnupg-1) ; This is the version used by perl-gnupg-interface
870 ("perl-config-general" ,perl-config-general)
871 ("perl-clone" ,perl-clone)
872 ("perl-data" ,perl-data)
873 ("perl-exporter-tiny" ,perl-exporter-tiny)
874 ("perl-file-homedir" ,perl-file-homedir)
875 ("perl-file-sharedir" ,perl-file-sharedir)
876 ("perl-file-which" ,perl-file-which)
877 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
878 ("perl-gnupg-interface" ,perl-gnupg-interface)
879 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
880 ("perl-list-moreutils" ,perl-list-moreutils)
881 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
882 ("perl-lwp-online" ,perl-lwp-online)
883 ("perl-module-build" ,perl-module-build)
884 ("perl-module-pluggable-object" ,perl-module-pluggable)
885 ("perl-moo" ,perl-moo)
886 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
887 ("perl-moox-late" ,perl-moox-late)
888 ("perl-moox-options" ,perl-moox-options)
889 ("perl-namespace-clean" ,perl-namespace-clean)
890 ("perl-net-dbus" ,perl-net-dbus)
891 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
892 ("perl-path-tiny" ,perl-path-tiny)
893 ("perl-test-most" ,perl-test-most)
894 ("perl-test-trap" ,perl-test-trap)
895 ("perl-time-duration" ,perl-time-duration)
896 ("perl-time-duration-parse" ,perl-time-duration-parse)
897 ("perl-try-tiny" ,perl-try-tiny)
898 ("perl-type-tiny" ,perl-type-tiny)
899 ("perl-types-path-tiny" ,perl-types-path-tiny)
900 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
901 ("perl-xml-parser" ,perl-xml-parser)
902 ("perl-xml-twig" ,perl-xml-twig)
903 ("torsocks" ,torsocks)))
906 (modify-phases %standard-phases
907 ;; Needed for using gpg-connect-agent during tests.
908 (add-before 'check 'set-HOME
909 (lambda _ (setenv "HOME" "/tmp") #t))
910 (add-before 'install 'fix-references
911 (lambda* (#:key inputs outputs #:allow-other-keys)
912 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
914 ;; Skip check whether dependencies are in the PATH
915 (("defined which.*") "")
916 (("call\\('parcimonie-torified-gpg'\\)")
917 (string-append "call('" (assoc-ref outputs "out")
918 "/bin/parcimonie-torified-gpg')")))
919 (substitute* "bin/parcimonie-torified-gpg"
920 (("torsocks") (string-append (assoc-ref inputs "torsocks")
923 (add-after 'install 'wrap-program
924 (lambda* (#:key inputs outputs #:allow-other-keys)
925 (let* ((out (assoc-ref outputs "out"))
926 (perllib (string-append out "/lib/perl5/site_perl/"
927 ,(package-version perl))))
928 (wrap-program (string-append out "/bin/parcimonie")
930 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
932 (home-page "https://gaffer.ptitcanardnoir.org/intrigeri/code/parcimonie/")
933 (synopsis "Incrementally refreshes a GnuPG keyring")
934 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
935 that makes it hard to correlate the keyring content to an individual, and
936 makes it hard to locate an individual based on an identifying subset of her
937 keyring content. Parcimonie is a daemon that fetches one key at a time using
938 the Tor network, waits a bit, changes the Tor circuit being used, and starts
940 (license license:gpl1+)))
942 (define-public jetring
949 (uri (string-append "mirror://debian/pool/main/j/" name "/"
950 name "_" version ".tar.xz"))
953 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
954 (build-system gnu-build-system)
957 (modify-phases %standard-phases
958 (delete 'configure) ; no configure script
959 (add-before 'install 'hardlink-gnupg
960 (lambda* (#:key inputs #:allow-other-keys)
961 (let ((gpg (string-append (assoc-ref inputs "gnupg")
963 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
964 (("gpg -") (string-append gpg " -"))
965 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
968 (lambda* (#:key outputs #:allow-other-keys)
969 (let* ((out (assoc-ref outputs "out"))
970 (man (string-append out "/share/man")))
971 (for-each (lambda (file)
972 (install-file file (string-append out "/bin/")))
973 (find-files "." "jetring-[[:alpha:]]+$"))
974 (for-each (lambda (file)
975 (install-file file (string-append man "/man1/")))
976 (find-files "." ".*\\.1$"))
977 (install-file "jetring.7" (string-append man "/man7/"))
979 #:tests? #f)) ; no test phase
983 (home-page "https://joeyh.name/code/jetring/")
984 (synopsis "GnuPG keyring maintenance using changesets")
986 "Jetring is a collection of tools that allow for gpg keyrings to be
987 maintained using changesets. It was developed with the Debian keyring in mind,
988 and aims to solve the problem that a gpg keyring is a binary blob that's hard
989 for multiple people to collaboratively edit.
991 With jetring, changesets can be submitted, reviewed to see exactly what they
992 will do, applied, and used to build a keyring. The origin of every change made
993 to the keyring is available for auditing, and gpg signatures can be used for
994 integrity guarantees.")
995 (license license:gpl2+)))