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