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 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 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
18 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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 openldap)
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages perl-check)
44 #:use-module (gnu packages pth)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages qt)
47 #:use-module (gnu packages readline)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages databases)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gnome)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages security-token)
56 #:use-module (gnu packages swig)
57 #:use-module (gnu packages tls)
58 #:use-module (gnu packages tor)
59 #:use-module (gnu packages web)
60 #:use-module (gnu packages xml)
61 #:use-module (guix packages)
62 #:use-module (guix download)
63 #:use-module (guix git-download)
64 #:use-module (guix build-system gnu)
65 #:use-module (guix build-system perl)
66 #:use-module (guix build-system python))
68 (define-public libgpg-error
75 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
79 "1li95ni122fzinzlmxbln63nmgij63irxfvi52ws4zfbzv3am4sg"))))
80 (build-system gnu-build-system)
81 (home-page "https://gnupg.org")
82 (synopsis "Library of error values for GnuPG components")
84 "Libgpg-error is a small library that defines common error values
85 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
86 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
87 Daemon and possibly more in the future.")
88 (license license:lgpl2.0+)
89 (properties '((ftp-server . "ftp.gnupg.org")
90 (ftp-directory . "/gcrypt/libgpg-error")))))
92 (define-public libgcrypt
98 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
102 "1cvqd9jk5qshbh48yh3ixw4zyr4n5k50r3475rrh20xfn7w7aa3s"))))
103 (build-system gnu-build-system)
105 `(("libgpg-error-host" ,libgpg-error)))
107 ;; Needed here for the 'gpg-error' program.
108 `(("libgpg-error-native" ,libgpg-error)))
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.
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")
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
124 (license license:lgpl2.0+)
125 (properties '((ftp-server . "ftp.gnupg.org")
126 (ftp-directory . "/gcrypt/libgcrypt")))))
128 (define-public libassuan
135 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
139 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"))))
140 (build-system gnu-build-system)
142 `(("libgpg-error" ,libgpg-error)
144 (home-page "https://gnupg.org")
146 "IPC library used by GnuPG and related software")
148 "Libassuan is a small library implementing the so-called Assuan
149 protocol. This protocol is used for IPC between most newer
150 GnuPG components. Both, server and client side functions are
152 (license license:lgpl2.0+)
153 (properties '((ftp-server . "ftp.gnupg.org")
154 (ftp-directory . "/gcrypt/libassuan")))))
156 (define-public libksba
164 "mirror://gnupg/libksba/libksba-"
168 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
169 (build-system gnu-build-system)
171 `(("libgpg-error" ,libgpg-error)))
173 `(("libgpg-error" ,libgpg-error)))
176 (list ,@(if (%current-target-system)
177 '("CC_FOR_BUILD=gcc")
179 (string-append "--with-gpg-error-prefix="
180 (assoc-ref %build-inputs "libgpg-error")))))
181 (home-page "https://www.gnupg.org")
182 (synopsis "CMS and X.509 access library")
184 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
185 as well as the CMS easily accessible by other applications. Both
186 specifications are building blocks of S/MIME and TLS.")
187 (license license:gpl3+)
188 (properties '((ftp-server . "ftp.gnupg.org")
189 (ftp-directory . "/gcrypt/libksba")))))
198 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
201 "1hmkkp6vzyrh8v01c2ynzf9vwikyagp7p1lxhbnr4ysk3w66jji9"))))
202 (build-system gnu-build-system)
203 (home-page "https://www.gnupg.org")
204 (synopsis "Non-preemptive thread library")
206 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
207 threads implementation.
209 In contrast to GNU Pth is is based on the system's standard threads
210 implementation. This allows the use of libraries which are not
211 compatible to GNU Pth.")
212 (license (list license:lgpl3+ license:gpl2+)))) ; dual license
220 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
224 "0mzgibq4dpxh3i9anmwg12xdjry28y83icafhx3j3djg5niqk89z"))))
225 (build-system gnu-build-system)
227 `(("pkg-config" ,pkg-config)))
232 ("libassuan" ,libassuan)
233 ("libgcrypt" ,libgcrypt)
234 ("libgpg-error" ,libgpg-error)
237 ("openldap" ,openldap)
238 ("pcsc-lite" ,pcsc-lite)
239 ("readline" ,readline)
243 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
244 ;; executable in its installation directory in
245 ;; /gnu/store before it has been installed.
246 "--enable-gnupg-builddir-envvar"
247 "--enable-all-tests")
249 (modify-phases %standard-phases
250 (add-before 'configure 'patch-paths
251 (lambda* (#:key inputs #:allow-other-keys)
252 (substitute* "scd/scdaemon.c"
253 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
254 (string-append "\"" (assoc-ref inputs "pcsc-lite")
257 (add-after 'build 'patch-scheme-tests
259 (substitute* (find-files "tests" ".\\.scm$")
260 (("/usr/bin/env gpgscm")
261 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
263 (add-before 'build 'patch-test-paths
265 (substitute* '("tests/inittests"
266 "tests/pkits/inittests"
268 "tests/pkits/common.sh"
269 "tests/pkits/Makefile")
270 (("/bin/pwd") (which "pwd")))
271 (substitute* "common/t-exectool.c"
272 (("/bin/cat") (which "cat"))
273 (("/bin/true") (which "true"))
274 (("/bin/false") (which "false")))
276 (home-page "https://gnupg.org/")
277 (synopsis "GNU Privacy Guard")
279 "The GNU Privacy Guard is a complete implementation of the OpenPGP
280 standard. It is used to encrypt and sign data and communication. It
281 features powerful key management and the ability to access public key
282 servers. It includes several libraries: libassuan (IPC between GnuPG
283 components), libgpg-error (centralized GnuPG error values), and
284 libskba (working with X.509 certificates and CMS data).")
285 (license license:gpl3+)
286 (properties '((ftp-server . "ftp.gnupg.org")
287 (ftp-directory . "/gcrypt/gnupg")))))
289 (define-public gnupg-2.0
290 (package (inherit gnupg)
294 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
298 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
304 ("libassuan" ,libassuan)
305 ("libgcrypt" ,libgcrypt)
306 ("libgpg-error" ,libgpg-error)
309 ("openldap" ,openldap)
311 ("readline" ,readline)))
314 (modify-phases %standard-phases
315 (add-before 'configure 'patch-config-files
317 (substitute* "tests/openpgp/Makefile.in"
318 (("/bin/sh") (which "sh")))
320 (add-after 'install 'rename-v2-commands
321 (lambda* (#:key outputs #:allow-other-keys)
322 ;; Upstream suggests removing the trailing '2' from command names:
323 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
324 (let ((out (assoc-ref outputs "out")))
325 (with-directory-excursion (string-append out "/bin")
326 (rename-file "gpgv2" "gpgv")
327 (rename-file "gpg2" "gpg")
329 ;; Keep the old name around to ease transition.
330 (symlink "gpgv" "gpgv2")
331 (symlink "gpg" "gpg2")
333 (properties `((superseded . ,gnupg)))))
335 (define-public gnupg-1
336 (package (inherit gnupg)
340 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
344 "1d1hz4szh1kvwhsw7w2zxa6q5ndrk3qy6hj289l1b8k3xi5s554m"))))
350 ("readline" ,readline)
351 ("libgpg-error" ,libgpg-error)))
354 (modify-phases %standard-phases
355 (add-after 'unpack 'patch-check-sh
357 (substitute* "checks/Makefile.in"
358 (("/bin/sh") (which "sh"))))))))))
367 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
371 "14q619lxbk64vz7lih5gjb928qm28jrnn1h3yhsrrff3jw8yv3qs"))))
372 (build-system gnu-build-system)
376 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
377 `(("libgpg-error" ,libgpg-error)))
379 `(("libassuan" ,libassuan)))
380 (home-page "https://www.gnupg.org/related_software/gpgme/")
381 (synopsis "Library providing simplified access to GnuPG functionality")
383 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
384 easier for applications. It provides a High-Level Crypto API for encryption,
385 decryption, signing, signature verification and key management. Currently
386 it uses GnuPG as its backend but the API isn't restricted to this engine.
388 Because the direct use of GnuPG from an application can be a complicated
389 programming task, it is suggested that all software should try to use GPGME
390 instead. This way bug fixes or improvements can be done at a central place
391 and every application benefits from this.")
392 (license license:lgpl2.1+)))
394 (define-public qgpgme
400 (modify-phases %standard-phases
401 (add-before 'build 'chdir-and-symlink
402 (lambda* (#:key inputs #:allow-other-keys)
403 (let ((gpgme (assoc-ref inputs "gpgme")))
404 (symlink (string-append gpgme "/lib/libgpgmepp.la")
405 "lang/cpp/src/libgpgmepp.la")
406 (symlink (string-append gpgme "/lib/libgpgme.la")
411 `(("pkg-config" ,pkg-config)
412 ,@(package-native-inputs gpgme)))
416 ,@(package-inputs gpgme)))
417 (synopsis "Qt API bindings for gpgme")
418 (description "QGpgme provides a very high level Qt API around GpgMEpp.
420 QGpgME was originally developed as part of libkleo and incorporated into
421 gpgpme starting with version 1.7.")
422 (license license:gpl2+))) ;; Note: this differs from gpgme
424 (define-public python-gpg
430 (uri (pypi-uri "gpg" version))
433 "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
434 (build-system python-build-system)
436 '(#:tests? #f)) ; No test suite.
441 (home-page (package-home-page gpgme))
442 (synopsis "Python bindings for GPGME GnuPG cryptography library")
443 (description "This package provides Python bindings to the GPGME GnuPG
444 cryptographic library. It is developed in the GPGME source code, and then
445 distributed separately.")
446 (license license:lgpl2.1+)))
448 (define-public python2-gpg
449 (package-with-python2 python-gpg))
451 (define-public python-pygpgme
453 (name "python-pygpgme")
458 (uri (pypi-uri "pygpgme" version))
461 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
462 ;; Unfortunately, we have to disable some tests due to some gpg-agent
464 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
465 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
466 "python-pygpgme-fix-pinentry-tests.patch"))))
469 (modify-phases %standard-phases
470 (add-before 'build 'make-build
472 (zero? (system* "make" "build"))))
475 (zero? (system* "make" "check")))))))
476 (build-system python-build-system)
478 `(("gnupg" ,gnupg-1)))
481 (home-page "https://launchpad.net/pygpgme")
482 (synopsis "Python module for working with OpenPGP messages")
484 "PyGPGME is a Python module that lets you sign, verify, encrypt and
485 decrypt messages using the OpenPGP format by making use of GPGME.")
486 (license license:lgpl2.1+)))
488 (define-public python2-pygpgme
489 (package-with-python2 python-pygpgme))
491 (define-public python-gnupg
493 (name "python-gnupg")
498 (uri (pypi-uri "python-gnupg" version))
501 "0nkbs9c8f30lra7ca39kg91x8cyxn0jb61vih4qky839gpbwwwiq"))))
502 (build-system python-build-system)
505 (modify-phases %standard-phases
508 (substitute* "test_gnupg.py"
509 ;; Exported keys don't have a version line!
510 (("del k1\\[1\\]") "#")
511 ;; Unsure why this test fails.
512 (("'test_search_keys'") "True")
513 (("def test_search_keys") "def disabled__search_keys"))
514 (setenv "USERNAME" "guixbuilder")
515 ;; The doctests are extremely slow and sometimes time out,
516 ;; so we disable them.
517 (zero? (system* "python"
518 "test_gnupg.py" "--no-doctests")))))))
520 `(("gnupg" ,gnupg-1)))
521 (home-page "https://packages.python.org/python-gnupg/index.html")
522 (synopsis "Wrapper for the GNU Privacy Guard")
524 "This module allows easy access to GnuPG’s key management, encryption
525 and signature functionality from Python programs.")
526 (license license:bsd-3)))
528 (define-public python2-gnupg
529 (package-with-python2 python-gnupg))
531 (define-public perl-gnupg-interface
533 (name "perl-gnupg-interface")
537 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
538 "GnuPG-Interface-" version ".tar.gz"))
541 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
542 (build-system perl-build-system)
545 (modify-phases %standard-phases
546 ;; FIXME: This test fails for unknown reasons
547 (add-after 'unpack 'delete-broken-test
549 (delete-file "t/encrypt_symmetrically.t")
552 `(("gnupg" ,gnupg-1)))
554 `(("perl-moo" ,perl-moo)
555 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
556 ("perl-moox-late" ,perl-moox-late)))
559 ("perl-module-install" ,perl-module-install)))
560 (home-page "http://search.cpan.org/dist/GnuPG-Interface/")
561 (synopsis "Perl interface to GnuPG")
562 (description "@code{GnuPG::Interface} and its associated modules are
563 designed to provide an object-oriented method for interacting with GnuPG,
564 being able to perform functions such as but not limited to encrypting,
565 signing, decryption, verification, and key-listing parsing.")
566 (license license:perl-license)))
575 "https://github.com/jaymzh/pius/releases/download/v"
576 version "/pius-" version ".tar.bz2"))
579 "0lgc0ipwdfqbq16zax8kn17wbv8xyw4ygc09fawl2yp459z0ql4n"))))
580 (build-system python-build-system)
581 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
585 #:python ,python-2 ;uses the Python 2 'print' syntax
587 (modify-phases %standard-phases
589 'build 'set-gpg-file-name
590 (lambda* (#:key inputs outputs #:allow-other-keys)
591 (let* ((gpg (string-append (assoc-ref inputs "gpg")
593 (substitute* "libpius/constants.py"
594 (("/usr/bin/gpg2") gpg))
596 (synopsis "Programs to simplify GnuPG key signing")
598 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
599 parties. It is the main utility and makes it possible to quickly and easily
600 sign each UID on a set of PGP keys. It is designed to take the pain out of
601 the sign-all-the-keys part of PGP Keysigning Party while adding security
604 pius-keyring-mgr and pius-party-worksheet help organisers of
605 PGP keysigning parties.")
606 (license license:gpl2)
607 (home-page "https://www.phildev.net/pius/index.shtml")))
609 (define-public signing-party
611 (name "signing-party")
615 (uri (string-append "mirror://debian/pool/main/s/signing-party/"
616 "signing-party_" version ".orig.tar.gz"))
618 "1n5bpcfpl9vg1xp6r1jhbyahrgdyxp05b5pria1rh4m0qnv8sifr"))))
619 (build-system gnu-build-system)
621 `(("autoconf" ,autoconf-wrapper)
622 ("automake" ,automake)))
623 (inputs `(("perl" ,perl)
624 ("perl-text-template" ,perl-text-template)
625 ("perl-mime-tools" ,perl-mime-tools)
626 ("perl-gnupg-interface" ,perl-gnupg-interface)
627 ("perl-net-idn-encode" ,perl-net-idn-encode)
632 (modify-phases %standard-phases
633 (add-before 'configure 'change-directory
635 ;; The build system in the unpack phase changes to a less useful
636 ;; subdirectory, so move up one level
637 (chdir (dirname (getcwd)))))
639 (lambda* (#:key outputs #:allow-other-keys)
640 (let ((out (assoc-ref outputs "out")))
641 (substitute* "keyanalyze/Makefile"
642 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
643 (substitute* "keyanalyze/Makefile"
644 (("\\./configure") (string-append "./configure --prefix=" out)))
645 (substitute* "gpgwrap/src/Makefile"
647 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
648 out "/bin/gpgwrap\n")))
649 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
650 "keylookup/Makefile" "sig2dot/Makefile"
651 "springgraph/Makefile")
653 (setenv "CONFIG_SHELL" (which "sh")))))
655 (lambda* (#:key outputs #:allow-other-keys #:rest args)
656 (let ((out (assoc-ref outputs "out"))
657 (install (assoc-ref %standard-phases 'install)))
661 (copy-file (string-append dir "/" file)
662 (string-append out "/bin/" file)))
663 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
664 "gpglist" "gpg-mailkeys" "gpgparticipants")
665 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
666 "gpglist" "gpg-mailkeys" "gpgparticipants"))
669 (copy-file (string-append dir "/" file)
670 (string-append out "/share/man/man1/" file)))
671 '("caff" "caff" "caff" "gpgdir"
672 "gpg-key2ps" "gpglist" "gpg-mailkeys"
673 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
674 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
675 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
676 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
677 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
678 "process_keys.1" "pgpring.1" "keyanalyze.1")))))
679 (add-after 'install 'wrap-programs
680 (lambda* (#:key outputs #:allow-other-keys)
681 (let* ((out (assoc-ref outputs "out")))
683 (string-append out "/bin/caff")
684 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))))))
685 (synopsis "Collection of scripts for simplifying gnupg key signing")
687 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
688 including tools for signing keys, keyring analysis, and party preparation.
690 @item caff: CA - Fire and Forget signs and mails a key
691 @item pgp-clean: removes all non-self signatures from key
692 @item pgp-fixkey: removes broken packets from keys
693 @item gpg-mailkeys: simply mail out a signed key to its owner
694 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
695 @item gpgdir: recursive directory encryption tool
696 @item gpglist: show who signed which of your UIDs
697 @item gpgsigs: annotates list of GnuPG keys with already done signatures
698 @item gpgparticipants: create list of party participants for the organiser
699 @item gpgwrap: a passphrase wrapper
700 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
701 @item keylookup: ncurses wrapper around gpg --search
702 @item sig2dot: converts a list of GnuPG signatures to a .dot file
703 @item springgraph: creates a graph from a .dot file
705 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
706 ;; and caff and gpgsigs: bsd-3, see
707 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
708 (license license:gpl2)
709 (home-page "https://pgp-tools.alioth.debian.org/")))
711 (define-public pinentry-tty
713 (name "pinentry-tty")
717 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
721 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
722 (build-system gnu-build-system)
724 `(#:configure-flags '("--enable-pinentry-tty")))
726 `(("ncurses" ,ncurses)
727 ("libassuan" ,libassuan)
728 ("libsecret" ,libsecret "out")))
730 `(("pkg-config" ,pkg-config)))
731 (home-page "https://gnupg.org/aegypten2/")
732 (synopsis "GnuPG's interface to passphrase input")
734 "Pinentry provides a console that allows users to enter a passphrase when
735 @code{gpg} is run and needs it.")
736 (license license:gpl2+)
737 (properties '((ftp-server . "ftp.gnupg.org")
738 (ftp-directory . "/gcrypt/pinentry")
739 (upstream-name . "pinentry")))))
741 (define-public pinentry-gtk2
743 (inherit pinentry-tty)
744 (name "pinentry-gtk2")
748 ,@(package-inputs pinentry-tty)))
750 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
751 passphrase when @code{gpg} is run and needs it.")))
753 (define-public pinentry-gnome3
755 (inherit pinentry-tty)
756 (name "pinentry-gnome3")
761 ,@(package-inputs pinentry-tty)))
763 `(#:configure-flags '("--enable-pinentry-gnome3")))
765 "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3
766 that allows users to enter a passphrase when required by @code{gpg} or other
769 (define-public pinentry-qt
771 (inherit pinentry-tty)
775 ,@(package-inputs pinentry-tty)))
777 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
779 "Pinentry provides a console and a Qt GUI that allows users to enter a
780 passphrase when @code{gpg} is run and needs it.")))
782 (define-public pinentry
783 (package (inherit pinentry-gtk2)
786 (define-public paperkey
792 (uri (string-append "http://www.jabberwocky.com/"
793 "software/paperkey/paperkey-"
797 "1yybj8bj68v4lxwpn596b6ismh2fyixw5vlqqg26byrn4d9dfmsv"))))
798 (build-system gnu-build-system)
801 (modify-phases %standard-phases
802 (add-before 'check 'patch-check-scripts
804 (substitute* '("checks/roundtrip.sh"
805 "checks/roundtrip-raw.sh")
806 (("/bin/echo") "echo"))
808 (home-page "http://www.jabberwocky.com/software/paperkey/")
809 (synopsis "Backup OpenPGP keys to paper")
811 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
812 for printing with paper and ink, which have amazingly long retention
813 qualities. To reconstruct a secret key, you re-enter those
814 bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
815 them to transform your existing public key into a secret key.")
816 (license license:gpl2+)))
824 (uri (string-append "mirror://gnupg/gpa/"
825 name "-" version ".tar.bz2"))
828 "09xphbi2456qynwqq5n0yh0zdmdi2ggrj3wk4hsyh5lrzlvcrff3"))))
829 (build-system gnu-build-system)
831 `(("pkg-config" ,pkg-config)))
835 ("libassuan" ,libassuan)
836 ("libgpg-error" ,libgpg-error)
838 (home-page "https://gnupg.org/software/gpa/")
839 (synopsis "Graphical user interface for GnuPG")
841 "GPA, the GNU Privacy Assistant, is a graphical user interface for
842 @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign
843 files, to verify signatures, and to manage the private and public keys.")
844 (license license:gpl3+)))
846 (define-public parcimonie
852 (uri (string-append "https://gaffer.ptitcanardnoir.org/"
853 "intrigeri/files/parcimonie/App-Parcimonie-"
857 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
858 (build-system perl-build-system)
860 `(("gnupg" ,gnupg-1) ; This is the version used by perl-gnupg-interface
861 ("perl-config-general" ,perl-config-general)
862 ("perl-clone" ,perl-clone)
863 ("perl-data" ,perl-data)
864 ("perl-exporter-tiny" ,perl-exporter-tiny)
865 ("perl-file-homedir" ,perl-file-homedir)
866 ("perl-file-sharedir" ,perl-file-sharedir)
867 ("perl-file-which" ,perl-file-which)
868 ("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
869 ("perl-gnupg-interface" ,perl-gnupg-interface)
870 ("perl-ipc-system-simple" ,perl-ipc-system-simple)
871 ("perl-list-moreutils" ,perl-list-moreutils)
872 ("perl-libintl-perl" ,perl-libintl-perl) ; Locale::TextDomain
873 ("perl-lwp-online" ,perl-lwp-online)
874 ("perl-module-build" ,perl-module-build)
875 ("perl-module-pluggable-object" ,perl-module-pluggable)
876 ("perl-moo" ,perl-moo)
877 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
878 ("perl-moox-late" ,perl-moox-late)
879 ("perl-moox-options" ,perl-moox-options)
880 ("perl-namespace-clean" ,perl-namespace-clean)
881 ("perl-net-dbus" ,perl-net-dbus)
882 ("perl-net-dbus-glib" ,perl-net-dbus-glib)
883 ("perl-path-tiny" ,perl-path-tiny)
884 ("perl-test-most" ,perl-test-most)
885 ("perl-test-trap" ,perl-test-trap)
886 ("perl-time-duration" ,perl-time-duration)
887 ("perl-time-duration-parse" ,perl-time-duration-parse)
888 ("perl-try-tiny" ,perl-try-tiny)
889 ("perl-type-tiny" ,perl-type-tiny)
890 ("perl-types-path-tiny" ,perl-types-path-tiny)
891 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
892 ("perl-xml-parser" ,perl-xml-parser)
893 ("perl-xml-twig" ,perl-xml-twig)
894 ("torsocks" ,torsocks)))
897 (modify-phases %standard-phases
898 ;; Needed for using gpg-connect-agent during tests.
899 (add-before 'check 'set-HOME
900 (lambda _ (setenv "HOME" "/tmp") #t))
901 (add-before 'install 'fix-references
902 (lambda* (#:key inputs outputs #:allow-other-keys)
903 (substitute* "lib/App/Parcimonie/GnuPG/Interface.pm"
905 ;; Skip check whether dependencies are in the PATH
906 (("defined which.*") "")
907 (("call\\('parcimonie-torified-gpg'\\)")
908 (string-append "call('" (assoc-ref outputs "out")
909 "/bin/parcimonie-torified-gpg')")))
910 (substitute* "bin/parcimonie-torified-gpg"
911 (("torsocks") (string-append (assoc-ref inputs "torsocks")
914 (add-after 'install 'wrap-program
915 (lambda* (#:key inputs outputs #:allow-other-keys)
916 (let* ((out (assoc-ref outputs "out"))
917 (perllib (string-append out "/lib/perl5/site_perl/"
918 ,(package-version perl))))
919 (wrap-program (string-append out "/bin/parcimonie")
921 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
923 (home-page "https://gaffer.ptitcanardnoir.org/intrigeri/code/parcimonie/")
924 (synopsis "Incrementally refreshes a GnuPG keyring")
925 (description "Parcimonie incrementaly refreshes a GnuPG keyring in a way
926 that makes it hard to correlate the keyring content to an individual, and
927 makes it hard to locate an individual based on an identifying subset of her
928 keyring content. Parcimonie is a daemon that fetches one key at a time using
929 the Tor network, waits a bit, changes the Tor circuit being used, and starts
931 (license license:gpl1+)))