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 xml)
69 #:use-module (guix packages)
70 #:use-module (guix download)
71 #:use-module (guix git-download)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system perl)
74 #:use-module (guix build-system python)
75 #:use-module (srfi srfi-1))
77 (define-public libgpg-error
84 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
88 "0z696dmhfxm2n6pmr8b857wwljq9h633yi99bhbn7h88f91rigds"))
89 (patches (search-patches "libgpg-error-gawk-compat.patch"))
90 ;; XXX: Remove this snippet with the gawk patch above. It avoids having
91 ;; to call autoreconf for the Makefile.am change to take effect.
92 (modules '((guix build utils)))
95 (substitute* "src/Makefile.in"
96 (("namespace=errnos") "pkg_namespace=errnos"))
98 (build-system gnu-build-system)
99 (home-page "https://gnupg.org")
100 (synopsis "Library of error values for GnuPG components")
102 "Libgpg-error is a small library that defines common error values
103 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
104 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
105 Daemon and possibly more in the future.")
106 (license license:lgpl2.0+)
107 (properties '((ftp-server . "ftp.gnupg.org")
108 (ftp-directory . "/gcrypt/libgpg-error")))))
110 (define-public libgcrypt
114 (replacement libgcrypt-1.8.5)
117 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
121 "09r27ywj9zplq6n9qw3mn7zmvf6y2jdmwx5d1kg8yqkj0qx18f7n"))))
122 (build-system gnu-build-system)
124 `(("libgpg-error-host" ,libgpg-error)))
126 ;; Needed here for the 'gpg-error' program.
127 `(("libgpg-error-native" ,libgpg-error)))
129 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
130 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
131 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
133 (list (string-append "--with-gpg-error-prefix="
134 (assoc-ref %build-inputs "libgpg-error-host")))))
135 (outputs '("out" "debug"))
136 (home-page "https://gnupg.org/")
137 (synopsis "Cryptographic function library")
139 "Libgcrypt is a general-purpose cryptographic library. It provides the
140 standard cryptographic building blocks such as symmetric ciphers, hash
141 algorithms, public key algorithms, large integer functions and random number
143 (license license:lgpl2.0+)
144 (properties '((ftp-server . "ftp.gnupg.org")
145 (ftp-directory . "/gcrypt/libgcrypt")))))
147 (define-public libgcrypt-1.8.5
153 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
157 "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))))
159 (define-public libassuan
166 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
170 "00p7cpvzf0q3qwcgg51r9d0vbab4qga2xi8wpk2fgd36710b1g4i"))))
171 (build-system gnu-build-system)
173 `(("libgpg-error" ,libgpg-error)
175 (home-page "https://gnupg.org")
177 "IPC library used by GnuPG and related software")
179 "Libassuan is a small library implementing the so-called Assuan
180 protocol. This protocol is used for IPC between most newer
181 GnuPG components. Both, server and client side functions are
183 (license license:lgpl2.0+)
184 (properties '((ftp-server . "ftp.gnupg.org")
185 (ftp-directory . "/gcrypt/libassuan")))))
187 (define-public libksba
195 "mirror://gnupg/libksba/libksba-"
199 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
200 (build-system gnu-build-system)
202 `(("libgpg-error" ,libgpg-error)))
204 `(("libgpg-error" ,libgpg-error)))
207 (list ,@(if (%current-target-system)
208 '("CC_FOR_BUILD=gcc")
210 (string-append "--with-gpg-error-prefix="
211 (assoc-ref %build-inputs "libgpg-error")))))
212 (home-page "https://www.gnupg.org")
213 (synopsis "CMS and X.509 access library")
215 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
216 as well as the CMS easily accessible by other applications. Both
217 specifications are building blocks of S/MIME and TLS.")
218 (license license:gpl3+)
219 (properties '((ftp-server . "ftp.gnupg.org")
220 (ftp-directory . "/gcrypt/libksba")))))
229 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
231 (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
232 (build-system gnu-build-system)
233 (home-page "https://www.gnupg.org")
234 (synopsis "Non-preemptive thread library")
236 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
237 threads implementation.
239 In contrast to GNU Pth is is based on the system's standard threads
240 implementation. This allows the use of libraries which are not
241 compatible to GNU Pth.")
242 (license (list license:lgpl3+ license:gpl2+)) ; dual license
243 (properties '((ftp-server . "ftp.gnupg.org")
244 (ftp-directory . "/gcrypt/npth")))))
252 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
256 "056mgy09lvsi03531a437qj58la1j2x1y1scvfi53diris3658mg"))))
257 (build-system gnu-build-system)
259 `(("pkg-config" ,pkg-config)))
262 ("libassuan" ,libassuan)
263 ("libgcrypt" ,libgcrypt)
264 ("libgpg-error" ,libgpg-error)
267 ("openldap" ,openldap)
268 ("pcsc-lite" ,pcsc-lite)
269 ("readline" ,readline)
273 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
274 ;; executable in its installation directory in
275 ;; /gnu/store before it has been installed.
276 "--enable-gnupg-builddir-envvar"
277 "--enable-all-tests")
279 (modify-phases %standard-phases
280 (add-before 'configure 'patch-paths
281 (lambda* (#:key inputs #:allow-other-keys)
282 (substitute* "scd/scdaemon.c"
283 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
284 (string-append "\"" (assoc-ref inputs "pcsc-lite")
287 (add-after 'build 'patch-scheme-tests
289 (substitute* (find-files "tests" ".\\.scm$")
290 (("/usr/bin/env gpgscm")
291 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
293 (add-before 'build 'patch-test-paths
295 (substitute* '("tests/inittests"
296 "tests/pkits/inittests"
298 "tests/pkits/common.sh"
299 "tests/pkits/Makefile")
300 (("/bin/pwd") (which "pwd")))
301 (substitute* "common/t-exectool.c"
302 (("/bin/cat") (which "cat"))
303 (("/bin/true") (which "true"))
304 (("/bin/false") (which "false")))
306 (home-page "https://gnupg.org/")
307 (synopsis "GNU Privacy Guard")
309 "The GNU Privacy Guard is a complete implementation of the OpenPGP
310 standard. It is used to encrypt and sign data and communication. It
311 features powerful key management and the ability to access public key
312 servers. It includes several libraries: libassuan (IPC between GnuPG
313 components), libgpg-error (centralized GnuPG error values), and
314 libskba (working with X.509 certificates and CMS data).")
315 (license license:gpl3+)
316 (properties '((ftp-server . "ftp.gnupg.org")
317 (ftp-directory . "/gcrypt/gnupg")))))
319 (define-public gnupg-2.0
320 (package (inherit gnupg)
324 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
328 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
334 ("libassuan" ,libassuan)
335 ("libgcrypt" ,libgcrypt)
336 ("libgpg-error" ,libgpg-error)
339 ("openldap" ,openldap)
341 ("readline" ,readline)))
344 (modify-phases %standard-phases
345 (add-before 'configure 'patch-config-files
347 (substitute* "tests/openpgp/Makefile.in"
348 (("/bin/sh") (which "sh")))
350 (add-after 'install 'rename-v2-commands
351 (lambda* (#:key outputs #:allow-other-keys)
352 ;; Upstream suggests removing the trailing '2' from command names:
353 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
354 (let ((out (assoc-ref outputs "out")))
355 (with-directory-excursion (string-append out "/bin")
356 (rename-file "gpgv2" "gpgv")
357 (rename-file "gpg2" "gpg")
359 ;; Keep the old name around to ease transition.
360 (symlink "gpgv" "gpgv2")
361 (symlink "gpg" "gpg2")
363 (properties `((superseded . ,gnupg)))))
365 (define-public gnupg-1
366 (package (inherit gnupg)
370 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
374 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
380 ("readline" ,readline)
381 ("libgpg-error" ,libgpg-error)))
384 (modify-phases %standard-phases
385 (add-after 'unpack 'patch-check-sh
387 (substitute* "checks/Makefile.in"
388 (("/bin/sh") (which "sh")))
398 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
400 (base32 "0imyjfryvvjdbai454p70zcr95m94j9xnzywrlilqdw2fqi0pqy4"))))
401 (build-system gnu-build-system)
405 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
406 `(("libgpg-error" ,libgpg-error)))
408 `(("libassuan" ,libassuan)))
409 (home-page "https://www.gnupg.org/related_software/gpgme/")
410 (synopsis "Library providing simplified access to GnuPG functionality")
412 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
413 easier for applications. It provides a High-Level Crypto API for encryption,
414 decryption, signing, signature verification and key management. Currently
415 it uses GnuPG as its backend but the API isn't restricted to this engine.
417 Because the direct use of GnuPG from an application can be a complicated
418 programming task, it is suggested that all software should try to use GPGME
419 instead. This way bug fixes or improvements can be done at a central place
420 and every application benefits from this.")
421 (license license:lgpl2.1+)
422 (properties '((ftp-server . "ftp.gnupg.org")
423 (ftp-directory . "/gcrypt/gpgme")))))
425 (define-public qgpgme
431 (modify-phases %standard-phases
432 (add-before 'build 'chdir-and-symlink
433 (lambda* (#:key inputs #:allow-other-keys)
434 (let ((gpgme (assoc-ref inputs "gpgme")))
435 (symlink (string-append gpgme "/lib/libgpgmepp.la")
436 "lang/cpp/src/libgpgmepp.la")
437 (symlink (string-append gpgme "/lib/libgpgme.la")
442 `(("pkg-config" ,pkg-config)
443 ,@(package-native-inputs gpgme)))
447 ,@(package-inputs gpgme)))
448 (synopsis "Qt API bindings for gpgme")
449 (description "QGpgme provides a very high level Qt API around GpgMEpp.
451 QGpgME was originally developed as part of libkleo and incorporated into
452 gpgpme starting with version 1.7.")
453 (license license:gpl2+))) ;; Note: this differs from gpgme
455 (define-public guile-gcrypt
457 (name "guile-gcrypt")
459 (home-page "https://notabug.org/cwebber/guile-gcrypt")
463 (url (string-append home-page ".git"))
464 (commit (string-append "v" version))))
467 "1mhc5m4xygkfj7x18f8apiqpfdn9mrql0am5sk13cf5xn8x1r63z"))
468 (file-name (string-append name "-" version "-checkout"))))
469 (build-system gnu-build-system)
471 `(("pkg-config" ,pkg-config)
472 ("autoconf" ,autoconf)
473 ("automake" ,automake)
474 ("texinfo" ,texinfo)))
476 `(("guile" ,guile-2.2)
477 ("libgcrypt" ,libgcrypt)))
478 (synopsis "Cryptography library for Guile using Libgcrypt")
480 "Guile-Gcrypt provides a Guile 2.x interface to a subset of the
481 GNU Libgcrypt crytographic library. It provides modules for cryptographic
482 hash functions, message authentication codes (MAC), public-key cryptography,
483 strong randomness, and more. It is implemented using the foreign function
484 interface (FFI) of Guile.")
485 (license license:gpl3+)))
487 (define-public guile2.0-gcrypt
488 (package (inherit guile-gcrypt)
489 (name "guile2.0-gcrypt")
491 `(("guile" ,guile-2.0)
492 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
494 (define-public guile3.0-gcrypt
496 (inherit guile-gcrypt)
497 (name "guile3.0-gcrypt")
499 `(("guile" ,guile-next)
500 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
502 (define-public python-gpg
508 (uri (pypi-uri "gpg" version))
511 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
512 (build-system python-build-system)
515 (modify-phases %standard-phases
516 (add-before 'build 'set-environment
518 (substitute* "setup.py"
519 (("cc") (which "gcc")))
521 #:tests? #f)) ; No test suite.
526 (home-page (package-home-page gpgme))
527 (synopsis "Python bindings for GPGME GnuPG cryptography library")
528 (description "This package provides Python bindings to the GPGME GnuPG
529 cryptographic library. It is developed in the GPGME source code, and then
530 distributed separately.")
531 (license license:lgpl2.1+)))
533 (define-public python2-gpg
534 (package-with-python2 python-gpg))
536 (define-public python-pygpgme
538 (name "python-pygpgme")
543 (uri (pypi-uri "pygpgme" version))
546 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
547 ;; Unfortunately, we have to disable some tests due to some gpg-agent
549 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
550 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
551 "python-pygpgme-fix-pinentry-tests.patch"))))
554 (modify-phases %standard-phases
555 (add-before 'build 'make-build
556 (lambda _ (invoke "make" "build")))
558 (lambda _ (invoke "make" "check"))))))
559 (build-system python-build-system)
561 `(("gnupg" ,gnupg-1)))
564 (home-page "https://launchpad.net/pygpgme")
565 (synopsis "Python module for working with OpenPGP messages")
567 "PyGPGME is a Python module that lets you sign, verify, encrypt and
568 decrypt messages using the OpenPGP format by making use of GPGME.")
569 (license license:lgpl2.1+)))
571 (define-public python2-pygpgme
572 (package-with-python2 python-pygpgme))
574 (define-public python-gnupg
576 (name "python-gnupg")
581 (uri (pypi-uri "python-gnupg" version))
584 "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
585 (build-system python-build-system)
588 (modify-phases %standard-phases
591 (substitute* "test_gnupg.py"
592 ;; Unsure why this test fails.
593 (("'test_search_keys'") "True")
594 (("def test_search_keys") "def disabled__search_keys"))
595 (setenv "USERNAME" "guixbuilder")
596 ;; The doctests are extremely slow and sometimes time out,
597 ;; so we disable them.
599 "test_gnupg.py" "--no-doctests"))))))
601 `(("gnupg" ,gnupg-1)))
602 (home-page "https://packages.python.org/python-gnupg/index.html")
603 (synopsis "Wrapper for the GNU Privacy Guard")
605 "This module allows easy access to GnuPG’s key management, encryption
606 and signature functionality from Python programs.")
607 (license license:bsd-3)))
609 (define-public python2-gnupg
610 (package-with-python2 python-gnupg))
612 (define-public perl-gnupg-interface
614 (name "perl-gnupg-interface")
618 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
619 "GnuPG-Interface-" version ".tar.gz"))
622 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
623 (build-system perl-build-system)
626 (modify-phases %standard-phases
627 ;; FIXME: This test fails for unknown reasons
628 (add-after 'unpack 'delete-broken-test
630 (delete-file "t/encrypt_symmetrically.t")
633 `(("gnupg" ,gnupg-1)))
635 `(("perl-moo" ,perl-moo)
636 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
637 ("perl-moox-late" ,perl-moox-late)))
640 ("perl-module-install" ,perl-module-install)))
641 (home-page "https://metacpan.org/release/GnuPG-Interface")
642 (synopsis "Perl interface to GnuPG")
643 (description "@code{GnuPG::Interface} and its associated modules are
644 designed to provide an object-oriented method for interacting with GnuPG,
645 being able to perform functions such as but not limited to encrypting,
646 signing, decryption, verification, and key-listing parsing.")
647 (license license:perl-license)))
656 "https://github.com/jaymzh/pius/releases/download/v"
657 version "/pius-" version ".tar.bz2"))
660 "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
661 (build-system python-build-system)
662 (inputs `(("perl" ,perl) ; for 'pius-party-worksheet'
664 ("python-six" ,python2-six)))
667 #:python ,python-2 ; uses the Python 2 'print' syntax
669 (modify-phases %standard-phases
671 'build 'set-gpg-file-name
672 (lambda* (#:key inputs outputs #:allow-other-keys)
673 (let* ((gpg (string-append (assoc-ref inputs "gpg")
675 (substitute* "libpius/constants.py"
676 (("/usr/bin/gpg2") gpg))
678 (synopsis "Programs to simplify GnuPG key signing")
680 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
681 parties. It is the main utility and makes it possible to quickly and easily
682 sign each UID on a set of PGP keys. It is designed to take the pain out of
683 the sign-all-the-keys part of PGP Keysigning Party while adding security
686 pius-keyring-mgr and pius-party-worksheet help organisers of
687 PGP keysigning parties.")
688 (license license:gpl2)
689 (home-page "https://www.phildev.net/pius/index.shtml")))
691 (define-public signing-party
693 (name "signing-party")
695 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
700 (commit (string-append "v" version))))
701 (file-name (git-file-name name version))
704 "0lq8nmwjmysry0n4jg6vb7bh0lagbyb9pa11ii3s41p1mhzchf2r"))))
705 (build-system gnu-build-system)
707 `(("autoconf" ,autoconf-wrapper)
708 ("automake" ,automake)))
709 (inputs `(("perl" ,perl)
710 ("perl-text-template" ,perl-text-template)
711 ("perl-mime-tools" ,perl-mime-tools)
712 ("perl-gnupg-interface" ,perl-gnupg-interface)
713 ("perl-net-idn-encode" ,perl-net-idn-encode)
716 `(#:tests? #f ; no test suite
718 (modify-phases %standard-phases
720 (lambda* (#:key outputs #:allow-other-keys)
721 (let ((out (assoc-ref outputs "out")))
722 (substitute* "keyanalyze/Makefile"
723 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
724 (substitute* "keyanalyze/Makefile"
725 (("\\./configure") (string-append "./configure --prefix=" out)))
726 (substitute* "gpgwrap/Makefile"
728 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
729 out "/bin/gpgwrap\n")))
730 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
731 "keylookup/Makefile" "sig2dot/Makefile"
732 "springgraph/Makefile")
734 (setenv "CONFIG_SHELL" (which "sh")))
737 (lambda* (#:key outputs #:allow-other-keys #:rest args)
738 (let ((out (assoc-ref outputs "out"))
739 (install (assoc-ref %standard-phases 'install)))
743 (copy-file (string-append dir "/" file)
744 (string-append out "/bin/" file)))
745 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
746 "gpglist" "gpg-mailkeys" "gpgparticipants")
747 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
748 "gpglist" "gpg-mailkeys" "gpgparticipants"))
751 (copy-file (string-append dir "/" file)
752 (string-append out "/share/man/man1/" file)))
753 '("caff" "caff" "caff" "gpgdir"
754 "gpg-key2ps" "gpglist" "gpg-mailkeys"
755 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
756 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
757 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
758 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
759 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
760 "process_keys.1" "pgpring.1" "keyanalyze.1")))
762 (add-after 'install 'wrap-programs
763 (lambda* (#:key outputs #:allow-other-keys)
764 (let* ((out (assoc-ref outputs "out")))
766 (string-append out "/bin/caff")
767 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
769 (synopsis "Collection of scripts for simplifying gnupg key signing")
771 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
772 including tools for signing keys, keyring analysis, and party preparation.
774 @item caff: CA - Fire and Forget signs and mails a key
775 @item pgp-clean: removes all non-self signatures from key
776 @item pgp-fixkey: removes broken packets from keys
777 @item gpg-mailkeys: simply mail out a signed key to its owner
778 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
779 @item gpgdir: recursive directory encryption tool
780 @item gpglist: show who signed which of your UIDs
781 @item gpgsigs: annotates list of GnuPG keys with already done signatures
782 @item gpgparticipants: create list of party participants for the organiser
783 @item gpgwrap: a passphrase wrapper
784 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
785 @item keylookup: ncurses wrapper around gpg --search
786 @item sig2dot: converts a list of GnuPG signatures to a .dot file
787 @item springgraph: creates a graph from a .dot file
789 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
790 ;; and caff and gpgsigs: bsd-3, see
791 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
792 (license license:gpl2)))
794 (define-public pinentry-tty
796 (name "pinentry-tty")
800 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
804 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
805 (build-system gnu-build-system)
807 `(#:configure-flags '("--enable-pinentry-tty")))
809 `(("ncurses" ,ncurses)
810 ("libassuan" ,libassuan)
811 ("libsecret" ,libsecret "out")))
813 `(("pkg-config" ,pkg-config)))
814 (home-page "https://gnupg.org/aegypten2/")
815 (synopsis "GnuPG's interface to passphrase input")
817 "Pinentry provides a console that allows users to enter a passphrase when
818 @code{gpg} is run and needs it.")
819 (license license:gpl2+)
820 (properties '((ftp-server . "ftp.gnupg.org")
821 (ftp-directory . "/gcrypt/pinentry")
822 (upstream-name . "pinentry")))))
824 (define-public pinentry-emacs
826 (inherit pinentry-tty)
827 (name "pinentry-emacs")
829 `(#:configure-flags '("--enable-pinentry-emacs")))
831 "Pinentry provides a console and an Emacs interface that allows users to
832 enter a passphrase when required by @code{gpg} or other software.")))
834 (define-public pinentry-gtk2
836 (inherit pinentry-tty)
837 (name "pinentry-gtk2")
841 ,@(package-inputs pinentry-tty)))
843 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
844 passphrase when @code{gpg} is run and needs it.")))
846 (define-public pinentry-gnome3
848 (inherit pinentry-tty)
849 (name "pinentry-gnome3")
854 ,@(package-inputs pinentry-tty)))
856 `(#:configure-flags '("--enable-pinentry-gnome3")))
858 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
859 that allows users to enter a passphrase when required by @code{gpg} or other
862 (define-public pinentry-qt
864 (inherit pinentry-tty)
868 ,@(package-inputs pinentry-tty)))
870 "Pinentry provides a console and a Qt GUI that allows users to enter a
871 passphrase when @code{gpg} is run and needs it.")))
873 (define-public pinentry-efl
875 (inherit pinentry-tty)
876 (name "pinentry-efl")
879 (inherit (package-source pinentry-tty))
880 (patches (search-patches "pinentry-efl.patch"))))
882 '(#:configure-flags '("--enable-pinentry-efl")
884 (modify-phases %standard-phases
887 (invoke "sh" "autogen.sh"))))))
889 `(("autoconf" ,autoconf)
890 ("automake" ,automake)
891 ("gettext" ,gettext-minimal)
892 ,@(package-native-inputs pinentry-tty)))
895 ,@(package-inputs pinentry-tty)))
897 "Pinentry provides a console and a graphical interface for the
898 @dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a
899 passphrase when @code{gpg} is run and needs it.")))
901 (define-public pinentry
902 (package (inherit pinentry-gtk2)
905 (define-public paperkey
911 (uri (string-append "http://www.jabberwocky.com/"
912 "software/paperkey/paperkey-"
916 "1prd2jaf4zjad3xhv160hmi5n408ssljfg7iz90jxs9w111pjwy4"))))
917 (build-system gnu-build-system)
920 (modify-phases %standard-phases
921 (add-before 'check 'patch-check-scripts
923 (substitute* '("checks/roundtrip.sh"
924 "checks/roundtrip-raw.sh")
925 (("/bin/echo") "echo"))
927 (home-page "http://www.jabberwocky.com/software/paperkey/")
928 (synopsis "Backup OpenPGP keys to paper")
930 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
931 for printing with paper and ink, which have amazingly long retention
932 qualities. To reconstruct a secret key, you re-enter those
933 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
934 them to transform your existing public key into a secret key.")
935 (license license:gpl2+)))
937 (define-public pgpdump
944 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
947 (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
948 (build-system gnu-build-system)
950 `(#:tests? #f ; no make check
951 #:configure-flags (list "--prefix=/")
952 #:make-flags (list "CC=gcc"
953 (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
956 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
957 (synopsis "PGP packet visualizer")
958 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
961 The output of this command is similar to GnuPG's list packets command,
962 however, pgpdump produces more detailed and easier to understand output.")
963 (license license:bsd-3)))
971 (uri (string-append "mirror://gnupg/gpa/"
972 name "-" version ".tar.bz2"))
975 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
976 (build-system gnu-build-system)
978 `(("pkg-config" ,pkg-config)))
982 ("libassuan" ,libassuan)
983 ("libgpg-error" ,libgpg-error)
985 (home-page "https://gnupg.org/software/gpa/")
986 (synopsis "Graphical user interface for GnuPG")
988 "GPA, the GNU Privacy Assistant, is a graphical user interface for
989 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
990 files, to verify signatures, and to manage the private and public keys.")
991 (license license:gpl3+)
992 (properties '((ftp-server . "ftp.gnupg.org")
993 (ftp-directory . "/gcrypt/gpa")))))
995 (define-public parcimonie
1001 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1002 "parcimonie/App-Parcimonie-"
1006 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
1007 (build-system perl-build-system)
1009 `(("gnupg" ,gnupg-1) ; This is the version used by perl-gnupg-interface
1010 ("perl-config-general" ,perl-config-general)
1011 ("perl-clone" ,perl-clone)
1012 ("perl-data" ,perl-data)
1013 ("perl-exporter-tiny" ,perl-exporter-tiny)
1014 ("perl-file-homedir" ,perl-file-homedir)
1015 ("perl-file-sharedir" ,perl-file-sharedir)
1016 ("perl-file-which" ,perl-file-which)
1017 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
1018 ("perl-gnupg-interface" ,perl-gnupg-interface)
1019 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1020 ("perl-list-moreutils" ,perl-list-moreutils)
1021 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
1022 ("perl-lwp-online" ,perl-lwp-online)
1023 ("perl-module-build" ,perl-module-build)
1024 ("perl-module-pluggable-object" ,perl-module-pluggable)
1025 ("perl-moo" ,perl-moo)
1026 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
1027 ("perl-moox-late" ,perl-moox-late)
1028 ("perl-moox-options" ,perl-moox-options)
1029 ("perl-namespace-clean" ,perl-namespace-clean)
1030 ("perl-net-dbus" ,perl-net-dbus)
1031 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
1032 ("perl-path-tiny" ,perl-path-tiny)
1033 ("perl-test-most" ,perl-test-most)
1034 ("perl-test-trap" ,perl-test-trap)
1035 ("perl-time-duration" ,perl-time-duration)
1036 ("perl-time-duration-parse" ,perl-time-duration-parse)
1037 ("perl-try-tiny" ,perl-try-tiny)
1038 ("perl-type-tiny" ,perl-type-tiny)
1039 ("perl-types-path-tiny" ,perl-types-path-tiny)
1040 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1041 ("perl-xml-parser" ,perl-xml-parser)
1042 ("perl-xml-twig" ,perl-xml-twig)
1043 ("torsocks" ,torsocks)))
1046 (modify-phases %standard-phases
1047 ;; Needed for using gpg-connect-agent during tests.
1048 (add-before 'check 'set-HOME
1049 (lambda _ (setenv "HOME" "/tmp") #t))
1050 (add-before 'install 'fix-references
1051 (lambda* (#:key inputs outputs #:allow-other-keys)
1052 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
1054 ;; Skip check whether dependencies are in the PATH
1055 (("defined which.*") "")
1056 (("call\\('parcimonie-torified-gpg'\\)")
1057 (string-append "call('" (assoc-ref outputs "out")
1058 "/bin/parcimonie-torified-gpg')")))
1059 (substitute* "bin/parcimonie-torified-gpg"
1060 (("torsocks") (string-append (assoc-ref inputs "torsocks")
1063 (add-after 'install 'wrap-program
1064 (lambda* (#:key inputs outputs #:allow-other-keys)
1065 (let* ((out (assoc-ref outputs "out"))
1066 (perllib (string-append out "/lib/perl5/site_perl/"
1067 ,(package-version perl))))
1068 (wrap-program (string-append out "/bin/parcimonie")
1070 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1072 (home-page "https://gaffer.boum.org/intrigeri/code/parcimonie/")
1073 (synopsis "Incrementally refreshes a GnuPG keyring")
1074 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1075 that makes it hard to correlate the keyring content to an individual, and
1076 makes it hard to locate an individual based on an identifying subset of her
1077 keyring content. Parcimonie is a daemon that fetches one key at a time using
1078 the Tor network, waits a bit, changes the Tor circuit being used, and starts
1080 (license license:gpl1+)))
1082 (define-public jetring
1089 (uri (string-append "mirror://debian/pool/main/j/" name "/"
1090 name "_" version ".tar.xz"))
1093 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
1094 (build-system gnu-build-system)
1097 (modify-phases %standard-phases
1098 (delete 'configure) ; no configure script
1099 (add-before 'install 'hardlink-gnupg
1100 (lambda* (#:key inputs #:allow-other-keys)
1101 (let ((gpg (string-append (assoc-ref inputs "gnupg")
1103 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1104 (("gpg -") (string-append gpg " -"))
1105 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1108 (lambda* (#:key outputs #:allow-other-keys)
1109 (let* ((out (assoc-ref outputs "out"))
1110 (man (string-append out "/share/man")))
1111 (for-each (lambda (file)
1112 (install-file file (string-append out "/bin/")))
1113 (find-files "." "jetring-[[:alpha:]]+$"))
1114 (for-each (lambda (file)
1115 (install-file file (string-append man "/man1/")))
1116 (find-files "." ".*\\.1$"))
1117 (install-file "jetring.7" (string-append man "/man7/"))
1119 #:tests? #f)) ; no test phase
1123 (home-page "https://joeyh.name/code/jetring/")
1124 (synopsis "GnuPG keyring maintenance using changesets")
1126 "Jetring is a collection of tools that allow for gpg keyrings to be
1127 maintained using changesets. It was developed with the Debian keyring in mind,
1128 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1129 for multiple people to collaboratively edit.
1131 With jetring, changesets can be submitted, reviewed to see exactly what they
1132 will do, applied, and used to build a keyring. The origin of every change made
1133 to the keyring is available for auditing, and gpg signatures can be used for
1134 integrity guarantees.")
1135 (license license:gpl2+)))