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