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