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