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>
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 "0z696dmhfxm2n6pmr8b857wwljq9h633yi99bhbn7h88f91rigds"))
91 (patches (search-patches "libgpg-error-gawk-compat.patch"))
92 ;; XXX: Remove this snippet with the gawk patch above. It avoids having
93 ;; to call autoreconf for the Makefile.am change to take effect.
94 (modules '((guix build utils)))
97 (substitute* "src/Makefile.in"
98 (("namespace=errnos") "pkg_namespace=errnos"))
100 (build-system gnu-build-system)
102 (if (%current-target-system)
103 `(#:modules ((ice-9 match)
104 (guix build gnu-build-system)
107 (modify-phases %standard-phases
108 ;; When cross-compiling, some platform specific properties cannot
109 ;; be detected. Create a symlink to the appropriate platform
110 ;; file. See Cross-Compiling section at:
111 ;; https://github.com/gpg/libgpg-error/blob/master/README
112 (add-after 'unpack 'cross-symlinks
113 (lambda* (#:key target inputs #:allow-other-keys)
115 (match (string-take target
116 (string-index target #\-))
117 ("armhf" "arm-unknown-linux-gnueabi")
119 (string-append x "-unknown-linux-gnu")))))
121 (string-append "lock-obj-pub." triplet ".h")
122 "src/syscfg/lock-obj-pub.linux-gnu.h"))
125 (native-inputs `(("gettext" ,gettext-minimal)))
126 (home-page "https://gnupg.org")
127 (synopsis "Library of error values for GnuPG components")
129 "Libgpg-error is a small library that defines common error values
130 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
131 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
132 Daemon and possibly more in the future.")
133 (license license:lgpl2.0+)
134 (properties '((ftp-server . "ftp.gnupg.org")
135 (ftp-directory . "/gcrypt/libgpg-error")))))
137 (define-public libgcrypt
143 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
147 "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))
148 (build-system gnu-build-system)
150 `(("libgpg-error-host" ,libgpg-error)))
152 ;; Needed here for the 'gpg-error' program.
153 `(("libgpg-error-native" ,libgpg-error)))
155 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
156 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
157 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
159 (list (string-append "--with-gpg-error-prefix="
160 (assoc-ref %build-inputs "libgpg-error-host")))))
161 (outputs '("out" "debug"))
162 (home-page "https://gnupg.org/")
163 (synopsis "Cryptographic function library")
165 "Libgcrypt is a general-purpose cryptographic library. It provides the
166 standard cryptographic building blocks such as symmetric ciphers, hash
167 algorithms, public key algorithms, large integer functions and random number
169 (license license:lgpl2.0+)
170 (properties '((ftp-server . "ftp.gnupg.org")
171 (ftp-directory . "/gcrypt/libgcrypt")))))
173 (define-public libassuan
180 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
184 "00p7cpvzf0q3qwcgg51r9d0vbab4qga2xi8wpk2fgd36710b1g4i"))))
185 (build-system gnu-build-system)
187 `(("libgpg-error" ,libgpg-error)
189 (home-page "https://gnupg.org")
191 "IPC library used by GnuPG and related software")
193 "Libassuan is a small library implementing the so-called Assuan
194 protocol. This protocol is used for IPC between most newer
195 GnuPG components. Both, server and client side functions are
197 (license license:lgpl2.0+)
198 (properties '((ftp-server . "ftp.gnupg.org")
199 (ftp-directory . "/gcrypt/libassuan")))))
201 (define-public libksba
209 "mirror://gnupg/libksba/libksba-"
213 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
214 (build-system gnu-build-system)
216 `(("libgpg-error" ,libgpg-error)))
218 `(("libgpg-error" ,libgpg-error)))
221 (list ,@(if (%current-target-system)
222 '("CC_FOR_BUILD=gcc")
224 (string-append "--with-gpg-error-prefix="
225 (assoc-ref %build-inputs "libgpg-error")))))
226 (home-page "https://www.gnupg.org")
227 (synopsis "CMS and X.509 access library")
229 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
230 as well as the CMS easily accessible by other applications. Both
231 specifications are building blocks of S/MIME and TLS.")
232 (license license:gpl3+)
233 (properties '((ftp-server . "ftp.gnupg.org")
234 (ftp-directory . "/gcrypt/libksba")))))
243 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
245 (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
246 (build-system gnu-build-system)
247 (home-page "https://www.gnupg.org")
248 (synopsis "Non-preemptive thread library")
250 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
251 threads implementation.
253 In contrast to GNU Pth is is based on the system's standard threads
254 implementation. This allows the use of libraries which are not
255 compatible to GNU Pth.")
256 (license (list license:lgpl3+ license:gpl2+)) ; dual license
257 (properties '((ftp-server . "ftp.gnupg.org")
258 (ftp-directory . "/gcrypt/npth")))))
266 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
270 "1h6yx6sdpz3lf9gdppgxqcf73baynr8gflmh43286fkgw3058994"))))
271 (build-system gnu-build-system)
273 `(("pkg-config" ,pkg-config)))
276 ("libassuan" ,libassuan)
277 ("libgcrypt" ,libgcrypt)
278 ("libgpg-error" ,libgpg-error)
281 ("openldap" ,openldap)
282 ("pcsc-lite" ,pcsc-lite)
283 ("readline" ,readline)
287 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
288 ;; executable in its installation directory in
289 ;; /gnu/store before it has been installed.
290 "--enable-gnupg-builddir-envvar"
291 "--enable-all-tests")
293 (modify-phases %standard-phases
294 (add-before 'configure 'patch-paths
295 (lambda* (#:key inputs #:allow-other-keys)
296 (substitute* "scd/scdaemon.c"
297 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
298 (string-append "\"" (assoc-ref inputs "pcsc-lite")
301 (add-after 'build 'patch-scheme-tests
303 (substitute* (find-files "tests" ".\\.scm$")
304 (("/usr/bin/env gpgscm")
305 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
307 (add-before 'build 'patch-test-paths
309 (substitute* '("tests/inittests"
310 "tests/pkits/inittests"
312 "tests/pkits/common.sh"
313 "tests/pkits/Makefile")
314 (("/bin/pwd") (which "pwd")))
315 (substitute* "common/t-exectool.c"
316 (("/bin/cat") (which "cat"))
317 (("/bin/true") (which "true"))
318 (("/bin/false") (which "false")))
320 (home-page "https://gnupg.org/")
321 (synopsis "GNU Privacy Guard")
323 "The GNU Privacy Guard is a complete implementation of the OpenPGP
324 standard. It is used to encrypt and sign data and communication. It
325 features powerful key management and the ability to access public key
326 servers. It includes several libraries: libassuan (IPC between GnuPG
327 components), libgpg-error (centralized GnuPG error values), and
328 libskba (working with X.509 certificates and CMS data).")
329 (license license:gpl3+)
330 (properties '((ftp-server . "ftp.gnupg.org")
331 (ftp-directory . "/gcrypt/gnupg")))))
333 (define-public gnupg-2.0
334 (package (inherit gnupg)
338 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
342 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
348 ("libassuan" ,libassuan)
349 ("libgcrypt" ,libgcrypt)
350 ("libgpg-error" ,libgpg-error)
353 ("openldap" ,openldap)
355 ("readline" ,readline)))
358 (modify-phases %standard-phases
359 (add-before 'configure 'patch-config-files
361 (substitute* "tests/openpgp/Makefile.in"
362 (("/bin/sh") (which "sh")))
364 (add-after 'install 'rename-v2-commands
365 (lambda* (#:key outputs #:allow-other-keys)
366 ;; Upstream suggests removing the trailing '2' from command names:
367 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
368 (let ((out (assoc-ref outputs "out")))
369 (with-directory-excursion (string-append out "/bin")
370 (rename-file "gpgv2" "gpgv")
371 (rename-file "gpg2" "gpg")
373 ;; Keep the old name around to ease transition.
374 (symlink "gpgv" "gpgv2")
375 (symlink "gpg" "gpg2")
377 (properties `((superseded . ,gnupg)))))
379 (define-public gnupg-1
380 (package (inherit gnupg)
384 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
388 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
394 ("readline" ,readline)
395 ("libgpg-error" ,libgpg-error)))
398 (modify-phases %standard-phases
399 (add-after 'unpack 'patch-check-sh
401 (substitute* "checks/Makefile.in"
402 (("/bin/sh") (which "sh")))
412 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
414 (base32 "0imyjfryvvjdbai454p70zcr95m94j9xnzywrlilqdw2fqi0pqy4"))))
415 (build-system gnu-build-system)
419 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
420 `(("libgpg-error" ,libgpg-error)))
422 `(("libassuan" ,libassuan)))
423 (home-page "https://www.gnupg.org/related_software/gpgme/")
424 (synopsis "Library providing simplified access to GnuPG functionality")
426 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
427 easier for applications. It provides a High-Level Crypto API for encryption,
428 decryption, signing, signature verification and key management. Currently
429 it uses GnuPG as its backend but the API isn't restricted to this engine.
431 Because the direct use of GnuPG from an application can be a complicated
432 programming task, it is suggested that all software should try to use GPGME
433 instead. This way bug fixes or improvements can be done at a central place
434 and every application benefits from this.")
435 (license license:lgpl2.1+)
436 (properties '((ftp-server . "ftp.gnupg.org")
437 (ftp-directory . "/gcrypt/gpgme")))))
439 (define-public qgpgme
445 (modify-phases %standard-phases
446 (add-before 'build 'chdir-and-symlink
447 (lambda* (#:key inputs #:allow-other-keys)
448 (let ((gpgme (assoc-ref inputs "gpgme")))
449 (symlink (string-append gpgme "/lib/libgpgmepp.la")
450 "lang/cpp/src/libgpgmepp.la")
451 (symlink (string-append gpgme "/lib/libgpgme.la")
456 `(("pkg-config" ,pkg-config)
457 ,@(package-native-inputs gpgme)))
461 ,@(package-inputs gpgme)))
462 (synopsis "Qt API bindings for gpgme")
463 (description "QGpgme provides a very high level Qt API around GpgMEpp.
465 QGpgME was originally developed as part of libkleo and incorporated into
466 gpgpme starting with version 1.7.")
467 (license license:gpl2+))) ;; Note: this differs from gpgme
469 (define-public guile-gcrypt
471 (name "guile-gcrypt")
473 (home-page "https://notabug.org/cwebber/guile-gcrypt")
477 (url (string-append home-page ".git"))
478 (commit (string-append "v" version))))
481 "0n232iyayc46f7hywmjw0jr7pbmmz5h4b04jskhkzz9gxz0ci99c"))
482 (file-name (string-append name "-" version "-checkout"))))
483 (build-system gnu-build-system)
485 ;; When cross-compiling, the bash script libgcrypt-config provided by
486 ;; libgcrypt must be accessible during configure phase.
487 `(,@(if (%current-target-system)
489 (modify-phases %standard-phases
490 (add-before 'configure 'add-libgrypt-config
492 (setenv "PATH" (string-append
493 (assoc-ref %build-inputs "libgcrypt")
499 `(("pkg-config" ,pkg-config)
500 ("autoconf" ,autoconf)
501 ("automake" ,automake)
503 ("guile" ,guile-2.2)))
505 `(("guile" ,guile-2.2)
506 ("libgcrypt" ,libgcrypt)))
507 (synopsis "Cryptography library for Guile using Libgcrypt")
509 "Guile-Gcrypt provides a Guile 2.x interface to a subset of the
510 GNU Libgcrypt crytographic library. It provides modules for cryptographic
511 hash functions, message authentication codes (MAC), public-key cryptography,
512 strong randomness, and more. It is implemented using the foreign function
513 interface (FFI) of Guile.")
514 (license license:gpl3+)))
516 (define-public guile2.0-gcrypt
517 (package (inherit guile-gcrypt)
518 (name "guile2.0-gcrypt")
520 `(("guile" ,guile-2.0)
521 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
523 (define-public guile3.0-gcrypt
525 (inherit guile-gcrypt)
526 (name "guile3.0-gcrypt")
528 `(("guile" ,guile-next)
529 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
531 (define-public python-gpg
537 (uri (pypi-uri "gpg" version))
540 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
541 (build-system python-build-system)
544 (modify-phases %standard-phases
545 (add-before 'build 'set-environment
547 (substitute* "setup.py"
548 (("cc") (which "gcc")))
550 #:tests? #f)) ; No test suite.
555 (home-page (package-home-page gpgme))
556 (synopsis "Python bindings for GPGME GnuPG cryptography library")
557 (description "This package provides Python bindings to the GPGME GnuPG
558 cryptographic library. It is developed in the GPGME source code, and then
559 distributed separately.")
560 (license license:lgpl2.1+)))
562 (define-public python2-gpg
563 (package-with-python2 python-gpg))
565 (define-public python-pygpgme
567 (name "python-pygpgme")
572 (uri (pypi-uri "pygpgme" version))
575 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
576 ;; Unfortunately, we have to disable some tests due to some gpg-agent
578 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
579 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
580 "python-pygpgme-fix-pinentry-tests.patch"))))
583 (modify-phases %standard-phases
584 (add-before 'build 'make-build
585 (lambda _ (invoke "make" "build")))
587 (lambda _ (invoke "make" "check"))))))
588 (build-system python-build-system)
590 `(("gnupg" ,gnupg-1)))
593 (home-page "https://launchpad.net/pygpgme")
594 (synopsis "Python module for working with OpenPGP messages")
596 "PyGPGME is a Python module that lets you sign, verify, encrypt and
597 decrypt messages using the OpenPGP format by making use of GPGME.")
598 (license license:lgpl2.1+)))
600 (define-public python2-pygpgme
601 (package-with-python2 python-pygpgme))
603 (define-public python-gnupg
605 (name "python-gnupg")
610 (uri (pypi-uri "python-gnupg" version))
613 "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
614 (build-system python-build-system)
617 (modify-phases %standard-phases
620 (substitute* "test_gnupg.py"
621 ;; Unsure why this test fails.
622 (("'test_search_keys'") "True")
623 (("def test_search_keys") "def disabled__search_keys"))
624 (setenv "USERNAME" "guixbuilder")
625 ;; The doctests are extremely slow and sometimes time out,
626 ;; so we disable them.
628 "test_gnupg.py" "--no-doctests"))))))
630 `(("gnupg" ,gnupg-1)))
631 (home-page "https://packages.python.org/python-gnupg/index.html")
632 (synopsis "Wrapper for the GNU Privacy Guard")
634 "This module allows easy access to GnuPG’s key management, encryption
635 and signature functionality from Python programs.")
636 (license license:bsd-3)))
638 (define-public python2-gnupg
639 (package-with-python2 python-gnupg))
641 (define-public perl-gnupg-interface
643 (name "perl-gnupg-interface")
647 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
648 "GnuPG-Interface-" version ".tar.gz"))
651 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
652 (build-system perl-build-system)
655 (modify-phases %standard-phases
656 ;; FIXME: This test fails for unknown reasons
657 (add-after 'unpack 'delete-broken-test
659 (delete-file "t/encrypt_symmetrically.t")
662 `(("gnupg" ,gnupg-1)))
664 `(("perl-moo" ,perl-moo)
665 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
666 ("perl-moox-late" ,perl-moox-late)))
669 ("perl-module-install" ,perl-module-install)))
670 (home-page "https://metacpan.org/release/GnuPG-Interface")
671 (synopsis "Perl interface to GnuPG")
672 (description "@code{GnuPG::Interface} and its associated modules are
673 designed to provide an object-oriented method for interacting with GnuPG,
674 being able to perform functions such as but not limited to encrypting,
675 signing, decryption, verification, and key-listing parsing.")
676 (license license:perl-license)))
685 "https://github.com/jaymzh/pius/releases/download/v"
686 version "/pius-" version ".tar.bz2"))
689 "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
690 (build-system python-build-system)
691 (inputs `(("perl" ,perl) ; for 'pius-party-worksheet'
693 ("python-six" ,python2-six)))
696 #:python ,python-2 ; uses the Python 2 'print' syntax
698 (modify-phases %standard-phases
700 'build 'set-gpg-file-name
701 (lambda* (#:key inputs outputs #:allow-other-keys)
702 (let* ((gpg (string-append (assoc-ref inputs "gpg")
704 (substitute* "libpius/constants.py"
705 (("/usr/bin/gpg2") gpg))
707 (synopsis "Programs to simplify GnuPG key signing")
709 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
710 parties. It is the main utility and makes it possible to quickly and easily
711 sign each UID on a set of PGP keys. It is designed to take the pain out of
712 the sign-all-the-keys part of PGP Keysigning Party while adding security
715 pius-keyring-mgr and pius-party-worksheet help organisers of
716 PGP keysigning parties.")
717 (license license:gpl2)
718 (home-page "https://www.phildev.net/pius/index.shtml")))
720 (define-public signing-party
722 (name "signing-party")
724 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
729 (commit (string-append "v" version))))
730 (file-name (git-file-name name version))
733 "0lq8nmwjmysry0n4jg6vb7bh0lagbyb9pa11ii3s41p1mhzchf2r"))))
734 (build-system gnu-build-system)
736 `(("autoconf" ,autoconf-wrapper)
737 ("automake" ,automake)))
738 (inputs `(("perl" ,perl)
739 ("perl-text-template" ,perl-text-template)
740 ("perl-mime-tools" ,perl-mime-tools)
741 ("perl-gnupg-interface" ,perl-gnupg-interface)
742 ("perl-net-idn-encode" ,perl-net-idn-encode)
745 `(#:tests? #f ; no test suite
747 (modify-phases %standard-phases
749 (lambda* (#:key outputs #:allow-other-keys)
750 (let ((out (assoc-ref outputs "out")))
751 (substitute* "keyanalyze/Makefile"
752 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
753 (substitute* "keyanalyze/Makefile"
754 (("\\./configure") (string-append "./configure --prefix=" out)))
755 (substitute* "gpgwrap/Makefile"
757 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
758 out "/bin/gpgwrap\n")))
759 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
760 "keylookup/Makefile" "sig2dot/Makefile"
761 "springgraph/Makefile")
763 (setenv "CONFIG_SHELL" (which "sh")))
766 (lambda* (#:key outputs #:allow-other-keys #:rest args)
767 (let ((out (assoc-ref outputs "out"))
768 (install (assoc-ref %standard-phases 'install)))
772 (copy-file (string-append dir "/" file)
773 (string-append out "/bin/" file)))
774 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
775 "gpglist" "gpg-mailkeys" "gpgparticipants")
776 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
777 "gpglist" "gpg-mailkeys" "gpgparticipants"))
780 (copy-file (string-append dir "/" file)
781 (string-append out "/share/man/man1/" file)))
782 '("caff" "caff" "caff" "gpgdir"
783 "gpg-key2ps" "gpglist" "gpg-mailkeys"
784 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
785 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
786 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
787 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
788 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
789 "process_keys.1" "pgpring.1" "keyanalyze.1")))
791 (add-after 'install 'wrap-programs
792 (lambda* (#:key outputs #:allow-other-keys)
793 (let* ((out (assoc-ref outputs "out")))
795 (string-append out "/bin/caff")
796 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
798 (synopsis "Collection of scripts for simplifying gnupg key signing")
800 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
801 including tools for signing keys, keyring analysis, and party preparation.
803 @item caff: CA - Fire and Forget signs and mails a key
804 @item pgp-clean: removes all non-self signatures from key
805 @item pgp-fixkey: removes broken packets from keys
806 @item gpg-mailkeys: simply mail out a signed key to its owner
807 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
808 @item gpgdir: recursive directory encryption tool
809 @item gpglist: show who signed which of your UIDs
810 @item gpgsigs: annotates list of GnuPG keys with already done signatures
811 @item gpgparticipants: create list of party participants for the organiser
812 @item gpgwrap: a passphrase wrapper
813 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
814 @item keylookup: ncurses wrapper around gpg --search
815 @item sig2dot: converts a list of GnuPG signatures to a .dot file
816 @item springgraph: creates a graph from a .dot file
818 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
819 ;; and caff and gpgsigs: bsd-3, see
820 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
821 (license license:gpl2)))
823 (define-public pinentry-tty
825 (name "pinentry-tty")
829 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
833 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
834 (build-system gnu-build-system)
836 `(#:configure-flags '("--enable-pinentry-tty")))
838 `(("ncurses" ,ncurses)
839 ("libassuan" ,libassuan)
840 ("libsecret" ,libsecret "out")))
842 `(("pkg-config" ,pkg-config)))
843 (home-page "https://gnupg.org/aegypten2/")
844 (synopsis "GnuPG's interface to passphrase input")
846 "Pinentry provides a console that allows users to enter a passphrase when
847 @code{gpg} is run and needs it.")
848 (license license:gpl2+)
849 (properties '((ftp-server . "ftp.gnupg.org")
850 (ftp-directory . "/gcrypt/pinentry")
851 (upstream-name . "pinentry")))))
853 (define-public pinentry-emacs
855 (inherit pinentry-tty)
856 (name "pinentry-emacs")
858 `(#:configure-flags '("--enable-pinentry-emacs")))
860 "Pinentry provides a console and an Emacs interface that allows users to
861 enter a passphrase when required by @code{gpg} or other software.")))
863 (define-public pinentry-gtk2
865 (inherit pinentry-tty)
866 (name "pinentry-gtk2")
870 ,@(package-inputs pinentry-tty)))
872 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
873 passphrase when @code{gpg} is run and needs it.")))
875 (define-public pinentry-gnome3
877 (inherit pinentry-tty)
878 (name "pinentry-gnome3")
883 ,@(package-inputs pinentry-tty)))
885 `(#:configure-flags '("--enable-pinentry-gnome3")))
887 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
888 that allows users to enter a passphrase when required by @code{gpg} or other
891 (define-public pinentry-qt
893 (inherit pinentry-tty)
897 ,@(package-inputs pinentry-tty)))
899 "Pinentry provides a console and a Qt GUI that allows users to enter a
900 passphrase when @code{gpg} is run and needs it.")))
902 (define-public pinentry-efl
904 (inherit pinentry-tty)
905 (name "pinentry-efl")
908 (inherit (package-source pinentry-tty))
909 (patches (search-patches "pinentry-efl.patch"))))
911 '(#:configure-flags '("--enable-pinentry-efl")
913 (modify-phases %standard-phases
916 (invoke "sh" "autogen.sh"))))))
918 `(("autoconf" ,autoconf)
919 ("automake" ,automake)
920 ("gettext" ,gettext-minimal)
921 ,@(package-native-inputs pinentry-tty)))
924 ,@(package-inputs pinentry-tty)))
926 "Pinentry provides a console and a graphical interface for the
927 @dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a
928 passphrase when @code{gpg} is run and needs it.")))
930 (define-public pinentry
931 (package (inherit pinentry-gtk2)
934 (define-public paperkey
940 (uri (string-append "https://www.jabberwocky.com/"
941 "software/paperkey/paperkey-"
945 "1xq5gni6gksjkd5avg0zpd73vsr97appksfx0gx2m38s4w9zsid2"))))
946 (build-system gnu-build-system)
949 (modify-phases %standard-phases
950 (add-before 'check 'patch-check-scripts
952 (substitute* '("checks/roundtrip.sh"
953 "checks/roundtrip-raw.sh")
954 (("/bin/echo") "echo"))
956 (home-page "https://www.jabberwocky.com/software/paperkey/")
957 (synopsis "Backup OpenPGP keys to paper")
959 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
960 for printing with paper and ink, which have amazingly long retention
961 qualities. To reconstruct a secret key, you re-enter those
962 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
963 them to transform your existing public key into a secret key.")
964 (license license:gpl2+)))
966 (define-public pgpdump
973 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
976 (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
977 (build-system gnu-build-system)
979 `(#:tests? #f ; no make check
980 #:configure-flags (list "--prefix=/")
981 #:make-flags (list "CC=gcc"
982 (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
985 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
986 (synopsis "PGP packet visualizer")
987 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
990 The output of this command is similar to GnuPG's list packets command,
991 however, pgpdump produces more detailed and easier to understand output.")
992 (license license:bsd-3)))
1000 (uri (string-append "mirror://gnupg/gpa/"
1001 name "-" version ".tar.bz2"))
1004 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
1005 (build-system gnu-build-system)
1007 `(("pkg-config" ,pkg-config)))
1011 ("libassuan" ,libassuan)
1012 ("libgpg-error" ,libgpg-error)
1013 ("gtk+-2" ,gtk+-2)))
1014 (home-page "https://gnupg.org/software/gpa/")
1015 (synopsis "Graphical user interface for GnuPG")
1017 "GPA, the GNU Privacy Assistant, is a graphical user interface for
1018 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
1019 files, to verify signatures, and to manage the private and public keys.")
1020 (license license:gpl3+)
1021 (properties '((ftp-server . "ftp.gnupg.org")
1022 (ftp-directory . "/gcrypt/gpa")))))
1024 (define-public parcimonie
1030 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1031 "parcimonie/App-Parcimonie-"
1035 "14pvapvzrxh1yh8zgcj1llmc2dd8g1fgzskxlja21gmw8c88aqdk"))))
1036 (build-system perl-build-system)
1039 ("perl-config-general" ,perl-config-general)
1040 ("perl-clone" ,perl-clone)
1041 ("perl-data" ,perl-data)
1042 ("perl-exporter-tiny" ,perl-exporter-tiny)
1043 ("perl-file-homedir" ,perl-file-homedir)
1044 ("perl-file-sharedir" ,perl-file-sharedir)
1045 ("perl-file-which" ,perl-file-which)
1046 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
1047 ("perl-gnupg-interface" ,perl-gnupg-interface)
1048 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1049 ("perl-list-moreutils" ,perl-list-moreutils)
1050 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
1051 ("perl-lwp-online" ,perl-lwp-online)
1052 ("perl-module-build" ,perl-module-build)
1053 ("perl-module-pluggable-object" ,perl-module-pluggable)
1054 ("perl-moo" ,perl-moo)
1055 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
1056 ("perl-moox-late" ,perl-moox-late)
1057 ("perl-moox-options" ,perl-moox-options)
1058 ("perl-moox-strictconstructor" ,perl-moox-strictconstructor)
1059 ("perl-namespace-clean" ,perl-namespace-clean)
1060 ("perl-net-dbus" ,perl-net-dbus)
1061 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
1062 ("perl-path-tiny" ,perl-path-tiny)
1063 ("perl-strictures" ,perl-strictures-2)
1064 ("perl-test-most" ,perl-test-most)
1065 ("perl-test-trap" ,perl-test-trap)
1066 ("perl-time-duration" ,perl-time-duration)
1067 ("perl-time-duration-parse" ,perl-time-duration-parse)
1068 ("perl-try-tiny" ,perl-try-tiny)
1069 ("perl-type-tiny" ,perl-type-tiny)
1070 ("perl-types-path-tiny" ,perl-types-path-tiny)
1071 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1072 ("perl-xml-parser" ,perl-xml-parser)
1073 ("perl-xml-twig" ,perl-xml-twig)
1074 ("torsocks" ,torsocks)))
1076 `(("xorg-server" ,xorg-server-for-tests)))
1079 (modify-phases %standard-phases
1080 ;; Needed for using gpg-connect-agent during tests.
1081 (add-before 'check 'prepare-for-tests
1082 (lambda* (#:key inputs #:allow-other-keys)
1083 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1084 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1085 (setenv "DISPLAY" ":1")
1086 (setenv "HOME" "/tmp")
1087 ;; These tests are known to fail
1088 (delete-file "t/32-keyserver_defined_on_command_line.t")
1089 (delete-file "t/33-checkGpgHasDefinedKeyserver.t")
1090 ;; The applet is deprecated upstream.
1091 (delete-file "t/00-load_all.t")
1093 (add-before 'install 'fix-references
1094 (lambda* (#:key inputs outputs #:allow-other-keys)
1095 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
1096 ;; Skip check whether dependencies are in the PATH
1097 (("defined which.*") ""))
1099 (add-after 'install 'wrap-program
1100 (lambda* (#:key inputs outputs #:allow-other-keys)
1101 (let* ((out (assoc-ref outputs "out"))
1102 (perllib (string-append out "/lib/perl5/site_perl/"
1103 ,(package-version perl))))
1104 (wrap-program (string-append out "/bin/parcimonie")
1106 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1108 (home-page "https://gaffer.boum.org/intrigeri/code/parcimonie/")
1109 (synopsis "Incrementally refreshes a GnuPG keyring")
1110 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1111 that makes it hard to correlate the keyring content to an individual, and
1112 makes it hard to locate an individual based on an identifying subset of her
1113 keyring content. Parcimonie is a daemon that fetches one key at a time using
1114 the Tor network, waits a bit, changes the Tor circuit being used, and starts
1116 (license license:gpl1+)))
1118 (define-public jetring
1125 (uri (string-append "mirror://debian/pool/main/j/" name "/"
1126 name "_" version ".tar.xz"))
1129 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
1130 (build-system gnu-build-system)
1133 (modify-phases %standard-phases
1134 (delete 'configure) ; no configure script
1135 (add-before 'install 'hardlink-gnupg
1136 (lambda* (#:key inputs #:allow-other-keys)
1137 (let ((gpg (string-append (assoc-ref inputs "gnupg")
1139 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1140 (("gpg -") (string-append gpg " -"))
1141 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1144 (lambda* (#:key outputs #:allow-other-keys)
1145 (let* ((out (assoc-ref outputs "out"))
1146 (man (string-append out "/share/man")))
1147 (for-each (lambda (file)
1148 (install-file file (string-append out "/bin/")))
1149 (find-files "." "jetring-[[:alpha:]]+$"))
1150 (for-each (lambda (file)
1151 (install-file file (string-append man "/man1/")))
1152 (find-files "." ".*\\.1$"))
1153 (install-file "jetring.7" (string-append man "/man7/"))
1155 #:tests? #f)) ; no test phase
1159 (home-page "https://joeyh.name/code/jetring/")
1160 (synopsis "GnuPG keyring maintenance using changesets")
1162 "Jetring is a collection of tools that allow for gpg keyrings to be
1163 maintained using changesets. It was developed with the Debian keyring in mind,
1164 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1165 for multiple people to collaboratively edit.
1167 With jetring, changesets can be submitted, reviewed to see exactly what they
1168 will do, applied, and used to build a keyring. The origin of every change made
1169 to the keyring is available for auditing, and gpg signatures can be used for
1170 integrity guarantees.")
1171 (license license:gpl2+)))