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 "1dj1razn35srkgadx3i30yr0q037cr0dn54m6a54vxgh3zlsirmz"))))
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 "0p6ss4f3vlkf91pmp27bmvfr5bdxxi0pb3dmxpqljglbsx4mxd8h"))))
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-2.0
330 (package (inherit gnupg)
334 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
338 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
344 ("libassuan" ,libassuan)
345 ("libgcrypt" ,libgcrypt)
346 ("libgpg-error" ,libgpg-error)
349 ("openldap" ,openldap)
351 ("readline" ,readline)))
354 (modify-phases %standard-phases
355 (add-before 'configure 'patch-config-files
357 (substitute* "tests/openpgp/Makefile.in"
358 (("/bin/sh") (which "sh")))
360 (add-after 'install 'rename-v2-commands
361 (lambda* (#:key outputs #:allow-other-keys)
362 ;; Upstream suggests removing the trailing '2' from command names:
363 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
364 (let ((out (assoc-ref outputs "out")))
365 (with-directory-excursion (string-append out "/bin")
366 (rename-file "gpgv2" "gpgv")
367 (rename-file "gpg2" "gpg")
369 ;; Keep the old name around to ease transition.
370 (symlink "gpgv" "gpgv2")
371 (symlink "gpg" "gpg2")
373 (properties `((superseded . ,gnupg)))))
375 (define-public gnupg-1
376 (package (inherit gnupg)
380 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
384 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
390 ("readline" ,readline)
391 ("libgpg-error" ,libgpg-error)))
394 (modify-phases %standard-phases
395 (add-after 'unpack 'patch-check-sh
397 (substitute* "checks/Makefile.in"
398 (("/bin/sh") (which "sh")))
408 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
410 (base32 "01s3rlspykbm9vmi5rfbdm3d20ip6yni69r48idqzlmhlq8ggwff"))))
411 (build-system gnu-build-system)
415 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
416 `(("libgpg-error" ,libgpg-error)))
418 `(("libassuan" ,libassuan)))
419 (home-page "https://www.gnupg.org/related_software/gpgme/")
420 (synopsis "Library providing simplified access to GnuPG functionality")
422 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
423 easier for applications. It provides a High-Level Crypto API for encryption,
424 decryption, signing, signature verification and key management. Currently
425 it uses GnuPG as its backend but the API isn't restricted to this engine.
427 Because the direct use of GnuPG from an application can be a complicated
428 programming task, it is suggested that all software should try to use GPGME
429 instead. This way bug fixes or improvements can be done at a central place
430 and every application benefits from this.")
431 (license license:lgpl2.1+)
432 (properties '((ftp-server . "ftp.gnupg.org")
433 (ftp-directory . "/gcrypt/gpgme")))))
435 (define-public qgpgme
441 (modify-phases %standard-phases
442 (add-before 'build 'chdir-and-symlink
443 (lambda* (#:key inputs #:allow-other-keys)
444 (let ((gpgme (assoc-ref inputs "gpgme")))
445 (symlink (string-append gpgme "/lib/libgpgmepp.la")
446 "lang/cpp/src/libgpgmepp.la")
447 (symlink (string-append gpgme "/lib/libgpgme.la")
452 `(("pkg-config" ,pkg-config)
453 ,@(package-native-inputs gpgme)))
457 ,@(package-inputs gpgme)))
458 (synopsis "Qt API bindings for gpgme")
459 (description "QGpgme provides a very high level Qt API around GpgMEpp.
461 QGpgME was originally developed as part of libkleo and incorporated into
462 gpgpme starting with version 1.7.")
463 (license license:gpl2+))) ;; Note: this differs from gpgme
465 (define-public guile-gcrypt
467 (name "guile-gcrypt")
469 (home-page "https://notabug.org/cwebber/guile-gcrypt")
473 (url (string-append home-page ".git"))
474 (commit (string-append "v" version))))
477 "0m29fg4pdfifnqqsa437zc5c1bhbfh62mc69ba25ak4x2cla41ll"))
478 (file-name (git-file-name name version))))
479 (build-system gnu-build-system)
481 ;; When cross-compiling, the bash script libgcrypt-config provided by
482 ;; libgcrypt must be accessible during configure phase.
483 `(,@(if (%current-target-system)
485 (modify-phases %standard-phases
486 (add-before 'configure 'add-libgrypt-config
488 (setenv "PATH" (string-append
489 (assoc-ref %build-inputs "libgcrypt")
495 `(("pkg-config" ,pkg-config)
496 ("autoconf" ,autoconf)
497 ("automake" ,automake)
499 ("guile" ,guile-3.0)))
501 `(("guile" ,guile-3.0)
502 ("libgcrypt" ,libgcrypt)))
503 (synopsis "Cryptography library for Guile using Libgcrypt")
505 "Guile-Gcrypt provides a Guile interface to a subset of the
506 GNU Libgcrypt crytographic library. It provides modules for cryptographic
507 hash functions, message authentication codes (MAC), public-key cryptography,
508 strong randomness, and more. It is implemented using the foreign function
509 interface (FFI) of Guile.")
510 (license license:gpl3+)))
512 (define-public guile2.0-gcrypt
513 (package (inherit guile-gcrypt)
514 (name "guile2.0-gcrypt")
516 `(("guile" ,guile-2.0)
517 ,@(alist-delete "guile" (package-native-inputs guile-gcrypt))))
519 `(("guile" ,guile-2.0)
520 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
522 (define-public guile2.2-gcrypt
524 (inherit guile-gcrypt)
525 (name "guile2.2-gcrypt")
527 `(("guile" ,guile-2.2)
528 ,@(alist-delete "guile" (package-native-inputs guile-gcrypt))))
530 `(("guile" ,guile-2.2)
531 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
533 (define-public guile3.0-gcrypt
534 (deprecated-package "guile3.0-gcrypt" guile-gcrypt))
536 (define-public python-gpg
542 (uri (pypi-uri "gpg" version))
545 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
546 (build-system python-build-system)
549 (modify-phases %standard-phases
550 (add-before 'build 'set-environment
552 (substitute* "setup.py"
553 (("cc") (which "gcc")))
555 #:tests? #f)) ; No test suite.
560 (home-page (package-home-page gpgme))
561 (synopsis "Python bindings for GPGME GnuPG cryptography library")
562 (description "This package provides Python bindings to the GPGME GnuPG
563 cryptographic library. It is developed in the GPGME source code, and then
564 distributed separately.")
565 (license license:lgpl2.1+)))
567 (define-public python2-gpg
568 (package-with-python2 python-gpg))
570 (define-public python-pygpgme
572 (name "python-pygpgme")
577 (uri (pypi-uri "pygpgme" version))
580 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
581 ;; Unfortunately, we have to disable some tests due to some gpg-agent
583 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
584 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
585 "python-pygpgme-fix-pinentry-tests.patch"))))
588 (modify-phases %standard-phases
589 (add-before 'build 'make-build
590 (lambda _ (invoke "make" "build")))
592 (lambda _ (invoke "make" "check"))))))
593 (build-system python-build-system)
595 `(("gnupg" ,gnupg-1)))
598 (home-page "https://launchpad.net/pygpgme")
599 (synopsis "Python module for working with OpenPGP messages")
601 "PyGPGME is a Python module that lets you sign, verify, encrypt and
602 decrypt messages using the OpenPGP format by making use of GPGME.")
603 (license license:lgpl2.1+)))
605 (define-public python2-pygpgme
606 (package-with-python2 python-pygpgme))
608 (define-public python-gnupg
610 (name "python-gnupg")
615 (uri (pypi-uri "python-gnupg" version))
618 "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
619 (build-system python-build-system)
622 (modify-phases %standard-phases
625 (substitute* "test_gnupg.py"
626 ;; Unsure why this test fails.
627 (("'test_search_keys'") "True")
628 (("def test_search_keys") "def disabled__search_keys"))
629 (setenv "USERNAME" "guixbuilder")
630 ;; The doctests are extremely slow and sometimes time out,
631 ;; so we disable them.
633 "test_gnupg.py" "--no-doctests"))))))
635 `(("gnupg" ,gnupg-1)))
636 (home-page "https://packages.python.org/python-gnupg/index.html")
637 (synopsis "Wrapper for the GNU Privacy Guard")
639 "This module allows easy access to GnuPG’s key management, encryption
640 and signature functionality from Python programs.")
641 (license license:bsd-3)))
643 (define-public python2-gnupg
644 (package-with-python2 python-gnupg))
646 (define-public perl-gnupg-interface
648 (name "perl-gnupg-interface")
652 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
653 "GnuPG-Interface-" version ".tar.gz"))
656 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
657 (build-system perl-build-system)
660 (modify-phases %standard-phases
661 ;; FIXME: This test fails for unknown reasons
662 (add-after 'unpack 'delete-broken-test
664 (delete-file "t/encrypt_symmetrically.t")
667 `(("gnupg" ,gnupg-1)))
669 `(("perl-moo" ,perl-moo)
670 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
671 ("perl-moox-late" ,perl-moox-late)))
674 ("perl-module-install" ,perl-module-install)))
675 (home-page "https://metacpan.org/release/GnuPG-Interface")
676 (synopsis "Perl interface to GnuPG")
677 (description "@code{GnuPG::Interface} and its associated modules are
678 designed to provide an object-oriented method for interacting with GnuPG,
679 being able to perform functions such as but not limited to encrypting,
680 signing, decryption, verification, and key-listing parsing.")
681 (license license:perl-license)))
690 "https://github.com/jaymzh/pius/releases/download/v"
691 version "/pius-" version ".tar.bz2"))
694 "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
695 (build-system python-build-system)
696 (inputs `(("perl" ,perl) ; for 'pius-party-worksheet'
698 ("python-six" ,python2-six)))
701 #:python ,python-2 ; uses the Python 2 'print' syntax
703 (modify-phases %standard-phases
705 'build 'set-gpg-file-name
706 (lambda* (#:key inputs outputs #:allow-other-keys)
707 (let* ((gpg (string-append (assoc-ref inputs "gpg")
709 (substitute* "libpius/constants.py"
710 (("/usr/bin/gpg2") gpg))
712 (synopsis "Programs to simplify GnuPG key signing")
714 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
715 parties. It is the main utility and makes it possible to quickly and easily
716 sign each UID on a set of PGP keys. It is designed to take the pain out of
717 the sign-all-the-keys part of PGP Keysigning Party while adding security
720 pius-keyring-mgr and pius-party-worksheet help organisers of
721 PGP keysigning parties.")
722 (license license:gpl2)
723 (home-page "https://www.phildev.net/pius/index.shtml")))
725 (define-public signing-party
727 (name "signing-party")
729 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
734 (commit (string-append "v" version))))
735 (file-name (git-file-name name version))
738 "0lq8nmwjmysry0n4jg6vb7bh0lagbyb9pa11ii3s41p1mhzchf2r"))))
739 (build-system gnu-build-system)
741 `(("autoconf" ,autoconf-wrapper)
742 ("automake" ,automake)))
743 (inputs `(("perl" ,perl)
744 ("perl-text-template" ,perl-text-template)
745 ("perl-mime-tools" ,perl-mime-tools)
746 ("perl-gnupg-interface" ,perl-gnupg-interface)
747 ("perl-net-idn-encode" ,perl-net-idn-encode)
750 `(#:tests? #f ; no test suite
752 (modify-phases %standard-phases
754 (lambda* (#:key outputs #:allow-other-keys)
755 (let ((out (assoc-ref outputs "out")))
756 (substitute* "keyanalyze/Makefile"
757 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
758 (substitute* "keyanalyze/Makefile"
759 (("\\./configure") (string-append "./configure --prefix=" out)))
760 (substitute* "gpgwrap/Makefile"
762 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
763 out "/bin/gpgwrap\n")))
764 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
765 "keylookup/Makefile" "sig2dot/Makefile"
766 "springgraph/Makefile")
768 (setenv "CONFIG_SHELL" (which "sh")))
771 (lambda* (#:key outputs #:allow-other-keys #:rest args)
772 (let ((out (assoc-ref outputs "out"))
773 (install (assoc-ref %standard-phases 'install)))
777 (copy-file (string-append dir "/" file)
778 (string-append out "/bin/" file)))
779 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
780 "gpglist" "gpg-mailkeys" "gpgparticipants")
781 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
782 "gpglist" "gpg-mailkeys" "gpgparticipants"))
785 (copy-file (string-append dir "/" file)
786 (string-append out "/share/man/man1/" file)))
787 '("caff" "caff" "caff" "gpgdir"
788 "gpg-key2ps" "gpglist" "gpg-mailkeys"
789 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
790 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
791 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
792 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
793 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
794 "process_keys.1" "pgpring.1" "keyanalyze.1")))
796 (add-after 'install 'wrap-programs
797 (lambda* (#:key outputs #:allow-other-keys)
798 (let* ((out (assoc-ref outputs "out")))
800 (string-append out "/bin/caff")
801 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
803 (synopsis "Collection of scripts for simplifying gnupg key signing")
805 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
806 including tools for signing keys, keyring analysis, and party preparation.
808 @item caff: CA - Fire and Forget signs and mails a key
809 @item pgp-clean: removes all non-self signatures from key
810 @item pgp-fixkey: removes broken packets from keys
811 @item gpg-mailkeys: simply mail out a signed key to its owner
812 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
813 @item gpgdir: recursive directory encryption tool
814 @item gpglist: show who signed which of your UIDs
815 @item gpgsigs: annotates list of GnuPG keys with already done signatures
816 @item gpgparticipants: create list of party participants for the organiser
817 @item gpgwrap: a passphrase wrapper
818 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
819 @item keylookup: ncurses wrapper around gpg --search
820 @item sig2dot: converts a list of GnuPG signatures to a .dot file
821 @item springgraph: creates a graph from a .dot file
823 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
824 ;; and caff and gpgsigs: bsd-3, see
825 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
826 (license license:gpl2)))
828 (define-public pinentry-tty
830 (name "pinentry-tty")
834 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
838 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
839 (build-system gnu-build-system)
841 `(#:configure-flags '("--enable-pinentry-tty")))
843 `(("ncurses" ,ncurses)
844 ("libassuan" ,libassuan)
845 ("libsecret" ,libsecret "out")))
847 `(("pkg-config" ,pkg-config)))
848 (home-page "https://gnupg.org/aegypten2/")
849 (synopsis "GnuPG's interface to passphrase input")
851 "Pinentry provides a console that allows users to enter a passphrase when
852 @code{gpg} is run and needs it.")
853 (license license:gpl2+)
854 (properties '((ftp-server . "ftp.gnupg.org")
855 (ftp-directory . "/gcrypt/pinentry")
856 (upstream-name . "pinentry")))))
858 (define-public pinentry-emacs
860 (inherit pinentry-tty)
861 (name "pinentry-emacs")
863 `(#:configure-flags '("--enable-pinentry-emacs")))
865 "Pinentry provides a console and an Emacs interface that allows users to
866 enter a passphrase when required by @code{gpg} or other software.")))
868 (define-public pinentry-gtk2
870 (inherit pinentry-tty)
871 (name "pinentry-gtk2")
873 `(#:configure-flags '("--enable-fallback-curses")))
877 ,@(package-inputs pinentry-tty)))
879 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
880 passphrase when @code{gpg} is run and needs it.")))
882 (define-public pinentry-gnome3
884 (inherit pinentry-tty)
885 (name "pinentry-gnome3")
890 ,@(package-inputs pinentry-tty)))
892 `(#:configure-flags '("--enable-pinentry-gnome3"
893 "--enable-fallback-curses")))
895 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
896 that allows users to enter a passphrase when required by @code{gpg} or other
899 (define-public pinentry-qt
901 (inherit pinentry-tty)
904 `(#:configure-flags '("--enable-fallback-curses")))
907 ,@(package-inputs pinentry-tty)))
909 "Pinentry provides a console and a Qt GUI that allows users to enter a
910 passphrase when @code{gpg} is run and needs it.")))
912 (define-public pinentry-efl
914 (inherit pinentry-tty)
915 (name "pinentry-efl")
918 (inherit (package-source pinentry-tty))
919 (patches (search-patches "pinentry-efl.patch"))))
921 '(#:configure-flags '("--enable-pinentry-efl"
922 "--enable-fallback-curses")
924 (modify-phases %standard-phases
927 (invoke "sh" "autogen.sh"))))))
929 `(("autoconf" ,autoconf)
930 ("automake" ,automake)
931 ("gettext" ,gettext-minimal)
932 ,@(package-native-inputs pinentry-tty)))
935 ,@(package-inputs pinentry-tty)))
937 "Pinentry provides a console and a graphical interface for the
938 @dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a
939 passphrase when @code{gpg} is run and needs it.")))
941 (define-public pinentry
942 (package (inherit pinentry-gtk2)
945 (define-public paperkey
951 (uri (string-append "https://www.jabberwocky.com/"
952 "software/paperkey/paperkey-"
956 "1xq5gni6gksjkd5avg0zpd73vsr97appksfx0gx2m38s4w9zsid2"))))
957 (build-system gnu-build-system)
960 (modify-phases %standard-phases
961 (add-before 'check 'patch-check-scripts
963 (substitute* '("checks/roundtrip.sh"
964 "checks/roundtrip-raw.sh")
965 (("/bin/echo") "echo"))
967 (home-page "https://www.jabberwocky.com/software/paperkey/")
968 (synopsis "Backup OpenPGP keys to paper")
970 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
971 for printing with paper and ink, which have amazingly long retention
972 qualities. To reconstruct a secret key, you re-enter those
973 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
974 them to transform your existing public key into a secret key.")
975 (license license:gpl2+)))
977 (define-public pgpdump
984 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
987 (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
988 (build-system gnu-build-system)
990 `(#:tests? #f ; no make check
991 #:configure-flags (list "--prefix=/")
992 #:make-flags (list "CC=gcc"
993 (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
996 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
997 (synopsis "PGP packet visualizer")
998 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
1001 The output of this command is similar to GnuPG's list packets command,
1002 however, pgpdump produces more detailed and easier to understand output.")
1003 (license license:bsd-3)))
1011 (uri (string-append "mirror://gnupg/gpa/"
1012 name "-" version ".tar.bz2"))
1015 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
1016 (build-system gnu-build-system)
1019 (modify-phases %standard-phases
1020 (add-after 'install 'wrap-program
1021 (lambda* (#:key inputs outputs #:allow-other-keys)
1022 (let ((out (assoc-ref outputs "out"))
1023 (gnupg (assoc-ref inputs "gnupg")))
1024 (wrap-program (string-append out "/bin/gpa")
1025 `("PATH" ":" prefix (,(string-append gnupg "/bin"))))
1028 `(("pkg-config" ,pkg-config)))
1032 ("libassuan" ,libassuan)
1033 ("libgpg-error" ,libgpg-error)
1034 ("gtk+-2" ,gtk+-2)))
1035 (home-page "https://gnupg.org/software/gpa/")
1036 (synopsis "Graphical user interface for GnuPG")
1038 "GPA, the GNU Privacy Assistant, is a graphical user interface for
1039 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
1040 files, to verify signatures, and to manage the private and public keys.")
1041 (license license:gpl3+)
1042 (properties '((ftp-server . "ftp.gnupg.org")
1043 (ftp-directory . "/gcrypt/gpa")))))
1045 (define-public parcimonie
1051 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1052 "parcimonie/App-Parcimonie-"
1056 "14pvapvzrxh1yh8zgcj1llmc2dd8g1fgzskxlja21gmw8c88aqdk"))))
1057 (build-system perl-build-system)
1060 ("perl-config-general" ,perl-config-general)
1061 ("perl-clone" ,perl-clone)
1062 ("perl-data" ,perl-data)
1063 ("perl-exporter-tiny" ,perl-exporter-tiny)
1064 ("perl-file-homedir" ,perl-file-homedir)
1065 ("perl-file-sharedir" ,perl-file-sharedir)
1066 ("perl-file-which" ,perl-file-which)
1067 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
1068 ("perl-gnupg-interface" ,perl-gnupg-interface)
1069 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1070 ("perl-list-moreutils" ,perl-list-moreutils)
1071 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
1072 ("perl-lwp-online" ,perl-lwp-online)
1073 ("perl-module-build" ,perl-module-build)
1074 ("perl-module-pluggable-object" ,perl-module-pluggable)
1075 ("perl-moo" ,perl-moo)
1076 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
1077 ("perl-moox-late" ,perl-moox-late)
1078 ("perl-moox-options" ,perl-moox-options)
1079 ("perl-moox-strictconstructor" ,perl-moox-strictconstructor)
1080 ("perl-namespace-clean" ,perl-namespace-clean)
1081 ("perl-net-dbus" ,perl-net-dbus)
1082 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
1083 ("perl-path-tiny" ,perl-path-tiny)
1084 ("perl-strictures" ,perl-strictures-2)
1085 ("perl-test-most" ,perl-test-most)
1086 ("perl-test-trap" ,perl-test-trap)
1087 ("perl-time-duration" ,perl-time-duration)
1088 ("perl-time-duration-parse" ,perl-time-duration-parse)
1089 ("perl-try-tiny" ,perl-try-tiny)
1090 ("perl-type-tiny" ,perl-type-tiny)
1091 ("perl-types-path-tiny" ,perl-types-path-tiny)
1092 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1093 ("perl-xml-parser" ,perl-xml-parser)
1094 ("perl-xml-twig" ,perl-xml-twig)
1095 ("torsocks" ,torsocks)))
1097 `(("xorg-server" ,xorg-server-for-tests)))
1100 (modify-phases %standard-phases
1101 ;; Needed for using gpg-connect-agent during tests.
1102 (add-before 'check 'prepare-for-tests
1103 (lambda* (#:key inputs #:allow-other-keys)
1104 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1105 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1106 (setenv "DISPLAY" ":1")
1107 (setenv "HOME" "/tmp")
1108 ;; These tests are known to fail
1109 (delete-file "t/32-keyserver_defined_on_command_line.t")
1110 (delete-file "t/33-checkGpgHasDefinedKeyserver.t")
1111 ;; The applet is deprecated upstream.
1112 (delete-file "t/00-load_all.t")
1114 (add-before 'install 'fix-references
1115 (lambda* (#:key inputs outputs #:allow-other-keys)
1116 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
1117 ;; Skip check whether dependencies are in the PATH
1118 (("defined which.*") ""))
1120 (add-after 'install 'wrap-program
1121 (lambda* (#:key inputs outputs #:allow-other-keys)
1122 (let* ((out (assoc-ref outputs "out"))
1123 (perllib (string-append out "/lib/perl5/site_perl/"
1124 ,(package-version perl))))
1125 (wrap-program (string-append out "/bin/parcimonie")
1127 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1129 (home-page "https://gaffer.boum.org/intrigeri/code/parcimonie/")
1130 (synopsis "Incrementally refreshes a GnuPG keyring")
1131 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1132 that makes it hard to correlate the keyring content to an individual, and
1133 makes it hard to locate an individual based on an identifying subset of her
1134 keyring content. Parcimonie is a daemon that fetches one key at a time using
1135 the Tor network, waits a bit, changes the Tor circuit being used, and starts
1137 (license license:gpl1+)))
1139 (define-public jetring
1147 (url "https://salsa.debian.org/debian/jetring")
1148 (commit (string-append "debian/" version))))
1149 (file-name (git-file-name name version))
1152 "1acbx2vnbkms1c0wgcnh05d4g359sg5z0aiw541vx2qq9sgdhlv6"))))
1153 (build-system gnu-build-system)
1156 (modify-phases %standard-phases
1157 (delete 'configure) ; no configure script
1158 (add-before 'install 'hardlink-gnupg
1159 (lambda* (#:key inputs #:allow-other-keys)
1160 (let ((gpg (string-append (assoc-ref inputs "gnupg")
1162 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1163 (("gpg -") (string-append gpg " -"))
1164 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1167 (lambda* (#:key outputs #:allow-other-keys)
1168 (let* ((out (assoc-ref outputs "out"))
1169 (man (string-append out "/share/man")))
1170 (for-each (lambda (file)
1171 (install-file file (string-append out "/bin/")))
1172 (find-files "." "jetring-[[:alpha:]]+$"))
1173 (for-each (lambda (file)
1174 (install-file file (string-append man "/man1/")))
1175 (find-files "." ".*\\.1$"))
1176 (install-file "jetring.7" (string-append man "/man7/"))
1178 #:tests? #f)) ; no test phase
1182 (home-page "https://joeyh.name/code/jetring/")
1183 (synopsis "GnuPG keyring maintenance using changesets")
1185 "Jetring is a collection of tools that allow for gpg keyrings to be
1186 maintained using changesets. It was developed with the Debian keyring in mind,
1187 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1188 for multiple people to collaboratively edit.
1190 With jetring, changesets can be submitted, reviewed to see exactly what they
1191 will do, applied, and used to build a keyring. The origin of every change made
1192 to the keyring is available for auditing, and gpg signatures can be used for
1193 integrity guarantees.")
1194 (license license:gpl2+)))