1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 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 Marius Bakke <mbakke@fastmail.com>
18 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages gnupg)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages adns)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages curl)
42 #:use-module (gnu packages crypto)
43 #:use-module (gnu packages emacs)
44 #:use-module (gnu packages enlightenment)
45 #:use-module (gnu packages gettext)
46 #:use-module (gnu packages guile)
47 #:use-module (gnu packages openldap)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages perl-check)
50 #:use-module (gnu packages pth)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages python-xyz)
53 #:use-module (gnu packages qt)
54 #:use-module (gnu packages readline)
55 #:use-module (gnu packages compression)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages security-token)
62 #:use-module (gnu packages sqlite)
63 #:use-module (gnu packages swig)
64 #:use-module (gnu packages texinfo)
65 #:use-module (gnu packages tls)
66 #:use-module (gnu packages tor)
67 #:use-module (gnu packages web)
68 #:use-module (gnu packages xml)
69 #:use-module (guix packages)
70 #:use-module (guix download)
71 #:use-module (guix git-download)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system perl)
74 #:use-module (guix build-system python)
75 #:use-module (srfi srfi-1))
77 (define-public libgpg-error
84 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
88 "0z696dmhfxm2n6pmr8b857wwljq9h633yi99bhbn7h88f91rigds"))
89 (patches (search-patches "libgpg-error-gawk-compat.patch"))
90 ;; XXX: Remove this snippet with the gawk patch above. It avoids having
91 ;; to call autoreconf for the Makefile.am change to take effect.
92 (modules '((guix build utils)))
95 (substitute* "src/Makefile.in"
96 (("namespace=errnos") "pkg_namespace=errnos"))
98 (build-system gnu-build-system)
100 (if (%current-target-system)
101 `(#:modules ((ice-9 match)
102 (guix build gnu-build-system)
105 (modify-phases %standard-phases
106 ;; When cross-compiling, some platform specific properties cannot
107 ;; be detected. Create a symlink to the appropriate platform
108 ;; file. See Cross-Compiling section at:
109 ;; https://github.com/gpg/libgpg-error/blob/master/README
110 (add-after 'unpack 'cross-symlinks
111 (lambda* (#:key target inputs #:allow-other-keys)
113 (match (string-take target
114 (string-index target #\-))
115 ("armhf" "arm-unknown-linux-gnueabi")
117 (string-append x "-unknown-linux-gnu")))))
119 (string-append "lock-obj-pub." triplet ".h")
120 "src/syscfg/lock-obj-pub.linux-gnu.h"))
123 (native-inputs `(("gettext" ,gettext-minimal)))
124 (home-page "https://gnupg.org")
125 (synopsis "Library of error values for GnuPG components")
127 "Libgpg-error is a small library that defines common error values
128 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
129 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
130 Daemon and possibly more in the future.")
131 (license license:lgpl2.0+)
132 (properties '((ftp-server . "ftp.gnupg.org")
133 (ftp-directory . "/gcrypt/libgpg-error")))))
135 (define-public libgcrypt
141 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
145 "09r27ywj9zplq6n9qw3mn7zmvf6y2jdmwx5d1kg8yqkj0qx18f7n"))))
146 (build-system gnu-build-system)
148 `(("libgpg-error-host" ,libgpg-error)))
150 ;; Needed here for the 'gpg-error' program.
151 `(("libgpg-error-native" ,libgpg-error)))
153 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
154 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
155 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
157 (list (string-append "--with-gpg-error-prefix="
158 (assoc-ref %build-inputs "libgpg-error-host")))))
159 (outputs '("out" "debug"))
160 (home-page "https://gnupg.org/")
161 (synopsis "Cryptographic function library")
163 "Libgcrypt is a general-purpose cryptographic library. It provides the
164 standard cryptographic building blocks such as symmetric ciphers, hash
165 algorithms, public key algorithms, large integer functions and random number
167 (license license:lgpl2.0+)
168 (properties '((ftp-server . "ftp.gnupg.org")
169 (ftp-directory . "/gcrypt/libgcrypt")))))
171 (define-public libassuan
178 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
182 "00p7cpvzf0q3qwcgg51r9d0vbab4qga2xi8wpk2fgd36710b1g4i"))))
183 (build-system gnu-build-system)
185 `(("libgpg-error" ,libgpg-error)
187 (home-page "https://gnupg.org")
189 "IPC library used by GnuPG and related software")
191 "Libassuan is a small library implementing the so-called Assuan
192 protocol. This protocol is used for IPC between most newer
193 GnuPG components. Both, server and client side functions are
195 (license license:lgpl2.0+)
196 (properties '((ftp-server . "ftp.gnupg.org")
197 (ftp-directory . "/gcrypt/libassuan")))))
199 (define-public libksba
207 "mirror://gnupg/libksba/libksba-"
211 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
212 (build-system gnu-build-system)
214 `(("libgpg-error" ,libgpg-error)))
216 `(("libgpg-error" ,libgpg-error)))
219 (list ,@(if (%current-target-system)
220 '("CC_FOR_BUILD=gcc")
222 (string-append "--with-gpg-error-prefix="
223 (assoc-ref %build-inputs "libgpg-error")))))
224 (home-page "https://www.gnupg.org")
225 (synopsis "CMS and X.509 access library")
227 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
228 as well as the CMS easily accessible by other applications. Both
229 specifications are building blocks of S/MIME and TLS.")
230 (license license:gpl3+)
231 (properties '((ftp-server . "ftp.gnupg.org")
232 (ftp-directory . "/gcrypt/libksba")))))
241 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
243 (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
244 (build-system gnu-build-system)
245 (home-page "https://www.gnupg.org")
246 (synopsis "Non-preemptive thread library")
248 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
249 threads implementation.
251 In contrast to GNU Pth is is based on the system's standard threads
252 implementation. This allows the use of libraries which are not
253 compatible to GNU Pth.")
254 (license (list license:lgpl3+ license:gpl2+)) ; dual license
255 (properties '((ftp-server . "ftp.gnupg.org")
256 (ftp-directory . "/gcrypt/npth")))))
264 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
268 "056mgy09lvsi03531a437qj58la1j2x1y1scvfi53diris3658mg"))))
269 (build-system gnu-build-system)
271 `(("pkg-config" ,pkg-config)))
274 ("libassuan" ,libassuan)
275 ("libgcrypt" ,libgcrypt)
276 ("libgpg-error" ,libgpg-error)
279 ("openldap" ,openldap)
280 ("pcsc-lite" ,pcsc-lite)
281 ("readline" ,readline)
285 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
286 ;; executable in its installation directory in
287 ;; /gnu/store before it has been installed.
288 "--enable-gnupg-builddir-envvar"
289 "--enable-all-tests")
291 (modify-phases %standard-phases
292 (add-before 'configure 'patch-paths
293 (lambda* (#:key inputs #:allow-other-keys)
294 (substitute* "scd/scdaemon.c"
295 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
296 (string-append "\"" (assoc-ref inputs "pcsc-lite")
299 (add-after 'build 'patch-scheme-tests
301 (substitute* (find-files "tests" ".\\.scm$")
302 (("/usr/bin/env gpgscm")
303 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
305 (add-before 'build 'patch-test-paths
307 (substitute* '("tests/inittests"
308 "tests/pkits/inittests"
310 "tests/pkits/common.sh"
311 "tests/pkits/Makefile")
312 (("/bin/pwd") (which "pwd")))
313 (substitute* "common/t-exectool.c"
314 (("/bin/cat") (which "cat"))
315 (("/bin/true") (which "true"))
316 (("/bin/false") (which "false")))
318 (home-page "https://gnupg.org/")
319 (synopsis "GNU Privacy Guard")
321 "The GNU Privacy Guard is a complete implementation of the OpenPGP
322 standard. It is used to encrypt and sign data and communication. It
323 features powerful key management and the ability to access public key
324 servers. It includes several libraries: libassuan (IPC between GnuPG
325 components), libgpg-error (centralized GnuPG error values), and
326 libskba (working with X.509 certificates and CMS data).")
327 (license license:gpl3+)
328 (properties '((ftp-server . "ftp.gnupg.org")
329 (ftp-directory . "/gcrypt/gnupg")))))
331 (define-public gnupg-2.0
332 (package (inherit gnupg)
336 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
340 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
346 ("libassuan" ,libassuan)
347 ("libgcrypt" ,libgcrypt)
348 ("libgpg-error" ,libgpg-error)
351 ("openldap" ,openldap)
353 ("readline" ,readline)))
356 (modify-phases %standard-phases
357 (add-before 'configure 'patch-config-files
359 (substitute* "tests/openpgp/Makefile.in"
360 (("/bin/sh") (which "sh")))
362 (add-after 'install 'rename-v2-commands
363 (lambda* (#:key outputs #:allow-other-keys)
364 ;; Upstream suggests removing the trailing '2' from command names:
365 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
366 (let ((out (assoc-ref outputs "out")))
367 (with-directory-excursion (string-append out "/bin")
368 (rename-file "gpgv2" "gpgv")
369 (rename-file "gpg2" "gpg")
371 ;; Keep the old name around to ease transition.
372 (symlink "gpgv" "gpgv2")
373 (symlink "gpg" "gpg2")
375 (properties `((superseded . ,gnupg)))))
377 (define-public gnupg-1
378 (package (inherit gnupg)
382 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
386 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
392 ("readline" ,readline)
393 ("libgpg-error" ,libgpg-error)))
396 (modify-phases %standard-phases
397 (add-after 'unpack 'patch-check-sh
399 (substitute* "checks/Makefile.in"
400 (("/bin/sh") (which "sh")))
410 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
412 (base32 "0imyjfryvvjdbai454p70zcr95m94j9xnzywrlilqdw2fqi0pqy4"))))
413 (build-system gnu-build-system)
417 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
418 `(("libgpg-error" ,libgpg-error)))
420 `(("libassuan" ,libassuan)))
421 (home-page "https://www.gnupg.org/related_software/gpgme/")
422 (synopsis "Library providing simplified access to GnuPG functionality")
424 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
425 easier for applications. It provides a High-Level Crypto API for encryption,
426 decryption, signing, signature verification and key management. Currently
427 it uses GnuPG as its backend but the API isn't restricted to this engine.
429 Because the direct use of GnuPG from an application can be a complicated
430 programming task, it is suggested that all software should try to use GPGME
431 instead. This way bug fixes or improvements can be done at a central place
432 and every application benefits from this.")
433 (license license:lgpl2.1+)
434 (properties '((ftp-server . "ftp.gnupg.org")
435 (ftp-directory . "/gcrypt/gpgme")))))
437 (define-public qgpgme
443 (modify-phases %standard-phases
444 (add-before 'build 'chdir-and-symlink
445 (lambda* (#:key inputs #:allow-other-keys)
446 (let ((gpgme (assoc-ref inputs "gpgme")))
447 (symlink (string-append gpgme "/lib/libgpgmepp.la")
448 "lang/cpp/src/libgpgmepp.la")
449 (symlink (string-append gpgme "/lib/libgpgme.la")
454 `(("pkg-config" ,pkg-config)
455 ,@(package-native-inputs gpgme)))
459 ,@(package-inputs gpgme)))
460 (synopsis "Qt API bindings for gpgme")
461 (description "QGpgme provides a very high level Qt API around GpgMEpp.
463 QGpgME was originally developed as part of libkleo and incorporated into
464 gpgpme starting with version 1.7.")
465 (license license:gpl2+))) ;; Note: this differs from gpgme
467 (define-public guile-gcrypt
469 (name "guile-gcrypt")
471 (home-page "https://notabug.org/cwebber/guile-gcrypt")
475 (url (string-append home-page ".git"))
476 (commit (string-append "v" version))))
479 "1mhc5m4xygkfj7x18f8apiqpfdn9mrql0am5sk13cf5xn8x1r63z"))
480 (file-name (string-append name "-" version "-checkout"))))
481 (build-system gnu-build-system)
483 `(("pkg-config" ,pkg-config)
484 ("autoconf" ,autoconf)
485 ("automake" ,automake)
486 ("texinfo" ,texinfo)))
488 `(("guile" ,guile-2.2)
489 ("libgcrypt" ,libgcrypt)))
490 (synopsis "Cryptography library for Guile using Libgcrypt")
492 "Guile-Gcrypt provides a Guile 2.x interface to a subset of the
493 GNU Libgcrypt crytographic library. It provides modules for cryptographic
494 hash functions, message authentication codes (MAC), public-key cryptography,
495 strong randomness, and more. It is implemented using the foreign function
496 interface (FFI) of Guile.")
497 (license license:gpl3+)))
499 (define-public guile2.0-gcrypt
500 (package (inherit guile-gcrypt)
501 (name "guile2.0-gcrypt")
503 `(("guile" ,guile-2.0)
504 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
506 (define-public python-gpg
512 (uri (pypi-uri "gpg" version))
515 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
516 (build-system python-build-system)
519 (modify-phases %standard-phases
520 (add-before 'build 'set-environment
522 (substitute* "setup.py"
523 (("cc") (which "gcc")))
525 #:tests? #f)) ; No test suite.
530 (home-page (package-home-page gpgme))
531 (synopsis "Python bindings for GPGME GnuPG cryptography library")
532 (description "This package provides Python bindings to the GPGME GnuPG
533 cryptographic library. It is developed in the GPGME source code, and then
534 distributed separately.")
535 (license license:lgpl2.1+)))
537 (define-public python2-gpg
538 (package-with-python2 python-gpg))
540 (define-public python-pygpgme
542 (name "python-pygpgme")
547 (uri (pypi-uri "pygpgme" version))
550 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
551 ;; Unfortunately, we have to disable some tests due to some gpg-agent
553 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
554 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
555 "python-pygpgme-fix-pinentry-tests.patch"))))
558 (modify-phases %standard-phases
559 (add-before 'build 'make-build
560 (lambda _ (invoke "make" "build")))
562 (lambda _ (invoke "make" "check"))))))
563 (build-system python-build-system)
565 `(("gnupg" ,gnupg-1)))
568 (home-page "https://launchpad.net/pygpgme")
569 (synopsis "Python module for working with OpenPGP messages")
571 "PyGPGME is a Python module that lets you sign, verify, encrypt and
572 decrypt messages using the OpenPGP format by making use of GPGME.")
573 (license license:lgpl2.1+)))
575 (define-public python2-pygpgme
576 (package-with-python2 python-pygpgme))
578 (define-public python-gnupg
580 (name "python-gnupg")
585 (uri (pypi-uri "python-gnupg" version))
588 "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
589 (build-system python-build-system)
592 (modify-phases %standard-phases
595 (substitute* "test_gnupg.py"
596 ;; Unsure why this test fails.
597 (("'test_search_keys'") "True")
598 (("def test_search_keys") "def disabled__search_keys"))
599 (setenv "USERNAME" "guixbuilder")
600 ;; The doctests are extremely slow and sometimes time out,
601 ;; so we disable them.
603 "test_gnupg.py" "--no-doctests"))))))
605 `(("gnupg" ,gnupg-1)))
606 (home-page "https://packages.python.org/python-gnupg/index.html")
607 (synopsis "Wrapper for the GNU Privacy Guard")
609 "This module allows easy access to GnuPG’s key management, encryption
610 and signature functionality from Python programs.")
611 (license license:bsd-3)))
613 (define-public python2-gnupg
614 (package-with-python2 python-gnupg))
616 (define-public perl-gnupg-interface
618 (name "perl-gnupg-interface")
622 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
623 "GnuPG-Interface-" version ".tar.gz"))
626 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
627 (build-system perl-build-system)
630 (modify-phases %standard-phases
631 ;; FIXME: This test fails for unknown reasons
632 (add-after 'unpack 'delete-broken-test
634 (delete-file "t/encrypt_symmetrically.t")
637 `(("gnupg" ,gnupg-1)))
639 `(("perl-moo" ,perl-moo)
640 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
641 ("perl-moox-late" ,perl-moox-late)))
644 ("perl-module-install" ,perl-module-install)))
645 (home-page "https://metacpan.org/release/GnuPG-Interface")
646 (synopsis "Perl interface to GnuPG")
647 (description "@code{GnuPG::Interface} and its associated modules are
648 designed to provide an object-oriented method for interacting with GnuPG,
649 being able to perform functions such as but not limited to encrypting,
650 signing, decryption, verification, and key-listing parsing.")
651 (license license:perl-license)))
660 "https://github.com/jaymzh/pius/releases/download/v"
661 version "/pius-" version ".tar.bz2"))
664 "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
665 (build-system python-build-system)
666 (inputs `(("perl" ,perl) ; for 'pius-party-worksheet'
668 ("python-six" ,python2-six)))
671 #:python ,python-2 ; uses the Python 2 'print' syntax
673 (modify-phases %standard-phases
675 'build 'set-gpg-file-name
676 (lambda* (#:key inputs outputs #:allow-other-keys)
677 (let* ((gpg (string-append (assoc-ref inputs "gpg")
679 (substitute* "libpius/constants.py"
680 (("/usr/bin/gpg2") gpg))
682 (synopsis "Programs to simplify GnuPG key signing")
684 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
685 parties. It is the main utility and makes it possible to quickly and easily
686 sign each UID on a set of PGP keys. It is designed to take the pain out of
687 the sign-all-the-keys part of PGP Keysigning Party while adding security
690 pius-keyring-mgr and pius-party-worksheet help organisers of
691 PGP keysigning parties.")
692 (license license:gpl2)
693 (home-page "https://www.phildev.net/pius/index.shtml")))
695 (define-public signing-party
697 (name "signing-party")
699 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
704 (commit (string-append "v" version))))
705 (file-name (git-file-name name version))
708 "0lq8nmwjmysry0n4jg6vb7bh0lagbyb9pa11ii3s41p1mhzchf2r"))))
709 (build-system gnu-build-system)
711 `(("autoconf" ,autoconf-wrapper)
712 ("automake" ,automake)))
713 (inputs `(("perl" ,perl)
714 ("perl-text-template" ,perl-text-template)
715 ("perl-mime-tools" ,perl-mime-tools)
716 ("perl-gnupg-interface" ,perl-gnupg-interface)
717 ("perl-net-idn-encode" ,perl-net-idn-encode)
720 `(#:tests? #f ; no test suite
722 (modify-phases %standard-phases
724 (lambda* (#:key outputs #:allow-other-keys)
725 (let ((out (assoc-ref outputs "out")))
726 (substitute* "keyanalyze/Makefile"
727 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
728 (substitute* "keyanalyze/Makefile"
729 (("\\./configure") (string-append "./configure --prefix=" out)))
730 (substitute* "gpgwrap/Makefile"
732 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
733 out "/bin/gpgwrap\n")))
734 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
735 "keylookup/Makefile" "sig2dot/Makefile"
736 "springgraph/Makefile")
738 (setenv "CONFIG_SHELL" (which "sh")))
741 (lambda* (#:key outputs #:allow-other-keys #:rest args)
742 (let ((out (assoc-ref outputs "out"))
743 (install (assoc-ref %standard-phases 'install)))
747 (copy-file (string-append dir "/" file)
748 (string-append out "/bin/" file)))
749 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
750 "gpglist" "gpg-mailkeys" "gpgparticipants")
751 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
752 "gpglist" "gpg-mailkeys" "gpgparticipants"))
755 (copy-file (string-append dir "/" file)
756 (string-append out "/share/man/man1/" file)))
757 '("caff" "caff" "caff" "gpgdir"
758 "gpg-key2ps" "gpglist" "gpg-mailkeys"
759 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
760 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
761 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
762 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
763 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
764 "process_keys.1" "pgpring.1" "keyanalyze.1")))
766 (add-after 'install 'wrap-programs
767 (lambda* (#:key outputs #:allow-other-keys)
768 (let* ((out (assoc-ref outputs "out")))
770 (string-append out "/bin/caff")
771 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
773 (synopsis "Collection of scripts for simplifying gnupg key signing")
775 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
776 including tools for signing keys, keyring analysis, and party preparation.
778 @item caff: CA - Fire and Forget signs and mails a key
779 @item pgp-clean: removes all non-self signatures from key
780 @item pgp-fixkey: removes broken packets from keys
781 @item gpg-mailkeys: simply mail out a signed key to its owner
782 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
783 @item gpgdir: recursive directory encryption tool
784 @item gpglist: show who signed which of your UIDs
785 @item gpgsigs: annotates list of GnuPG keys with already done signatures
786 @item gpgparticipants: create list of party participants for the organiser
787 @item gpgwrap: a passphrase wrapper
788 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
789 @item keylookup: ncurses wrapper around gpg --search
790 @item sig2dot: converts a list of GnuPG signatures to a .dot file
791 @item springgraph: creates a graph from a .dot file
793 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
794 ;; and caff and gpgsigs: bsd-3, see
795 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
796 (license license:gpl2)))
798 (define-public pinentry-tty
800 (name "pinentry-tty")
804 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
808 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
809 (build-system gnu-build-system)
811 `(#:configure-flags '("--enable-pinentry-tty")))
813 `(("ncurses" ,ncurses)
814 ("libassuan" ,libassuan)
815 ("libsecret" ,libsecret "out")))
817 `(("pkg-config" ,pkg-config)))
818 (home-page "https://gnupg.org/aegypten2/")
819 (synopsis "GnuPG's interface to passphrase input")
821 "Pinentry provides a console that allows users to enter a passphrase when
822 @code{gpg} is run and needs it.")
823 (license license:gpl2+)
824 (properties '((ftp-server . "ftp.gnupg.org")
825 (ftp-directory . "/gcrypt/pinentry")
826 (upstream-name . "pinentry")))))
828 (define-public pinentry-emacs
830 (inherit pinentry-tty)
831 (name "pinentry-emacs")
833 `(#:configure-flags '("--enable-pinentry-emacs")))
835 "Pinentry provides a console and an Emacs interface that allows users to
836 enter a passphrase when required by @code{gpg} or other software.")))
838 (define-public pinentry-gtk2
840 (inherit pinentry-tty)
841 (name "pinentry-gtk2")
845 ,@(package-inputs pinentry-tty)))
847 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
848 passphrase when @code{gpg} is run and needs it.")))
850 (define-public pinentry-gnome3
852 (inherit pinentry-tty)
853 (name "pinentry-gnome3")
858 ,@(package-inputs pinentry-tty)))
860 `(#:configure-flags '("--enable-pinentry-gnome3")))
862 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
863 that allows users to enter a passphrase when required by @code{gpg} or other
866 (define-public pinentry-qt
868 (inherit pinentry-tty)
872 ,@(package-inputs pinentry-tty)))
874 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
876 "Pinentry provides a console and a Qt GUI that allows users to enter a
877 passphrase when @code{gpg} is run and needs it.")))
879 (define-public pinentry-efl
881 (inherit pinentry-tty)
882 (name "pinentry-efl")
885 (inherit (package-source pinentry-tty))
886 (patches (search-patches "pinentry-efl.patch"))))
888 '(#:configure-flags '("--enable-pinentry-efl")
890 (modify-phases %standard-phases
893 (invoke "sh" "autogen.sh"))))))
895 `(("autoconf" ,autoconf)
896 ("automake" ,automake)
897 ("gettext" ,gettext-minimal)
898 ,@(package-native-inputs pinentry-tty)))
901 ,@(package-inputs pinentry-tty)))
903 "Pinentry provides a console and a graphical interface for the
904 @dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a
905 passphrase when @code{gpg} is run and needs it.")))
907 (define-public pinentry
908 (package (inherit pinentry-gtk2)
911 (define-public paperkey
917 (uri (string-append "http://www.jabberwocky.com/"
918 "software/paperkey/paperkey-"
922 "1prd2jaf4zjad3xhv160hmi5n408ssljfg7iz90jxs9w111pjwy4"))))
923 (build-system gnu-build-system)
926 (modify-phases %standard-phases
927 (add-before 'check 'patch-check-scripts
929 (substitute* '("checks/roundtrip.sh"
930 "checks/roundtrip-raw.sh")
931 (("/bin/echo") "echo"))
933 (home-page "http://www.jabberwocky.com/software/paperkey/")
934 (synopsis "Backup OpenPGP keys to paper")
936 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
937 for printing with paper and ink, which have amazingly long retention
938 qualities. To reconstruct a secret key, you re-enter those
939 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
940 them to transform your existing public key into a secret key.")
941 (license license:gpl2+)))
943 (define-public pgpdump
950 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
953 (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
954 (build-system gnu-build-system)
956 `(#:tests? #f ; no make check
957 #:configure-flags (list "--prefix=/")
958 #:make-flags (list "CC=gcc"
959 (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
962 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
963 (synopsis "PGP packet visualizer")
964 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
967 The output of this command is similar to GnuPG's list packets command,
968 however, pgpdump produces more detailed and easier to understand output.")
969 (license license:bsd-3)))
977 (uri (string-append "mirror://gnupg/gpa/"
978 name "-" version ".tar.bz2"))
981 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
982 (build-system gnu-build-system)
984 `(("pkg-config" ,pkg-config)))
988 ("libassuan" ,libassuan)
989 ("libgpg-error" ,libgpg-error)
991 (home-page "https://gnupg.org/software/gpa/")
992 (synopsis "Graphical user interface for GnuPG")
994 "GPA, the GNU Privacy Assistant, is a graphical user interface for
995 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
996 files, to verify signatures, and to manage the private and public keys.")
997 (license license:gpl3+)
998 (properties '((ftp-server . "ftp.gnupg.org")
999 (ftp-directory . "/gcrypt/gpa")))))
1001 (define-public parcimonie
1007 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1008 "parcimonie/App-Parcimonie-"
1012 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
1013 (build-system perl-build-system)
1015 `(("gnupg" ,gnupg-1) ; This is the version used by perl-gnupg-interface
1016 ("perl-config-general" ,perl-config-general)
1017 ("perl-clone" ,perl-clone)
1018 ("perl-data" ,perl-data)
1019 ("perl-exporter-tiny" ,perl-exporter-tiny)
1020 ("perl-file-homedir" ,perl-file-homedir)
1021 ("perl-file-sharedir" ,perl-file-sharedir)
1022 ("perl-file-which" ,perl-file-which)
1023 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
1024 ("perl-gnupg-interface" ,perl-gnupg-interface)
1025 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1026 ("perl-list-moreutils" ,perl-list-moreutils)
1027 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
1028 ("perl-lwp-online" ,perl-lwp-online)
1029 ("perl-module-build" ,perl-module-build)
1030 ("perl-module-pluggable-object" ,perl-module-pluggable)
1031 ("perl-moo" ,perl-moo)
1032 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
1033 ("perl-moox-late" ,perl-moox-late)
1034 ("perl-moox-options" ,perl-moox-options)
1035 ("perl-namespace-clean" ,perl-namespace-clean)
1036 ("perl-net-dbus" ,perl-net-dbus)
1037 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
1038 ("perl-path-tiny" ,perl-path-tiny)
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)))
1052 (modify-phases %standard-phases
1053 ;; Needed for using gpg-connect-agent during tests.
1054 (add-before 'check 'set-HOME
1055 (lambda _ (setenv "HOME" "/tmp") #t))
1056 (add-before 'install 'fix-references
1057 (lambda* (#:key inputs outputs #:allow-other-keys)
1058 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
1060 ;; Skip check whether dependencies are in the PATH
1061 (("defined which.*") "")
1062 (("call\\('parcimonie-torified-gpg'\\)")
1063 (string-append "call('" (assoc-ref outputs "out")
1064 "/bin/parcimonie-torified-gpg')")))
1065 (substitute* "bin/parcimonie-torified-gpg"
1066 (("torsocks") (string-append (assoc-ref inputs "torsocks")
1069 (add-after 'install 'wrap-program
1070 (lambda* (#:key inputs outputs #:allow-other-keys)
1071 (let* ((out (assoc-ref outputs "out"))
1072 (perllib (string-append out "/lib/perl5/site_perl/"
1073 ,(package-version perl))))
1074 (wrap-program (string-append out "/bin/parcimonie")
1076 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1078 (home-page "https://gaffer.boum.org/intrigeri/code/parcimonie/")
1079 (synopsis "Incrementally refreshes a GnuPG keyring")
1080 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1081 that makes it hard to correlate the keyring content to an individual, and
1082 makes it hard to locate an individual based on an identifying subset of her
1083 keyring content. Parcimonie is a daemon that fetches one key at a time using
1084 the Tor network, waits a bit, changes the Tor circuit being used, and starts
1086 (license license:gpl1+)))
1088 (define-public jetring
1095 (uri (string-append "mirror://debian/pool/main/j/" name "/"
1096 name "_" version ".tar.xz"))
1099 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
1100 (build-system gnu-build-system)
1103 (modify-phases %standard-phases
1104 (delete 'configure) ; no configure script
1105 (add-before 'install 'hardlink-gnupg
1106 (lambda* (#:key inputs #:allow-other-keys)
1107 (let ((gpg (string-append (assoc-ref inputs "gnupg")
1109 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1110 (("gpg -") (string-append gpg " -"))
1111 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1114 (lambda* (#:key outputs #:allow-other-keys)
1115 (let* ((out (assoc-ref outputs "out"))
1116 (man (string-append out "/share/man")))
1117 (for-each (lambda (file)
1118 (install-file file (string-append out "/bin/")))
1119 (find-files "." "jetring-[[:alpha:]]+$"))
1120 (for-each (lambda (file)
1121 (install-file file (string-append man "/man1/")))
1122 (find-files "." ".*\\.1$"))
1123 (install-file "jetring.7" (string-append man "/man7/"))
1125 #:tests? #f)) ; no test phase
1129 (home-page "https://joeyh.name/code/jetring/")
1130 (synopsis "GnuPG keyring maintenance using changesets")
1132 "Jetring is a collection of tools that allow for gpg keyrings to be
1133 maintained using changesets. It was developed with the Debian keyring in mind,
1134 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1135 for multiple people to collaboratively edit.
1137 With jetring, changesets can be submitted, reviewed to see exactly what they
1138 will do, applied, and used to build a keyring. The origin of every change made
1139 to the keyring is available for auditing, and gpg signatures can be used for
1140 integrity guarantees.")
1141 (license license:gpl2+)))