1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 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, 2021 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2016 Christine Lemmer-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–2022 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>
20 ;;; Copyright © 2020 Fredrik Salomonsson <plattfot@posteo.net>
21 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
22 ;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me>
23 ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
24 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
26 ;;; This file is part of GNU Guix.
28 ;;; GNU Guix is free software; you can redistribute it and/or modify it
29 ;;; under the terms of the GNU General Public License as published by
30 ;;; the Free Software Foundation; either version 3 of the License, or (at
31 ;;; your option) any later version.
33 ;;; GNU Guix is distributed in the hope that it will be useful, but
34 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 ;;; GNU General Public License for more details.
38 ;;; You should have received a copy of the GNU General Public License
39 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41 (define-module (gnu packages gnupg)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages adns)
45 #:use-module (gnu packages autotools)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages curl)
48 #:use-module (gnu packages crypto)
49 #:use-module (gnu packages emacs)
50 #:use-module (gnu packages enlightenment)
51 #:use-module (gnu packages gettext)
52 #:use-module (gnu packages guile)
53 #:use-module (gnu packages openldap)
54 #:use-module (gnu packages perl)
55 #:use-module (gnu packages perl-check)
56 #:use-module (gnu packages pth)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages python-xyz)
59 #:use-module (gnu packages qt)
60 #:use-module (gnu packages readline)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages glib)
64 #:use-module (gnu packages gnome)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages ncurses)
67 #:use-module (gnu packages security-token)
68 #:use-module (gnu packages sqlite)
69 #:use-module (gnu packages swig)
70 #:use-module (gnu packages texinfo)
71 #:use-module (gnu packages tls)
72 #:use-module (gnu packages tor)
73 #:use-module (gnu packages web)
74 #:use-module (gnu packages xorg)
75 #:use-module (gnu packages xdisorg)
76 #:use-module (gnu packages xml)
77 #:use-module (gnu packages popt)
78 #:use-module (gnu packages xdisorg)
79 #:use-module (guix gexp)
80 #:use-module (guix packages)
81 #:use-module (guix download)
82 #:use-module (guix utils)
83 #:use-module (guix git-download)
84 #:use-module (guix build-system gnu)
85 #:use-module (guix build-system perl)
86 #:use-module (guix build-system python)
87 #:use-module (ice-9 match)
88 #:use-module (guix build-system meson)
89 #:use-module (srfi srfi-1))
91 (define-public libgpg-error
98 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
102 "08syj8mlarww8mh8x3s0x6hjqbnxp2lkg3hab57qqpv1dh7yf1zw"))))
103 (build-system gnu-build-system)
105 (if (%current-target-system)
106 `(#:modules ((guix build gnu-build-system)
109 (modify-phases %standard-phases
110 ;; If this is left out, some generated header
111 ;; files will be sprinkled with ‘\c’, which
112 ;; the compiler won't like.
113 (add-after 'unpack 'fix-gen-lock-obj.sh
115 (substitute* "src/gen-lock-obj.sh"
116 (("if test -n `echo -n`") "if ! test -n `echo -n`"))))
117 ;; When cross-compiling, some platform specific properties cannot
118 ;; be detected. Create a symlink to the appropriate platform
119 ;; file if required. Note that these platform files depend on
120 ;; both the operating system and architecture!
122 ;; See Cross-Compiling section at:
123 ;; https://github.com/gpg/libgpg-error/blob/master/README
124 (add-after 'unpack 'cross-symlinks
126 (define (link triplet source)
127 (symlink (string-append "lock-obj-pub." triplet ".h")
128 (string-append "src/syscfg/lock-obj-pub."
130 ,(let* ((target (%current-target-system))
132 (string-take target (string-index target #\-))))
133 (cond ((target-linux? target)
136 `(link "arm-unknown-linux-gnueabi" "linux-gnu"))
138 `(link "mips-unknown-linux-gnu" "linux-gnu"))
139 ;; Don't always link to the "linux-gnu"
140 ;; configuration, as this is not correct for
141 ;; all architectures.
145 (native-inputs `(("gettext" ,gettext-minimal)))
146 (home-page "https://gnupg.org")
147 (synopsis "Library of error values for GnuPG components")
149 "Libgpg-error is a small library that defines common error values
150 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
151 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
152 Daemon and possibly more in the future.")
153 (license license:lgpl2.0+)
154 (properties '((ftp-server . "ftp.gnupg.org")
155 (ftp-directory . "/gcrypt/libgpg-error")))))
157 (define-public libgcrypt
163 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
167 "1xasrh9zxhgj2n5n8dvpzbwn1mzpmlzy270xhbq2gl8xk2xy4pc9"))))
168 (build-system gnu-build-system)
170 `(("libgpg-error-host" ,libgpg-error)))
172 ;; Needed here for the 'gpg-error' program.
173 `(("libgpg-error-native" ,libgpg-error)))
175 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
176 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
177 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
179 (list (string-append "--with-gpg-error-prefix="
180 (assoc-ref %build-inputs "libgpg-error-host"))
181 ;; When cross-compiling, _gcry_mpih_lshift etc are undefined
182 ,@(if (%current-target-system) '("--disable-asm")
184 (outputs '("out" "debug"))
185 (home-page "https://gnupg.org/")
186 (synopsis "Cryptographic function library")
188 "Libgcrypt is a general-purpose cryptographic library. It provides the
189 standard cryptographic building blocks such as symmetric ciphers, hash
190 algorithms, public key algorithms, large integer functions and random number
192 (license license:lgpl2.0+)
193 (properties '((ftp-server . "ftp.gnupg.org")
194 (ftp-directory . "/gcrypt/libgcrypt")))))
196 (define-public libassuan
203 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
207 "1r1lvcp67gn5lfrj1g388sd77ca6qwnmxndirdysd71gk362z34f"))))
208 (build-system gnu-build-system)
210 (list libgpg-error pth))
211 (home-page "https://gnupg.org")
213 "IPC library used by GnuPG and related software")
215 "Libassuan is a small library implementing the so-called Assuan
216 protocol. This protocol is used for IPC between most newer
217 GnuPG components. Both, server and client side functions are
219 (license license:lgpl2.0+)
220 (properties '((ftp-server . "ftp.gnupg.org")
221 (ftp-directory . "/gcrypt/libassuan")))))
223 (define-public libksba
231 "mirror://gnupg/libksba/libksba-"
235 "12x40y9ihs8nw2xs2y2vjfw90mhikbm5rvabma0dh5frybk87mns"))))
236 (build-system gnu-build-system)
241 (list ,@(if (%current-target-system)
242 '("CC_FOR_BUILD=gcc")
244 (string-append "--with-gpg-error-prefix="
245 (assoc-ref %build-inputs "libgpg-error")))))
246 (home-page "https://www.gnupg.org")
247 (synopsis "CMS and X.509 access library")
249 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
250 as well as the CMS easily accessible by other applications. Both
251 specifications are building blocks of S/MIME and TLS.")
252 (license license:gpl3+)
253 (properties '((ftp-server . "ftp.gnupg.org")
254 (ftp-directory . "/gcrypt/libksba")))))
263 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
265 (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
266 (build-system gnu-build-system)
267 (home-page "https://www.gnupg.org")
268 (synopsis "Non-preemptive thread library")
270 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
271 threads implementation.
273 In contrast to GNU Pth is is based on the system's standard threads
274 implementation. This allows the use of libraries which are not
275 compatible to GNU Pth.")
276 (license (list license:lgpl3+ license:gpl2+)) ; dual license
277 (properties '((ftp-server . "ftp.gnupg.org")
278 (ftp-directory . "/gcrypt/npth")))))
283 ;; Note: The 2.2.X releases are Long Term Support (LTS), so stick to it
284 ;; for our stable 'gnupg'.
285 ;; Note2: 2.2.33 currently suffers from regressions, so do not update to it
286 ;; (see: https://dev.gnupg.org/T5742).
288 (replacement gnupg/fixed)
291 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
293 (patches (search-patches "gnupg-default-pinentry.patch"))
296 "0506gv54z10c96z5821z9p0ksibk1pfilsmag39ffqrcz0sinmxj"))))
297 (build-system gnu-build-system)
313 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
314 ;; executable in its installation directory in
315 ;; /gnu/store before it has been installed.
316 "--enable-gnupg-builddir-envvar"
317 "--enable-all-tests")
319 (modify-phases %standard-phases
320 (add-before 'configure 'patch-paths
321 (lambda* (#:key inputs #:allow-other-keys)
322 (substitute* "scd/scdaemon.c"
323 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
324 (string-append "\"" (assoc-ref inputs "pcsc-lite")
325 "/lib/" name "\"")))))
326 (add-after 'build 'patch-scheme-tests
328 (substitute* (find-files "tests" ".\\.scm$")
329 (("/usr/bin/env gpgscm")
330 (string-append (getcwd) "/tests/gpgscm/gpgscm")))))
331 (add-before 'build 'patch-test-paths
333 (substitute* '("tests/inittests"
334 "tests/pkits/inittests"
336 "tests/pkits/common.sh"
337 "tests/pkits/Makefile")
338 (("/bin/pwd") (which "pwd")))
339 (substitute* "common/t-exectool.c"
340 (("/bin/cat") (which "cat"))
341 (("/bin/true") (which "true"))
342 (("/bin/false") (which "false"))))))))
343 (home-page "https://gnupg.org/")
344 (synopsis "GNU Privacy Guard")
346 "The GNU Privacy Guard is a complete implementation of the OpenPGP
347 standard. It is used to encrypt and sign data and communication. It
348 features powerful key management and the ability to access public key
349 servers. It includes several libraries: libassuan (IPC between GnuPG
350 components), libgpg-error (centralized GnuPG error values), and
351 libskba (working with X.509 certificates and CMS data).")
352 (license license:gpl3+)
353 (properties '((ftp-server . "ftp.gnupg.org")
354 (ftp-directory . "/gcrypt/gnupg")))))
360 (inherit (package-source gnupg))
362 (append (origin-patches (package-source gnupg))
363 (search-patches "gnupg-CVE-2022-34903.patch")))))))
365 (define-public gnupg-1
366 (package (inherit gnupg)
370 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
374 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))
375 (patches (search-patches "gnupg-1-build-with-gcc10.patch"))))
378 (list zlib bzip2 curl readline libgpg-error))
381 (modify-phases %standard-phases
382 (add-after 'unpack 'patch-check-sh
384 (substitute* "checks/Makefile.in"
385 (("/bin/sh") (which "sh"))))))))))
394 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
396 (base32 "1bg13l5s8x9p1v0jyv29n84bay27pflindpzjsc9gj7i4wdkrg7f"))))
397 (build-system gnu-build-system)
401 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
405 (home-page "https://www.gnupg.org/related_software/gpgme/")
406 (synopsis "Library providing simplified access to GnuPG functionality")
408 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
409 easier for applications. It provides a High-Level Crypto API for encryption,
410 decryption, signing, signature verification and key management. Currently
411 it uses GnuPG as its backend but the API isn't restricted to this engine.
413 Because the direct use of GnuPG from an application can be a complicated
414 programming task, it is suggested that all software should try to use GPGME
415 instead. This way bug fixes or improvements can be done at a central place
416 and every application benefits from this.")
417 (license license:lgpl2.1+)
418 (properties '((ftp-server . "ftp.gnupg.org")
419 (ftp-directory . "/gcrypt/gpgme")))))
421 (define-public qgpgme
427 (modify-phases %standard-phases
428 (add-before 'build 'chdir-and-symlink
429 (lambda* (#:key inputs #:allow-other-keys)
430 (let ((gpgme (assoc-ref inputs "gpgme")))
431 (symlink (string-append gpgme "/lib/libgpgmepp.la")
432 "lang/cpp/src/libgpgmepp.la")
433 (symlink (string-append gpgme "/lib/libgpgme.la")
435 (chdir "lang/qt"))))))
437 (modify-inputs (package-native-inputs gpgme)
438 (prepend pkg-config)))
440 (modify-inputs (package-inputs gpgme)
441 (prepend gpgme qtbase-5)))
442 (synopsis "Qt API bindings for gpgme")
443 (description "QGpgme provides a very high level Qt API around GpgMEpp.
445 QGpgME was originally developed as part of libkleo and incorporated into
446 gpgpme starting with version 1.7.")
447 (license license:gpl2+))) ;; Note: this differs from gpgme
449 (define-public guile-gcrypt
451 (name "guile-gcrypt")
453 (home-page "https://notabug.org/cwebber/guile-gcrypt")
457 (url (string-append home-page ".git"))
458 (commit (string-append "v" version))))
461 "0m29fg4pdfifnqqsa437zc5c1bhbfh62mc69ba25ak4x2cla41ll"))
462 (file-name (git-file-name name version))))
463 (build-system gnu-build-system)
465 ;; Work around <https://bugs.gnu.org/20272> to achieve reproducible
467 '(#:parallel-build? #f
470 (modify-phases %standard-phases
471 (add-before 'configure 'add-libgrypt-config
472 (lambda* (#:key inputs target #:allow-other-keys)
474 ;; When cross-compiling, the bash script 'libgcrypt-config'
475 ;; must be accessible during the configure phase.
479 (search-input-file inputs "bin/libgcrypt-config"))
480 ":" (getenv "PATH")))))))))
482 (list pkg-config autoconf automake texinfo guile-3.0))
484 (list guile-3.0 libgcrypt))
485 (synopsis "Cryptography library for Guile using Libgcrypt")
487 "Guile-Gcrypt provides a Guile interface to a subset of the
488 GNU Libgcrypt crytographic library. It provides modules for cryptographic
489 hash functions, message authentication codes (MAC), public-key cryptography,
490 strong randomness, and more. It is implemented using the foreign function
491 interface (FFI) of Guile.")
492 (license license:gpl3+)))
494 (define-public guile2.0-gcrypt
495 (package (inherit guile-gcrypt)
496 (name "guile2.0-gcrypt")
498 (modify-inputs (package-native-inputs guile-gcrypt)
499 (replace "guile" guile-2.0)))
501 (modify-inputs (package-inputs guile-gcrypt)
502 (replace "guile" guile-2.0)))))
504 (define-public guile2.2-gcrypt
506 (inherit guile-gcrypt)
507 (name "guile2.2-gcrypt")
509 (modify-inputs (package-native-inputs guile-gcrypt)
510 (replace "guile" guile-2.2)))
512 (modify-inputs (package-inputs guile-gcrypt)
513 (replace "guile" guile-2.2)))))
515 (define-public python-gpg
521 (uri (pypi-uri "gpg" version))
524 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
525 (build-system python-build-system)
528 (modify-phases %standard-phases
529 (add-before 'build 'set-environment
531 (substitute* "setup.py"
532 (("cc") (which "gcc")))
534 #:tests? #f)) ; No test suite.
539 (home-page (package-home-page gpgme))
540 (synopsis "Python bindings for GPGME GnuPG cryptography library")
541 (description "This package provides Python bindings to the GPGME GnuPG
542 cryptographic library. It is developed in the GPGME source code, and then
543 distributed separately.")
544 (license license:lgpl2.1+)))
546 (define-public python-pygpgme
548 (name "python-pygpgme")
553 (uri (pypi-uri "pygpgme" version))
556 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
557 ;; Unfortunately, we have to disable some tests due to some gpg-agent
559 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
560 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
561 "python-pygpgme-fix-pinentry-tests.patch"))))
564 (modify-phases %standard-phases
565 (add-before 'build 'make-build
566 (lambda _ (invoke "make" "build")))
568 (lambda _ (invoke "make" "check"))))))
569 (build-system python-build-system)
574 (home-page "https://launchpad.net/pygpgme")
575 (synopsis "Python module for working with OpenPGP messages")
577 "PyGPGME is a Python module that lets you sign, verify, encrypt and
578 decrypt messages using the OpenPGP format by making use of GPGME.")
579 (license license:lgpl2.1+)))
581 (define-public python-gnupg
583 (name "python-gnupg")
588 (uri (pypi-uri "python-gnupg" version))
591 "1mq7hljy3bjkxdvh3qx2bv4y0b66l9pmc6i06ys75y7dbjpf2kdn"))))
592 (build-system python-build-system)
595 (modify-phases %standard-phases
597 (lambda* (#:key tests? #:allow-other-keys)
599 (substitute* "test_gnupg.py"
600 ;; Unsure why this test fails.
601 (("'test_search_keys'") "True")
602 (("def test_search_keys") "def disabled__search_keys"))
603 (setenv "USERNAME" "guixbuilder")
604 ;; The doctests are extremely slow and sometimes time out,
605 ;; so we disable them.
606 (invoke "python" "test_gnupg.py" "--no-doctests")))))))
609 (home-page "https://pythonhosted.org/python-gnupg/index.html")
610 (synopsis "Wrapper for the GNU Privacy Guard")
612 "This module allows easy access to GnuPG’s key management, encryption
613 and signature functionality from Python programs.")
614 (license license:bsd-3)))
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")
639 (list perl-moo perl-moox-handlesvia perl-moox-late))
641 (list which perl-module-install))
642 (home-page "https://metacpan.org/release/GnuPG-Interface")
643 (synopsis "Perl interface to GnuPG")
644 (description "@code{GnuPG::Interface} and its associated modules are
645 designed to provide an object-oriented method for interacting with GnuPG,
646 being able to perform functions such as but not limited to encrypting,
647 signing, decryption, verification, and key-listing parsing.")
648 (license license:perl-license)))
657 "https://github.com/jaymzh/pius/releases/download/v"
658 version "/pius-" version ".tar.bz2"))
661 "11fhmfvr0avxl222rv43wjd2xjbpxrsmcl8xwmn0nvf1rw95v9fn"))))
662 (build-system python-build-system)
665 (modify-phases %standard-phases
666 (add-before 'build 'set-gpg-file-name
667 (lambda* (#:key inputs #:allow-other-keys)
668 (substitute* "libpius/constants.py"
670 (search-input-file inputs "bin/gpg"))))))))
671 (inputs (list perl ;for 'pius-party-worksheet'
673 (synopsis "Programs to simplify GnuPG key signing")
675 "Pius (PGP Individual UID Signer) helps attendees of PGP key signing
676 parties. It is the main utility and makes it possible to quickly and easily
677 sign each UID on a set of PGP keys. It is designed to take the pain out of
678 the sign-all-the-keys part of PGP key signing parties while adding security to
679 the process. The @command{pius-keyring-mgr} and
680 @command{pius-party-worksheet} commands help organizers of PGP key signing
682 (license license:gpl2)
683 (home-page "https://www.phildev.net/pius/index.shtml")))
685 (define-public signing-party
687 (name "signing-party")
689 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
694 (commit (string-append "v" version))))
695 (file-name (git-file-name name version))
698 "1aig5ssabzbk4mih7xd04vgr931bw0flbi8dz902wlr610gyv5s5"))))
699 (build-system gnu-build-system)
701 ;; autoconf-wrapper is required due to the non-standard
703 `(("autoconf" ,autoconf-wrapper)
704 ("automake" ,automake)))
712 `(#:tests? #f ; no test suite
714 (modify-phases %standard-phases
716 (lambda* (#:key outputs #:allow-other-keys)
717 (let ((out (assoc-ref outputs "out")))
718 (substitute* "keyanalyze/Makefile"
719 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
720 (substitute* "keyanalyze/Makefile"
721 (("\\./configure") (string-append "./configure --prefix=" out)))
722 (substitute* "gpgwrap/Makefile"
724 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
725 out "/bin/gpgwrap\n")))
726 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
727 "keylookup/Makefile" "sig2dot/Makefile"
728 "springgraph/Makefile")
730 (setenv "CONFIG_SHELL" (which "sh")))
733 (lambda* (#:key outputs #:allow-other-keys #:rest args)
734 (let ((out (assoc-ref outputs "out"))
735 (install (assoc-ref %standard-phases 'install)))
739 (copy-file (string-append dir "/" file)
740 (string-append out "/bin/" file)))
741 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
742 "gpglist" "gpg-mailkeys" "gpgparticipants")
743 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
744 "gpglist" "gpg-mailkeys" "gpgparticipants"))
747 (copy-file (string-append dir "/" file)
748 (string-append out "/share/man/man1/" file)))
749 '("caff" "caff" "caff" "gpgdir"
750 "gpg-key2ps" "gpglist" "gpg-mailkeys"
751 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
752 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
753 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
754 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
755 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
756 "process_keys.1" "pgpring.1" "keyanalyze.1")))
758 (add-after 'install 'wrap-programs
759 (lambda* (#:key outputs #:allow-other-keys)
760 (let* ((out (assoc-ref outputs "out")))
762 (string-append out "/bin/caff")
763 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
765 (synopsis "Collection of scripts for simplifying gnupg key signing")
767 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
768 including tools for signing keys, keyring analysis, and party preparation.
770 @item caff: CA - Fire and Forget signs and mails a key
771 @item pgp-clean: removes all non-self signatures from key
772 @item pgp-fixkey: removes broken packets from keys
773 @item gpg-mailkeys: simply mail out a signed key to its owner
774 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
775 @item gpgdir: recursive directory encryption tool
776 @item gpglist: show who signed which of your UIDs
777 @item gpgsigs: annotates list of GnuPG keys with already done signatures
778 @item gpgparticipants: create list of party participants for the organiser
779 @item gpgwrap: a passphrase wrapper
780 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
781 @item keylookup: ncurses wrapper around gpg --search
782 @item sig2dot: converts a list of GnuPG signatures to a .dot file
783 @item springgraph: creates a graph from a .dot file
785 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
786 ;; and caff and gpgsigs: bsd-3, see
787 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
788 (license license:gpl2)))
790 (define-public pinentry-tty
792 (name "pinentry-tty")
796 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
800 "0w34c4x5hkxaxnnkcrm1azlzwzxcziv5dkci3xcd0hz0ld2j01qh"))))
801 (build-system gnu-build-system)
803 `(#:configure-flags '("--enable-pinentry-tty")))
805 (list ncurses libassuan
806 `(,libsecret "out")))
809 (home-page "https://gnupg.org/aegypten2/")
810 (synopsis "GnuPG's interface to passphrase input")
812 "Pinentry provides a console that allows users to enter a passphrase when
813 @code{gpg} is run and needs it.")
814 (license license:gpl2+)
815 (properties '((ftp-server . "ftp.gnupg.org")
816 (ftp-directory . "/gcrypt/pinentry")
817 (upstream-name . "pinentry")))))
819 (define-public pinentry-emacs
821 (inherit pinentry-tty)
822 (name "pinentry-emacs")
824 `(#:configure-flags '("--enable-pinentry-emacs")))
826 "Pinentry provides a console and an Emacs interface that allows users to
827 enter a passphrase when required by @code{gpg} or other software.")))
829 (define-public pinentry-gtk2
831 (inherit pinentry-tty)
832 (name "pinentry-gtk2")
834 `(#:configure-flags '("--enable-fallback-curses")))
836 (modify-inputs (package-inputs pinentry-tty)
837 (prepend gtk+-2 glib)))
839 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
840 passphrase when @code{gpg} is run and needs it.")))
842 (define-public pinentry-gnome3
844 (inherit pinentry-tty)
845 (name "pinentry-gnome3")
847 (modify-inputs (package-inputs pinentry-tty)
848 (prepend gtk+-2 gcr glib)))
850 `(#:configure-flags '("--enable-pinentry-gnome3"
851 "--enable-fallback-curses")))
853 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
854 that allows users to enter a passphrase when required by @code{gpg} or other
857 (define-public pinentry-qt
859 (inherit pinentry-tty)
862 `(#:configure-flags '("--enable-fallback-curses")))
864 (modify-inputs (package-inputs pinentry-tty)
867 "Pinentry provides a console and a Qt GUI that allows users to enter a
868 passphrase when @code{gpg} is run and needs it.")))
870 (define-public pinentry-efl
872 (inherit pinentry-tty)
873 (name "pinentry-efl")
875 '(#:configure-flags '("--enable-pinentry-efl"
876 "--enable-fallback-curses")
878 (modify-phases %standard-phases
881 (invoke "sh" "autogen.sh"))))))
883 `(("autoconf" ,autoconf)
884 ("automake" ,automake)
885 ("gettext" ,gettext-minimal)
886 ,@(package-native-inputs pinentry-tty)))
888 (modify-inputs (package-inputs pinentry-tty)
891 "Pinentry provides a console and a graphical interface for @acronym{EFL,
892 the Enlightenment Foundation Libraries} that allows users to enter a
893 passphrase when @code{gpg} is run and needs it.")))
895 (define-public pinentry-rofi
897 (name "pinentry-rofi")
902 (url "https://github.com/plattfot/pinentry-rofi/")
904 (file-name (git-file-name name version))
906 (base32 "0kjzvgni9srl8h5c52pqrvgdxs6avv0nhgk19apd97sx10qdwdhk"))))
907 (build-system gnu-build-system)
912 ,@%gnu-build-system-modules)
916 (add-after 'install 'hall-wrap-binaries
917 (lambda* (#:key inputs outputs #:allow-other-keys)
918 (let* ((out (assoc-ref outputs "out"))
919 (bin (string-append out "/bin/"))
920 (site (string-append out "/share/guile/site"))
921 (rofi-bin (string-append (assoc-ref inputs "rofi") "/bin")))
922 (match (scandir site)
925 (string-append bin "pinentry-rofi")
926 (list "PATH" ":" 'prefix `(,rofi-bin)))
928 (add-after 'compress-documentation 'installcheck
930 (invoke "make" "installcheck"))))))
932 (list autoconf autoconf-archive automake pkg-config texinfo))
933 (inputs (list guile-3.0 rofi))
934 (synopsis "Rofi GUI for GnuPG's passphrase input")
935 (description "Pinentry-rofi is a simple graphical user interface for
936 passphrase or PIN when required by @code{gpg} or other software. It is using
937 the Rofi application launcher as the user interface. Which makes it combined
938 with @code{rofi-pass} a good front end for @code{password-store}.")
939 (home-page "https://github.com/plattfot/pinentry-rofi/")
940 (license license:gpl3+)))
942 (define-public pinentry-bemenu
944 (name "pinentry-bemenu")
950 (url "https://github.com/t-8ch/pinentry-bemenu")
951 (commit (string-append "v" version))))
952 (file-name (git-file-name name version))
954 (base32 "09nw49pyfs65m35a40kpzh6h0mf5yyjzmzq3jxp660885m0b29g8"))))
955 (build-system meson-build-system)
959 (list bemenu libassuan libgpg-error popt))
960 (home-page "https://github.com/t-8ch/pinentry-bemenu")
961 (synopsis "Pinentry implementation based on @code{bemenu}")
963 "This package provides a Pinentry implementation based on Bemenu.")
964 (license license:gpl3+)))
966 (define-public pinentry
967 (package (inherit pinentry-gtk2)
970 (define-public paperkey
976 (uri (string-append "https://www.jabberwocky.com/"
977 "software/paperkey/paperkey-"
981 "1xq5gni6gksjkd5avg0zpd73vsr97appksfx0gx2m38s4w9zsid2"))))
982 (build-system gnu-build-system)
985 (modify-phases %standard-phases
986 (add-before 'check 'patch-check-scripts
988 (substitute* '("checks/roundtrip.sh"
989 "checks/roundtrip-raw.sh")
990 (("/bin/echo") "echo"))
992 (home-page "https://www.jabberwocky.com/software/paperkey/")
993 (synopsis "Backup OpenPGP keys to paper")
995 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
996 for printing with paper and ink, which have amazingly long retention
997 qualities. To reconstruct a secret key, you re-enter those
998 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
999 them to transform your existing public key into a secret key.")
1000 (license license:gpl2+)))
1002 (define-public pgpdump
1009 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
1012 (base32 "0kslr62h3wazg4x0l38lsmswvh2dizpnwcrdsmqz62b3plnr40jf"))))
1013 (build-system gnu-build-system)
1015 (list #:tests? #f ; no make check
1017 #~(list (string-append "CC=" #$(cc-for-target)))))
1020 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
1021 (synopsis "PGP packet visualizer")
1022 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
1023 packets from a file.
1025 The output of this command is similar to GnuPG's list packets command,
1026 however, pgpdump produces more detailed and easier to understand output.")
1027 (license license:bsd-3)))
1035 (uri (string-append "mirror://gnupg/gpa/"
1036 name "-" version ".tar.bz2"))
1039 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
1040 (build-system gnu-build-system)
1043 (modify-phases %standard-phases
1044 (add-after 'install 'wrap-program
1045 (lambda* (#:key inputs outputs #:allow-other-keys)
1046 (let ((out (assoc-ref outputs "out"))
1047 (gnupg (assoc-ref inputs "gnupg")))
1048 (wrap-program (string-append out "/bin/gpa")
1049 `("PATH" ":" prefix (,(string-append gnupg "/bin"))))
1056 ("libassuan" ,libassuan)
1057 ("libgpg-error" ,libgpg-error)
1058 ("gtk+-2" ,gtk+-2)))
1059 (home-page "https://gnupg.org/software/gpa/")
1060 (synopsis "Graphical user interface for GnuPG")
1062 "GPA, the GNU Privacy Assistant, is a graphical user interface for
1063 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
1064 files, to verify signatures, and to manage the private and public keys.")
1065 (license license:gpl3+)
1066 (properties '((ftp-server . "ftp.gnupg.org")
1067 (ftp-directory . "/gcrypt/gpa")))))
1069 (define-public parcimonie
1075 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1076 "parcimonie/App-Parcimonie-"
1080 "10gal2h8ihg7nnzy3adw942axd2ia1rcn1fw3a3v07n5mm8kqrx9"))))
1081 (build-system perl-build-system)
1089 perl-gnupg-interface
1090 perl-ipc-system-simple
1096 perl-moox-strictconstructor
1097 perl-namespace-clean
1102 perl-time-duration-parse
1105 perl-types-path-tiny
1108 (list perl-file-which
1109 perl-gnupg-interface
1116 xorg-server-for-tests))
1119 (modify-phases %standard-phases
1120 ;; Needed for using gpg-connect-agent during tests.
1121 (add-before 'check 'prepare-for-tests
1122 (lambda* (#:key inputs #:allow-other-keys)
1123 (let ((Xvfb (search-input-file inputs "/bin/Xvfb")))
1124 (system (string-append Xvfb " :1 &"))
1125 (setenv "DISPLAY" ":1")
1126 (setenv "HOME" "/tmp")
1127 ;; These tests expect usable gnupg configurations.
1128 (delete-file "t/32-keyserver_defined_on_command_line.t")
1129 (delete-file "t/33-checkGpgHasDefinedKeyserver.t"))))
1130 (add-before 'install 'fix-references
1131 (lambda* (#:key inputs outputs #:allow-other-keys)
1132 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
1133 ;; Skip check whether dependencies are in the PATH
1134 (("defined which.*") ""))))
1135 (add-after 'install 'wrap-program
1136 (lambda* (#:key inputs outputs #:allow-other-keys)
1137 (let* ((out (assoc-ref outputs "out"))
1138 (perllib (string-append out "/lib/perl5/site_perl/"
1139 ,(package-version perl))))
1140 (wrap-program (string-append out "/bin/parcimonie")
1142 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))))))))
1143 (home-page "https://salsa.debian.org/intrigeri/parcimonie")
1144 (synopsis "Incrementally refreshes a GnuPG keyring")
1145 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1146 that makes it hard to correlate the keyring content to an individual, and
1147 makes it hard to locate an individual based on an identifying subset of her
1148 keyring content. Parcimonie is a daemon that fetches one key at a time using
1149 the Tor network, waits a bit, changes the Tor circuit being used, and starts
1151 (properties '((upstream-name . "App-Parcimonie")))
1152 (license license:gpl1+)))
1154 (define-public jetring
1162 (url "https://salsa.debian.org/debian/jetring")
1163 (commit "535380166eb1b222ba34864af07f3e36f4fb52c9")))
1164 (file-name (git-file-name name version))
1166 (base32 "19m7rj446pr4nql44khwq0cfxfrm8cslj5v9jll08p7nk6glq5px"))))
1167 (build-system gnu-build-system)
1170 (modify-phases %standard-phases
1171 (delete 'configure) ; no configure script
1172 (add-before 'install 'hardlink-gnupg
1173 (lambda* (#:key inputs #:allow-other-keys)
1174 (let ((gpg (search-input-file inputs "/bin/gpg")))
1175 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1176 (("gpg -") (string-append gpg " -"))
1177 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1180 (lambda* (#:key outputs #:allow-other-keys)
1181 (let* ((out (assoc-ref outputs "out"))
1182 (man (string-append out "/share/man")))
1183 (for-each (lambda (file)
1184 (install-file file (string-append out "/bin/")))
1185 (find-files "." "jetring-[[:alpha:]]+$"))
1186 (for-each (lambda (file)
1187 (install-file file (string-append man "/man1/")))
1188 (find-files "." ".*\\.1$"))
1189 (install-file "jetring.7" (string-append man "/man7/"))
1191 #:tests? #f)) ; no test phase
1194 (home-page "https://joeyh.name/code/jetring/")
1195 (synopsis "GnuPG keyring maintenance using changesets")
1197 "Jetring is a collection of tools that allow for gpg keyrings to be
1198 maintained using changesets. It was developed with the Debian keyring in mind,
1199 and aims to solve the problem that a gpg keyring is a binary blob that's hard
1200 for multiple people to collaboratively edit.
1202 With jetring, changesets can be submitted, reviewed to see exactly what they
1203 will do, applied, and used to build a keyring. The origin of every change made
1204 to the keyring is available for auditing, and gpg signatures can be used for
1205 integrity guarantees.")
1206 (license license:gpl2+)))