1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015, 2018 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014, 2018 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
7 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
10 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
11 ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
12 ;;; Copyright © 2016 Mike Gerwitz <mtg@gnu.org>
13 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
14 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
16 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
17 ;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
18 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages gnupg)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages adns)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages curl)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages emacs)
44 #:use-module (gnu packages enlightenment)
45 #:use-module (gnu packages gettext)
46 #:use-module (gnu packages guile)
47 #:use-module (gnu packages openldap)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages perl-check)
50 #:use-module (gnu packages pth)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages python-xyz)
53 #:use-module (gnu packages qt)
54 #:use-module (gnu packages readline)
55 #:use-module (gnu packages compression)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages security-token)
62 #:use-module (gnu packages sqlite)
63 #:use-module (gnu packages swig)
64 #:use-module (gnu packages texinfo)
65 #:use-module (gnu packages tls)
66 #:use-module (gnu packages tor)
67 #:use-module (gnu packages web)
68 #:use-module (gnu packages xorg)
69 #:use-module (gnu packages xml)
70 #:use-module (guix packages)
71 #:use-module (guix download)
72 #:use-module (guix git-download)
73 #:use-module (guix build-system gnu)
74 #:use-module (guix build-system perl)
75 #:use-module (guix build-system python)
76 #:use-module (srfi srfi-1))
78 (define-public libgpg-error
85 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
89 "0z696dmhfxm2n6pmr8b857wwljq9h633yi99bhbn7h88f91rigds"))
90 (patches (search-patches "libgpg-error-gawk-compat.patch"))
91 ;; XXX: Remove this snippet with the gawk patch above. It avoids having
92 ;; to call autoreconf for the Makefile.am change to take effect.
93 (modules '((guix build utils)))
96 (substitute* "src/Makefile.in"
97 (("namespace=errnos") "pkg_namespace=errnos"))
99 (build-system gnu-build-system)
100 (home-page "https://gnupg.org")
101 (synopsis "Library of error values for GnuPG components")
103 "Libgpg-error is a small library that defines common error values
104 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
105 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
106 Daemon and possibly more in the future.")
107 (license license:lgpl2.0+)
108 (properties '((ftp-server . "ftp.gnupg.org")
109 (ftp-directory . "/gcrypt/libgpg-error")))))
111 (define-public libgcrypt
115 (replacement libgcrypt-1.8.5)
118 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
122 "09r27ywj9zplq6n9qw3mn7zmvf6y2jdmwx5d1kg8yqkj0qx18f7n"))))
123 (build-system gnu-build-system)
125 `(("libgpg-error-host" ,libgpg-error)))
127 ;; Needed here for the 'gpg-error' program.
128 `(("libgpg-error-native" ,libgpg-error)))
130 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
131 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
132 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
134 (list (string-append "--with-gpg-error-prefix="
135 (assoc-ref %build-inputs "libgpg-error-host")))))
136 (outputs '("out" "debug"))
137 (home-page "https://gnupg.org/")
138 (synopsis "Cryptographic function library")
140 "Libgcrypt is a general-purpose cryptographic library. It provides the
141 standard cryptographic building blocks such as symmetric ciphers, hash
142 algorithms, public key algorithms, large integer functions and random number
144 (license license:lgpl2.0+)
145 (properties '((ftp-server . "ftp.gnupg.org")
146 (ftp-directory . "/gcrypt/libgcrypt")))))
148 (define-public libgcrypt-1.8.5
154 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
158 "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))))
160 (define-public libassuan
167 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
171 "00p7cpvzf0q3qwcgg51r9d0vbab4qga2xi8wpk2fgd36710b1g4i"))))
172 (build-system gnu-build-system)
174 `(("libgpg-error" ,libgpg-error)
176 (home-page "https://gnupg.org")
178 "IPC library used by GnuPG and related software")
180 "Libassuan is a small library implementing the so-called Assuan
181 protocol. This protocol is used for IPC between most newer
182 GnuPG components. Both, server and client side functions are
184 (license license:lgpl2.0+)
185 (properties '((ftp-server . "ftp.gnupg.org")
186 (ftp-directory . "/gcrypt/libassuan")))))
188 (define-public libksba
196 "mirror://gnupg/libksba/libksba-"
200 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
201 (build-system gnu-build-system)
203 `(("libgpg-error" ,libgpg-error)))
205 `(("libgpg-error" ,libgpg-error)))
208 (list ,@(if (%current-target-system)
209 '("CC_FOR_BUILD=gcc")
211 (string-append "--with-gpg-error-prefix="
212 (assoc-ref %build-inputs "libgpg-error")))))
213 (home-page "https://www.gnupg.org")
214 (synopsis "CMS and X.509 access library")
216 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
217 as well as the CMS easily accessible by other applications. Both
218 specifications are building blocks of S/MIME and TLS.")
219 (license license:gpl3+)
220 (properties '((ftp-server . "ftp.gnupg.org")
221 (ftp-directory . "/gcrypt/libksba")))))
230 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
232 (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
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
244 (properties '((ftp-server . "ftp.gnupg.org")
245 (ftp-directory . "/gcrypt/npth")))))
253 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
257 "1h6yx6sdpz3lf9gdppgxqcf73baynr8gflmh43286fkgw3058994"))))
258 (build-system gnu-build-system)
260 `(("pkg-config" ,pkg-config)))
263 ("libassuan" ,libassuan)
264 ("libgcrypt" ,libgcrypt)
265 ("libgpg-error" ,libgpg-error)
268 ("openldap" ,openldap)
269 ("pcsc-lite" ,pcsc-lite)
270 ("readline" ,readline)
274 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
275 ;; executable in its installation directory in
276 ;; /gnu/store before it has been installed.
277 "--enable-gnupg-builddir-envvar"
278 "--enable-all-tests")
280 (modify-phases %standard-phases
281 (add-before 'configure 'patch-paths
282 (lambda* (#:key inputs #:allow-other-keys)
283 (substitute* "scd/scdaemon.c"
284 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
285 (string-append "\"" (assoc-ref inputs "pcsc-lite")
288 (add-after 'build 'patch-scheme-tests
290 (substitute* (find-files "tests" ".\\.scm$")
291 (("/usr/bin/env gpgscm")
292 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
294 (add-before 'build 'patch-test-paths
296 (substitute* '("tests/inittests"
297 "tests/pkits/inittests"
299 "tests/pkits/common.sh"
300 "tests/pkits/Makefile")
301 (("/bin/pwd") (which "pwd")))
302 (substitute* "common/t-exectool.c"
303 (("/bin/cat") (which "cat"))
304 (("/bin/true") (which "true"))
305 (("/bin/false") (which "false")))
307 (home-page "https://gnupg.org/")
308 (synopsis "GNU Privacy Guard")
310 "The GNU Privacy Guard is a complete implementation of the OpenPGP
311 standard. It is used to encrypt and sign data and communication. It
312 features powerful key management and the ability to access public key
313 servers. It includes several libraries: libassuan (IPC between GnuPG
314 components), libgpg-error (centralized GnuPG error values), and
315 libskba (working with X.509 certificates and CMS data).")
316 (license license:gpl3+)
317 (properties '((ftp-server . "ftp.gnupg.org")
318 (ftp-directory . "/gcrypt/gnupg")))))
320 (define-public gnupg-2.0
321 (package (inherit gnupg)
325 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
329 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
335 ("libassuan" ,libassuan)
336 ("libgcrypt" ,libgcrypt)
337 ("libgpg-error" ,libgpg-error)
340 ("openldap" ,openldap)
342 ("readline" ,readline)))
345 (modify-phases %standard-phases
346 (add-before 'configure 'patch-config-files
348 (substitute* "tests/openpgp/Makefile.in"
349 (("/bin/sh") (which "sh")))
351 (add-after 'install 'rename-v2-commands
352 (lambda* (#:key outputs #:allow-other-keys)
353 ;; Upstream suggests removing the trailing '2' from command names:
354 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
355 (let ((out (assoc-ref outputs "out")))
356 (with-directory-excursion (string-append out "/bin")
357 (rename-file "gpgv2" "gpgv")
358 (rename-file "gpg2" "gpg")
360 ;; Keep the old name around to ease transition.
361 (symlink "gpgv" "gpgv2")
362 (symlink "gpg" "gpg2")
364 (properties `((superseded . ,gnupg)))))
366 (define-public gnupg-1
367 (package (inherit gnupg)
371 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
375 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
381 ("readline" ,readline)
382 ("libgpg-error" ,libgpg-error)))
385 (modify-phases %standard-phases
386 (add-after 'unpack 'patch-check-sh
388 (substitute* "checks/Makefile.in"
389 (("/bin/sh") (which "sh")))
399 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
401 (base32 "0imyjfryvvjdbai454p70zcr95m94j9xnzywrlilqdw2fqi0pqy4"))))
402 (build-system gnu-build-system)
406 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
407 `(("libgpg-error" ,libgpg-error)))
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+)
423 (properties '((ftp-server . "ftp.gnupg.org")
424 (ftp-directory . "/gcrypt/gpgme")))))
426 (define-public qgpgme
432 (modify-phases %standard-phases
433 (add-before 'build 'chdir-and-symlink
434 (lambda* (#:key inputs #:allow-other-keys)
435 (let ((gpgme (assoc-ref inputs "gpgme")))
436 (symlink (string-append gpgme "/lib/libgpgmepp.la")
437 "lang/cpp/src/libgpgmepp.la")
438 (symlink (string-append gpgme "/lib/libgpgme.la")
443 `(("pkg-config" ,pkg-config)
444 ,@(package-native-inputs gpgme)))
448 ,@(package-inputs gpgme)))
449 (synopsis "Qt API bindings for gpgme")
450 (description "QGpgme provides a very high level Qt API around GpgMEpp.
452 QGpgME was originally developed as part of libkleo and incorporated into
453 gpgpme starting with version 1.7.")
454 (license license:gpl2+))) ;; Note: this differs from gpgme
456 (define-public guile-gcrypt
458 (name "guile-gcrypt")
460 (home-page "https://notabug.org/cwebber/guile-gcrypt")
464 (url (string-append home-page ".git"))
465 (commit (string-append "v" version))))
468 "0n232iyayc46f7hywmjw0jr7pbmmz5h4b04jskhkzz9gxz0ci99c"))
469 (file-name (string-append name "-" version "-checkout"))))
470 (build-system gnu-build-system)
472 `(("pkg-config" ,pkg-config)
473 ("autoconf" ,autoconf)
474 ("automake" ,automake)
475 ("texinfo" ,texinfo)))
477 `(("guile" ,guile-2.2)
478 ("libgcrypt" ,libgcrypt)))
479 (synopsis "Cryptography library for Guile using Libgcrypt")
481 "Guile-Gcrypt provides a Guile 2.x interface to a subset of the
482 GNU Libgcrypt crytographic library. It provides modules for cryptographic
483 hash functions, message authentication codes (MAC), public-key cryptography,
484 strong randomness, and more. It is implemented using the foreign function
485 interface (FFI) of Guile.")
486 (license license:gpl3+)))
488 (define-public guile2.0-gcrypt
489 (package (inherit guile-gcrypt)
490 (name "guile2.0-gcrypt")
492 `(("guile" ,guile-2.0)
493 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
495 (define-public guile3.0-gcrypt
497 (inherit guile-gcrypt)
498 (name "guile3.0-gcrypt")
500 `(("guile" ,guile-next)
501 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
503 (define-public python-gpg
509 (uri (pypi-uri "gpg" version))
512 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
513 (build-system python-build-system)
516 (modify-phases %standard-phases
517 (add-before 'build 'set-environment
519 (substitute* "setup.py"
520 (("cc") (which "gcc")))
522 #:tests? #f)) ; No test suite.
527 (home-page (package-home-page gpgme))
528 (synopsis "Python bindings for GPGME GnuPG cryptography library")
529 (description "This package provides Python bindings to the GPGME GnuPG
530 cryptographic library. It is developed in the GPGME source code, and then
531 distributed separately.")
532 (license license:lgpl2.1+)))
534 (define-public python2-gpg
535 (package-with-python2 python-gpg))
537 (define-public python-pygpgme
539 (name "python-pygpgme")
544 (uri (pypi-uri "pygpgme" version))
547 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
548 ;; Unfortunately, we have to disable some tests due to some gpg-agent
550 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
551 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
552 "python-pygpgme-fix-pinentry-tests.patch"))))
555 (modify-phases %standard-phases
556 (add-before 'build 'make-build
557 (lambda _ (invoke "make" "build")))
559 (lambda _ (invoke "make" "check"))))))
560 (build-system python-build-system)
562 `(("gnupg" ,gnupg-1)))
565 (home-page "https://launchpad.net/pygpgme")
566 (synopsis "Python module for working with OpenPGP messages")
568 "PyGPGME is a Python module that lets you sign, verify, encrypt and
569 decrypt messages using the OpenPGP format by making use of GPGME.")
570 (license license:lgpl2.1+)))
572 (define-public python2-pygpgme
573 (package-with-python2 python-pygpgme))
575 (define-public python-gnupg
577 (name "python-gnupg")
582 (uri (pypi-uri "python-gnupg" version))
585 "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
586 (build-system python-build-system)
589 (modify-phases %standard-phases
592 (substitute* "test_gnupg.py"
593 ;; Unsure why this test fails.
594 (("'test_search_keys'") "True")
595 (("def test_search_keys") "def disabled__search_keys"))
596 (setenv "USERNAME" "guixbuilder")
597 ;; The doctests are extremely slow and sometimes time out,
598 ;; so we disable them.
600 "test_gnupg.py" "--no-doctests"))))))
602 `(("gnupg" ,gnupg-1)))
603 (home-page "https://packages.python.org/python-gnupg/index.html")
604 (synopsis "Wrapper for the GNU Privacy Guard")
606 "This module allows easy access to GnuPG’s key management, encryption
607 and signature functionality from Python programs.")
608 (license license:bsd-3)))
610 (define-public python2-gnupg
611 (package-with-python2 python-gnupg))
613 (define-public perl-gnupg-interface
615 (name "perl-gnupg-interface")
619 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
620 "GnuPG-Interface-" version ".tar.gz"))
623 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
624 (build-system perl-build-system)
627 (modify-phases %standard-phases
628 ;; FIXME: This test fails for unknown reasons
629 (add-after 'unpack 'delete-broken-test
631 (delete-file "t/encrypt_symmetrically.t")
634 `(("gnupg" ,gnupg-1)))
636 `(("perl-moo" ,perl-moo)
637 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
638 ("perl-moox-late" ,perl-moox-late)))
641 ("perl-module-install" ,perl-module-install)))
642 (home-page "https://metacpan.org/release/GnuPG-Interface")
643 (synopsis "Perl interface to GnuPG")
644 (description "@code{GnuPG::Interface} and its associated modules are
645 designed to provide an object-oriented method for interacting with GnuPG,
646 being able to perform functions such as but not limited to encrypting,
647 signing, decryption, verification, and key-listing parsing.")
648 (license license:perl-license)))
657 "https://github.com/jaymzh/pius/releases/download/v"
658 version "/pius-" version ".tar.bz2"))
661 "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
662 (build-system python-build-system)
663 (inputs `(("perl" ,perl) ; for 'pius-party-worksheet'
665 ("python-six" ,python2-six)))
668 #:python ,python-2 ; uses the Python 2 'print' syntax
670 (modify-phases %standard-phases
672 'build 'set-gpg-file-name
673 (lambda* (#:key inputs outputs #:allow-other-keys)
674 (let* ((gpg (string-append (assoc-ref inputs "gpg")
676 (substitute* "libpius/constants.py"
677 (("/usr/bin/gpg2") gpg))
679 (synopsis "Programs to simplify GnuPG key signing")
681 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
682 parties. It is the main utility and makes it possible to quickly and easily
683 sign each UID on a set of PGP keys. It is designed to take the pain out of
684 the sign-all-the-keys part of PGP Keysigning Party while adding security
687 pius-keyring-mgr and pius-party-worksheet help organisers of
688 PGP keysigning parties.")
689 (license license:gpl2)
690 (home-page "https://www.phildev.net/pius/index.shtml")))
692 (define-public signing-party
694 (name "signing-party")
696 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
701 (commit (string-append "v" version))))
702 (file-name (git-file-name name version))
705 "0lq8nmwjmysry0n4jg6vb7bh0lagbyb9pa11ii3s41p1mhzchf2r"))))
706 (build-system gnu-build-system)
708 `(("autoconf" ,autoconf-wrapper)
709 ("automake" ,automake)))
710 (inputs `(("perl" ,perl)
711 ("perl-text-template" ,perl-text-template)
712 ("perl-mime-tools" ,perl-mime-tools)
713 ("perl-gnupg-interface" ,perl-gnupg-interface)
714 ("perl-net-idn-encode" ,perl-net-idn-encode)
717 `(#:tests? #f ; no test suite
719 (modify-phases %standard-phases
721 (lambda* (#:key outputs #:allow-other-keys)
722 (let ((out (assoc-ref outputs "out")))
723 (substitute* "keyanalyze/Makefile"
724 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
725 (substitute* "keyanalyze/Makefile"
726 (("\\./configure") (string-append "./configure --prefix=" out)))
727 (substitute* "gpgwrap/Makefile"
729 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
730 out "/bin/gpgwrap\n")))
731 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
732 "keylookup/Makefile" "sig2dot/Makefile"
733 "springgraph/Makefile")
735 (setenv "CONFIG_SHELL" (which "sh")))
738 (lambda* (#:key outputs #:allow-other-keys #:rest args)
739 (let ((out (assoc-ref outputs "out"))
740 (install (assoc-ref %standard-phases 'install)))
744 (copy-file (string-append dir "/" file)
745 (string-append out "/bin/" file)))
746 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
747 "gpglist" "gpg-mailkeys" "gpgparticipants")
748 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
749 "gpglist" "gpg-mailkeys" "gpgparticipants"))
752 (copy-file (string-append dir "/" file)
753 (string-append out "/share/man/man1/" file)))
754 '("caff" "caff" "caff" "gpgdir"
755 "gpg-key2ps" "gpglist" "gpg-mailkeys"
756 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
757 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
758 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
759 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
760 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
761 "process_keys.1" "pgpring.1" "keyanalyze.1")))
763 (add-after 'install 'wrap-programs
764 (lambda* (#:key outputs #:allow-other-keys)
765 (let* ((out (assoc-ref outputs "out")))
767 (string-append out "/bin/caff")
768 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
770 (synopsis "Collection of scripts for simplifying gnupg key signing")
772 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
773 including tools for signing keys, keyring analysis, and party preparation.
775 @item caff: CA - Fire and Forget signs and mails a key
776 @item pgp-clean: removes all non-self signatures from key
777 @item pgp-fixkey: removes broken packets from keys
778 @item gpg-mailkeys: simply mail out a signed key to its owner
779 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
780 @item gpgdir: recursive directory encryption tool
781 @item gpglist: show who signed which of your UIDs
782 @item gpgsigs: annotates list of GnuPG keys with already done signatures
783 @item gpgparticipants: create list of party participants for the organiser
784 @item gpgwrap: a passphrase wrapper
785 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
786 @item keylookup: ncurses wrapper around gpg --search
787 @item sig2dot: converts a list of GnuPG signatures to a .dot file
788 @item springgraph: creates a graph from a .dot file
790 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
791 ;; and caff and gpgsigs: bsd-3, see
792 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
793 (license license:gpl2)))
795 (define-public pinentry-tty
797 (name "pinentry-tty")
801 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
805 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
806 (build-system gnu-build-system)
808 `(#:configure-flags '("--enable-pinentry-tty")))
810 `(("ncurses" ,ncurses)
811 ("libassuan" ,libassuan)
812 ("libsecret" ,libsecret "out")))
814 `(("pkg-config" ,pkg-config)))
815 (home-page "https://gnupg.org/aegypten2/")
816 (synopsis "GnuPG's interface to passphrase input")
818 "Pinentry provides a console that allows users to enter a passphrase when
819 @code{gpg} is run and needs it.")
820 (license license:gpl2+)
821 (properties '((ftp-server . "ftp.gnupg.org")
822 (ftp-directory . "/gcrypt/pinentry")
823 (upstream-name . "pinentry")))))
825 (define-public pinentry-emacs
827 (inherit pinentry-tty)
828 (name "pinentry-emacs")
830 `(#:configure-flags '("--enable-pinentry-emacs")))
832 "Pinentry provides a console and an Emacs interface that allows users to
833 enter a passphrase when required by @code{gpg} or other software.")))
835 (define-public pinentry-gtk2
837 (inherit pinentry-tty)
838 (name "pinentry-gtk2")
842 ,@(package-inputs pinentry-tty)))
844 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
845 passphrase when @code{gpg} is run and needs it.")))
847 (define-public pinentry-gnome3
849 (inherit pinentry-tty)
850 (name "pinentry-gnome3")
855 ,@(package-inputs pinentry-tty)))
857 `(#:configure-flags '("--enable-pinentry-gnome3")))
859 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
860 that allows users to enter a passphrase when required by @code{gpg} or other
863 (define-public pinentry-qt
865 (inherit pinentry-tty)
869 ,@(package-inputs pinentry-tty)))
871 "Pinentry provides a console and a Qt GUI that allows users to enter a
872 passphrase when @code{gpg} is run and needs it.")))
874 (define-public pinentry-efl
876 (inherit pinentry-tty)
877 (name "pinentry-efl")
880 (inherit (package-source pinentry-tty))
881 (patches (search-patches "pinentry-efl.patch"))))
883 '(#:configure-flags '("--enable-pinentry-efl")
885 (modify-phases %standard-phases
888 (invoke "sh" "autogen.sh"))))))
890 `(("autoconf" ,autoconf)
891 ("automake" ,automake)
892 ("gettext" ,gettext-minimal)
893 ,@(package-native-inputs pinentry-tty)))
896 ,@(package-inputs pinentry-tty)))
898 "Pinentry provides a console and a graphical interface for the
899 @dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a
900 passphrase when @code{gpg} is run and needs it.")))
902 (define-public pinentry
903 (package (inherit pinentry-gtk2)
906 (define-public paperkey
912 (uri (string-append "https://www.jabberwocky.com/"
913 "software/paperkey/paperkey-"
917 "1xq5gni6gksjkd5avg0zpd73vsr97appksfx0gx2m38s4w9zsid2"))))
918 (build-system gnu-build-system)
921 (modify-phases %standard-phases
922 (add-before 'check 'patch-check-scripts
924 (substitute* '("checks/roundtrip.sh"
925 "checks/roundtrip-raw.sh")
926 (("/bin/echo") "echo"))
928 (home-page "https://www.jabberwocky.com/software/paperkey/")
929 (synopsis "Backup OpenPGP keys to paper")
931 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
932 for printing with paper and ink, which have amazingly long retention
933 qualities. To reconstruct a secret key, you re-enter those
934 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
935 them to transform your existing public key into a secret key.")
936 (license license:gpl2+)))
938 (define-public pgpdump
945 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
948 (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
949 (build-system gnu-build-system)
951 `(#:tests? #f ; no make check
952 #:configure-flags (list "--prefix=/")
953 #:make-flags (list "CC=gcc"
954 (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
957 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
958 (synopsis "PGP packet visualizer")
959 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
962 The output of this command is similar to GnuPG's list packets command,
963 however, pgpdump produces more detailed and easier to understand output.")
964 (license license:bsd-3)))
972 (uri (string-append "mirror://gnupg/gpa/"
973 name "-" version ".tar.bz2"))
976 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
977 (build-system gnu-build-system)
979 `(("pkg-config" ,pkg-config)))
983 ("libassuan" ,libassuan)
984 ("libgpg-error" ,libgpg-error)
986 (home-page "https://gnupg.org/software/gpa/")
987 (synopsis "Graphical user interface for GnuPG")
989 "GPA, the GNU Privacy Assistant, is a graphical user interface for
990 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
991 files, to verify signatures, and to manage the private and public keys.")
992 (license license:gpl3+)
993 (properties '((ftp-server . "ftp.gnupg.org")
994 (ftp-directory . "/gcrypt/gpa")))))
996 (define-public parcimonie
1002 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1003 "parcimonie/App-Parcimonie-"
1007 "14pvapvzrxh1yh8zgcj1llmc2dd8g1fgzskxlja21gmw8c88aqdk"))))
1008 (build-system perl-build-system)
1011 ("perl-config-general" ,perl-config-general)
1012 ("perl-clone" ,perl-clone)
1013 ("perl-data" ,perl-data)
1014 ("perl-exporter-tiny" ,perl-exporter-tiny)
1015 ("perl-file-homedir" ,perl-file-homedir)
1016 ("perl-file-sharedir" ,perl-file-sharedir)
1017 ("perl-file-which" ,perl-file-which)
1018 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
1019 ("perl-gnupg-interface" ,perl-gnupg-interface)
1020 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1021 ("perl-list-moreutils" ,perl-list-moreutils)
1022 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
1023 ("perl-lwp-online" ,perl-lwp-online)
1024 ("perl-module-build" ,perl-module-build)
1025 ("perl-module-pluggable-object" ,perl-module-pluggable)
1026 ("perl-moo" ,perl-moo)
1027 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
1028 ("perl-moox-late" ,perl-moox-late)
1029 ("perl-moox-options" ,perl-moox-options)
1030 ("perl-moox-strictconstructor" ,perl-moox-strictconstructor)
1031 ("perl-namespace-clean" ,perl-namespace-clean)
1032 ("perl-net-dbus" ,perl-net-dbus)
1033 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
1034 ("perl-path-tiny" ,perl-path-tiny)
1035 ("perl-strictures" ,perl-strictures-2)
1036 ("perl-test-most" ,perl-test-most)
1037 ("perl-test-trap" ,perl-test-trap)
1038 ("perl-time-duration" ,perl-time-duration)
1039 ("perl-time-duration-parse" ,perl-time-duration-parse)
1040 ("perl-try-tiny" ,perl-try-tiny)
1041 ("perl-type-tiny" ,perl-type-tiny)
1042 ("perl-types-path-tiny" ,perl-types-path-tiny)
1043 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1044 ("perl-xml-parser" ,perl-xml-parser)
1045 ("perl-xml-twig" ,perl-xml-twig)
1046 ("torsocks" ,torsocks)))
1048 `(("xorg-server" ,xorg-server-for-tests)))
1051 (modify-phases %standard-phases
1052 ;; Needed for using gpg-connect-agent during tests.
1053 (add-before 'check 'prepare-for-tests
1054 (lambda* (#:key inputs #:allow-other-keys)
1055 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1056 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1057 (setenv "DISPLAY" ":1")
1058 (setenv "HOME" "/tmp")
1059 ;; These tests are known to fail
1060 (delete-file "t/32-keyserver_defined_on_command_line.t")
1061 (delete-file "t/33-checkGpgHasDefinedKeyserver.t")
1062 ;; The applet is deprecated upstream.
1063 (delete-file "t/00-load_all.t")
1065 (add-before 'install 'fix-references
1066 (lambda* (#:key inputs outputs #:allow-other-keys)
1067 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
1068 ;; Skip check whether dependencies are in the PATH
1069 (("defined which.*") ""))
1071 (add-after 'install 'wrap-program
1072 (lambda* (#:key inputs outputs #:allow-other-keys)
1073 (let* ((out (assoc-ref outputs "out"))
1074 (perllib (string-append out "/lib/perl5/site_perl/"
1075 ,(package-version perl))))
1076 (wrap-program (string-append out "/bin/parcimonie")
1078 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1080 (home-page "https://gaffer.boum.org/intrigeri/code/parcimonie/")
1081 (synopsis "Incrementally refreshes a GnuPG keyring")
1082 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1083 that makes it hard to correlate the keyring content to an individual, and
1084 makes it hard to locate an individual based on an identifying subset of her
1085 keyring content. Parcimonie is a daemon that fetches one key at a time using
1086 the Tor network, waits a bit, changes the Tor circuit being used, and starts
1088 (license license:gpl1+)))
1090 (define-public jetring
1097 (uri (string-append "mirror://debian/pool/main/j/" name "/"
1098 name "_" version ".tar.xz"))
1101 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
1102 (build-system gnu-build-system)
1105 (modify-phases %standard-phases
1106 (delete 'configure) ; no configure script
1107 (add-before 'install 'hardlink-gnupg
1108 (lambda* (#:key inputs #:allow-other-keys)
1109 (let ((gpg (string-append (assoc-ref inputs "gnupg")
1111 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1112 (("gpg -") (string-append gpg " -"))
1113 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1116 (lambda* (#:key outputs #:allow-other-keys)
1117 (let* ((out (assoc-ref outputs "out"))
1118 (man (string-append out "/share/man")))
1119 (for-each (lambda (file)
1120 (install-file file (string-append out "/bin/")))
1121 (find-files "." "jetring-[[:alpha:]]+$"))
1122 (for-each (lambda (file)
1123 (install-file file (string-append man "/man1/")))
1124 (find-files "." ".*\\.1$"))
1125 (install-file "jetring.7" (string-append man "/man7/"))
1127 #:tests? #f)) ; no test phase
1131 (home-page "https://joeyh.name/code/jetring/")
1132 (synopsis "GnuPG keyring maintenance using changesets")
1134 "Jetring is a collection of tools that allow for gpg keyrings to be
1135 maintained using changesets. It was developed with the Debian keyring in mind,
1136 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1137 for multiple people to collaboratively edit.
1139 With jetring, changesets can be submitted, reviewed to see exactly what they
1140 will do, applied, and used to build a keyring. The origin of every change made
1141 to the keyring is available for auditing, and gpg signatures can be used for
1142 integrity guarantees.")
1143 (license license:gpl2+)))