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