.gitignore: Re-add 'authenticate' script.
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
464f5447 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
a92d9726 3;;; Copyright © 2013, 2015, 2018 Andreas Enge <andreas@enge.fr>
c8e3651a 4;;; Copyright © 2014, 2018 Eric Bavier <bavier@member.fsf.org>
3a7261bf 5;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
5dabdb75 6;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
607d280e 7;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
5aeb6611 8;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
a05d1d82 9;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
4a78fd46 10;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
41edb23f 11;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
cd9ed6c1 12;;; Copyright © 2016 Mike Gerwitz <mtg@gnu.org>
0f391063 13;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
e3dd1f0c 14;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
5aeb6611 15;;; Copyright © 2017 Petter <petter@mykolab.ch>
f7147e27 16;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
df9f6289 17;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
8d1939e4 18;;;
233e7676 19;;; This file is part of GNU Guix.
8d1939e4 20;;;
233e7676 21;;; GNU Guix is free software; you can redistribute it and/or modify it
8d1939e4
LC
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
233e7676 26;;; GNU Guix is distributed in the hope that it will be useful, but
8d1939e4
LC
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
233e7676 32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
8d1939e4 33
1ffa7090 34(define-module (gnu packages gnupg)
07157e8a 35 #:use-module ((guix licenses) #:prefix license:)
a05d1d82 36 #:use-module (gnu packages)
7b40296f 37 #:use-module (gnu packages adns)
c9ce8e17 38 #:use-module (gnu packages autotools)
34ef5755 39 #:use-module (gnu packages base)
01e11826 40 #:use-module (gnu packages curl)
c9ce8e17 41 #:use-module (gnu packages crypto)
abc4a332 42 #:use-module (gnu packages emacs)
b0cb92b2 43 #:use-module (gnu packages guile)
01e11826 44 #:use-module (gnu packages openldap)
ea4d96c6 45 #:use-module (gnu packages perl)
5ccde207 46 #:use-module (gnu packages perl-check)
1ffa7090 47 #:use-module (gnu packages pth)
ea4d96c6 48 #:use-module (gnu packages python)
54df7558 49 #:use-module (gnu packages qt)
1ffa7090 50 #:use-module (gnu packages readline)
07157e8a 51 #:use-module (gnu packages compression)
2d12284d 52 #:use-module (gnu packages databases)
40d806af
LC
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages glib)
d1d75c6a 55 #:use-module (gnu packages gnome)
40d806af
LC
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages ncurses)
cd9ed6c1 58 #:use-module (gnu packages security-token)
e3dd1f0c 59 #:use-module (gnu packages swig)
b0cb92b2 60 #:use-module (gnu packages texinfo)
a7fd7b68 61 #:use-module (gnu packages tls)
15b08442
P
62 #:use-module (gnu packages tor)
63 #:use-module (gnu packages web)
64 #:use-module (gnu packages xml)
8d1939e4 65 #:use-module (guix packages)
87f5d366 66 #:use-module (guix download)
0f391063 67 #:use-module (guix git-download)
14e2e44d 68 #:use-module (guix build-system gnu)
34ef5755 69 #:use-module (guix build-system perl)
c8e3651a
EB
70 #:use-module (guix build-system python)
71 #:use-module (srfi srfi-1))
8d1939e4
LC
72
73(define-public libgpg-error
74 (package
75 (name "libgpg-error")
1abc295b 76 (version "1.28")
8d1939e4
LC
77 (source
78 (origin
87f5d366 79 (method url-fetch)
0db342a5 80 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
8d1939e4
LC
81 version ".tar.bz2"))
82 (sha256
83 (base32
1bf7ef85
EF
84 "0jfsfnh9bxlxiwxws60yah4ybjw2hshmvqp31pri4m4h8ivrbnry"))
85 (patches (search-patches "libgpg-error-aarch64-logging-fix.patch"))))
8d1939e4 86 (build-system gnu-build-system)
72fb1b24 87 (home-page "https://gnupg.org")
35b9e423 88 (synopsis "Library of error values for GnuPG components")
8d1939e4
LC
89 (description
90 "Libgpg-error is a small library that defines common error values
91for all GnuPG components. Among these are GPG, GPGSM, GPGME,
92GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
93Daemon and possibly more in the future.")
63e8bb12
LC
94 (license license:lgpl2.0+)
95 (properties '((ftp-server . "ftp.gnupg.org")
96 (ftp-directory . "/gcrypt/libgpg-error")))))
8d1939e4 97
df9f6289
MB
98;; Some packages (e.g. GPGME) require a newer libgpg-error to deal with
99;; error codes from recent GnuPG. Remove this in the next rebuild cycle.
100(define-public libgpg-error-1.31
101 (package
102 (inherit libgpg-error)
103 (version "1.31")
104 (source (origin
105 (method url-fetch)
106 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
107 version ".tar.bz2"))
108 (sha256
109 (base32
110 "1vx4nw6rxh2biy3h8n96fyr86q29h8gjl6837437i51jr4isil20"))))))
111
8d1939e4
LC
112(define-public libgcrypt
113 (package
03439df6 114 (replacement libgcrypt/fixed)
8d1939e4 115 (name "libgcrypt")
36d37ca9 116 (version "1.8.2")
84a3e3b7
LC
117 (source (origin
118 (method url-fetch)
119 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
120 version ".tar.bz2"))
121 (sha256
122 (base32
36d37ca9 123 "01sca9m8hm6b5v8hmqsfdjhyz013869p1f0fxw9ln52qfnp4q1n8"))))
8d1939e4
LC
124 (build-system gnu-build-system)
125 (propagated-inputs
e0932742 126 `(("libgpg-error-host" ,libgpg-error)))
e766f699
JD
127 (native-inputs
128 ;; Needed here for the 'gpg-error' program.
e0932742 129 `(("libgpg-error-native" ,libgpg-error)))
e766f699
JD
130 (arguments
131 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
132 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
133 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
134 `(#:configure-flags
135 (list (string-append "--with-gpg-error-prefix="
e0932742 136 (assoc-ref %build-inputs "libgpg-error-host")))))
40fed2d8 137 (outputs '("out" "debug"))
72fb1b24 138 (home-page "https://gnupg.org/")
f50d2669 139 (synopsis "Cryptographic function library")
8d1939e4 140 (description
a22dc0c4
LC
141 "Libgcrypt is a general-purpose cryptographic library. It provides the
142standard cryptographic building blocks such as symmetric ciphers, hash
143algorithms, public key algorithms, large integer functions and random number
144generation.")
63e8bb12
LC
145 (license license:lgpl2.0+)
146 (properties '((ftp-server . "ftp.gnupg.org")
147 (ftp-directory . "/gcrypt/libgcrypt")))))
8d1939e4 148
03439df6
EF
149(define libgcrypt/fixed
150 (package
151 (inherit libgcrypt)
152 (name "libgcrypt")
153 (version "1.8.3")
154 (source (origin
155 (method url-fetch)
156 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
157 version ".tar.bz2"))
158 (sha256
159 (base32
160 "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36"))))))
161
8d1939e4
LC
162(define-public libassuan
163 (package
164 (name "libassuan")
5965b083 165 (version "2.5.1")
8d1939e4
LC
166 (source
167 (origin
87f5d366 168 (method url-fetch)
0db342a5 169 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
8d1939e4
LC
170 version ".tar.bz2"))
171 (sha256
172 (base32
5965b083 173 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"))))
8d1939e4
LC
174 (build-system gnu-build-system)
175 (propagated-inputs
5965b083
LF
176 `(("libgpg-error" ,libgpg-error)
177 ("pth" ,pth)))
72fb1b24 178 (home-page "https://gnupg.org")
8d1939e4 179 (synopsis
35b9e423 180 "IPC library used by GnuPG and related software")
8d1939e4
LC
181 (description
182 "Libassuan is a small library implementing the so-called Assuan
183protocol. This protocol is used for IPC between most newer
184GnuPG components. Both, server and client side functions are
185provided.")
63e8bb12
LC
186 (license license:lgpl2.0+)
187 (properties '((ftp-server . "ftp.gnupg.org")
188 (ftp-directory . "/gcrypt/libassuan")))))
8d1939e4
LC
189
190(define-public libksba
191 (package
192 (name "libksba")
c95f7160 193 (version "1.3.5")
8d1939e4
LC
194 (source
195 (origin
87f5d366 196 (method url-fetch)
8d1939e4 197 (uri (string-append
0db342a5 198 "mirror://gnupg/libksba/libksba-"
8d1939e4
LC
199 version ".tar.bz2"))
200 (sha256
201 (base32
c95f7160 202 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
8d1939e4
LC
203 (build-system gnu-build-system)
204 (propagated-inputs
205 `(("libgpg-error" ,libgpg-error)))
e766f699
JD
206 (native-inputs
207 `(("libgpg-error" ,libgpg-error)))
208 (arguments
209 `(#:configure-flags
210 (list ,@(if (%current-target-system)
211 '("CC_FOR_BUILD=gcc")
212 '())
213 (string-append "--with-gpg-error-prefix="
214 (assoc-ref %build-inputs "libgpg-error")))))
72fb1b24 215 (home-page "https://www.gnupg.org")
35b9e423 216 (synopsis "CMS and X.509 access library")
8d1939e4
LC
217 (description
218 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
219as well as the CMS easily accessible by other applications. Both
220specifications are building blocks of S/MIME and TLS.")
63e8bb12
LC
221 (license license:gpl3+)
222 (properties '((ftp-server . "ftp.gnupg.org")
223 (ftp-directory . "/gcrypt/libksba")))))
8d1939e4 224
c18ea90f
AE
225(define-public npth
226 (package
227 (name "npth")
f48a9d4a 228 (version "1.5")
c18ea90f
AE
229 (source
230 (origin
231 (method url-fetch)
89c83e8c 232 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
c18ea90f
AE
233 (sha256
234 (base32
f48a9d4a 235 "1hmkkp6vzyrh8v01c2ynzf9vwikyagp7p1lxhbnr4ysk3w66jji9"))))
c18ea90f 236 (build-system gnu-build-system)
72fb1b24 237 (home-page "https://www.gnupg.org")
c18ea90f
AE
238 (synopsis "Non-preemptive thread library")
239 (description
240 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
241threads implementation.
242
243In contrast to GNU Pth is is based on the system's standard threads
244implementation. This allows the use of libraries which are not
245compatible to GNU Pth.")
07157e8a 246 (license (list license:lgpl3+ license:gpl2+)))) ; dual license
c18ea90f 247
8d1939e4
LC
248(define-public gnupg
249 (package
250 (name "gnupg")
b20aef98 251 (version "2.2.11")
58970d6a
LC
252 (source (origin
253 (method url-fetch)
254 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
255 ".tar.bz2"))
256 (sha256
257 (base32
b20aef98 258 "1ncwqjhcxh46fgkp84g2lhf91amcha7abk6wdm1kagzm7q93wv29"))))
8d1939e4 259 (build-system gnu-build-system)
08fa45b1
MW
260 (native-inputs
261 `(("pkg-config" ,pkg-config)))
8d1939e4 262 (inputs
f02d254a 263 `(("gnutls" ,gnutls)
8d1939e4
LC
264 ("libassuan" ,libassuan)
265 ("libgcrypt" ,libgcrypt)
01e11826 266 ("libgpg-error" ,libgpg-error)
8d1939e4 267 ("libksba" ,libksba)
cd064df7 268 ("npth" ,npth)
01e11826 269 ("openldap" ,openldap)
cd9ed6c1 270 ("pcsc-lite" ,pcsc-lite)
2d12284d
EF
271 ("readline" ,readline)
272 ("sqlite" ,sqlite)
273 ("zlib" ,zlib)))
30e9cbb4 274 (arguments
10756b9e 275 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
f11275c9
LF
276 ;; executable in its installation directory in
277 ;; /gnu/store before it has been installed.
e184de57
EF
278 "--enable-gnupg-builddir-envvar"
279 "--enable-all-tests")
163708a6 280 #:phases
45477c6a 281 (modify-phases %standard-phases
cd9ed6c1
MG
282 (add-before 'configure 'patch-paths
283 (lambda* (#:key inputs #:allow-other-keys)
cd9ed6c1
MG
284 (substitute* "scd/scdaemon.c"
285 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
286 (string-append "\"" (assoc-ref inputs "pcsc-lite")
287 "/lib/" name "\"")))
7deb5ee8
LF
288 #t))
289 (add-after 'build 'patch-scheme-tests
290 (lambda _
291 (substitute* (find-files "tests" ".\\.scm$")
292 (("/usr/bin/env gpgscm")
764c5662
LF
293 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
294 #t))
f11275c9 295 (add-before 'build 'patch-test-paths
92cc6a58
EF
296 (lambda _
297 (substitute* '("tests/inittests"
298 "tests/pkits/inittests"
299 "tests/Makefile"
300 "tests/pkits/common.sh"
301 "tests/pkits/Makefile")
302 (("/bin/pwd") (which "pwd")))
303 (substitute* "common/t-exectool.c"
304 (("/bin/cat") (which "cat"))
305 (("/bin/true") (which "true"))
306 (("/bin/false") (which "false")))
307 #t)))))
72fb1b24 308 (home-page "https://gnupg.org/")
f50d2669 309 (synopsis "GNU Privacy Guard")
8d1939e4 310 (description
a22dc0c4
LC
311 "The GNU Privacy Guard is a complete implementation of the OpenPGP
312standard. It is used to encrypt and sign data and communication. It
313features powerful key management and the ability to access public key
79c311b8 314servers. It includes several libraries: libassuan (IPC between GnuPG
58970d6a
LC
315components), libgpg-error (centralized GnuPG error values), and
316libskba (working with X.509 certificates and CMS data).")
63e8bb12
LC
317 (license license:gpl3+)
318 (properties '((ftp-server . "ftp.gnupg.org")
319 (ftp-directory . "/gcrypt/gnupg")))))
ea4d96c6 320
cd064df7
AE
321(define-public gnupg-2.0
322 (package (inherit gnupg)
b5afe6f0 323 (version "2.0.30")
cd064df7
AE
324 (source (origin
325 (method url-fetch)
326 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
327 ".tar.bz2"))
328 (sha256
329 (base32
b5afe6f0 330 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
08fa45b1 331 (native-inputs '())
cd064df7 332 (inputs
7b40296f
EF
333 `(("adns" ,adns)
334 ("bzip2" ,bzip2)
cd064df7
AE
335 ("curl" ,curl)
336 ("libassuan" ,libassuan)
337 ("libgcrypt" ,libgcrypt)
338 ("libgpg-error" ,libgpg-error)
339 ("libksba" ,libksba)
340 ("pth" ,pth)
341 ("openldap" ,openldap)
07157e8a 342 ("zlib" ,zlib)
cd064df7
AE
343 ("readline" ,readline)))
344 (arguments
345 `(#:phases
80c47cf8 346 (modify-phases %standard-phases
6b547d22
LC
347 (add-before 'configure 'patch-config-files
348 (lambda _
349 (substitute* "tests/openpgp/Makefile.in"
3a534f42 350 (("/bin/sh") (which "sh")))
bc85b127
LC
351 #t))
352 (add-after 'install 'rename-v2-commands
353 (lambda* (#:key outputs #:allow-other-keys)
354 ;; Upstream suggests removing the trailing '2' from command names:
355 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
356 (let ((out (assoc-ref outputs "out")))
357 (with-directory-excursion (string-append out "/bin")
358 (rename-file "gpgv2" "gpgv")
359 (rename-file "gpg2" "gpg")
360
361 ;; Keep the old name around to ease transition.
362 (symlink "gpgv" "gpgv2")
363 (symlink "gpg" "gpg2")
806e891e
LF
364 #t)))))))
365 (properties `((superseded . ,gnupg)))))
cd064df7 366
5249045c
MW
367(define-public gnupg-1
368 (package (inherit gnupg)
b6c675c6 369 (version "1.4.23")
58970d6a
LC
370 (source (origin
371 (method url-fetch)
372 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
373 ".tar.bz2"))
374 (sha256
375 (base32
b6c675c6 376 "1fkq4sqldvf6a25mm2qz95swv1qjg464736091w51djiwqbjyin9"))))
08fa45b1 377 (native-inputs '())
5249045c 378 (inputs
07157e8a
LC
379 `(("zlib" ,zlib)
380 ("bzip2" ,bzip2)
5249045c
MW
381 ("curl" ,curl)
382 ("readline" ,readline)
383 ("libgpg-error" ,libgpg-error)))
384 (arguments
29d90757
LF
385 `(#:phases
386 (modify-phases %standard-phases
387 (add-after 'unpack 'patch-check-sh
388 (lambda _
389 (substitute* "checks/Makefile.in"
b17f7238
MW
390 (("/bin/sh") (which "sh")))
391 #t)))))))
5249045c 392
09d5c166
AE
393(define-public gpgme
394 (package
395 (name "gpgme")
df9f6289 396 (version "1.11.1")
09d5c166
AE
397 (source
398 (origin
399 (method url-fetch)
400 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
401 ".tar.bz2"))
402 (sha256
403 (base32
df9f6289 404 "0vxx5xaag3rhp4g2arp5qm77gvz4kj0m3hnpvhkdvqyjfhbi26rd"))))
09d5c166 405 (build-system gnu-build-system)
b3ecb3fe
LF
406 (native-inputs
407 `(("gnupg" ,gnupg)))
68640c3c
MW
408 (propagated-inputs
409 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
df9f6289 410 `(("libgpg-error" ,libgpg-error-1.31)))
09d5c166 411 (inputs
b3ecb3fe 412 `(("libassuan" ,libassuan)))
72fb1b24 413 (home-page "https://www.gnupg.org/related_software/gpgme/")
35b9e423 414 (synopsis "Library providing simplified access to GnuPG functionality")
09d5c166
AE
415 (description
416 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
417easier for applications. It provides a High-Level Crypto API for encryption,
418decryption, signing, signature verification and key management. Currently
419it uses GnuPG as its backend but the API isn't restricted to this engine.
420
421Because the direct use of GnuPG from an application can be a complicated
422programming task, it is suggested that all software should try to use GPGME
423instead. This way bug fixes or improvements can be done at a central place
424and every application benefits from this.")
07157e8a 425 (license license:lgpl2.1+)))
09d5c166 426
6b982a78
HG
427(define-public qgpgme
428 (package
429 (inherit gpgme)
430 (name "qgpgme")
431 (arguments
432 `(#:phases
433 (modify-phases %standard-phases
434 (add-before 'build 'chdir-and-symlink
435 (lambda* (#:key inputs #:allow-other-keys)
436 (let ((gpgme (assoc-ref inputs "gpgme")))
437 (symlink (string-append gpgme "/lib/libgpgmepp.la")
438 "lang/cpp/src/libgpgmepp.la")
439 (symlink (string-append gpgme "/lib/libgpgme.la")
440 "src/libgpgme.la"))
441 (chdir "lang/qt")
442 #t)))))
443 (native-inputs
0684f1d6
LF
444 `(("pkg-config" ,pkg-config)
445 ,@(package-native-inputs gpgme)))
6b982a78
HG
446 (inputs
447 `(("gpgme" ,gpgme)
448 ("qtbase" ,qtbase)
449 ,@(package-inputs gpgme)))
450 (synopsis "Qt API bindings for gpgme")
451 (description "QGpgme provides a very high level Qt API around GpgMEpp.
452
453QGpgME was originally developed as part of libkleo and incorporated into
454gpgpme starting with version 1.7.")
455 (license license:gpl2+))) ;; Note: this differs from gpgme
456
b0cb92b2
LC
457(define-public guile-gcrypt
458 (package
459 (name "guile-gcrypt")
460 (version "0.1.0")
461 (home-page "https://notabug.org/cwebber/guile-gcrypt")
462 (source (origin
463 (method git-fetch)
464 (uri (git-reference
465 (url (string-append home-page ".git"))
466 (commit (string-append "v" version))))
467 (sha256
468 (base32
469 "1lhgh3105yi0ggrjsjibv4wp1ipz8s17pa820hk2wln3rc04wpvf"))
470 (file-name (string-append name "-" version "-checkout"))))
471 (build-system gnu-build-system)
472 (native-inputs
473 `(("pkg-config" ,pkg-config)
474 ("autoconf" ,autoconf)
475 ("automake" ,automake)
476 ("texinfo" ,texinfo)))
477 (inputs
478 `(("guile" ,guile-2.2)
479 ("libgcrypt" ,libgcrypt)))
b0cb92b2
LC
480 (synopsis "Cryptography library for Guile using Libgcrypt")
481 (description
482 "Guile-Gcrypt provides a Guile 2.x interface to a subset of the
483GNU Libgcrypt crytographic library. It provides modules for cryptographic
484hash functions, message authentication codes (MAC), public-key cryptography,
485strong randomness, and more. It is implemented using the foreign function
486interface (FFI) of Guile.")
487 (license license:gpl3+)))
488
c8e3651a
EB
489(define-public guile2.0-gcrypt
490 (package (inherit guile-gcrypt)
491 (name "guile2.0-gcrypt")
492 (inputs
493 `(("guile" ,guile-2.0)
494 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
495
e3dd1f0c
LF
496(define-public python-gpg
497 (package
498 (name "python-gpg")
99c63f3f 499 (version "1.8.0")
e3dd1f0c
LF
500 (source (origin
501 (method url-fetch)
502 (uri (pypi-uri "gpg" version))
503 (sha256
504 (base32
505 "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
506 (build-system python-build-system)
507 (arguments
508 '(#:tests? #f)) ; No test suite.
509 (inputs
510 `(("gpgme" ,gpgme)))
511 (native-inputs
512 `(("swig" ,swig)))
513 (home-page (package-home-page gpgme))
514 (synopsis "Python bindings for GPGME GnuPG cryptography library")
515 (description "This package provides Python bindings to the GPGME GnuPG
516cryptographic library. It is developed in the GPGME source code, and then
517distributed separately.")
518 (license license:lgpl2.1+)))
519
520(define-public python2-gpg
521 (package-with-python2 python-gpg))
522
a05d1d82
CAW
523(define-public python-pygpgme
524 (package
525 (name "python-pygpgme")
526 (version "0.3")
527 (source
528 (origin
529 (method url-fetch)
530 (uri (pypi-uri "pygpgme" version))
531 (sha256
532 (base32
533 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
534 ;; Unfortunately, we have to disable some tests due to some gpg-agent
535 ;; goofiness... see:
536 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
1c9cea74
LF
537 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
538 "python-pygpgme-fix-pinentry-tests.patch"))))
a05d1d82
CAW
539 (arguments
540 `(#:phases
541 (modify-phases %standard-phases
542 (add-before 'build 'make-build
543 (lambda _
544 (zero? (system* "make" "build"))))
545 (replace 'check
546 (lambda _
547 (zero? (system* "make" "check")))))))
548 (build-system python-build-system)
e6f63412
LF
549 (native-inputs
550 `(("gnupg" ,gnupg-1)))
a05d1d82 551 (inputs
e6f63412 552 `(("gpgme" ,gpgme)))
a05d1d82
CAW
553 (home-page "https://launchpad.net/pygpgme")
554 (synopsis "Python module for working with OpenPGP messages")
555 (description
556 "PyGPGME is a Python module that lets you sign, verify, encrypt and
557decrypt messages using the OpenPGP format by making use of GPGME.")
558 (license license:lgpl2.1+)))
559
560(define-public python2-pygpgme
5c31f4aa 561 (package-with-python2 python-pygpgme))
a05d1d82 562
22af9029
RW
563(define-public python-gnupg
564 (package
565 (name "python-gnupg")
ff76a1e9 566 (version "0.4.3")
22af9029
RW
567 (source
568 (origin
569 (method url-fetch)
5b669ba1 570 (uri (pypi-uri "python-gnupg" version))
22af9029
RW
571 (sha256
572 (base32
ff76a1e9 573 "03dc8whhvk7ccspbk8vzfhkxli8cd9zfbss5p597g4jldgy8s59d"))))
22af9029
RW
574 (build-system python-build-system)
575 (arguments
576 `(#:phases
577 (modify-phases %standard-phases
578 (replace 'check
ec089763
RW
579 (lambda _
580 (substitute* "test_gnupg.py"
ec089763
RW
581 ;; Unsure why this test fails.
582 (("'test_search_keys'") "True")
583 (("def test_search_keys") "def disabled__search_keys"))
584 (setenv "USERNAME" "guixbuilder")
585 ;; The doctests are extremely slow and sometimes time out,
586 ;; so we disable them.
b262aba7
TGR
587 (invoke "python"
588 "test_gnupg.py" "--no-doctests"))))))
22af9029
RW
589 (native-inputs
590 `(("gnupg" ,gnupg-1)))
72fb1b24 591 (home-page "https://packages.python.org/python-gnupg/index.html")
22af9029
RW
592 (synopsis "Wrapper for the GNU Privacy Guard")
593 (description
594 "This module allows easy access to GnuPG’s key management, encryption
595and signature functionality from Python programs.")
596 (license license:bsd-3)))
597
598(define-public python2-gnupg
599 (package-with-python2 python-gnupg))
600
34ef5755
CB
601(define-public perl-gnupg-interface
602 (package
603 (name "perl-gnupg-interface")
604 (version "0.52")
9c2d0a03
RW
605 (source (origin
606 (method url-fetch)
607 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
608 "GnuPG-Interface-" version ".tar.gz"))
609 (sha256
610 (base32
611 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
34ef5755
CB
612 (build-system perl-build-system)
613 (arguments
9c2d0a03
RW
614 `(#:phases
615 (modify-phases %standard-phases
616 ;; FIXME: This test fails for unknown reasons
617 (add-after 'unpack 'delete-broken-test
618 (lambda _
619 (delete-file "t/encrypt_symmetrically.t")
620 #t)))))
34ef5755 621 (inputs
9c2d0a03 622 `(("gnupg" ,gnupg-1)))
34ef5755
CB
623 (propagated-inputs
624 `(("perl-moo" ,perl-moo)
9c2d0a03
RW
625 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
626 ("perl-moox-late" ,perl-moox-late)))
627 (native-inputs
628 `(("which" ,which)
629 ("perl-module-install" ,perl-module-install)))
9aba9b12 630 (home-page "https://metacpan.org/release/GnuPG-Interface")
34ef5755 631 (synopsis "Perl interface to GnuPG")
9c2d0a03
RW
632 (description "@code{GnuPG::Interface} and its associated modules are
633designed to provide an object-oriented method for interacting with GnuPG,
634being able to perform functions such as but not limited to encrypting,
635signing, decryption, verification, and key-listing parsing.")
34ef5755
CB
636 (license license:perl-license)))
637
ea4d96c6 638(define-public pius
cda0ef04
TS
639 (package
640 (name "pius")
66eb91be 641 (version "2.2.6")
cda0ef04
TS
642 (source (origin
643 (method url-fetch)
644 (uri (string-append
645 "https://github.com/jaymzh/pius/releases/download/v"
646 version "/pius-" version ".tar.bz2"))
647 (sha256
648 (base32
a92d9726
AE
649 "1893hzpx3zv724drqv48csrn0cm98xw4ymb1zmhs2jvjj1778zfj"))
650 (patches (search-patches "pius.patch"))))
cda0ef04
TS
651 (build-system python-build-system)
652 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
fcb1dd99
AE
653 ("gpg" ,gnupg)
654 ("python-six" ,python2-six)))
cda0ef04
TS
655 (arguments
656 `(#:tests? #f
657 #:python ,python-2 ;uses the Python 2 'print' syntax
658 #:phases
659 (modify-phases %standard-phases
660 (add-before
661 'build 'set-gpg-file-name
662 (lambda* (#:key inputs outputs #:allow-other-keys)
663 (let* ((gpg (string-append (assoc-ref inputs "gpg")
664 "/bin/gpg")))
665 (substitute* "libpius/constants.py"
666 (("/usr/bin/gpg2") gpg))
667 #t))))))
668 (synopsis "Programs to simplify GnuPG key signing")
669 (description
670 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
35b9e423
EB
671parties. It is the main utility and makes it possible to quickly and easily
672sign each UID on a set of PGP keys. It is designed to take the pain out of
ea4d96c6
AE
673the sign-all-the-keys part of PGP Keysigning Party while adding security
674to the process.
675
676pius-keyring-mgr and pius-party-worksheet help organisers of
677PGP keysigning parties.")
cda0ef04
TS
678 (license license:gpl2)
679 (home-page "https://www.phildev.net/pius/index.shtml")))
96be765c
AE
680
681(define-public signing-party
831f07a0
LC
682 ;; Upstream moved from alioth.debian.org to salsa.debian.org but the
683 ;; automatic svn import did not preserve tags apparently, so there's no real
684 ;; version number.
685 (let ((commit "d6f2296325605ee96ddf9f5b156e5e3f667a6df3")
686 (revision "0"))
687 (package
688 (name "signing-party")
689 (version (git-version "2.6" revision commit))
690 (home-page "https://salsa.debian.org/stappers/pgp-tools")
691 (source (origin
692 (method git-fetch)
693 (uri (git-reference
694 (url home-page)
695 (commit commit)))
696 (sha256
697 (base32
698 "00f7zasbwcbjzd92br2j10pyjxv0aw1qb4540qfz2dxzxgmdscrz"))))
699 (build-system gnu-build-system)
700 (native-inputs
701 `(("autoconf" ,autoconf-wrapper)
702 ("automake" ,automake)))
703 (inputs `(("perl" ,perl)
704 ("perl-text-template" ,perl-text-template)
705 ("perl-mime-tools" ,perl-mime-tools)
706 ("perl-gnupg-interface" ,perl-gnupg-interface)
707 ("perl-net-idn-encode" ,perl-net-idn-encode)
708 ("libmd" ,libmd)))
709 (arguments
710 `(#:tests? #f
711 #:phases
712 (modify-phases %standard-phases
713 (replace 'configure
714 (lambda* (#:key outputs #:allow-other-keys)
715 (let ((out (assoc-ref outputs "out")))
716 (substitute* "keyanalyze/Makefile"
717 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
718 (substitute* "keyanalyze/Makefile"
719 (("\\./configure") (string-append "./configure --prefix=" out)))
720 (substitute* "gpgwrap/Makefile"
721 (("\\} clean")
722 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
723 out "/bin/gpgwrap\n")))
724 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
725 "keylookup/Makefile" "sig2dot/Makefile"
726 "springgraph/Makefile")
727 (("/usr") out))
728 (setenv "CONFIG_SHELL" (which "sh")))))
729 (replace 'install
730 (lambda* (#:key outputs #:allow-other-keys #:rest args)
731 (let ((out (assoc-ref outputs "out"))
732 (install (assoc-ref %standard-phases 'install)))
733 (apply install args)
734 (for-each
735 (lambda (dir file)
736 (copy-file (string-append dir "/" file)
737 (string-append out "/bin/" file)))
738 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
739 "gpglist" "gpg-mailkeys" "gpgparticipants")
740 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
741 "gpglist" "gpg-mailkeys" "gpgparticipants"))
742 (for-each
743 (lambda (dir file)
744 (copy-file (string-append dir "/" file)
745 (string-append out "/share/man/man1/" file)))
746 '("caff" "caff" "caff" "gpgdir"
747 "gpg-key2ps" "gpglist" "gpg-mailkeys"
748 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
749 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
750 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
751 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
752 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
753 "process_keys.1" "pgpring.1" "keyanalyze.1")))))
754 (add-after 'install 'wrap-programs
755 (lambda* (#:key outputs #:allow-other-keys)
756 (let* ((out (assoc-ref outputs "out")))
757 (wrap-program
758 (string-append out "/bin/caff")
759 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))))))
760 (synopsis "Collection of scripts for simplifying gnupg key signing")
761 (description
762 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
96be765c 763including tools for signing keys, keyring analysis, and party preparation.
7ac53403
EF
764@enumerate
765@item caff: CA - Fire and Forget signs and mails a key
766@item pgp-clean: removes all non-self signatures from key
767@item pgp-fixkey: removes broken packets from keys
768@item gpg-mailkeys: simply mail out a signed key to its owner
769@item gpg-key2ps: generate PostScript file with fingerprint paper strips
770@item gpgdir: recursive directory encryption tool
771@item gpglist: show who signed which of your UIDs
772@item gpgsigs: annotates list of GnuPG keys with already done signatures
773@item gpgparticipants: create list of party participants for the organiser
774@item gpgwrap: a passphrase wrapper
775@item keyanalyze: minimum signing distance (MSD) analysis on keyrings
776@item keylookup: ncurses wrapper around gpg --search
777@item sig2dot: converts a list of GnuPG signatures to a .dot file
778@item springgraph: creates a graph from a .dot file
779@end enumerate")
831f07a0
LC
780 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
781 ;; and caff and gpgsigs: bsd-3, see
782 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
783 (license license:gpl2))))
40d806af 784
c607b701 785(define-public pinentry-tty
40d806af 786 (package
c607b701 787 (name "pinentry-tty")
4498cbd7 788 (version "1.1.0")
40d806af
LC
789 (source (origin
790 (method url-fetch)
791 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
792 version ".tar.bz2"))
793 (sha256
794 (base32
4498cbd7 795 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
40d806af 796 (build-system gnu-build-system)
c607b701
EF
797 (arguments
798 `(#:configure-flags '("--enable-pinentry-tty")))
40d806af
LC
799 (inputs
800 `(("ncurses" ,ncurses)
18ed97d6 801 ("libassuan" ,libassuan)
c607b701 802 ("libsecret" ,libsecret "out")))
40d806af
LC
803 (native-inputs
804 `(("pkg-config" ,pkg-config)))
547cb17d 805 (home-page "https://gnupg.org/aegypten2/")
40d806af
LC
806 (synopsis "GnuPG's interface to passphrase input")
807 (description
c607b701 808 "Pinentry provides a console that allows users to enter a passphrase when
9614897b 809@code{gpg} is run and needs it.")
f8457932
LC
810 (license license:gpl2+)
811 (properties '((ftp-server . "ftp.gnupg.org")
812 (ftp-directory . "/gcrypt/pinentry")
813 (upstream-name . "pinentry")))))
4380a7b4 814
abc4a332
PN
815(define-public pinentry-emacs
816 (package
817 (inherit pinentry-tty)
818 (name "pinentry-emacs")
819 (arguments
820 `(#:configure-flags '("--enable-pinentry-emacs")))
821 (description
822 "Pinentry provides a console and an Emacs interface that allows users to
823enter a passphrase when required by @code{gpg} or other software.")))
824
c607b701
EF
825(define-public pinentry-gtk2
826 (package
827 (inherit pinentry-tty)
828 (name "pinentry-gtk2")
829 (inputs
830 `(("gtk+" ,gtk+-2)
831 ("glib" ,glib)
832 ,@(package-inputs pinentry-tty)))
833 (description
834 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
9614897b 835passphrase when @code{gpg} is run and needs it.")))
c607b701 836
41edb23f
CB
837(define-public pinentry-gnome3
838 (package
839 (inherit pinentry-tty)
840 (name "pinentry-gnome3")
841 (inputs
842 `(("gtk+" ,gtk+-2)
843 ("gcr" ,gcr)
844 ("glib" ,glib)
845 ,@(package-inputs pinentry-tty)))
846 (arguments
847 `(#:configure-flags '("--enable-pinentry-gnome3")))
848 (description
849 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
850that allows users to enter a passphrase when required by @code{gpg} or other
851software.")))
c607b701 852
54df7558
EF
853(define-public pinentry-qt
854 (package
855 (inherit pinentry-tty)
856 (name "pinentry-qt")
857 (inputs
e2788cef 858 `(("qtbase" ,qtbase)
54df7558 859 ,@(package-inputs pinentry-tty)))
984ad832
DC
860 (arguments
861 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
54df7558
EF
862 (description
863 "Pinentry provides a console and a Qt GUI that allows users to enter a
9614897b 864passphrase when @code{gpg} is run and needs it.")))
54df7558 865
940f8d39
EF
866(define-public pinentry
867 (package (inherit pinentry-gtk2)
868 (name "pinentry")))
869
4380a7b4
EB
870(define-public paperkey
871 (package
872 (name "paperkey")
ae9877fe 873 (version "1.5")
4380a7b4
EB
874 (source (origin
875 (method url-fetch)
876 (uri (string-append "http://www.jabberwocky.com/"
877 "software/paperkey/paperkey-"
878 version ".tar.gz"))
879 (sha256
880 (base32
ae9877fe 881 "1prd2jaf4zjad3xhv160hmi5n408ssljfg7iz90jxs9w111pjwy4"))))
4380a7b4
EB
882 (build-system gnu-build-system)
883 (arguments
884 `(#:phases
e379d85c
EF
885 (modify-phases %standard-phases
886 (add-before 'check 'patch-check-scripts
887 (lambda _
888 (substitute* '("checks/roundtrip.sh"
889 "checks/roundtrip-raw.sh")
890 (("/bin/echo") "echo"))
891 #t)))))
4380a7b4
EB
892 (home-page "http://www.jabberwocky.com/software/paperkey/")
893 (synopsis "Backup OpenPGP keys to paper")
894 (description
895 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
896for printing with paper and ink, which have amazingly long retention
897qualities. To reconstruct a secret key, you re-enter those
898bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
899them to transform your existing public key into a secret key.")
07157e8a 900 (license license:gpl2+)))
8384499c 901
902(define-public gpa
903 (package
904 (name "gpa")
905 (version "0.9.10")
906 (source (origin
907 (method url-fetch)
908 (uri (string-append "mirror://gnupg/gpa/"
909 name "-" version ".tar.bz2"))
910 (sha256
911 (base32
912 "09xphbi2456qynwqq5n0yh0zdmdi2ggrj3wk4hsyh5lrzlvcrff3"))))
913 (build-system gnu-build-system)
914 (native-inputs
915 `(("pkg-config" ,pkg-config)))
916 (inputs
917 `(("gnupg" ,gnupg)
918 ("gpgme" ,gpgme)
919 ("libassuan" ,libassuan)
920 ("libgpg-error" ,libgpg-error)
921 ("gtk+-2" ,gtk+-2)))
922 (home-page "https://gnupg.org/software/gpa/")
923 (synopsis "Graphical user interface for GnuPG")
924 (description
925 "GPA, the GNU Privacy Assistant, is a graphical user interface for
926@uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
927files, to verify signatures, and to manage the private and public keys.")
928 (license license:gpl3+)))
5aeb6611 929
15b08442
P
930(define-public parcimonie
931 (package
932 (name "parcimonie")
933 (version "0.10.3")
934 (source (origin
935 (method url-fetch)
936 (uri (string-append "https://gaffer.ptitcanardnoir.org/"
937 "intrigeri/files/parcimonie/App-Parcimonie-"
938 version ".tar.gz"))
939 (sha256
940 (base32
941 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
942 (build-system perl-build-system)
943 (inputs
944 `(("gnupg" ,gnupg-1) ; This is the version used by perl-gnupg-interface
945 ("perl-config-general" ,perl-config-general)
946 ("perl-clone" ,perl-clone)
947 ("perl-data" ,perl-data)
948 ("perl-exporter-tiny" ,perl-exporter-tiny)
949 ("perl-file-homedir" ,perl-file-homedir)
950 ("perl-file-sharedir" ,perl-file-sharedir)
951 ("perl-file-which" ,perl-file-which)
952 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
953 ("perl-gnupg-interface" ,perl-gnupg-interface)
954 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
955 ("perl-list-moreutils" ,perl-list-moreutils)
956 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
957 ("perl-lwp-online" ,perl-lwp-online)
958 ("perl-module-build" ,perl-module-build)
959 ("perl-module-pluggable-object" ,perl-module-pluggable)
960 ("perl-moo" ,perl-moo)
961 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
962 ("perl-moox-late" ,perl-moox-late)
963 ("perl-moox-options" ,perl-moox-options)
964 ("perl-namespace-clean" ,perl-namespace-clean)
965 ("perl-net-dbus" ,perl-net-dbus)
966 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
967 ("perl-path-tiny" ,perl-path-tiny)
968 ("perl-test-most" ,perl-test-most)
969 ("perl-test-trap" ,perl-test-trap)
970 ("perl-time-duration" ,perl-time-duration)
971 ("perl-time-duration-parse" ,perl-time-duration-parse)
972 ("perl-try-tiny" ,perl-try-tiny)
973 ("perl-type-tiny" ,perl-type-tiny)
974 ("perl-types-path-tiny" ,perl-types-path-tiny)
975 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
976 ("perl-xml-parser" ,perl-xml-parser)
977 ("perl-xml-twig" ,perl-xml-twig)
978 ("torsocks" ,torsocks)))
979 (arguments
980 `(#:phases
981 (modify-phases %standard-phases
982 ;; Needed for using gpg-connect-agent during tests.
983 (add-before 'check 'set-HOME
984 (lambda _ (setenv "HOME" "/tmp") #t))
985 (add-before 'install 'fix-references
986 (lambda* (#:key inputs outputs #:allow-other-keys)
987 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
988 (("gpg2") "gpg")
989 ;; Skip check whether dependencies are in the PATH
990 (("defined which.*") "")
991 (("call\\('parcimonie-torified-gpg'\\)")
992 (string-append "call('" (assoc-ref outputs "out")
993 "/bin/parcimonie-torified-gpg')")))
994 (substitute* "bin/parcimonie-torified-gpg"
995 (("torsocks") (string-append (assoc-ref inputs "torsocks")
996 "/bin/torsocks")))
997 #t))
998 (add-after 'install 'wrap-program
999 (lambda* (#:key inputs outputs #:allow-other-keys)
1000 (let* ((out (assoc-ref outputs "out"))
1001 (perllib (string-append out "/lib/perl5/site_perl/"
1002 ,(package-version perl))))
1003 (wrap-program (string-append out "/bin/parcimonie")
1004 `("PERL5LIB" ":"
1005 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1006 #t))))))
1007 (home-page "https://gaffer.ptitcanardnoir.org/intrigeri/code/parcimonie/")
1008 (synopsis "Incrementally refreshes a GnuPG keyring")
1009 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1010that makes it hard to correlate the keyring content to an individual, and
1011makes it hard to locate an individual based on an identifying subset of her
1012keyring content. Parcimonie is a daemon that fetches one key at a time using
1013the Tor network, waits a bit, changes the Tor circuit being used, and starts
1014over.")
1015 (license license:gpl1+)))
607d280e
EF
1016
1017(define-public jetring
1018 (package
1019 (name "jetring")
835cf37c 1020 (version "0.27")
607d280e
EF
1021 (source
1022 (origin
1023 (method url-fetch)
1024 (uri (string-append "mirror://debian/pool/main/j/" name "/"
1025 name "_" version ".tar.xz"))
1026 (sha256
1027 (base32
835cf37c 1028 "0jy0x5zj7v87xgyldlsx1knzp0mv10wzamblrw1b61i2m1ii4pxz"))))
607d280e
EF
1029 (build-system gnu-build-system)
1030 (arguments
1031 '(#:phases
1032 (modify-phases %standard-phases
1033 (delete 'configure) ; no configure script
1034 (add-before 'install 'hardlink-gnupg
1035 (lambda* (#:key inputs #:allow-other-keys)
1036 (let ((gpg (string-append (assoc-ref inputs "gnupg")
1037 "/bin/gpg")))
1038 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1039 (("gpg -") (string-append gpg " -"))
1040 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1041 #t)))
1042 (replace 'install
1043 (lambda* (#:key outputs #:allow-other-keys)
1044 (let* ((out (assoc-ref outputs "out"))
1045 (man (string-append out "/share/man")))
1046 (for-each (lambda (file)
1047 (install-file file (string-append out "/bin/")))
1048 (find-files "." "jetring-[[:alpha:]]+$"))
1049 (for-each (lambda (file)
1050 (install-file file (string-append man "/man1/")))
1051 (find-files "." ".*\\.1$"))
1052 (install-file "jetring.7" (string-append man "/man7/"))
1053 #t))))
1054 #:tests? #f)) ; no test phase
1055 (inputs
1056 `(("gnupg" ,gnupg)
1057 ("perl" ,perl)))
1058 (home-page "https://joeyh.name/code/jetring/")
1059 (synopsis "GnuPG keyring maintenance using changesets")
1060 (description
1061 "Jetring is a collection of tools that allow for gpg keyrings to be
1062maintained using changesets. It was developed with the Debian keyring in mind,
1063and aims to solve the problem that a gpg keyring is a binary blob that's hard
1064for multiple people to collaboratively edit.
1065
1066With jetring, changesets can be submitted, reviewed to see exactly what they
1067will do, applied, and used to build a keyring. The origin of every change made
1068to the keyring is available for auditing, and gpg signatures can be used for
1069integrity guarantees.")
1070 (license license:gpl2+)))