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