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