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