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