gnu: git-annex: Update to 8.20200330.
[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>
e5b44b06 14;;; Copyright © 2017, 2020 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"))
e5b44b06 255 (patches (search-patches "gnupg-default-pinentry.patch"))
58970d6a
LC
256 (sha256
257 (base32
e4257138 258 "0c6a4v9p6qzhsw1pfcwc459bxpc8hma0w9z8iqb9khvligack9q4"))))
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")
4286a6b0 396 (version "1.13.1")
09d5c166
AE
397 (source
398 (origin
399 (method url-fetch)
4286a6b0 400 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version ".tar.bz2"))
09d5c166 401 (sha256
4286a6b0 402 (base32 "0imyjfryvvjdbai454p70zcr95m94j9xnzywrlilqdw2fqi0pqy4"))))
09d5c166 403 (build-system gnu-build-system)
dde3f551
TGR
404 (arguments
405 `(#:phases
406 (modify-phases %standard-phases
407 (add-before 'check 'disable-failing-test
408 ;; XXX gnupg@2.2.20 breaks the expected JSON response for this test.
409 (lambda _
410 (substitute* "tests/json/t-json.c"
411 (("\"t-keylist-secret\", ") ""))
412 #t)))))
b3ecb3fe
LF
413 (native-inputs
414 `(("gnupg" ,gnupg)))
68640c3c
MW
415 (propagated-inputs
416 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
7de44023 417 `(("libgpg-error" ,libgpg-error)))
09d5c166 418 (inputs
b3ecb3fe 419 `(("libassuan" ,libassuan)))
72fb1b24 420 (home-page "https://www.gnupg.org/related_software/gpgme/")
35b9e423 421 (synopsis "Library providing simplified access to GnuPG functionality")
09d5c166
AE
422 (description
423 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
424easier for applications. It provides a High-Level Crypto API for encryption,
425decryption, signing, signature verification and key management. Currently
426it uses GnuPG as its backend but the API isn't restricted to this engine.
427
428Because the direct use of GnuPG from an application can be a complicated
429programming task, it is suggested that all software should try to use GPGME
430instead. This way bug fixes or improvements can be done at a central place
431and every application benefits from this.")
11450f15
EF
432 (license license:lgpl2.1+)
433 (properties '((ftp-server . "ftp.gnupg.org")
434 (ftp-directory . "/gcrypt/gpgme")))))
09d5c166 435
6b982a78
HG
436(define-public qgpgme
437 (package
438 (inherit gpgme)
439 (name "qgpgme")
440 (arguments
441 `(#:phases
442 (modify-phases %standard-phases
443 (add-before 'build 'chdir-and-symlink
444 (lambda* (#:key inputs #:allow-other-keys)
445 (let ((gpgme (assoc-ref inputs "gpgme")))
446 (symlink (string-append gpgme "/lib/libgpgmepp.la")
447 "lang/cpp/src/libgpgmepp.la")
448 (symlink (string-append gpgme "/lib/libgpgme.la")
449 "src/libgpgme.la"))
450 (chdir "lang/qt")
451 #t)))))
452 (native-inputs
0684f1d6
LF
453 `(("pkg-config" ,pkg-config)
454 ,@(package-native-inputs gpgme)))
6b982a78
HG
455 (inputs
456 `(("gpgme" ,gpgme)
457 ("qtbase" ,qtbase)
458 ,@(package-inputs gpgme)))
459 (synopsis "Qt API bindings for gpgme")
460 (description "QGpgme provides a very high level Qt API around GpgMEpp.
461
462QGpgME was originally developed as part of libkleo and incorporated into
463gpgpme starting with version 1.7.")
464 (license license:gpl2+))) ;; Note: this differs from gpgme
465
b0cb92b2
LC
466(define-public guile-gcrypt
467 (package
468 (name "guile-gcrypt")
6704e88d 469 (version "0.2.1")
b0cb92b2
LC
470 (home-page "https://notabug.org/cwebber/guile-gcrypt")
471 (source (origin
472 (method git-fetch)
473 (uri (git-reference
474 (url (string-append home-page ".git"))
475 (commit (string-append "v" version))))
476 (sha256
477 (base32
6704e88d 478 "0n232iyayc46f7hywmjw0jr7pbmmz5h4b04jskhkzz9gxz0ci99c"))
d47f9630 479 (file-name (git-file-name name version))))
b0cb92b2
LC
480 (build-system gnu-build-system)
481 (native-inputs
482 `(("pkg-config" ,pkg-config)
483 ("autoconf" ,autoconf)
484 ("automake" ,automake)
485 ("texinfo" ,texinfo)))
486 (inputs
487 `(("guile" ,guile-2.2)
488 ("libgcrypt" ,libgcrypt)))
b0cb92b2
LC
489 (synopsis "Cryptography library for Guile using Libgcrypt")
490 (description
491 "Guile-Gcrypt provides a Guile 2.x interface to a subset of the
492GNU Libgcrypt crytographic library. It provides modules for cryptographic
493hash functions, message authentication codes (MAC), public-key cryptography,
494strong randomness, and more. It is implemented using the foreign function
495interface (FFI) of Guile.")
496 (license license:gpl3+)))
497
c8e3651a
EB
498(define-public guile2.0-gcrypt
499 (package (inherit guile-gcrypt)
500 (name "guile2.0-gcrypt")
501 (inputs
502 `(("guile" ,guile-2.0)
503 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
504
89a99d53
LC
505(define-public guile3.0-gcrypt
506 (package
507 (inherit guile-gcrypt)
508 (name "guile3.0-gcrypt")
509 (inputs
510 `(("guile" ,guile-next)
511 ,@(alist-delete "guile" (package-inputs guile-gcrypt))))))
512
e3dd1f0c
LF
513(define-public python-gpg
514 (package
515 (name "python-gpg")
fb4fcfab 516 (version "1.10.0")
e3dd1f0c
LF
517 (source (origin
518 (method url-fetch)
519 (uri (pypi-uri "gpg" version))
520 (sha256
521 (base32
fb4fcfab 522 "1ji3ynhp36m1ccx7bmaq75dhij9frpn19v9mpi4aajn8csl194il"))))
e3dd1f0c
LF
523 (build-system python-build-system)
524 (arguments
fb4fcfab
EF
525 '(#:phases
526 (modify-phases %standard-phases
527 (add-before 'build 'set-environment
528 (lambda _
529 (substitute* "setup.py"
530 (("cc") (which "gcc")))
531 #t)))
532 #:tests? #f)) ; No test suite.
e3dd1f0c
LF
533 (inputs
534 `(("gpgme" ,gpgme)))
535 (native-inputs
536 `(("swig" ,swig)))
537 (home-page (package-home-page gpgme))
538 (synopsis "Python bindings for GPGME GnuPG cryptography library")
539 (description "This package provides Python bindings to the GPGME GnuPG
540cryptographic library. It is developed in the GPGME source code, and then
541distributed separately.")
542 (license license:lgpl2.1+)))
543
544(define-public python2-gpg
545 (package-with-python2 python-gpg))
546
a05d1d82
CAW
547(define-public python-pygpgme
548 (package
549 (name "python-pygpgme")
550 (version "0.3")
551 (source
552 (origin
553 (method url-fetch)
554 (uri (pypi-uri "pygpgme" version))
555 (sha256
556 (base32
557 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
558 ;; Unfortunately, we have to disable some tests due to some gpg-agent
559 ;; goofiness... see:
560 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
1c9cea74
LF
561 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
562 "python-pygpgme-fix-pinentry-tests.patch"))))
a05d1d82
CAW
563 (arguments
564 `(#:phases
565 (modify-phases %standard-phases
566 (add-before 'build 'make-build
9a425d68 567 (lambda _ (invoke "make" "build")))
a05d1d82 568 (replace 'check
9a425d68 569 (lambda _ (invoke "make" "check"))))))
a05d1d82 570 (build-system python-build-system)
e6f63412
LF
571 (native-inputs
572 `(("gnupg" ,gnupg-1)))
a05d1d82 573 (inputs
e6f63412 574 `(("gpgme" ,gpgme)))
a05d1d82
CAW
575 (home-page "https://launchpad.net/pygpgme")
576 (synopsis "Python module for working with OpenPGP messages")
577 (description
578 "PyGPGME is a Python module that lets you sign, verify, encrypt and
579decrypt messages using the OpenPGP format by making use of GPGME.")
580 (license license:lgpl2.1+)))
581
582(define-public python2-pygpgme
5c31f4aa 583 (package-with-python2 python-pygpgme))
a05d1d82 584
22af9029
RW
585(define-public python-gnupg
586 (package
587 (name "python-gnupg")
ba704797 588 (version "0.4.4")
22af9029
RW
589 (source
590 (origin
591 (method url-fetch)
5b669ba1 592 (uri (pypi-uri "python-gnupg" version))
22af9029
RW
593 (sha256
594 (base32
ba704797 595 "03pvjyp6q9pr8qa22i38az06ddzhvzy5kj192hxa3gbhnchg1nj5"))))
22af9029
RW
596 (build-system python-build-system)
597 (arguments
598 `(#:phases
599 (modify-phases %standard-phases
600 (replace 'check
ec089763
RW
601 (lambda _
602 (substitute* "test_gnupg.py"
ec089763
RW
603 ;; Unsure why this test fails.
604 (("'test_search_keys'") "True")
605 (("def test_search_keys") "def disabled__search_keys"))
606 (setenv "USERNAME" "guixbuilder")
607 ;; The doctests are extremely slow and sometimes time out,
608 ;; so we disable them.
b262aba7
TGR
609 (invoke "python"
610 "test_gnupg.py" "--no-doctests"))))))
22af9029
RW
611 (native-inputs
612 `(("gnupg" ,gnupg-1)))
72fb1b24 613 (home-page "https://packages.python.org/python-gnupg/index.html")
22af9029
RW
614 (synopsis "Wrapper for the GNU Privacy Guard")
615 (description
616 "This module allows easy access to GnuPG’s key management, encryption
617and signature functionality from Python programs.")
618 (license license:bsd-3)))
619
620(define-public python2-gnupg
621 (package-with-python2 python-gnupg))
622
34ef5755
CB
623(define-public perl-gnupg-interface
624 (package
625 (name "perl-gnupg-interface")
626 (version "0.52")
9c2d0a03
RW
627 (source (origin
628 (method url-fetch)
629 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
630 "GnuPG-Interface-" version ".tar.gz"))
631 (sha256
632 (base32
633 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
34ef5755
CB
634 (build-system perl-build-system)
635 (arguments
9c2d0a03
RW
636 `(#:phases
637 (modify-phases %standard-phases
638 ;; FIXME: This test fails for unknown reasons
639 (add-after 'unpack 'delete-broken-test
640 (lambda _
641 (delete-file "t/encrypt_symmetrically.t")
642 #t)))))
34ef5755 643 (inputs
9c2d0a03 644 `(("gnupg" ,gnupg-1)))
34ef5755
CB
645 (propagated-inputs
646 `(("perl-moo" ,perl-moo)
9c2d0a03
RW
647 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
648 ("perl-moox-late" ,perl-moox-late)))
649 (native-inputs
650 `(("which" ,which)
651 ("perl-module-install" ,perl-module-install)))
9aba9b12 652 (home-page "https://metacpan.org/release/GnuPG-Interface")
34ef5755 653 (synopsis "Perl interface to GnuPG")
9c2d0a03
RW
654 (description "@code{GnuPG::Interface} and its associated modules are
655designed to provide an object-oriented method for interacting with GnuPG,
656being able to perform functions such as but not limited to encrypting,
657signing, decryption, verification, and key-listing parsing.")
34ef5755
CB
658 (license license:perl-license)))
659
ea4d96c6 660(define-public pius
cda0ef04
TS
661 (package
662 (name "pius")
4f4b37df 663 (version "2.2.7")
cda0ef04
TS
664 (source (origin
665 (method url-fetch)
666 (uri (string-append
667 "https://github.com/jaymzh/pius/releases/download/v"
668 version "/pius-" version ".tar.bz2"))
669 (sha256
670 (base32
4f4b37df 671 "1nsl7czicv95j0gfz4s82ys3g3h2mwr6cq3ilid8bpz3iy7z4ipy"))))
cda0ef04 672 (build-system python-build-system)
4f4b37df 673 (inputs `(("perl" ,perl) ; for 'pius-party-worksheet'
fcb1dd99
AE
674 ("gpg" ,gnupg)
675 ("python-six" ,python2-six)))
cda0ef04
TS
676 (arguments
677 `(#:tests? #f
4f4b37df 678 #:python ,python-2 ; uses the Python 2 'print' syntax
cda0ef04
TS
679 #:phases
680 (modify-phases %standard-phases
681 (add-before
682 'build 'set-gpg-file-name
683 (lambda* (#:key inputs outputs #:allow-other-keys)
684 (let* ((gpg (string-append (assoc-ref inputs "gpg")
685 "/bin/gpg")))
686 (substitute* "libpius/constants.py"
687 (("/usr/bin/gpg2") gpg))
688 #t))))))
689 (synopsis "Programs to simplify GnuPG key signing")
690 (description
691 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
35b9e423
EB
692parties. It is the main utility and makes it possible to quickly and easily
693sign each UID on a set of PGP keys. It is designed to take the pain out of
ea4d96c6
AE
694the sign-all-the-keys part of PGP Keysigning Party while adding security
695to the process.
696
697pius-keyring-mgr and pius-party-worksheet help organisers of
698PGP keysigning parties.")
cda0ef04
TS
699 (license license:gpl2)
700 (home-page "https://www.phildev.net/pius/index.shtml")))
96be765c
AE
701
702(define-public signing-party
33678041
EF
703 (package
704 (name "signing-party")
cbebccbe 705 (version "2.10")
ca64945e 706 (home-page "https://salsa.debian.org/signing-party-team/signing-party")
33678041
EF
707 (source (origin
708 (method git-fetch)
709 (uri (git-reference
710 (url home-page)
cbebccbe 711 (commit (string-append "v" version))))
33678041
EF
712 (file-name (git-file-name name version))
713 (sha256
714 (base32
cbebccbe 715 "0lq8nmwjmysry0n4jg6vb7bh0lagbyb9pa11ii3s41p1mhzchf2r"))))
33678041
EF
716 (build-system gnu-build-system)
717 (native-inputs
718 `(("autoconf" ,autoconf-wrapper)
719 ("automake" ,automake)))
720 (inputs `(("perl" ,perl)
721 ("perl-text-template" ,perl-text-template)
722 ("perl-mime-tools" ,perl-mime-tools)
723 ("perl-gnupg-interface" ,perl-gnupg-interface)
724 ("perl-net-idn-encode" ,perl-net-idn-encode)
725 ("libmd" ,libmd)))
726 (arguments
cbebccbe 727 `(#:tests? #f ; no test suite
33678041
EF
728 #:phases
729 (modify-phases %standard-phases
730 (replace 'configure
731 (lambda* (#:key outputs #:allow-other-keys)
732 (let ((out (assoc-ref outputs "out")))
733 (substitute* "keyanalyze/Makefile"
734 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
735 (substitute* "keyanalyze/Makefile"
736 (("\\./configure") (string-append "./configure --prefix=" out)))
737 (substitute* "gpgwrap/Makefile"
738 (("\\} clean")
739 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
740 out "/bin/gpgwrap\n")))
741 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
742 "keylookup/Makefile" "sig2dot/Makefile"
743 "springgraph/Makefile")
744 (("/usr") out))
745 (setenv "CONFIG_SHELL" (which "sh")))
746 #t))
747 (replace 'install
748 (lambda* (#:key outputs #:allow-other-keys #:rest args)
749 (let ((out (assoc-ref outputs "out"))
750 (install (assoc-ref %standard-phases 'install)))
751 (apply install args)
752 (for-each
753 (lambda (dir file)
754 (copy-file (string-append dir "/" file)
755 (string-append out "/bin/" file)))
756 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
757 "gpglist" "gpg-mailkeys" "gpgparticipants")
758 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
759 "gpglist" "gpg-mailkeys" "gpgparticipants"))
760 (for-each
761 (lambda (dir file)
762 (copy-file (string-append dir "/" file)
763 (string-append out "/share/man/man1/" file)))
764 '("caff" "caff" "caff" "gpgdir"
765 "gpg-key2ps" "gpglist" "gpg-mailkeys"
766 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
767 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
768 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
769 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
770 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
771 "process_keys.1" "pgpring.1" "keyanalyze.1")))
772 #t))
773 (add-after 'install 'wrap-programs
774 (lambda* (#:key outputs #:allow-other-keys)
775 (let* ((out (assoc-ref outputs "out")))
776 (wrap-program
777 (string-append out "/bin/caff")
778 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
779 #t)))))
780 (synopsis "Collection of scripts for simplifying gnupg key signing")
781 (description
782 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
96be765c 783including tools for signing keys, keyring analysis, and party preparation.
7ac53403
EF
784@enumerate
785@item caff: CA - Fire and Forget signs and mails a key
786@item pgp-clean: removes all non-self signatures from key
787@item pgp-fixkey: removes broken packets from keys
788@item gpg-mailkeys: simply mail out a signed key to its owner
789@item gpg-key2ps: generate PostScript file with fingerprint paper strips
790@item gpgdir: recursive directory encryption tool
791@item gpglist: show who signed which of your UIDs
792@item gpgsigs: annotates list of GnuPG keys with already done signatures
793@item gpgparticipants: create list of party participants for the organiser
794@item gpgwrap: a passphrase wrapper
795@item keyanalyze: minimum signing distance (MSD) analysis on keyrings
796@item keylookup: ncurses wrapper around gpg --search
797@item sig2dot: converts a list of GnuPG signatures to a .dot file
798@item springgraph: creates a graph from a .dot file
799@end enumerate")
33678041
EF
800 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
801 ;; and caff and gpgsigs: bsd-3, see
802 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
803 (license license:gpl2)))
40d806af 804
c607b701 805(define-public pinentry-tty
40d806af 806 (package
c607b701 807 (name "pinentry-tty")
4498cbd7 808 (version "1.1.0")
40d806af
LC
809 (source (origin
810 (method url-fetch)
811 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
812 version ".tar.bz2"))
813 (sha256
814 (base32
4498cbd7 815 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
40d806af 816 (build-system gnu-build-system)
c607b701
EF
817 (arguments
818 `(#:configure-flags '("--enable-pinentry-tty")))
40d806af
LC
819 (inputs
820 `(("ncurses" ,ncurses)
18ed97d6 821 ("libassuan" ,libassuan)
c607b701 822 ("libsecret" ,libsecret "out")))
40d806af
LC
823 (native-inputs
824 `(("pkg-config" ,pkg-config)))
547cb17d 825 (home-page "https://gnupg.org/aegypten2/")
40d806af
LC
826 (synopsis "GnuPG's interface to passphrase input")
827 (description
c607b701 828 "Pinentry provides a console that allows users to enter a passphrase when
9614897b 829@code{gpg} is run and needs it.")
f8457932
LC
830 (license license:gpl2+)
831 (properties '((ftp-server . "ftp.gnupg.org")
832 (ftp-directory . "/gcrypt/pinentry")
833 (upstream-name . "pinentry")))))
4380a7b4 834
abc4a332
PN
835(define-public pinentry-emacs
836 (package
837 (inherit pinentry-tty)
838 (name "pinentry-emacs")
839 (arguments
840 `(#:configure-flags '("--enable-pinentry-emacs")))
841 (description
842 "Pinentry provides a console and an Emacs interface that allows users to
843enter a passphrase when required by @code{gpg} or other software.")))
844
c607b701
EF
845(define-public pinentry-gtk2
846 (package
847 (inherit pinentry-tty)
848 (name "pinentry-gtk2")
849 (inputs
850 `(("gtk+" ,gtk+-2)
851 ("glib" ,glib)
852 ,@(package-inputs pinentry-tty)))
853 (description
854 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
9614897b 855passphrase when @code{gpg} is run and needs it.")))
c607b701 856
41edb23f
CB
857(define-public pinentry-gnome3
858 (package
859 (inherit pinentry-tty)
860 (name "pinentry-gnome3")
861 (inputs
862 `(("gtk+" ,gtk+-2)
863 ("gcr" ,gcr)
864 ("glib" ,glib)
865 ,@(package-inputs pinentry-tty)))
866 (arguments
867 `(#:configure-flags '("--enable-pinentry-gnome3")))
868 (description
869 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
870that allows users to enter a passphrase when required by @code{gpg} or other
871software.")))
c607b701 872
54df7558
EF
873(define-public pinentry-qt
874 (package
875 (inherit pinentry-tty)
876 (name "pinentry-qt")
877 (inputs
e2788cef 878 `(("qtbase" ,qtbase)
54df7558
EF
879 ,@(package-inputs pinentry-tty)))
880 (description
881 "Pinentry provides a console and a Qt GUI that allows users to enter a
9614897b 882passphrase when @code{gpg} is run and needs it.")))
54df7558 883
5e369f8a
EF
884(define-public pinentry-efl
885 (package
886 (inherit pinentry-tty)
887 (name "pinentry-efl")
888 (source
889 (origin
890 (inherit (package-source pinentry-tty))
891 (patches (search-patches "pinentry-efl.patch"))))
892 (arguments
893 '(#:configure-flags '("--enable-pinentry-efl")
894 #:phases
895 (modify-phases %standard-phases
896 (replace 'bootstrap
897 (lambda _
898 (invoke "sh" "autogen.sh"))))))
899 (native-inputs
900 `(("autoconf" ,autoconf)
901 ("automake" ,automake)
902 ("gettext" ,gettext-minimal)
903 ,@(package-native-inputs pinentry-tty)))
904 (inputs
905 `(("efl" ,efl)
906 ,@(package-inputs pinentry-tty)))
907 (description
908 "Pinentry provides a console and a graphical interface for the
909@dfn{Enlightenment Foundation Libraries} (EFL) that allows users to enter a
910passphrase when @code{gpg} is run and needs it.")))
911
940f8d39
EF
912(define-public pinentry
913 (package (inherit pinentry-gtk2)
914 (name "pinentry")))
915
4380a7b4
EB
916(define-public paperkey
917 (package
918 (name "paperkey")
abe08256 919 (version "1.6")
4380a7b4
EB
920 (source (origin
921 (method url-fetch)
9530c4bf 922 (uri (string-append "https://www.jabberwocky.com/"
4380a7b4
EB
923 "software/paperkey/paperkey-"
924 version ".tar.gz"))
925 (sha256
926 (base32
abe08256 927 "1xq5gni6gksjkd5avg0zpd73vsr97appksfx0gx2m38s4w9zsid2"))))
4380a7b4
EB
928 (build-system gnu-build-system)
929 (arguments
930 `(#:phases
e379d85c
EF
931 (modify-phases %standard-phases
932 (add-before 'check 'patch-check-scripts
933 (lambda _
934 (substitute* '("checks/roundtrip.sh"
935 "checks/roundtrip-raw.sh")
936 (("/bin/echo") "echo"))
937 #t)))))
9530c4bf 938 (home-page "https://www.jabberwocky.com/software/paperkey/")
4380a7b4
EB
939 (synopsis "Backup OpenPGP keys to paper")
940 (description
941 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
942for printing with paper and ink, which have amazingly long retention
943qualities. To reconstruct a secret key, you re-enter those
944bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
945them to transform your existing public key into a secret key.")
07157e8a 946 (license license:gpl2+)))
8384499c 947
ba7bd6c6
VC
948(define-public pgpdump
949 (package
950 (name "pgpdump")
951 (version "0.33")
952 (source
953 (origin
954 (method url-fetch)
955 (uri (string-append "https://www.mew.org/~kazu/proj/pgpdump/pgpdump-"
956 version ".tar.gz"))
957 (sha256
958 (base32 "1j001jra2m89n6cys3n0hs574bipjdzfxhzpnd4jfyv95mqwl7n4"))))
959 (build-system gnu-build-system)
960 (arguments
961 `(#:tests? #f ; no make check
962 #:configure-flags (list "--prefix=/")
963 #:make-flags (list "CC=gcc"
964 (string-append "DESTDIR=" (assoc-ref %outputs "out")))))
965 (inputs
966 `(("zlib" ,zlib)))
967 (home-page "https://www.mew.org/~kazu/proj/pgpdump/en/")
968 (synopsis "PGP packet visualizer")
969 (description "pgpdump displays the sequence of OpenPGP or PGP version 2
970packets from a file.
971
972The output of this command is similar to GnuPG's list packets command,
973however, pgpdump produces more detailed and easier to understand output.")
974 (license license:bsd-3)))
975
8384499c 976(define-public gpa
977 (package
978 (name "gpa")
ee755b70 979 (version "0.10.0")
8384499c 980 (source (origin
981 (method url-fetch)
982 (uri (string-append "mirror://gnupg/gpa/"
983 name "-" version ".tar.bz2"))
984 (sha256
985 (base32
ee755b70 986 "1cbpc45f8qbdkd62p12s3q2rdq6fa5xdzwmcwd3xrj55bzkspnwm"))))
8384499c 987 (build-system gnu-build-system)
ea2a180f
BW
988 (arguments
989 `(#:phases
990 (modify-phases %standard-phases
991 (add-after 'install 'wrap-program
992 (lambda* (#:key inputs outputs #:allow-other-keys)
993 (let ((out (assoc-ref outputs "out"))
994 (gnupg (assoc-ref inputs "gnupg")))
995 (wrap-program (string-append out "/bin/gpa")
996 `("PATH" ":" prefix (,(string-append gnupg "/bin"))))
997 #t))))))
8384499c 998 (native-inputs
999 `(("pkg-config" ,pkg-config)))
1000 (inputs
1001 `(("gnupg" ,gnupg)
1002 ("gpgme" ,gpgme)
1003 ("libassuan" ,libassuan)
1004 ("libgpg-error" ,libgpg-error)
1005 ("gtk+-2" ,gtk+-2)))
1006 (home-page "https://gnupg.org/software/gpa/")
1007 (synopsis "Graphical user interface for GnuPG")
1008 (description
1009 "GPA, the GNU Privacy Assistant, is a graphical user interface for
1010@uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
1011files, to verify signatures, and to manage the private and public keys.")
9a451a67
EF
1012 (license license:gpl3+)
1013 (properties '((ftp-server . "ftp.gnupg.org")
1014 (ftp-directory . "/gcrypt/gpa")))))
5aeb6611 1015
15b08442
P
1016(define-public parcimonie
1017 (package
1018 (name "parcimonie")
2e6618fc 1019 (version "0.11.0")
15b08442
P
1020 (source (origin
1021 (method url-fetch)
9062fde4
EF
1022 (uri (string-append "https://gaffer.boum.org/intrigeri/files/"
1023 "parcimonie/App-Parcimonie-"
15b08442
P
1024 version ".tar.gz"))
1025 (sha256
1026 (base32
2e6618fc 1027 "14pvapvzrxh1yh8zgcj1llmc2dd8g1fgzskxlja21gmw8c88aqdk"))))
15b08442
P
1028 (build-system perl-build-system)
1029 (inputs
2e6618fc 1030 `(("gnupg" ,gnupg)
15b08442
P
1031 ("perl-config-general" ,perl-config-general)
1032 ("perl-clone" ,perl-clone)
1033 ("perl-data" ,perl-data)
1034 ("perl-exporter-tiny" ,perl-exporter-tiny)
1035 ("perl-file-homedir" ,perl-file-homedir)
1036 ("perl-file-sharedir" ,perl-file-sharedir)
1037 ("perl-file-which" ,perl-file-which)
1038 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
1039 ("perl-gnupg-interface" ,perl-gnupg-interface)
1040 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
1041 ("perl-list-moreutils" ,perl-list-moreutils)
1042 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
1043 ("perl-lwp-online" ,perl-lwp-online)
1044 ("perl-module-build" ,perl-module-build)
1045 ("perl-module-pluggable-object" ,perl-module-pluggable)
1046 ("perl-moo" ,perl-moo)
1047 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
1048 ("perl-moox-late" ,perl-moox-late)
1049 ("perl-moox-options" ,perl-moox-options)
2e6618fc 1050 ("perl-moox-strictconstructor" ,perl-moox-strictconstructor)
15b08442
P
1051 ("perl-namespace-clean" ,perl-namespace-clean)
1052 ("perl-net-dbus" ,perl-net-dbus)
1053 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
1054 ("perl-path-tiny" ,perl-path-tiny)
2e6618fc 1055 ("perl-strictures" ,perl-strictures-2)
15b08442
P
1056 ("perl-test-most" ,perl-test-most)
1057 ("perl-test-trap" ,perl-test-trap)
1058 ("perl-time-duration" ,perl-time-duration)
1059 ("perl-time-duration-parse" ,perl-time-duration-parse)
1060 ("perl-try-tiny" ,perl-try-tiny)
1061 ("perl-type-tiny" ,perl-type-tiny)
1062 ("perl-types-path-tiny" ,perl-types-path-tiny)
1063 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1064 ("perl-xml-parser" ,perl-xml-parser)
1065 ("perl-xml-twig" ,perl-xml-twig)
1066 ("torsocks" ,torsocks)))
2e6618fc 1067 (native-inputs
ff337525 1068 `(("xorg-server" ,xorg-server-for-tests)))
15b08442
P
1069 (arguments
1070 `(#:phases
1071 (modify-phases %standard-phases
1072 ;; Needed for using gpg-connect-agent during tests.
2e6618fc
EF
1073 (add-before 'check 'prepare-for-tests
1074 (lambda* (#:key inputs #:allow-other-keys)
1075 (let ((xorg-server (assoc-ref inputs "xorg-server")))
1076 (system (string-append xorg-server "/bin/Xvfb :1 &"))
1077 (setenv "DISPLAY" ":1")
1078 (setenv "HOME" "/tmp")
1079 ;; These tests are known to fail
1080 (delete-file "t/32-keyserver_defined_on_command_line.t")
1081 (delete-file "t/33-checkGpgHasDefinedKeyserver.t")
1082 ;; The applet is deprecated upstream.
1083 (delete-file "t/00-load_all.t")
1084 #t)))
15b08442
P
1085 (add-before 'install 'fix-references
1086 (lambda* (#:key inputs outputs #:allow-other-keys)
1087 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
15b08442 1088 ;; Skip check whether dependencies are in the PATH
2e6618fc 1089 (("defined which.*") ""))
15b08442
P
1090 #t))
1091 (add-after 'install 'wrap-program
1092 (lambda* (#:key inputs outputs #:allow-other-keys)
1093 (let* ((out (assoc-ref outputs "out"))
1094 (perllib (string-append out "/lib/perl5/site_perl/"
1095 ,(package-version perl))))
1096 (wrap-program (string-append out "/bin/parcimonie")
1097 `("PERL5LIB" ":"
1098 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
1099 #t))))))
9062fde4 1100 (home-page "https://gaffer.boum.org/intrigeri/code/parcimonie/")
15b08442
P
1101 (synopsis "Incrementally refreshes a GnuPG keyring")
1102 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
1103that makes it hard to correlate the keyring content to an individual, and
1104makes it hard to locate an individual based on an identifying subset of her
1105keyring content. Parcimonie is a daemon that fetches one key at a time using
1106the Tor network, waits a bit, changes the Tor circuit being used, and starts
1107over.")
1108 (license license:gpl1+)))
607d280e
EF
1109
1110(define-public jetring
1111 (package
1112 (name "jetring")
7da1e8f9 1113 (version "0.29")
607d280e
EF
1114 (source
1115 (origin
7da1e8f9
EF
1116 (method git-fetch)
1117 (uri (git-reference
1118 (url "https://salsa.debian.org/debian/jetring")
1119 (commit (string-append "debian/" version))))
1120 (file-name (git-file-name name version))
607d280e
EF
1121 (sha256
1122 (base32
7da1e8f9 1123 "1acbx2vnbkms1c0wgcnh05d4g359sg5z0aiw541vx2qq9sgdhlv6"))))
607d280e
EF
1124 (build-system gnu-build-system)
1125 (arguments
1126 '(#:phases
1127 (modify-phases %standard-phases
1128 (delete 'configure) ; no configure script
1129 (add-before 'install 'hardlink-gnupg
1130 (lambda* (#:key inputs #:allow-other-keys)
1131 (let ((gpg (string-append (assoc-ref inputs "gnupg")
1132 "/bin/gpg")))
1133 (substitute* (find-files "." "jetring-[[:alpha:]]+$")
1134 (("gpg -") (string-append gpg " -"))
1135 (("\\\"gpg\\\"") (string-append "\"" gpg "\"")))
1136 #t)))
1137 (replace 'install
1138 (lambda* (#:key outputs #:allow-other-keys)
1139 (let* ((out (assoc-ref outputs "out"))
1140 (man (string-append out "/share/man")))
1141 (for-each (lambda (file)
1142 (install-file file (string-append out "/bin/")))
1143 (find-files "." "jetring-[[:alpha:]]+$"))
1144 (for-each (lambda (file)
1145 (install-file file (string-append man "/man1/")))
1146 (find-files "." ".*\\.1$"))
1147 (install-file "jetring.7" (string-append man "/man7/"))
1148 #t))))
1149 #:tests? #f)) ; no test phase
1150 (inputs
1151 `(("gnupg" ,gnupg)
1152 ("perl" ,perl)))
1153 (home-page "https://joeyh.name/code/jetring/")
1154 (synopsis "GnuPG keyring maintenance using changesets")
1155 (description
1156 "Jetring is a collection of tools that allow for gpg keyrings to be
1157maintained using changesets. It was developed with the Debian keyring in mind,
1158and aims to solve the problem that a gpg keyring is a binary blob that's hard
1159for multiple people to collaboratively edit.
1160
1161With jetring, changesets can be submitted, reviewed to see exactly what they
1162will do, applied, and used to build a keyring. The origin of every change made
1163to the keyring is available for auditing, and gpg signatures can be used for
1164integrity guarantees.")
1165 (license license:gpl2+)))