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