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")
109 ("mips64el" "mips-unknown-linux-gnu")
111 (string-append x "-unknown-linux-gnu")))))
113 (string-append "lock-obj-pub." triplet ".h")
114 "src/syscfg/lock-obj-pub.linux-gnu.h"))
117 (native-inputs `(("gettext" ,gettext-minimal)))
118 (home-page "https://gnupg.org")
119 (synopsis "Library of error values for GnuPG components")
121 "Libgpg-error is a small library that defines common error values
122 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
123 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
124 Daemon and possibly more in the future.")
125 (license license:lgpl2.0+)
126 (properties '((ftp-server . "ftp.gnupg.org")
127 (ftp-directory . "/gcrypt/libgpg-error")))))
129 (define-public libgcrypt
135 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
139 "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))
140 (build-system gnu-build-system)
142 `(("libgpg-error-host" ,libgpg-error)))
144 ;; Needed here for the 'gpg-error' program.
145 `(("libgpg-error-native" ,libgpg-error)))
147 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
148 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
149 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
151 (list (string-append "--with-gpg-error-prefix="
152 (assoc-ref %build-inputs "libgpg-error-host"))
153 ;; When cross-compiling, _gcry_mpih_lshift etc are undefined
154 ,@(if (%current-target-system) '("--disable-asm")
156 (outputs '("out" "debug"))
157 (home-page "https://gnupg.org/")
158 (synopsis "Cryptographic function library")
160 "Libgcrypt is a general-purpose cryptographic library. It provides the
161 standard cryptographic building blocks such as symmetric ciphers, hash
162 algorithms, public key algorithms, large integer functions and random number
164 (license license:lgpl2.0+)
165 (properties '((ftp-server . "ftp.gnupg.org")
166 (ftp-directory . "/gcrypt/libgcrypt")))))
168 (define-public libassuan
175 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
179 "1w7vnnycq4z7gf4bk38pi4hrb8qrrzgfpz3cd7frwldxnfbfx060"))))
180 (build-system gnu-build-system)
182 `(("libgpg-error" ,libgpg-error)
184 (home-page "https://gnupg.org")
186 "IPC library used by GnuPG and related software")
188 "Libassuan is a small library implementing the so-called Assuan
189 protocol. This protocol is used for IPC between most newer
190 GnuPG components. Both, server and client side functions are
192 (license license:lgpl2.0+)
193 (properties '((ftp-server . "ftp.gnupg.org")
194 (ftp-directory . "/gcrypt/libassuan")))))
196 (define-public libksba
204 "mirror://gnupg/libksba/libksba-"
208 "1fm0mf3wq9fmyi1rmc1vk2fafn6liiw2mgxml3g7ybbb44lz2jmf"))))
209 (build-system gnu-build-system)
211 `(("libgpg-error" ,libgpg-error)))
213 `(("libgpg-error" ,libgpg-error)))
216 (list ,@(if (%current-target-system)
217 '("CC_FOR_BUILD=gcc")
219 (string-append "--with-gpg-error-prefix="
220 (assoc-ref %build-inputs "libgpg-error")))))
221 (home-page "https://www.gnupg.org")
222 (synopsis "CMS and X.509 access library")
224 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
225 as well as the CMS easily accessible by other applications. Both
226 specifications are building blocks of S/MIME and TLS.")
227 (license license:gpl3+)
228 (properties '((ftp-server . "ftp.gnupg.org")
229 (ftp-directory . "/gcrypt/libksba")))))
238 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
240 (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
241 (build-system gnu-build-system)
242 (home-page "https://www.gnupg.org")
243 (synopsis "Non-preemptive thread library")
245 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
246 threads implementation.
248 In contrast to GNU Pth is is based on the system's standard threads
249 implementation. This allows the use of libraries which are not
250 compatible to GNU Pth.")
251 (license (list license:lgpl3+ license:gpl2+)) ; dual license
252 (properties '((ftp-server . "ftp.gnupg.org")
253 (ftp-directory . "/gcrypt/npth")))))
261 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
263 (patches (search-patches "gnupg-default-pinentry.patch"))
266 "02n3klqbyzxyil13sg4wa0pcwr7vs7zjaslis926yjxg8yr0fly5"))))
267 (build-system gnu-build-system)
269 `(("pkg-config" ,pkg-config)))
272 ("libassuan" ,libassuan)
273 ("libgcrypt" ,libgcrypt)
274 ("libgpg-error" ,libgpg-error)
277 ("openldap" ,openldap)
278 ("pcsc-lite" ,pcsc-lite)
279 ("readline" ,readline)
283 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
284 ;; executable in its installation directory in
285 ;; /gnu/store before it has been installed.
286 "--enable-gnupg-builddir-envvar"
287 "--enable-all-tests")
289 (modify-phases %standard-phases
290 (add-before 'configure 'patch-paths
291 (lambda* (#:key inputs #:allow-other-keys)
292 (substitute* "scd/scdaemon.c"
293 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
294 (string-append "\"" (assoc-ref inputs "pcsc-lite")
297 (add-after 'build 'patch-scheme-tests
299 (substitute* (find-files "tests" ".\\.scm$")
300 (("/usr/bin/env gpgscm")
301 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
303 (add-before 'build 'patch-test-paths
305 (substitute* '("tests/inittests"
306 "tests/pkits/inittests"
308 "tests/pkits/common.sh"
309 "tests/pkits/Makefile")
310 (("/bin/pwd") (which "pwd")))
311 (substitute* "common/t-exectool.c"
312 (("/bin/cat") (which "cat"))
313 (("/bin/true") (which "true"))
314 (("/bin/false") (which "false")))
316 (home-page "https://gnupg.org/")
317 (synopsis "GNU Privacy Guard")
319 "The GNU Privacy Guard is a complete implementation of the OpenPGP
320 standard. It is used to encrypt and sign data and communication. It
321 features powerful key management and the ability to access public key
322 servers. It includes several libraries: libassuan (IPC between GnuPG
323 components), libgpg-error (centralized GnuPG error values), and
324 libskba (working with X.509 certificates and CMS data).")
325 (license license:gpl3+)
326 (properties '((ftp-server . "ftp.gnupg.org")
327 (ftp-directory . "/gcrypt/gnupg")))))
329 (define-public gnupg-1
330 (package (inherit gnupg)
334 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
338 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
344 ("readline" ,readline)
345 ("libgpg-error" ,libgpg-error)))
348 (modify-phases %standard-phases
349 (add-after 'unpack 'patch-check-sh
351 (substitute* "checks/Makefile.in"
352 (("/bin/sh") (which "sh")))
362 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
364 (base32 "0nqfipv5s4npfidsm1rs3kpq0r0av9bfqfd5r035jibx5k0jniqb"))))
365 (build-system gnu-build-system)
369 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
370 `(("libgpg-error" ,libgpg-error)))
372 `(("libassuan" ,libassuan)))
373 (home-page "https://www.gnupg.org/related_software/gpgme/")
374 (synopsis "Library providing simplified access to GnuPG functionality")
376 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
377 easier for applications. It provides a High-Level Crypto API for encryption,
378 decryption, signing, signature verification and key management. Currently
379 it uses GnuPG as its backend but the API isn't restricted to this engine.
381 Because the direct use of GnuPG from an application can be a complicated
382 programming task, it is suggested that all software should try to use GPGME
383 instead. This way bug fixes or improvements can be done at a central place
384 and every application benefits from this.")
385 (license license:lgpl2.1+)
386 (properties '((ftp-server . "ftp.gnupg.org")
387 (ftp-directory . "/gcrypt/gpgme")))))
389 (define-public qgpgme
395 (modify-phases %standard-phases
396 (add-before 'build 'chdir-and-symlink
397 (lambda* (#:key inputs #:allow-other-keys)
398 (let ((gpgme (assoc-ref inputs "gpgme")))
399 (symlink (string-append gpgme "/lib/libgpgmepp.la")
400 "lang/cpp/src/libgpgmepp.la")
401 (symlink (string-append gpgme "/lib/libgpgme.la")
406 `(("pkg-config" ,pkg-config)
407 ,@(package-native-inputs gpgme)))
411 ,@(package-inputs gpgme)))
412 (synopsis "Qt API bindings for gpgme")
413 (description "QGpgme provides a very high level Qt API around GpgMEpp.
415 QGpgME was originally developed as part of libkleo and incorporated into
416 gpgpme starting with version 1.7.")
417 (license license:gpl2+))) ;; Note: this differs from gpgme
419 (define-public guile-gcrypt
421 (name "guile-gcrypt")
423 (home-page "https://notabug.org/cwebber/guile-gcrypt")
427 (url (string-append home-page ".git"))
428 (commit (string-append "v" version))))
431 "0m29fg4pdfifnqqsa437zc5c1bhbfh62mc69ba25ak4x2cla41ll"))
432 (file-name (git-file-name name version))))
433 (build-system gnu-build-system)
435 ;; When cross-compiling, the bash script libgcrypt-config provided by
436 ;; libgcrypt must be accessible during configure phase.
437 `(,@(if (%current-target-system)
439 (modify-phases %standard-phases
440 (add-before 'configure 'add-libgrypt-config
442 (setenv "PATH" (string-append
443 (assoc-ref %build-inputs "libgcrypt")
449 `(("pkg-config" ,pkg-config)
450 ("autoconf" ,autoconf)
451 ("automake" ,automake)
453 ("guile" ,guile-3.0)))
455 `(("guile" ,guile-3.0)
456 ("libgcrypt" ,libgcrypt)))
457 (synopsis "Cryptography library for Guile using Libgcrypt")
459 "Guile-Gcrypt provides a Guile interface to a subset of the
460 GNU Libgcrypt crytographic library. It provides modules for cryptographic
461 hash functions, message authentication codes (MAC), public-key cryptography,
462 strong randomness, and more. It is implemented using the foreign function
463 interface (FFI) of Guile.")
464 (license license:gpl3+)))
466 (define-public guile2.0-gcrypt
467 (package (inherit guile-gcrypt)
468 (name "guile2.0-gcrypt")
470 `(("guile" ,guile-2.0)
471 ,@(alist-delete "guile" (package-native-inputs guile-gcrypt))))
473 `(("guile" ,guile-2.0)
474 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
476 (define-public guile2.2-gcrypt
478 (inherit guile-gcrypt)
479 (name "guile2.2-gcrypt")
481 `(("guile" ,guile-2.2)
482 ,@(alist-delete "guile" (package-native-inputs guile-gcrypt))))
484 `(("guile" ,guile-2.2)
485 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
487 (define-public guile3.0-gcrypt
488 (deprecated-package "guile3.0-gcrypt" guile-gcrypt))
490 (define-public python-gpg
496 (uri (pypi-uri "gpg" version))
499 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
500 (build-system python-build-system)
503 (modify-phases %standard-phases
504 (add-before 'build 'set-environment
506 (substitute* "setup.py"
507 (("cc") (which "gcc")))
509 #:tests? #f)) ; No test suite.
514 (home-page (package-home-page gpgme))
515 (synopsis "Python bindings for GPGME GnuPG cryptography library")
516 (description "This package provides Python bindings to the GPGME GnuPG
517 cryptographic library. It is developed in the GPGME source code, and then
518 distributed separately.")
519 (license license:lgpl2.1+)))
521 (define-public python2-gpg
522 (package-with-python2 python-gpg))
524 (define-public python-pygpgme
526 (name "python-pygpgme")
531 (uri (pypi-uri "pygpgme" version))
534 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
535 ;; Unfortunately, we have to disable some tests due to some gpg-agent
537 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
538 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
539 "python-pygpgme-fix-pinentry-tests.patch"))))
542 (modify-phases %standard-phases
543 (add-before 'build 'make-build
544 (lambda _ (invoke "make" "build")))
546 (lambda _ (invoke "make" "check"))))))
547 (build-system python-build-system)
549 `(("gnupg" ,gnupg-1)))
552 (home-page "https://launchpad.net/pygpgme")
553 (synopsis "Python module for working with OpenPGP messages")
555 "PyGPGME is a Python module that lets you sign, verify, encrypt and
556 decrypt messages using the OpenPGP format by making use of GPGME.")
557 (license license:lgpl2.1+)))
559 (define-public python2-pygpgme
560 (package-with-python2 python-pygpgme))
562 (define-public python-gnupg
564 (name "python-gnupg")
569 (uri (pypi-uri "python-gnupg" version))
572 "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
573 (build-system python-build-system)
576 (modify-phases %standard-phases
579 (substitute* "test_gnupg.py"
580 ;; Unsure why this test fails.
581 (("'test_search_keys'") "True")
582 (("def test_search_keys") "def disabled__search_keys"))
583 (setenv "USERNAME" "guixbuilder")
584 ;; The doctests are extremely slow and sometimes time out,
585 ;; so we disable them.
587 "test_gnupg.py" "--no-doctests"))))))
589 `(("gnupg" ,gnupg-1)))
590 (home-page "https://packages.python.org/python-gnupg/index.html")
591 (synopsis "Wrapper for the GNU Privacy Guard")
593 "This module allows easy access to GnuPG’s key management, encryption
594 and signature functionality from Python programs.")
595 (license license:bsd-3)))
597 (define-public python2-gnupg
598 (package-with-python2 python-gnupg))
600 (define-public perl-gnupg-interface
602 (name "perl-gnupg-interface")
606 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
607 "GnuPG-Interface-" version ".tar.gz"))
610 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
611 (build-system perl-build-system)
614 (modify-phases %standard-phases
615 ;; FIXME: This test fails for unknown reasons
616 (add-after 'unpack 'delete-broken-test
618 (delete-file "t/encrypt_symmetrically.t")
621 `(("gnupg" ,gnupg-1)))
623 `(("perl-moo" ,perl-moo)
624 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
625 ("perl-moox-late" ,perl-moox-late)))
628 ("perl-module-install" ,perl-module-install)))
629 (home-page "https://metacpan.org/release/GnuPG-Interface")
630 (synopsis "Perl interface to GnuPG")
631 (description "@code{GnuPG::Interface} and its associated modules are
632 designed to provide an object-oriented method for interacting with GnuPG,
633 being able to perform functions such as but not limited to encrypting,
634 signing, decryption, verification, and key-listing parsing.")
635 (license license:perl-license)))
644 "https://github.com/jaymzh/pius/releases/download/v"
645 version "/pius-" version ".tar.bz2"))
648 "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
649 (build-system python-build-system)
650 (inputs `(("perl" ,perl) ; for 'pius-party-worksheet'
652 ("python-six" ,python2-six)))
655 #:python ,python-2 ; uses the Python 2 'print' syntax
657 (modify-phases %standard-phases
659 'build 'set-gpg-file-name
660 (lambda* (#:key inputs outputs #:allow-other-keys)
661 (let* ((gpg (string-append (assoc-ref inputs "gpg")
663 (substitute* "libpius/constants.py"
664 (("/usr/bin/gpg2") gpg))
666 (synopsis "Programs to simplify GnuPG key signing")
668 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
669 parties. It is the main utility and makes it possible to quickly and easily
670 sign each UID on a set of PGP keys. It is designed to take the pain out of
671 the sign-all-the-keys part of PGP Keysigning Party while adding security
674 pius-keyring-mgr and pius-party-worksheet help organisers of
675 PGP keysigning parties.")
676 (license license:gpl2)
677 (home-page "https://www.phildev.net/pius/index.shtml")))
679 (define-public signing-party
681 (name "signing-party")
683 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
688 (commit (string-append "v" version))))
689 (file-name (git-file-name name version))
692 "1aig5ssabzbk4mih7xd04vgr931bw0flbi8dz902wlr610gyv5s5"))))
693 (build-system gnu-build-system)
695 `(("autoconf" ,autoconf-wrapper)
696 ("automake" ,automake)))
697 (inputs `(("perl" ,perl)
698 ("perl-text-template" ,perl-text-template)
699 ("perl-mime-tools" ,perl-mime-tools)
700 ("perl-gnupg-interface" ,perl-gnupg-interface)
701 ("perl-net-idn-encode" ,perl-net-idn-encode)
704 `(#:tests? #f ; no test suite
706 (modify-phases %standard-phases
708 (lambda* (#:key outputs #:allow-other-keys)
709 (let ((out (assoc-ref outputs "out")))
710 (substitute* "keyanalyze/Makefile"
711 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
712 (substitute* "keyanalyze/Makefile"
713 (("\\./configure") (string-append "./configure --prefix=" out)))
714 (substitute* "gpgwrap/Makefile"
716 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
717 out "/bin/gpgwrap\n")))
718 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
719 "keylookup/Makefile" "sig2dot/Makefile"
720 "springgraph/Makefile")
722 (setenv "CONFIG_SHELL" (which "sh")))
725 (lambda* (#:key outputs #:allow-other-keys #:rest args)
726 (let ((out (assoc-ref outputs "out"))
727 (install (assoc-ref %standard-phases 'install)))
731 (copy-file (string-append dir "/" file)
732 (string-append out "/bin/" file)))
733 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
734 "gpglist" "gpg-mailkeys" "gpgparticipants")
735 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
736 "gpglist" "gpg-mailkeys" "gpgparticipants"))
739 (copy-file (string-append dir "/" file)
740 (string-append out "/share/man/man1/" file)))
741 '("caff" "caff" "caff" "gpgdir"
742 "gpg-key2ps" "gpglist" "gpg-mailkeys"
743 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
744 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
745 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
746 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
747 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
748 "process_keys.1" "pgpring.1" "keyanalyze.1")))
750 (add-after 'install 'wrap-programs
751 (lambda* (#:key outputs #:allow-other-keys)
752 (let* ((out (assoc-ref outputs "out")))
754 (string-append out "/bin/caff")
755 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
757 (synopsis "Collection of scripts for simplifying gnupg key signing")
759 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
760 including tools for signing keys, keyring analysis, and party preparation.
762 @item caff: CA - Fire and Forget signs and mails a key
763 @item pgp-clean: removes all non-self signatures from key
764 @item pgp-fixkey: removes broken packets from keys
765 @item gpg-mailkeys: simply mail out a signed key to its owner
766 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
767 @item gpgdir: recursive directory encryption tool
768 @item gpglist: show who signed which of your UIDs
769 @item gpgsigs: annotates list of GnuPG keys with already done signatures
770 @item gpgparticipants: create list of party participants for the organiser
771 @item gpgwrap: a passphrase wrapper
772 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
773 @item keylookup: ncurses wrapper around gpg --search
774 @item sig2dot: converts a list of GnuPG signatures to a .dot file
775 @item springgraph: creates a graph from a .dot file
777 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
778 ;; and caff and gpgsigs: bsd-3, see
779 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
780 (license license:gpl2)))
782 (define-public pinentry-tty
784 (name "pinentry-tty")
788 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
792 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
793 (build-system gnu-build-system)
795 `(#:configure-flags '("--enable-pinentry-tty")))
797 `(("ncurses" ,ncurses)
798 ("libassuan" ,libassuan)
799 ("libsecret" ,libsecret "out")))
801 `(("pkg-config" ,pkg-config)))
802 (home-page "https://gnupg.org/aegypten2/")
803 (synopsis "GnuPG's interface to passphrase input")
805 "Pinentry provides a console that allows users to enter a passphrase when
806 @code{gpg} is run and needs it.")
807 (license license:gpl2+)
808 (properties '((ftp-server . "ftp.gnupg.org")
809 (ftp-directory . "/gcrypt/pinentry")
810 (upstream-name . "pinentry")))))
812 (define-public pinentry-emacs
814 (inherit pinentry-tty)
815 (name "pinentry-emacs")
817 `(#:configure-flags '("--enable-pinentry-emacs")))
819 "Pinentry provides a console and an Emacs interface that allows users to
820 enter a passphrase when required by @code{gpg} or other software.")))
822 (define-public pinentry-gtk2
824 (inherit pinentry-tty)
825 (name "pinentry-gtk2")
827 `(#:configure-flags '("--enable-fallback-curses")))
831 ,@(package-inputs pinentry-tty)))
833 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
834 passphrase when @code{gpg} is run and needs it.")))
836 (define-public pinentry-gnome3
838 (inherit pinentry-tty)
839 (name "pinentry-gnome3")
844 ,@(package-inputs pinentry-tty)))
846 `(#:configure-flags '("--enable-pinentry-gnome3"
847 "--enable-fallback-curses")))
849 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
850 that allows users to enter a passphrase when required by @code{gpg} or other
853 (define-public pinentry-qt
855 (inherit pinentry-tty)
858 `(#:configure-flags '("--enable-fallback-curses")))
861 ,@(package-inputs pinentry-tty)))
863 "Pinentry provides a console and a Qt GUI that allows users to enter a
864 passphrase when @code{gpg} is run and needs it.")))
866 (define-public pinentry-efl
868 (inherit pinentry-tty)
869 (name "pinentry-efl")
872 (inherit (package-source pinentry-tty))
873 (patches (search-patches "pinentry-efl.patch"))))
875 '(#:configure-flags '("--enable-pinentry-efl"
876 "--enable-fallback-curses")
878 (modify-phases %standard-phases
881 (invoke "sh" "autogen.sh"))))))
883 `(("autoconf" ,autoconf)
884 ("automake" ,automake)
885 ("gettext" ,gettext-minimal)
886 ,@(package-native-inputs pinentry-tty)))
889 ,@(package-inputs pinentry-tty)))
891 "Pinentry provides a console and a graphical interface for the
892 @dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a
893 passphrase when @code{gpg} is run and needs it.")))
895 (define-public pinentry
896 (package (inherit pinentry-gtk2)
899 (define-public paperkey
905 (uri (string-append "https://www.jabberwocky.com/"
906 "software/paperkey/paperkey-"
910 "1xq5gni6gksjkd5avg0zpd73vsr97appksfx0gx2m38s4w9zsid2"))))
911 (build-system gnu-build-system)
914 (modify-phases %standard-phases
915 (add-before 'check 'patch-check-scripts
917 (substitute* '("checks/roundtrip.sh"
918 "checks/roundtrip-raw.sh")
919 (("/bin/echo") "echo"))
921 (home-page "https://www.jabberwocky.com/software/paperkey/")
922 (synopsis "Backup OpenPGP keys to paper")
924 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
925 for printing with paper and ink, which have amazingly long retention
926 qualities. To reconstruct a secret key, you re-enter those
927 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
928 them to transform your existing public key into a secret key.")
929 (license license:gpl2+)))
931 (define-public pgpdump
938 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
941 (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
942 (build-system gnu-build-system)
944 `(#:tests? #f ; no make check
945 #:configure-flags (list "--prefix=/")
946 #:make-flags (list "CC=gcc"
947 (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
950 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
951 (synopsis "PGP packet visualizer")
952 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
955 The output of this command is similar to GnuPG's list packets command,
956 however, pgpdump produces more detailed and easier to understand output.")
957 (license license:bsd-3)))
965 (uri (string-append "mirror://gnupg/gpa/"
966 name "-" version ".tar.bz2"))
969 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
970 (build-system gnu-build-system)
973 (modify-phases %standard-phases
974 (add-after 'install 'wrap-program
975 (lambda* (#:key inputs outputs #:allow-other-keys)
976 (let ((out (assoc-ref outputs "out"))
977 (gnupg (assoc-ref inputs "gnupg")))
978 (wrap-program (string-append out "/bin/gpa")
979 `("PATH" ":" prefix (,(string-append gnupg "/bin"))))
982 `(("pkg-config" ,pkg-config)))
986 ("libassuan" ,libassuan)
987 ("libgpg-error" ,libgpg-error)
989 (home-page "https://gnupg.org/software/gpa/")
990 (synopsis "Graphical user interface for GnuPG")
992 "GPA, the GNU Privacy Assistant, is a graphical user interface for
993 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
994 files, to verify signatures, and to manage the private and public keys.")
995 (license license:gpl3+)
996 (properties '((ftp-server . "ftp.gnupg.org")
997 (ftp-directory . "/gcrypt/gpa")))))
999 (define-public parcimonie
1005 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1006 "parcimonie/App-Parcimonie-"
1010 "14pvapvzrxh1yh8zgcj1llmc2dd8g1fgzskxlja21gmw8c88aqdk"))))
1011 (build-system perl-build-system)
1014 ("perl-config-general" ,perl-config-general)
1015 ("perl-clone" ,perl-clone)
1016 ("perl-data" ,perl-data)
1017 ("perl-exporter-tiny" ,perl-exporter-tiny)
1018 ("perl-file-homedir" ,perl-file-homedir)
1019 ("perl-file-sharedir" ,perl-file-sharedir)
1020 ("perl-file-which" ,perl-file-which)
1021 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
1022 ("perl-gnupg-interface" ,perl-gnupg-interface)
1023 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1024 ("perl-list-moreutils" ,perl-list-moreutils)
1025 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
1026 ("perl-lwp-online" ,perl-lwp-online)
1027 ("perl-module-build" ,perl-module-build)
1028 ("perl-module-pluggable-object" ,perl-module-pluggable)
1029 ("perl-moo" ,perl-moo)
1030 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
1031 ("perl-moox-late" ,perl-moox-late)
1032 ("perl-moox-options" ,perl-moox-options)
1033 ("perl-moox-strictconstructor" ,perl-moox-strictconstructor)
1034 ("perl-namespace-clean" ,perl-namespace-clean)
1035 ("perl-net-dbus" ,perl-net-dbus)
1036 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
1037 ("perl-path-tiny" ,perl-path-tiny)
1038 ("perl-strictures" ,perl-strictures-2)
1039 ("perl-test-most" ,perl-test-most)
1040 ("perl-test-trap" ,perl-test-trap)
1041 ("perl-time-duration" ,perl-time-duration)
1042 ("perl-time-duration-parse" ,perl-time-duration-parse)
1043 ("perl-try-tiny" ,perl-try-tiny)
1044 ("perl-type-tiny" ,perl-type-tiny)
1045 ("perl-types-path-tiny" ,perl-types-path-tiny)
1046 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1047 ("perl-xml-parser" ,perl-xml-parser)
1048 ("perl-xml-twig" ,perl-xml-twig)
1049 ("torsocks" ,torsocks)))
1051 `(("xorg-server" ,xorg-server-for-tests)))
1054 (modify-phases %standard-phases
1055 ;; Needed for using gpg-connect-agent during tests.
1056 (add-before 'check 'prepare-for-tests
1057 (lambda* (#:key inputs #:allow-other-keys)
1058 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1059 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1060 (setenv "DISPLAY" ":1")
1061 (setenv "HOME" "/tmp")
1062 ;; These tests are known to fail
1063 (delete-file "t/32-keyserver_defined_on_command_line.t")
1064 (delete-file "t/33-checkGpgHasDefinedKeyserver.t")
1065 ;; The applet is deprecated upstream.
1066 (delete-file "t/00-load_all.t")
1068 (add-before 'install 'fix-references
1069 (lambda* (#:key inputs outputs #:allow-other-keys)
1070 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
1071 ;; Skip check whether dependencies are in the PATH
1072 (("defined which.*") ""))
1074 (add-after 'install 'wrap-program
1075 (lambda* (#:key inputs outputs #:allow-other-keys)
1076 (let* ((out (assoc-ref outputs "out"))
1077 (perllib (string-append out "/lib/perl5/site_perl/"
1078 ,(package-version perl))))
1079 (wrap-program (string-append out "/bin/parcimonie")
1081 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1083 (home-page "https://gaffer.boum.org/intrigeri/code/parcimonie/")
1084 (synopsis "Incrementally refreshes a GnuPG keyring")
1085 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1086 that makes it hard to correlate the keyring content to an individual, and
1087 makes it hard to locate an individual based on an identifying subset of her
1088 keyring content. Parcimonie is a daemon that fetches one key at a time using
1089 the Tor network, waits a bit, changes the Tor circuit being used, and starts
1091 (license license:gpl1+)))
1093 (define-public jetring
1101 (url "https://salsa.debian.org/debian/jetring")
1102 (commit (string-append "debian/" version))))
1103 (file-name (git-file-name name version))
1106 "1acbx2vnbkms1c0wgcnh05d4g359sg5z0aiw541vx2qq9sgdhlv6"))))
1107 (build-system gnu-build-system)
1110 (modify-phases %standard-phases
1111 (delete 'configure) ; no configure script
1112 (add-before 'install 'hardlink-gnupg
1113 (lambda* (#:key inputs #:allow-other-keys)
1114 (let ((gpg (string-append (assoc-ref inputs "gnupg")
1116 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1117 (("gpg -") (string-append gpg " -"))
1118 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1121 (lambda* (#:key outputs #:allow-other-keys)
1122 (let* ((out (assoc-ref outputs "out"))
1123 (man (string-append out "/share/man")))
1124 (for-each (lambda (file)
1125 (install-file file (string-append out "/bin/")))
1126 (find-files "." "jetring-[[:alpha:]]+$"))
1127 (for-each (lambda (file)
1128 (install-file file (string-append man "/man1/")))
1129 (find-files "." ".*\\.1$"))
1130 (install-file "jetring.7" (string-append man "/man7/"))
1132 #:tests? #f)) ; no test phase
1136 (home-page "https://joeyh.name/code/jetring/")
1137 (synopsis "GnuPG keyring maintenance using changesets")
1139 "Jetring is a collection of tools that allow for gpg keyrings to be
1140 maintained using changesets. It was developed with the Debian keyring in mind,
1141 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1142 for multiple people to collaboratively edit.
1144 With jetring, changesets can be submitted, reviewed to see exactly what they
1145 will do, applied, and used to build a keyring. The origin of every change made
1146 to the keyring is available for auditing, and gpg signatures can be used for
1147 integrity guarantees.")
1148 (license license:gpl2+)))