Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
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>
20 ;;;
21 ;;; This file is part of GNU Guix.
22 ;;;
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.
27 ;;;
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.
32 ;;;
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/>.
35
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))
78
79 (define-public libgpg-error
80 (package
81 (name "libgpg-error")
82 (version "1.37")
83 (source
84 (origin
85 (method url-fetch)
86 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
87 version ".tar.bz2"))
88 (sha256
89 (base32
90 "0qwpx8mbc2l421a22l0l1hpzkip9jng06bbzgxwpkkvk5bvnybdk"))))
91 (build-system gnu-build-system)
92 (arguments
93 (if (%current-target-system)
94 `(#:modules ((ice-9 match)
95 (guix build gnu-build-system)
96 (guix build utils))
97 #:phases
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)
105 (let ((triplet
106 (match (string-take target
107 (string-index target #\-))
108 ("armhf" "arm-unknown-linux-gnueabi")
109 ("mips64el" "mips-unknown-linux-gnu")
110 (x
111 (string-append x "-unknown-linux-gnu")))))
112 (symlink
113 (string-append "lock-obj-pub." triplet ".h")
114 "src/syscfg/lock-obj-pub.linux-gnu.h"))
115 #t))))
116 '()))
117 (native-inputs `(("gettext" ,gettext-minimal)))
118 (home-page "https://gnupg.org")
119 (synopsis "Library of error values for GnuPG components")
120 (description
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")))))
128
129 (define-public libgcrypt
130 (package
131 (name "libgcrypt")
132 (version "1.8.5")
133 (source (origin
134 (method url-fetch)
135 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
136 version ".tar.bz2"))
137 (sha256
138 (base32
139 "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv"))))
140 (build-system gnu-build-system)
141 (propagated-inputs
142 `(("libgpg-error-host" ,libgpg-error)))
143 (native-inputs
144 ;; Needed here for the 'gpg-error' program.
145 `(("libgpg-error-native" ,libgpg-error)))
146 (arguments
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.
150 `(#:configure-flags
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")
155 '()))))
156 (outputs '("out" "debug"))
157 (home-page "https://gnupg.org/")
158 (synopsis "Cryptographic function library")
159 (description
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
163 generation.")
164 (license license:lgpl2.0+)
165 (properties '((ftp-server . "ftp.gnupg.org")
166 (ftp-directory . "/gcrypt/libgcrypt")))))
167
168 (define-public libassuan
169 (package
170 (name "libassuan")
171 (version "2.5.4")
172 (source
173 (origin
174 (method url-fetch)
175 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
176 version ".tar.bz2"))
177 (sha256
178 (base32
179 "1w7vnnycq4z7gf4bk38pi4hrb8qrrzgfpz3cd7frwldxnfbfx060"))))
180 (build-system gnu-build-system)
181 (propagated-inputs
182 `(("libgpg-error" ,libgpg-error)
183 ("pth" ,pth)))
184 (home-page "https://gnupg.org")
185 (synopsis
186 "IPC library used by GnuPG and related software")
187 (description
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
191 provided.")
192 (license license:lgpl2.0+)
193 (properties '((ftp-server . "ftp.gnupg.org")
194 (ftp-directory . "/gcrypt/libassuan")))))
195
196 (define-public libksba
197 (package
198 (name "libksba")
199 (version "1.4.0")
200 (source
201 (origin
202 (method url-fetch)
203 (uri (string-append
204 "mirror://gnupg/libksba/libksba-"
205 version ".tar.bz2"))
206 (sha256
207 (base32
208 "1dj1razn35srkgadx3i30yr0q037cr0dn54m6a54vxgh3zlsirmz"))))
209 (build-system gnu-build-system)
210 (propagated-inputs
211 `(("libgpg-error" ,libgpg-error)))
212 (native-inputs
213 `(("libgpg-error" ,libgpg-error)))
214 (arguments
215 `(#:configure-flags
216 (list ,@(if (%current-target-system)
217 '("CC_FOR_BUILD=gcc")
218 '())
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")
223 (description
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")))))
230
231 (define-public npth
232 (package
233 (name "npth")
234 (version "1.6")
235 (source
236 (origin
237 (method url-fetch)
238 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
239 (sha256
240 (base32 "1lg2lkdd3z1s3rpyf88786l243adrzyk9p4q8z9n41ygmpcsp4qk"))))
241 (build-system gnu-build-system)
242 (home-page "https://www.gnupg.org")
243 (synopsis "Non-preemptive thread library")
244 (description
245 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
246 threads implementation.
247
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")))))
254
255 (define-public gnupg
256 (package
257 (name "gnupg")
258 (version "2.2.24")
259 (source (origin
260 (method url-fetch)
261 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
262 ".tar.bz2"))
263 (patches (search-patches "gnupg-default-pinentry.patch"))
264 (sha256
265 (base32
266 "0ilcp7m1dvwnri3i7q9wanf5pvhwxk7h106pd62g0d5fz80b944h"))))
267 (build-system gnu-build-system)
268 (native-inputs
269 `(("pkg-config" ,pkg-config)))
270 (inputs
271 `(("gnutls" ,gnutls)
272 ("libassuan" ,libassuan)
273 ("libgcrypt" ,libgcrypt)
274 ("libgpg-error" ,libgpg-error)
275 ("libksba" ,libksba)
276 ("npth" ,npth)
277 ("openldap" ,openldap)
278 ("pcsc-lite" ,pcsc-lite)
279 ("readline" ,readline)
280 ("sqlite" ,sqlite)
281 ("zlib" ,zlib)))
282 (arguments
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")
288 #:phases
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")
295 "/lib/" name "\"")))
296 #t))
297 (add-after 'build 'patch-scheme-tests
298 (lambda _
299 (substitute* (find-files "tests" ".\\.scm$")
300 (("/usr/bin/env gpgscm")
301 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
302 #t))
303 (add-before 'build 'patch-test-paths
304 (lambda _
305 (substitute* '("tests/inittests"
306 "tests/pkits/inittests"
307 "tests/Makefile"
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")))
315 #t)))))
316 (home-page "https://gnupg.org/")
317 (synopsis "GNU Privacy Guard")
318 (description
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")))))
328
329 (define-public gnupg-2.0
330 (package (inherit gnupg)
331 (version "2.0.30")
332 (source (origin
333 (method url-fetch)
334 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
335 ".tar.bz2"))
336 (sha256
337 (base32
338 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
339 (native-inputs '())
340 (inputs
341 `(("adns" ,adns)
342 ("bzip2" ,bzip2)
343 ("curl" ,curl)
344 ("libassuan" ,libassuan)
345 ("libgcrypt" ,libgcrypt)
346 ("libgpg-error" ,libgpg-error)
347 ("libksba" ,libksba)
348 ("pth" ,pth)
349 ("openldap" ,openldap)
350 ("zlib" ,zlib)
351 ("readline" ,readline)))
352 (arguments
353 `(#:phases
354 (modify-phases %standard-phases
355 (add-before 'configure 'patch-config-files
356 (lambda _
357 (substitute* "tests/openpgp/Makefile.in"
358 (("/bin/sh") (which "sh")))
359 #t))
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")
368
369 ;; Keep the old name around to ease transition.
370 (symlink "gpgv" "gpgv2")
371 (symlink "gpg" "gpg2")
372 #t)))))))
373 (properties `((superseded . ,gnupg)))))
374
375 (define-public gnupg-1
376 (package (inherit gnupg)
377 (version "1.4.23")
378 (source (origin
379 (method url-fetch)
380 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
381 ".tar.bz2"))
382 (sha256
383 (base32
384 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
385 (native-inputs '())
386 (inputs
387 `(("zlib" ,zlib)
388 ("bzip2" ,bzip2)
389 ("curl" ,curl)
390 ("readline" ,readline)
391 ("libgpg-error" ,libgpg-error)))
392 (arguments
393 `(#:phases
394 (modify-phases %standard-phases
395 (add-after 'unpack 'patch-check-sh
396 (lambda _
397 (substitute* "checks/Makefile.in"
398 (("/bin/sh") (which "sh")))
399 #t)))))))
400
401 (define-public gpgme
402 (package
403 (name "gpgme")
404 (version "1.15.0")
405 (source
406 (origin
407 (method url-fetch)
408 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
409 (sha256
410 (base32 "0nqfipv5s4npfidsm1rs3kpq0r0av9bfqfd5r035jibx5k0jniqb"))))
411 (build-system gnu-build-system)
412 (native-inputs
413 `(("gnupg" ,gnupg)))
414 (propagated-inputs
415 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
416 `(("libgpg-error" ,libgpg-error)))
417 (inputs
418 `(("libassuan" ,libassuan)))
419 (home-page "https://www.gnupg.org/related_software/gpgme/")
420 (synopsis "Library providing simplified access to GnuPG functionality")
421 (description
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.
426
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")))))
434
435 (define-public qgpgme
436 (package
437 (inherit gpgme)
438 (name "qgpgme")
439 (arguments
440 `(#:phases
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")
448 "src/libgpgme.la"))
449 (chdir "lang/qt")
450 #t)))))
451 (native-inputs
452 `(("pkg-config" ,pkg-config)
453 ,@(package-native-inputs gpgme)))
454 (inputs
455 `(("gpgme" ,gpgme)
456 ("qtbase" ,qtbase)
457 ,@(package-inputs gpgme)))
458 (synopsis "Qt API bindings for gpgme")
459 (description "QGpgme provides a very high level Qt API around GpgMEpp.
460
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
464
465 (define-public guile-gcrypt
466 (package
467 (name "guile-gcrypt")
468 (version "0.3.0")
469 (home-page "https://notabug.org/cwebber/guile-gcrypt")
470 (source (origin
471 (method git-fetch)
472 (uri (git-reference
473 (url (string-append home-page ".git"))
474 (commit (string-append "v" version))))
475 (sha256
476 (base32
477 "0m29fg4pdfifnqqsa437zc5c1bhbfh62mc69ba25ak4x2cla41ll"))
478 (file-name (git-file-name name version))))
479 (build-system gnu-build-system)
480 (arguments
481 ;; When cross-compiling, the bash script libgcrypt-config provided by
482 ;; libgcrypt must be accessible during configure phase.
483 `(,@(if (%current-target-system)
484 '(#:phases
485 (modify-phases %standard-phases
486 (add-before 'configure 'add-libgrypt-config
487 (lambda _
488 (setenv "PATH" (string-append
489 (assoc-ref %build-inputs "libgcrypt")
490 "/bin:"
491 (getenv "PATH")))
492 #t))))
493 '())))
494 (native-inputs
495 `(("pkg-config" ,pkg-config)
496 ("autoconf" ,autoconf)
497 ("automake" ,automake)
498 ("texinfo" ,texinfo)
499 ("guile" ,guile-3.0)))
500 (inputs
501 `(("guile" ,guile-3.0)
502 ("libgcrypt" ,libgcrypt)))
503 (synopsis "Cryptography library for Guile using Libgcrypt")
504 (description
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+)))
511
512 (define-public guile2.0-gcrypt
513 (package (inherit guile-gcrypt)
514 (name "guile2.0-gcrypt")
515 (native-inputs
516 `(("guile" ,guile-2.0)
517 ,@(alist-delete "guile" (package-native-inputs guile-gcrypt))))
518 (inputs
519 `(("guile" ,guile-2.0)
520 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
521
522 (define-public guile2.2-gcrypt
523 (package
524 (inherit guile-gcrypt)
525 (name "guile2.2-gcrypt")
526 (native-inputs
527 `(("guile" ,guile-2.2)
528 ,@(alist-delete "guile" (package-native-inputs guile-gcrypt))))
529 (inputs
530 `(("guile" ,guile-2.2)
531 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
532
533 (define-public guile3.0-gcrypt
534 (deprecated-package "guile3.0-gcrypt" guile-gcrypt))
535
536 (define-public python-gpg
537 (package
538 (name "python-gpg")
539 (version "1.10.0")
540 (source (origin
541 (method url-fetch)
542 (uri (pypi-uri "gpg" version))
543 (sha256
544 (base32
545 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
546 (build-system python-build-system)
547 (arguments
548 '(#:phases
549 (modify-phases %standard-phases
550 (add-before 'build 'set-environment
551 (lambda _
552 (substitute* "setup.py"
553 (("cc") (which "gcc")))
554 #t)))
555 #:tests? #f)) ; No test suite.
556 (inputs
557 `(("gpgme" ,gpgme)))
558 (native-inputs
559 `(("swig" ,swig)))
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+)))
566
567 (define-public python2-gpg
568 (package-with-python2 python-gpg))
569
570 (define-public python-pygpgme
571 (package
572 (name "python-pygpgme")
573 (version "0.3")
574 (source
575 (origin
576 (method url-fetch)
577 (uri (pypi-uri "pygpgme" version))
578 (sha256
579 (base32
580 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
581 ;; Unfortunately, we have to disable some tests due to some gpg-agent
582 ;; goofiness... see:
583 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
584 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
585 "python-pygpgme-fix-pinentry-tests.patch"))))
586 (arguments
587 `(#:phases
588 (modify-phases %standard-phases
589 (add-before 'build 'make-build
590 (lambda _ (invoke "make" "build")))
591 (replace 'check
592 (lambda _ (invoke "make" "check"))))))
593 (build-system python-build-system)
594 (native-inputs
595 `(("gnupg" ,gnupg-1)))
596 (inputs
597 `(("gpgme" ,gpgme)))
598 (home-page "https://launchpad.net/pygpgme")
599 (synopsis "Python module for working with OpenPGP messages")
600 (description
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+)))
604
605 (define-public python2-pygpgme
606 (package-with-python2 python-pygpgme))
607
608 (define-public python-gnupg
609 (package
610 (name "python-gnupg")
611 (version "0.4.4")
612 (source
613 (origin
614 (method url-fetch)
615 (uri (pypi-uri "python-gnupg" version))
616 (sha256
617 (base32
618 "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
619 (build-system python-build-system)
620 (arguments
621 `(#:phases
622 (modify-phases %standard-phases
623 (replace 'check
624 (lambda _
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.
632 (invoke "python"
633 "test_gnupg.py" "--no-doctests"))))))
634 (native-inputs
635 `(("gnupg" ,gnupg-1)))
636 (home-page "https://packages.python.org/python-gnupg/index.html")
637 (synopsis "Wrapper for the GNU Privacy Guard")
638 (description
639 "This module allows easy access to GnuPG’s key management, encryption
640 and signature functionality from Python programs.")
641 (license license:bsd-3)))
642
643 (define-public python2-gnupg
644 (package-with-python2 python-gnupg))
645
646 (define-public perl-gnupg-interface
647 (package
648 (name "perl-gnupg-interface")
649 (version "0.52")
650 (source (origin
651 (method url-fetch)
652 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
653 "GnuPG-Interface-" version ".tar.gz"))
654 (sha256
655 (base32
656 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
657 (build-system perl-build-system)
658 (arguments
659 `(#:phases
660 (modify-phases %standard-phases
661 ;; FIXME: This test fails for unknown reasons
662 (add-after 'unpack 'delete-broken-test
663 (lambda _
664 (delete-file "t/encrypt_symmetrically.t")
665 #t)))))
666 (inputs
667 `(("gnupg" ,gnupg-1)))
668 (propagated-inputs
669 `(("perl-moo" ,perl-moo)
670 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
671 ("perl-moox-late" ,perl-moox-late)))
672 (native-inputs
673 `(("which" ,which)
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)))
682
683 (define-public pius
684 (package
685 (name "pius")
686 (version "2.2.7")
687 (source (origin
688 (method url-fetch)
689 (uri (string-append
690 "https://github.com/jaymzh/pius/releases/download/v"
691 version "/pius-" version ".tar.bz2"))
692 (sha256
693 (base32
694 "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
695 (build-system python-build-system)
696 (inputs `(("perl" ,perl) ; for 'pius-party-worksheet'
697 ("gpg" ,gnupg)
698 ("python-six" ,python2-six)))
699 (arguments
700 `(#:tests? #f
701 #:python ,python-2 ; uses the Python 2 'print' syntax
702 #:phases
703 (modify-phases %standard-phases
704 (add-before
705 'build 'set-gpg-file-name
706 (lambda* (#:key inputs outputs #:allow-other-keys)
707 (let* ((gpg (string-append (assoc-ref inputs "gpg")
708 "/bin/gpg")))
709 (substitute* "libpius/constants.py"
710 (("/usr/bin/gpg2") gpg))
711 #t))))))
712 (synopsis "Programs to simplify GnuPG key signing")
713 (description
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
718 to the process.
719
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")))
724
725 (define-public signing-party
726 (package
727 (name "signing-party")
728 (version "2.10")
729 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
730 (source (origin
731 (method git-fetch)
732 (uri (git-reference
733 (url home-page)
734 (commit (string-append "v" version))))
735 (file-name (git-file-name name version))
736 (sha256
737 (base32
738 "0lq8nmwjmysry0n4jg6vb7bh0lagbyb9pa11ii3s41p1mhzchf2r"))))
739 (build-system gnu-build-system)
740 (native-inputs
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)
748 ("libmd" ,libmd)))
749 (arguments
750 `(#:tests? #f ; no test suite
751 #:phases
752 (modify-phases %standard-phases
753 (replace 'configure
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"
761 (("\\} clean")
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")
767 (("/usr") out))
768 (setenv "CONFIG_SHELL" (which "sh")))
769 #t))
770 (replace 'install
771 (lambda* (#:key outputs #:allow-other-keys #:rest args)
772 (let ((out (assoc-ref outputs "out"))
773 (install (assoc-ref %standard-phases 'install)))
774 (apply install args)
775 (for-each
776 (lambda (dir file)
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"))
783 (for-each
784 (lambda (dir file)
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")))
795 #t))
796 (add-after 'install 'wrap-programs
797 (lambda* (#:key outputs #:allow-other-keys)
798 (let* ((out (assoc-ref outputs "out")))
799 (wrap-program
800 (string-append out "/bin/caff")
801 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
802 #t)))))
803 (synopsis "Collection of scripts for simplifying gnupg key signing")
804 (description
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.
807 @enumerate
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
822 @end enumerate")
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)))
827
828 (define-public pinentry-tty
829 (package
830 (name "pinentry-tty")
831 (version "1.1.0")
832 (source (origin
833 (method url-fetch)
834 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
835 version ".tar.bz2"))
836 (sha256
837 (base32
838 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
839 (build-system gnu-build-system)
840 (arguments
841 `(#:configure-flags '("--enable-pinentry-tty")))
842 (inputs
843 `(("ncurses" ,ncurses)
844 ("libassuan" ,libassuan)
845 ("libsecret" ,libsecret "out")))
846 (native-inputs
847 `(("pkg-config" ,pkg-config)))
848 (home-page "https://gnupg.org/aegypten2/")
849 (synopsis "GnuPG's interface to passphrase input")
850 (description
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")))))
857
858 (define-public pinentry-emacs
859 (package
860 (inherit pinentry-tty)
861 (name "pinentry-emacs")
862 (arguments
863 `(#:configure-flags '("--enable-pinentry-emacs")))
864 (description
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.")))
867
868 (define-public pinentry-gtk2
869 (package
870 (inherit pinentry-tty)
871 (name "pinentry-gtk2")
872 (arguments
873 `(#:configure-flags '("--enable-fallback-curses")))
874 (inputs
875 `(("gtk+" ,gtk+-2)
876 ("glib" ,glib)
877 ,@(package-inputs pinentry-tty)))
878 (description
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.")))
881
882 (define-public pinentry-gnome3
883 (package
884 (inherit pinentry-tty)
885 (name "pinentry-gnome3")
886 (inputs
887 `(("gtk+" ,gtk+-2)
888 ("gcr" ,gcr)
889 ("glib" ,glib)
890 ,@(package-inputs pinentry-tty)))
891 (arguments
892 `(#:configure-flags '("--enable-pinentry-gnome3"
893 "--enable-fallback-curses")))
894 (description
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
897 software.")))
898
899 (define-public pinentry-qt
900 (package
901 (inherit pinentry-tty)
902 (name "pinentry-qt")
903 (arguments
904 `(#:configure-flags '("--enable-fallback-curses")))
905 (inputs
906 `(("qtbase" ,qtbase)
907 ,@(package-inputs pinentry-tty)))
908 (description
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.")))
911
912 (define-public pinentry-efl
913 (package
914 (inherit pinentry-tty)
915 (name "pinentry-efl")
916 (source
917 (origin
918 (inherit (package-source pinentry-tty))
919 (patches (search-patches "pinentry-efl.patch"))))
920 (arguments
921 '(#:configure-flags '("--enable-pinentry-efl"
922 "--enable-fallback-curses")
923 #:phases
924 (modify-phases %standard-phases
925 (replace 'bootstrap
926 (lambda _
927 (invoke "sh" "autogen.sh"))))))
928 (native-inputs
929 `(("autoconf" ,autoconf)
930 ("automake" ,automake)
931 ("gettext" ,gettext-minimal)
932 ,@(package-native-inputs pinentry-tty)))
933 (inputs
934 `(("efl" ,efl)
935 ,@(package-inputs pinentry-tty)))
936 (description
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.")))
940
941 (define-public pinentry
942 (package (inherit pinentry-gtk2)
943 (name "pinentry")))
944
945 (define-public paperkey
946 (package
947 (name "paperkey")
948 (version "1.6")
949 (source (origin
950 (method url-fetch)
951 (uri (string-append "https://www.jabberwocky.com/"
952 "software/paperkey/paperkey-"
953 version ".tar.gz"))
954 (sha256
955 (base32
956 "1xq5gni6gksjkd5avg0zpd73vsr97appksfx0gx2m38s4w9zsid2"))))
957 (build-system gnu-build-system)
958 (arguments
959 `(#:phases
960 (modify-phases %standard-phases
961 (add-before 'check 'patch-check-scripts
962 (lambda _
963 (substitute* '("checks/roundtrip.sh"
964 "checks/roundtrip-raw.sh")
965 (("/bin/echo") "echo"))
966 #t)))))
967 (home-page "https://www.jabberwocky.com/software/paperkey/")
968 (synopsis "Backup OpenPGP keys to paper")
969 (description
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+)))
976
977 (define-public pgpdump
978 (package
979 (name "pgpdump")
980 (version "0.33")
981 (source
982 (origin
983 (method url-fetch)
984 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
985 version ".tar.gz"))
986 (sha256
987 (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
988 (build-system gnu-build-system)
989 (arguments
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")))))
994 (inputs
995 `(("zlib" ,zlib)))
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
999 packets from a file.
1000
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)))
1004
1005 (define-public gpa
1006 (package
1007 (name "gpa")
1008 (version "0.10.0")
1009 (source (origin
1010 (method url-fetch)
1011 (uri (string-append "mirror://gnupg/gpa/"
1012 name "-" version ".tar.bz2"))
1013 (sha256
1014 (base32
1015 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
1016 (build-system gnu-build-system)
1017 (arguments
1018 `(#:phases
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"))))
1026 #t))))))
1027 (native-inputs
1028 `(("pkg-config" ,pkg-config)))
1029 (inputs
1030 `(("gnupg" ,gnupg)
1031 ("gpgme" ,gpgme)
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")
1037 (description
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")))))
1044
1045 (define-public parcimonie
1046 (package
1047 (name "parcimonie")
1048 (version "0.11.0")
1049 (source (origin
1050 (method url-fetch)
1051 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1052 "parcimonie/App-Parcimonie-"
1053 version ".tar.gz"))
1054 (sha256
1055 (base32
1056 "14pvapvzrxh1yh8zgcj1llmc2dd8g1fgzskxlja21gmw8c88aqdk"))))
1057 (build-system perl-build-system)
1058 (inputs
1059 `(("gnupg" ,gnupg)
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)))
1096 (native-inputs
1097 `(("xorg-server" ,xorg-server-for-tests)))
1098 (arguments
1099 `(#:phases
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")
1113 #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.*") ""))
1119 #t))
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")
1126 `("PERL5LIB" ":"
1127 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1128 #t))))))
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
1136 over.")
1137 (license license:gpl1+)))
1138
1139 (define-public jetring
1140 (package
1141 (name "jetring")
1142 (version "0.29")
1143 (source
1144 (origin
1145 (method git-fetch)
1146 (uri (git-reference
1147 (url "https://salsa.debian.org/debian/jetring")
1148 (commit (string-append "debian/" version))))
1149 (file-name (git-file-name name version))
1150 (sha256
1151 (base32
1152 "1acbx2vnbkms1c0wgcnh05d4g359sg5z0aiw541vx2qq9sgdhlv6"))))
1153 (build-system gnu-build-system)
1154 (arguments
1155 '(#:phases
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")
1161 "/bin/gpg")))
1162 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1163 (("gpg -") (string-append gpg " -"))
1164 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1165 #t)))
1166 (replace 'install
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/"))
1177 #t))))
1178 #:tests? #f)) ; no test phase
1179 (inputs
1180 `(("gnupg" ,gnupg)
1181 ("perl" ,perl)))
1182 (home-page "https://joeyh.name/code/jetring/")
1183 (synopsis "GnuPG keyring maintenance using changesets")
1184 (description
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.
1189
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+)))