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