1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 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, 2020 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
7 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 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 Nikita <nikita@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, 2020 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
16 ;;; Copyright © 2018, 2019, 2020 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>
19 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages gnupg)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages adns)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages curl)
43 #:use-module (gnu packages crypto)
44 #:use-module (gnu packages emacs)
45 #:use-module (gnu packages enlightenment)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages guile)
48 #:use-module (gnu packages openldap)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages perl-check)
51 #:use-module (gnu packages pth)
52 #:use-module (gnu packages python)
53 #:use-module (gnu packages python-xyz)
54 #:use-module (gnu packages qt)
55 #:use-module (gnu packages readline)
56 #:use-module (gnu packages compression)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages gnome)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages security-token)
63 #:use-module (gnu packages sqlite)
64 #:use-module (gnu packages swig)
65 #:use-module (gnu packages texinfo)
66 #:use-module (gnu packages tls)
67 #:use-module (gnu packages tor)
68 #:use-module (gnu packages web)
69 #:use-module (gnu packages xorg)
70 #:use-module (gnu packages xml)
71 #:use-module (guix packages)
72 #:use-module (guix download)
73 #:use-module (guix git-download)
74 #:use-module (guix build-system gnu)
75 #:use-module (guix build-system perl)
76 #:use-module (guix build-system python)
77 #:use-module (srfi srfi-1))
79 (define-public libgpg-error
86 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
90 "0qwpx8mbc2l421a22l0l1hpzkip9jng06bbzgxwpkkvk5bvnybdk"))))
91 (build-system gnu-build-system)
93 (if (%current-target-system)
94 `(#:modules ((ice-9 match)
95 (guix build gnu-build-system)
98 (modify-phases %standard-phases
99 ;; When cross-compiling, some platform specific properties cannot
100 ;; be detected. Create a symlink to the appropriate platform
101 ;; file. See Cross-Compiling section at:
102 ;; https://github.com/gpg/libgpg-error/blob/master/README
103 (add-after 'unpack 'cross-symlinks
104 (lambda* (#:key target inputs #:allow-other-keys)
106 (match (string-take target
107 (string-index target #\-))
108 ("armhf" "arm-unknown-linux-gnueabi")
110 (string-append x "-unknown-linux-gnu")))))
112 (string-append "lock-obj-pub." triplet ".h")
113 "src/syscfg/lock-obj-pub.linux-gnu.h"))
116 (native-inputs `(("gettext" ,gettext-minimal)))
117 (home-page "https://gnupg.org")
118 (synopsis "Library of error values for GnuPG components")
120 "Libgpg-error is a small library that defines common error values
121 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
122 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
123 Daemon and possibly more in the future.")
124 (license license:lgpl2.0+)
125 (properties '((ftp-server . "ftp.gnupg.org")
126 (ftp-directory . "/gcrypt/libgpg-error")))))
128 (define-public libgcrypt
134 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
138 "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))
139 (build-system gnu-build-system)
141 `(("libgpg-error-host" ,libgpg-error)))
143 ;; Needed here for the 'gpg-error' program.
144 `(("libgpg-error-native" ,libgpg-error)))
146 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
147 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
148 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
150 (list (string-append "--with-gpg-error-prefix="
151 (assoc-ref %build-inputs "libgpg-error-host"))
152 ;; When cross-compiling, _gcry_mpih_lshift etc are undefined
153 ,@(if (%current-target-system) '("--disable-asm")
155 (outputs '("out" "debug"))
156 (home-page "https://gnupg.org/")
157 (synopsis "Cryptographic function library")
159 "Libgcrypt is a general-purpose cryptographic library. It provides the
160 standard cryptographic building blocks such as symmetric ciphers, hash
161 algorithms, public key algorithms, large integer functions and random number
163 (license license:lgpl2.0+)
164 (properties '((ftp-server . "ftp.gnupg.org")
165 (ftp-directory . "/gcrypt/libgcrypt")))))
167 (define-public libassuan
174 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
178 "00p7cpvzf0q3qwcgg51r9d0vbab4qga2xi8wpk2fgd36710b1g4i"))))
179 (build-system gnu-build-system)
181 `(("libgpg-error" ,libgpg-error)
183 (home-page "https://gnupg.org")
185 "IPC library used by GnuPG and related software")
187 "Libassuan is a small library implementing the so-called Assuan
188 protocol. This protocol is used for IPC between most newer
189 GnuPG components. Both, server and client side functions are
191 (license license:lgpl2.0+)
192 (properties '((ftp-server . "ftp.gnupg.org")
193 (ftp-directory . "/gcrypt/libassuan")))))
195 (define-public libksba
203 "mirror://gnupg/libksba/libksba-"
207 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
208 (build-system gnu-build-system)
210 `(("libgpg-error" ,libgpg-error)))
212 `(("libgpg-error" ,libgpg-error)))
215 (list ,@(if (%current-target-system)
216 '("CC_FOR_BUILD=gcc")
218 (string-append "--with-gpg-error-prefix="
219 (assoc-ref %build-inputs "libgpg-error")))))
220 (home-page "https://www.gnupg.org")
221 (synopsis "CMS and X.509 access library")
223 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
224 as well as the CMS easily accessible by other applications. Both
225 specifications are building blocks of S/MIME and TLS.")
226 (license license:gpl3+)
227 (properties '((ftp-server . "ftp.gnupg.org")
228 (ftp-directory . "/gcrypt/libksba")))))
237 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
239 (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
240 (build-system gnu-build-system)
241 (home-page "https://www.gnupg.org")
242 (synopsis "Non-preemptive thread library")
244 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
245 threads implementation.
247 In contrast to GNU Pth is is based on the system's standard threads
248 implementation. This allows the use of libraries which are not
249 compatible to GNU Pth.")
250 (license (list license:lgpl3+ license:gpl2+)) ; dual license
251 (properties '((ftp-server . "ftp.gnupg.org")
252 (ftp-directory . "/gcrypt/npth")))))
260 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
262 (patches (search-patches "gnupg-default-pinentry.patch"))
265 "0p6ss4f3vlkf91pmp27bmvfr5bdxxi0pb3dmxpqljglbsx4mxd8h"))))
266 (build-system gnu-build-system)
268 `(("pkg-config" ,pkg-config)))
271 ("libassuan" ,libassuan)
272 ("libgcrypt" ,libgcrypt)
273 ("libgpg-error" ,libgpg-error)
276 ("openldap" ,openldap)
277 ("pcsc-lite" ,pcsc-lite)
278 ("readline" ,readline)
282 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
283 ;; executable in its installation directory in
284 ;; /gnu/store before it has been installed.
285 "--enable-gnupg-builddir-envvar"
286 "--enable-all-tests")
288 (modify-phases %standard-phases
289 (add-before 'configure 'patch-paths
290 (lambda* (#:key inputs #:allow-other-keys)
291 (substitute* "scd/scdaemon.c"
292 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
293 (string-append "\"" (assoc-ref inputs "pcsc-lite")
296 (add-after 'build 'patch-scheme-tests
298 (substitute* (find-files "tests" ".\\.scm$")
299 (("/usr/bin/env gpgscm")
300 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
302 (add-before 'build 'patch-test-paths
304 (substitute* '("tests/inittests"
305 "tests/pkits/inittests"
307 "tests/pkits/common.sh"
308 "tests/pkits/Makefile")
309 (("/bin/pwd") (which "pwd")))
310 (substitute* "common/t-exectool.c"
311 (("/bin/cat") (which "cat"))
312 (("/bin/true") (which "true"))
313 (("/bin/false") (which "false")))
315 (home-page "https://gnupg.org/")
316 (synopsis "GNU Privacy Guard")
318 "The GNU Privacy Guard is a complete implementation of the OpenPGP
319 standard. It is used to encrypt and sign data and communication. It
320 features powerful key management and the ability to access public key
321 servers. It includes several libraries: libassuan (IPC between GnuPG
322 components), libgpg-error (centralized GnuPG error values), and
323 libskba (working with X.509 certificates and CMS data).")
324 (license license:gpl3+)
325 (properties '((ftp-server . "ftp.gnupg.org")
326 (ftp-directory . "/gcrypt/gnupg")))))
328 (define-public gnupg-2.0
329 (package (inherit gnupg)
333 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
337 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
343 ("libassuan" ,libassuan)
344 ("libgcrypt" ,libgcrypt)
345 ("libgpg-error" ,libgpg-error)
348 ("openldap" ,openldap)
350 ("readline" ,readline)))
353 (modify-phases %standard-phases
354 (add-before 'configure 'patch-config-files
356 (substitute* "tests/openpgp/Makefile.in"
357 (("/bin/sh") (which "sh")))
359 (add-after 'install 'rename-v2-commands
360 (lambda* (#:key outputs #:allow-other-keys)
361 ;; Upstream suggests removing the trailing '2' from command names:
362 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
363 (let ((out (assoc-ref outputs "out")))
364 (with-directory-excursion (string-append out "/bin")
365 (rename-file "gpgv2" "gpgv")
366 (rename-file "gpg2" "gpg")
368 ;; Keep the old name around to ease transition.
369 (symlink "gpgv" "gpgv2")
370 (symlink "gpg" "gpg2")
372 (properties `((superseded . ,gnupg)))))
374 (define-public gnupg-1
375 (package (inherit gnupg)
379 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
383 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
389 ("readline" ,readline)
390 ("libgpg-error" ,libgpg-error)))
393 (modify-phases %standard-phases
394 (add-after 'unpack 'patch-check-sh
396 (substitute* "checks/Makefile.in"
397 (("/bin/sh") (which "sh")))
407 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
409 (base32 "01s3rlspykbm9vmi5rfbdm3d20ip6yni69r48idqzlmhlq8ggwff"))))
410 (build-system gnu-build-system)
414 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
415 `(("libgpg-error" ,libgpg-error)))
417 `(("libassuan" ,libassuan)))
418 (home-page "https://www.gnupg.org/related_software/gpgme/")
419 (synopsis "Library providing simplified access to GnuPG functionality")
421 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
422 easier for applications. It provides a High-Level Crypto API for encryption,
423 decryption, signing, signature verification and key management. Currently
424 it uses GnuPG as its backend but the API isn't restricted to this engine.
426 Because the direct use of GnuPG from an application can be a complicated
427 programming task, it is suggested that all software should try to use GPGME
428 instead. This way bug fixes or improvements can be done at a central place
429 and every application benefits from this.")
430 (license license:lgpl2.1+)
431 (properties '((ftp-server . "ftp.gnupg.org")
432 (ftp-directory . "/gcrypt/gpgme")))))
434 (define-public qgpgme
440 (modify-phases %standard-phases
441 (add-before 'build 'chdir-and-symlink
442 (lambda* (#:key inputs #:allow-other-keys)
443 (let ((gpgme (assoc-ref inputs "gpgme")))
444 (symlink (string-append gpgme "/lib/libgpgmepp.la")
445 "lang/cpp/src/libgpgmepp.la")
446 (symlink (string-append gpgme "/lib/libgpgme.la")
451 `(("pkg-config" ,pkg-config)
452 ,@(package-native-inputs gpgme)))
456 ,@(package-inputs gpgme)))
457 (synopsis "Qt API bindings for gpgme")
458 (description "QGpgme provides a very high level Qt API around GpgMEpp.
460 QGpgME was originally developed as part of libkleo and incorporated into
461 gpgpme starting with version 1.7.")
462 (license license:gpl2+))) ;; Note: this differs from gpgme
464 (define-public guile-gcrypt
466 (name "guile-gcrypt")
468 (home-page "https://notabug.org/cwebber/guile-gcrypt")
472 (url (string-append home-page ".git"))
473 (commit (string-append "v" version))))
476 "0m29fg4pdfifnqqsa437zc5c1bhbfh62mc69ba25ak4x2cla41ll"))
477 (file-name (git-file-name name version))))
478 (build-system gnu-build-system)
480 ;; When cross-compiling, the bash script libgcrypt-config provided by
481 ;; libgcrypt must be accessible during configure phase.
482 `(,@(if (%current-target-system)
484 (modify-phases %standard-phases
485 (add-before 'configure 'add-libgrypt-config
487 (setenv "PATH" (string-append
488 (assoc-ref %build-inputs "libgcrypt")
494 `(("pkg-config" ,pkg-config)
495 ("autoconf" ,autoconf)
496 ("automake" ,automake)
498 ("guile" ,guile-3.0)))
500 `(("guile" ,guile-3.0)
501 ("libgcrypt" ,libgcrypt)))
502 (synopsis "Cryptography library for Guile using Libgcrypt")
504 "Guile-Gcrypt provides a Guile interface to a subset of the
505 GNU Libgcrypt crytographic library. It provides modules for cryptographic
506 hash functions, message authentication codes (MAC), public-key cryptography,
507 strong randomness, and more. It is implemented using the foreign function
508 interface (FFI) of Guile.")
509 (license license:gpl3+)))
511 (define-public guile2.0-gcrypt
512 (package (inherit guile-gcrypt)
513 (name "guile2.0-gcrypt")
515 `(("guile" ,guile-2.0)
516 ,@(alist-delete "guile" (package-native-inputs guile-gcrypt))))
518 `(("guile" ,guile-2.0)
519 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
521 (define-public guile2.2-gcrypt
523 (inherit guile-gcrypt)
524 (name "guile2.2-gcrypt")
526 `(("guile" ,guile-2.2)
527 ,@(alist-delete "guile" (package-native-inputs guile-gcrypt))))
529 `(("guile" ,guile-2.2)
530 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
532 (define-public guile3.0-gcrypt
533 (deprecated-package "guile3.0-gcrypt" guile-gcrypt))
535 (define-public python-gpg
541 (uri (pypi-uri "gpg" version))
544 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
545 (build-system python-build-system)
548 (modify-phases %standard-phases
549 (add-before 'build 'set-environment
551 (substitute* "setup.py"
552 (("cc") (which "gcc")))
554 #:tests? #f)) ; No test suite.
559 (home-page (package-home-page gpgme))
560 (synopsis "Python bindings for GPGME GnuPG cryptography library")
561 (description "This package provides Python bindings to the GPGME GnuPG
562 cryptographic library. It is developed in the GPGME source code, and then
563 distributed separately.")
564 (license license:lgpl2.1+)))
566 (define-public python2-gpg
567 (package-with-python2 python-gpg))
569 (define-public python-pygpgme
571 (name "python-pygpgme")
576 (uri (pypi-uri "pygpgme" version))
579 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
580 ;; Unfortunately, we have to disable some tests due to some gpg-agent
582 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
583 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
584 "python-pygpgme-fix-pinentry-tests.patch"))))
587 (modify-phases %standard-phases
588 (add-before 'build 'make-build
589 (lambda _ (invoke "make" "build")))
591 (lambda _ (invoke "make" "check"))))))
592 (build-system python-build-system)
594 `(("gnupg" ,gnupg-1)))
597 (home-page "https://launchpad.net/pygpgme")
598 (synopsis "Python module for working with OpenPGP messages")
600 "PyGPGME is a Python module that lets you sign, verify, encrypt and
601 decrypt messages using the OpenPGP format by making use of GPGME.")
602 (license license:lgpl2.1+)))
604 (define-public python2-pygpgme
605 (package-with-python2 python-pygpgme))
607 (define-public python-gnupg
609 (name "python-gnupg")
614 (uri (pypi-uri "python-gnupg" version))
617 "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
618 (build-system python-build-system)
621 (modify-phases %standard-phases
624 (substitute* "test_gnupg.py"
625 ;; Unsure why this test fails.
626 (("'test_search_keys'") "True")
627 (("def test_search_keys") "def disabled__search_keys"))
628 (setenv "USERNAME" "guixbuilder")
629 ;; The doctests are extremely slow and sometimes time out,
630 ;; so we disable them.
632 "test_gnupg.py" "--no-doctests"))))))
634 `(("gnupg" ,gnupg-1)))
635 (home-page "https://packages.python.org/python-gnupg/index.html")
636 (synopsis "Wrapper for the GNU Privacy Guard")
638 "This module allows easy access to GnuPG’s key management, encryption
639 and signature functionality from Python programs.")
640 (license license:bsd-3)))
642 (define-public python2-gnupg
643 (package-with-python2 python-gnupg))
645 (define-public perl-gnupg-interface
647 (name "perl-gnupg-interface")
651 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
652 "GnuPG-Interface-" version ".tar.gz"))
655 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
656 (build-system perl-build-system)
659 (modify-phases %standard-phases
660 ;; FIXME: This test fails for unknown reasons
661 (add-after 'unpack 'delete-broken-test
663 (delete-file "t/encrypt_symmetrically.t")
666 `(("gnupg" ,gnupg-1)))
668 `(("perl-moo" ,perl-moo)
669 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
670 ("perl-moox-late" ,perl-moox-late)))
673 ("perl-module-install" ,perl-module-install)))
674 (home-page "https://metacpan.org/release/GnuPG-Interface")
675 (synopsis "Perl interface to GnuPG")
676 (description "@code{GnuPG::Interface} and its associated modules are
677 designed to provide an object-oriented method for interacting with GnuPG,
678 being able to perform functions such as but not limited to encrypting,
679 signing, decryption, verification, and key-listing parsing.")
680 (license license:perl-license)))
689 "https://github.com/jaymzh/pius/releases/download/v"
690 version "/pius-" version ".tar.bz2"))
693 "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
694 (build-system python-build-system)
695 (inputs `(("perl" ,perl) ; for 'pius-party-worksheet'
697 ("python-six" ,python2-six)))
700 #:python ,python-2 ; uses the Python 2 'print' syntax
702 (modify-phases %standard-phases
704 'build 'set-gpg-file-name
705 (lambda* (#:key inputs outputs #:allow-other-keys)
706 (let* ((gpg (string-append (assoc-ref inputs "gpg")
708 (substitute* "libpius/constants.py"
709 (("/usr/bin/gpg2") gpg))
711 (synopsis "Programs to simplify GnuPG key signing")
713 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
714 parties. It is the main utility and makes it possible to quickly and easily
715 sign each UID on a set of PGP keys. It is designed to take the pain out of
716 the sign-all-the-keys part of PGP Keysigning Party while adding security
719 pius-keyring-mgr and pius-party-worksheet help organisers of
720 PGP keysigning parties.")
721 (license license:gpl2)
722 (home-page "https://www.phildev.net/pius/index.shtml")))
724 (define-public signing-party
726 (name "signing-party")
728 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
733 (commit (string-append "v" version))))
734 (file-name (git-file-name name version))
737 "0lq8nmwjmysry0n4jg6vb7bh0lagbyb9pa11ii3s41p1mhzchf2r"))))
738 (build-system gnu-build-system)
740 `(("autoconf" ,autoconf-wrapper)
741 ("automake" ,automake)))
742 (inputs `(("perl" ,perl)
743 ("perl-text-template" ,perl-text-template)
744 ("perl-mime-tools" ,perl-mime-tools)
745 ("perl-gnupg-interface" ,perl-gnupg-interface)
746 ("perl-net-idn-encode" ,perl-net-idn-encode)
749 `(#:tests? #f ; no test suite
751 (modify-phases %standard-phases
753 (lambda* (#:key outputs #:allow-other-keys)
754 (let ((out (assoc-ref outputs "out")))
755 (substitute* "keyanalyze/Makefile"
756 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
757 (substitute* "keyanalyze/Makefile"
758 (("\\./configure") (string-append "./configure --prefix=" out)))
759 (substitute* "gpgwrap/Makefile"
761 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
762 out "/bin/gpgwrap\n")))
763 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
764 "keylookup/Makefile" "sig2dot/Makefile"
765 "springgraph/Makefile")
767 (setenv "CONFIG_SHELL" (which "sh")))
770 (lambda* (#:key outputs #:allow-other-keys #:rest args)
771 (let ((out (assoc-ref outputs "out"))
772 (install (assoc-ref %standard-phases 'install)))
776 (copy-file (string-append dir "/" file)
777 (string-append out "/bin/" file)))
778 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
779 "gpglist" "gpg-mailkeys" "gpgparticipants")
780 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
781 "gpglist" "gpg-mailkeys" "gpgparticipants"))
784 (copy-file (string-append dir "/" file)
785 (string-append out "/share/man/man1/" file)))
786 '("caff" "caff" "caff" "gpgdir"
787 "gpg-key2ps" "gpglist" "gpg-mailkeys"
788 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
789 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
790 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
791 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
792 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
793 "process_keys.1" "pgpring.1" "keyanalyze.1")))
795 (add-after 'install 'wrap-programs
796 (lambda* (#:key outputs #:allow-other-keys)
797 (let* ((out (assoc-ref outputs "out")))
799 (string-append out "/bin/caff")
800 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
802 (synopsis "Collection of scripts for simplifying gnupg key signing")
804 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
805 including tools for signing keys, keyring analysis, and party preparation.
807 @item caff: CA - Fire and Forget signs and mails a key
808 @item pgp-clean: removes all non-self signatures from key
809 @item pgp-fixkey: removes broken packets from keys
810 @item gpg-mailkeys: simply mail out a signed key to its owner
811 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
812 @item gpgdir: recursive directory encryption tool
813 @item gpglist: show who signed which of your UIDs
814 @item gpgsigs: annotates list of GnuPG keys with already done signatures
815 @item gpgparticipants: create list of party participants for the organiser
816 @item gpgwrap: a passphrase wrapper
817 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
818 @item keylookup: ncurses wrapper around gpg --search
819 @item sig2dot: converts a list of GnuPG signatures to a .dot file
820 @item springgraph: creates a graph from a .dot file
822 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
823 ;; and caff and gpgsigs: bsd-3, see
824 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
825 (license license:gpl2)))
827 (define-public pinentry-tty
829 (name "pinentry-tty")
833 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
837 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
838 (build-system gnu-build-system)
840 `(#:configure-flags '("--enable-pinentry-tty")))
842 `(("ncurses" ,ncurses)
843 ("libassuan" ,libassuan)
844 ("libsecret" ,libsecret "out")))
846 `(("pkg-config" ,pkg-config)))
847 (home-page "https://gnupg.org/aegypten2/")
848 (synopsis "GnuPG's interface to passphrase input")
850 "Pinentry provides a console that allows users to enter a passphrase when
851 @code{gpg} is run and needs it.")
852 (license license:gpl2+)
853 (properties '((ftp-server . "ftp.gnupg.org")
854 (ftp-directory . "/gcrypt/pinentry")
855 (upstream-name . "pinentry")))))
857 (define-public pinentry-emacs
859 (inherit pinentry-tty)
860 (name "pinentry-emacs")
862 `(#:configure-flags '("--enable-pinentry-emacs")))
864 "Pinentry provides a console and an Emacs interface that allows users to
865 enter a passphrase when required by @code{gpg} or other software.")))
867 (define-public pinentry-gtk2
869 (inherit pinentry-tty)
870 (name "pinentry-gtk2")
872 `(#:configure-flags '("--enable-fallback-curses")))
876 ,@(package-inputs pinentry-tty)))
878 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
879 passphrase when @code{gpg} is run and needs it.")))
881 (define-public pinentry-gnome3
883 (inherit pinentry-tty)
884 (name "pinentry-gnome3")
889 ,@(package-inputs pinentry-tty)))
891 `(#:configure-flags '("--enable-pinentry-gnome3"
892 "--enable-fallback-curses")))
894 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
895 that allows users to enter a passphrase when required by @code{gpg} or other
898 (define-public pinentry-qt
900 (inherit pinentry-tty)
903 `(#:configure-flags '("--enable-fallback-curses")))
906 ,@(package-inputs pinentry-tty)))
908 "Pinentry provides a console and a Qt GUI that allows users to enter a
909 passphrase when @code{gpg} is run and needs it.")))
911 (define-public pinentry-efl
913 (inherit pinentry-tty)
914 (name "pinentry-efl")
917 (inherit (package-source pinentry-tty))
918 (patches (search-patches "pinentry-efl.patch"))))
920 '(#:configure-flags '("--enable-pinentry-efl"
921 "--enable-fallback-curses")
923 (modify-phases %standard-phases
926 (invoke "sh" "autogen.sh"))))))
928 `(("autoconf" ,autoconf)
929 ("automake" ,automake)
930 ("gettext" ,gettext-minimal)
931 ,@(package-native-inputs pinentry-tty)))
934 ,@(package-inputs pinentry-tty)))
936 "Pinentry provides a console and a graphical interface for the
937 @dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a
938 passphrase when @code{gpg} is run and needs it.")))
940 (define-public pinentry
941 (package (inherit pinentry-gtk2)
944 (define-public paperkey
950 (uri (string-append "https://www.jabberwocky.com/"
951 "software/paperkey/paperkey-"
955 "1xq5gni6gksjkd5avg0zpd73vsr97appksfx0gx2m38s4w9zsid2"))))
956 (build-system gnu-build-system)
959 (modify-phases %standard-phases
960 (add-before 'check 'patch-check-scripts
962 (substitute* '("checks/roundtrip.sh"
963 "checks/roundtrip-raw.sh")
964 (("/bin/echo") "echo"))
966 (home-page "https://www.jabberwocky.com/software/paperkey/")
967 (synopsis "Backup OpenPGP keys to paper")
969 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
970 for printing with paper and ink, which have amazingly long retention
971 qualities. To reconstruct a secret key, you re-enter those
972 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
973 them to transform your existing public key into a secret key.")
974 (license license:gpl2+)))
976 (define-public pgpdump
983 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
986 (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
987 (build-system gnu-build-system)
989 `(#:tests? #f ; no make check
990 #:configure-flags (list "--prefix=/")
991 #:make-flags (list "CC=gcc"
992 (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
995 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
996 (synopsis "PGP packet visualizer")
997 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
1000 The output of this command is similar to GnuPG's list packets command,
1001 however, pgpdump produces more detailed and easier to understand output.")
1002 (license license:bsd-3)))
1010 (uri (string-append "mirror://gnupg/gpa/"
1011 name "-" version ".tar.bz2"))
1014 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
1015 (build-system gnu-build-system)
1018 (modify-phases %standard-phases
1019 (add-after 'install 'wrap-program
1020 (lambda* (#:key inputs outputs #:allow-other-keys)
1021 (let ((out (assoc-ref outputs "out"))
1022 (gnupg (assoc-ref inputs "gnupg")))
1023 (wrap-program (string-append out "/bin/gpa")
1024 `("PATH" ":" prefix (,(string-append gnupg "/bin"))))
1027 `(("pkg-config" ,pkg-config)))
1031 ("libassuan" ,libassuan)
1032 ("libgpg-error" ,libgpg-error)
1033 ("gtk+-2" ,gtk+-2)))
1034 (home-page "https://gnupg.org/software/gpa/")
1035 (synopsis "Graphical user interface for GnuPG")
1037 "GPA, the GNU Privacy Assistant, is a graphical user interface for
1038 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
1039 files, to verify signatures, and to manage the private and public keys.")
1040 (license license:gpl3+)
1041 (properties '((ftp-server . "ftp.gnupg.org")
1042 (ftp-directory . "/gcrypt/gpa")))))
1044 (define-public parcimonie
1050 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1051 "parcimonie/App-Parcimonie-"
1055 "14pvapvzrxh1yh8zgcj1llmc2dd8g1fgzskxlja21gmw8c88aqdk"))))
1056 (build-system perl-build-system)
1059 ("perl-config-general" ,perl-config-general)
1060 ("perl-clone" ,perl-clone)
1061 ("perl-data" ,perl-data)
1062 ("perl-exporter-tiny" ,perl-exporter-tiny)
1063 ("perl-file-homedir" ,perl-file-homedir)
1064 ("perl-file-sharedir" ,perl-file-sharedir)
1065 ("perl-file-which" ,perl-file-which)
1066 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
1067 ("perl-gnupg-interface" ,perl-gnupg-interface)
1068 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1069 ("perl-list-moreutils" ,perl-list-moreutils)
1070 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
1071 ("perl-lwp-online" ,perl-lwp-online)
1072 ("perl-module-build" ,perl-module-build)
1073 ("perl-module-pluggable-object" ,perl-module-pluggable)
1074 ("perl-moo" ,perl-moo)
1075 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
1076 ("perl-moox-late" ,perl-moox-late)
1077 ("perl-moox-options" ,perl-moox-options)
1078 ("perl-moox-strictconstructor" ,perl-moox-strictconstructor)
1079 ("perl-namespace-clean" ,perl-namespace-clean)
1080 ("perl-net-dbus" ,perl-net-dbus)
1081 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
1082 ("perl-path-tiny" ,perl-path-tiny)
1083 ("perl-strictures" ,perl-strictures-2)
1084 ("perl-test-most" ,perl-test-most)
1085 ("perl-test-trap" ,perl-test-trap)
1086 ("perl-time-duration" ,perl-time-duration)
1087 ("perl-time-duration-parse" ,perl-time-duration-parse)
1088 ("perl-try-tiny" ,perl-try-tiny)
1089 ("perl-type-tiny" ,perl-type-tiny)
1090 ("perl-types-path-tiny" ,perl-types-path-tiny)
1091 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1092 ("perl-xml-parser" ,perl-xml-parser)
1093 ("perl-xml-twig" ,perl-xml-twig)
1094 ("torsocks" ,torsocks)))
1096 `(("xorg-server" ,xorg-server-for-tests)))
1099 (modify-phases %standard-phases
1100 ;; Needed for using gpg-connect-agent during tests.
1101 (add-before 'check 'prepare-for-tests
1102 (lambda* (#:key inputs #:allow-other-keys)
1103 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1104 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1105 (setenv "DISPLAY" ":1")
1106 (setenv "HOME" "/tmp")
1107 ;; These tests are known to fail
1108 (delete-file "t/32-keyserver_defined_on_command_line.t")
1109 (delete-file "t/33-checkGpgHasDefinedKeyserver.t")
1110 ;; The applet is deprecated upstream.
1111 (delete-file "t/00-load_all.t")
1113 (add-before 'install 'fix-references
1114 (lambda* (#:key inputs outputs #:allow-other-keys)
1115 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
1116 ;; Skip check whether dependencies are in the PATH
1117 (("defined which.*") ""))
1119 (add-after 'install 'wrap-program
1120 (lambda* (#:key inputs outputs #:allow-other-keys)
1121 (let* ((out (assoc-ref outputs "out"))
1122 (perllib (string-append out "/lib/perl5/site_perl/"
1123 ,(package-version perl))))
1124 (wrap-program (string-append out "/bin/parcimonie")
1126 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1128 (home-page "https://gaffer.boum.org/intrigeri/code/parcimonie/")
1129 (synopsis "Incrementally refreshes a GnuPG keyring")
1130 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1131 that makes it hard to correlate the keyring content to an individual, and
1132 makes it hard to locate an individual based on an identifying subset of her
1133 keyring content. Parcimonie is a daemon that fetches one key at a time using
1134 the Tor network, waits a bit, changes the Tor circuit being used, and starts
1136 (license license:gpl1+)))
1138 (define-public jetring
1146 (url "https://salsa.debian.org/debian/jetring")
1147 (commit (string-append "debian/" version))))
1148 (file-name (git-file-name name version))
1151 "1acbx2vnbkms1c0wgcnh05d4g359sg5z0aiw541vx2qq9sgdhlv6"))))
1152 (build-system gnu-build-system)
1155 (modify-phases %standard-phases
1156 (delete 'configure) ; no configure script
1157 (add-before 'install 'hardlink-gnupg
1158 (lambda* (#:key inputs #:allow-other-keys)
1159 (let ((gpg (string-append (assoc-ref inputs "gnupg")
1161 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1162 (("gpg -") (string-append gpg " -"))
1163 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1166 (lambda* (#:key outputs #:allow-other-keys)
1167 (let* ((out (assoc-ref outputs "out"))
1168 (man (string-append out "/share/man")))
1169 (for-each (lambda (file)
1170 (install-file file (string-append out "/bin/")))
1171 (find-files "." "jetring-[[:alpha:]]+$"))
1172 (for-each (lambda (file)
1173 (install-file file (string-append man "/man1/")))
1174 (find-files "." ".*\\.1$"))
1175 (install-file "jetring.7" (string-append man "/man7/"))
1177 #:tests? #f)) ; no test phase
1181 (home-page "https://joeyh.name/code/jetring/")
1182 (synopsis "GnuPG keyring maintenance using changesets")
1184 "Jetring is a collection of tools that allow for gpg keyrings to be
1185 maintained using changesets. It was developed with the Debian keyring in mind,
1186 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1187 for multiple people to collaboratively edit.
1189 With jetring, changesets can be submitted, reviewed to see exactly what they
1190 will do, applied, and used to build a keyring. The origin of every change made
1191 to the keyring is available for auditing, and gpg signatures can be used for
1192 integrity guarantees.")
1193 (license license:gpl2+)))