1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 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>
17 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
67 (define-public libgpg-error
74 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
78 "1li95ni122fzinzlmxbln63nmgij63irxfvi52ws4zfbzv3am4sg"))))
79 (build-system gnu-build-system)
80 (home-page "https://gnupg.org")
81 (synopsis "Library of error values for GnuPG components")
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")))))
91 (define-public libgcrypt
97 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
101 "1cvqd9jk5qshbh48yh3ixw4zyr4n5k50r3475rrh20xfn7w7aa3s"))))
102 (build-system gnu-build-system)
104 `(("libgpg-error-host" ,libgpg-error)))
106 ;; Needed here for the 'gpg-error' program.
107 `(("libgpg-error-native" ,libgpg-error)))
109 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
110 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
111 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
113 (list (string-append "--with-gpg-error-prefix="
114 (assoc-ref %build-inputs "libgpg-error-host")))))
115 (outputs '("out" "debug"))
116 (home-page "https://gnupg.org/")
117 (synopsis "Cryptographic function library")
119 "Libgcrypt is a general-purpose cryptographic library. It provides the
120 standard cryptographic building blocks such as symmetric ciphers, hash
121 algorithms, public key algorithms, large integer functions and random number
123 (license license:lgpl2.0+)
124 (properties '((ftp-server . "ftp.gnupg.org")
125 (ftp-directory . "/gcrypt/libgcrypt")))))
127 (define-public libassuan
134 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
138 "18bwffjkx9pn0lawbsn6zhd90i7xhjgpf9b0nl5xw9134w1a2scy"))))
139 (build-system gnu-build-system)
141 `(("libgpg-error" ,libgpg-error) ("pth" ,pth)))
142 (home-page "https://gnupg.org")
144 "IPC library used by GnuPG and related software")
146 "Libassuan is a small library implementing the so-called Assuan
147 protocol. This protocol is used for IPC between most newer
148 GnuPG components. Both, server and client side functions are
150 (license license:lgpl2.0+)
151 (properties '((ftp-server . "ftp.gnupg.org")
152 (ftp-directory . "/gcrypt/libassuan")))))
154 (define-public libksba
162 "mirror://gnupg/libksba/libksba-"
166 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
167 (build-system gnu-build-system)
169 `(("libgpg-error" ,libgpg-error)))
171 `(("libgpg-error" ,libgpg-error)))
174 (list ,@(if (%current-target-system)
175 '("CC_FOR_BUILD=gcc")
177 (string-append "--with-gpg-error-prefix="
178 (assoc-ref %build-inputs "libgpg-error")))))
179 (home-page "https://www.gnupg.org")
180 (synopsis "CMS and X.509 access library")
182 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
183 as well as the CMS easily accessible by other applications. Both
184 specifications are building blocks of S/MIME and TLS.")
185 (license license:gpl3+)
186 (properties '((ftp-server . "ftp.gnupg.org")
187 (ftp-directory . "/gcrypt/libksba")))))
196 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
199 "1hmkkp6vzyrh8v01c2ynzf9vwikyagp7p1lxhbnr4ysk3w66jji9"))))
200 (build-system gnu-build-system)
201 (home-page "https://www.gnupg.org")
202 (synopsis "Non-preemptive thread library")
204 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
205 threads implementation.
207 In contrast to GNU Pth is is based on the system's standard threads
208 implementation. This allows the use of libraries which are not
209 compatible to GNU Pth.")
210 (license (list license:lgpl3+ license:gpl2+)))) ; dual license
218 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
222 "1d4482c4pbi0p1k8cc0f9c4q51k56v8navrbz5samxrrs42p3lyb"))))
223 (build-system gnu-build-system)
225 `(("pkg-config" ,pkg-config)))
230 ("libassuan" ,libassuan)
231 ("libgcrypt" ,libgcrypt)
232 ("libgpg-error" ,libgpg-error)
235 ("openldap" ,openldap)
236 ("pcsc-lite" ,pcsc-lite)
237 ("readline" ,readline)
241 `(#:configure-flags '(;; Otherwise, the test suite looks for the `gpg`
242 ;; executable in its installation directory in
243 ;; /gnu/store before it has been installed.
244 "--enable-gnupg-builddir-envvar"
245 "--enable-all-tests")
247 (modify-phases %standard-phases
248 (add-before 'configure 'patch-paths
249 (lambda* (#:key inputs #:allow-other-keys)
250 (substitute* "scd/scdaemon.c"
251 (("\"(libpcsclite\\.so[^\"]*)\"" _ name)
252 (string-append "\"" (assoc-ref inputs "pcsc-lite")
255 (add-after 'build 'patch-scheme-tests
257 (substitute* (find-files "tests" ".\\.scm$")
258 (("/usr/bin/env gpgscm")
259 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
261 (add-before 'build 'patch-test-paths
263 (substitute* '("tests/inittests"
264 "tests/pkits/inittests"
266 "tests/pkits/common.sh"
267 "tests/pkits/Makefile")
268 (("/bin/pwd") (which "pwd")))
269 (substitute* "common/t-exectool.c"
270 (("/bin/cat") (which "cat"))
271 (("/bin/true") (which "true"))
272 (("/bin/false") (which "false")))
274 (home-page "https://gnupg.org/")
275 (synopsis "GNU Privacy Guard")
277 "The GNU Privacy Guard is a complete implementation of the OpenPGP
278 standard. It is used to encrypt and sign data and communication. It
279 features powerful key management and the ability to access public key
280 servers. It includes several libraries: libassuan (IPC between GnuPG
281 components), libgpg-error (centralized GnuPG error values), and
282 libskba (working with X.509 certificates and CMS data).")
283 (license license:gpl3+)
284 (properties '((ftp-server . "ftp.gnupg.org")
285 (ftp-directory . "/gcrypt/gnupg")))))
287 (define-public gnupg-2.0
288 (package (inherit gnupg)
292 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
296 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
302 ("libassuan" ,libassuan)
303 ("libgcrypt" ,libgcrypt)
304 ("libgpg-error" ,libgpg-error)
307 ("openldap" ,openldap)
309 ("readline" ,readline)))
312 (modify-phases %standard-phases
313 (add-before 'configure 'patch-config-files
315 (substitute* "tests/openpgp/Makefile.in"
316 (("/bin/sh") (which "sh")))
318 (add-after 'install 'rename-v2-commands
319 (lambda* (#:key outputs #:allow-other-keys)
320 ;; Upstream suggests removing the trailing '2' from command names:
321 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
322 (let ((out (assoc-ref outputs "out")))
323 (with-directory-excursion (string-append out "/bin")
324 (rename-file "gpgv2" "gpgv")
325 (rename-file "gpg2" "gpg")
327 ;; Keep the old name around to ease transition.
328 (symlink "gpgv" "gpgv2")
329 (symlink "gpg" "gpg2")
332 (define-public gnupg-1
333 (package (inherit gnupg)
337 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
341 "1d1hz4szh1kvwhsw7w2zxa6q5ndrk3qy6hj289l1b8k3xi5s554m"))))
347 ("readline" ,readline)
348 ("libgpg-error" ,libgpg-error)))
351 (modify-phases %standard-phases
352 (add-after 'unpack 'patch-check-sh
354 (substitute* "checks/Makefile.in"
355 (("/bin/sh") (which "sh"))))))))))
364 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
368 "1ssc0gs02r4fasabk7c6v6r865k2j02mpb5g1vkpbmzsigdzwa8v"))))
369 (build-system gnu-build-system)
371 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
372 `(("libgpg-error" ,libgpg-error)))
374 `(("gnupg" ,gnupg-2.0)
375 ("libassuan" ,libassuan)))
378 (modify-phases %standard-phases
379 (add-after 'configure 'patch-cmake-file
381 ;; Work around <https://bugs.gnupg.org/gnupg/issue2877>.
382 (substitute* "lang/cpp/src/GpgmeppConfig.cmake.in"
383 (("@libsuffix@") ".so"))
385 (home-page "https://www.gnupg.org/related_software/gpgme/")
386 (synopsis "Library providing simplified access to GnuPG functionality")
388 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
389 easier for applications. It provides a High-Level Crypto API for encryption,
390 decryption, signing, signature verification and key management. Currently
391 it uses GnuPG as its backend but the API isn't restricted to this engine.
393 Because the direct use of GnuPG from an application can be a complicated
394 programming task, it is suggested that all software should try to use GPGME
395 instead. This way bug fixes or improvements can be done at a central place
396 and every application benefits from this.")
397 (license license:lgpl2.1+)))
399 (define-public qgpgme
405 (modify-phases %standard-phases
406 (add-before 'build 'chdir-and-symlink
407 (lambda* (#:key inputs #:allow-other-keys)
408 (let ((gpgme (assoc-ref inputs "gpgme")))
409 (symlink (string-append gpgme "/lib/libgpgmepp.la")
410 "lang/cpp/src/libgpgmepp.la")
411 (symlink (string-append gpgme "/lib/libgpgme.la")
416 `(("pkg-config" ,pkg-config)))
420 ,@(package-inputs gpgme)))
421 (synopsis "Qt API bindings for gpgme")
422 (description "QGpgme provides a very high level Qt API around GpgMEpp.
424 QGpgME was originally developed as part of libkleo and incorporated into
425 gpgpme starting with version 1.7.")
426 (license license:gpl2+))) ;; Note: this differs from gpgme
428 (define-public python-gpg
434 (uri (pypi-uri "gpg" version))
437 "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
438 (build-system python-build-system)
440 '(#:tests? #f)) ; No test suite.
445 (home-page (package-home-page gpgme))
446 (synopsis "Python bindings for GPGME GnuPG cryptography library")
447 (description "This package provides Python bindings to the GPGME GnuPG
448 cryptographic library. It is developed in the GPGME source code, and then
449 distributed separately.")
450 (license license:lgpl2.1+)))
452 (define-public python2-gpg
453 (package-with-python2 python-gpg))
455 (define-public python-pygpgme
457 (name "python-pygpgme")
462 (uri (pypi-uri "pygpgme" version))
465 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
466 ;; Unfortunately, we have to disable some tests due to some gpg-agent
468 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
469 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
470 "python-pygpgme-fix-pinentry-tests.patch"))))
473 (modify-phases %standard-phases
474 (add-before 'build 'make-build
476 (zero? (system* "make" "build"))))
479 (zero? (system* "make" "check")))))))
480 (build-system python-build-system)
482 `(("gnupg" ,gnupg-2.0)
484 (home-page "https://launchpad.net/pygpgme")
485 (synopsis "Python module for working with OpenPGP messages")
487 "PyGPGME is a Python module that lets you sign, verify, encrypt and
488 decrypt messages using the OpenPGP format by making use of GPGME.")
489 (license license:lgpl2.1+)))
491 (define-public python2-pygpgme
492 (package-with-python2 python-pygpgme))
494 (define-public python-gnupg
496 (name "python-gnupg")
501 (uri (pypi-uri "python-gnupg" version))
504 "0nkbs9c8f30lra7ca39kg91x8cyxn0jb61vih4qky839gpbwwwiq"))))
505 (build-system python-build-system)
508 (modify-phases %standard-phases
511 (substitute* "test_gnupg.py"
512 ;; Exported keys don't have a version line!
513 (("del k1\\[1\\]") "#")
514 ;; Unsure why this test fails.
515 (("'test_search_keys'") "True")
516 (("def test_search_keys") "def disabled__search_keys"))
517 (setenv "USERNAME" "guixbuilder")
518 ;; The doctests are extremely slow and sometimes time out,
519 ;; so we disable them.
520 (zero? (system* "python"
521 "test_gnupg.py" "--no-doctests")))))))
523 `(("gnupg" ,gnupg-1)))
524 (home-page "https://packages.python.org/python-gnupg/index.html")
525 (synopsis "Wrapper for the GNU Privacy Guard")
527 "This module allows easy access to GnuPG’s key management, encryption
528 and signature functionality from Python programs.")
529 (license license:bsd-3)))
531 (define-public python2-gnupg
532 (package-with-python2 python-gnupg))
534 (define-public perl-gnupg-interface
536 (name "perl-gnupg-interface")
540 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
541 "GnuPG-Interface-" version ".tar.gz"))
544 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
545 (build-system perl-build-system)
548 (modify-phases %standard-phases
549 ;; FIXME: This test fails for unknown reasons
550 (add-after 'unpack 'delete-broken-test
552 (delete-file "t/encrypt_symmetrically.t")
555 `(("gnupg" ,gnupg-1)))
557 `(("perl-moo" ,perl-moo)
558 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
559 ("perl-moox-late" ,perl-moox-late)))
562 ("perl-module-install" ,perl-module-install)))
563 (home-page "http://search.cpan.org/dist/GnuPG-Interface/")
564 (synopsis "Perl interface to GnuPG")
565 (description "@code{GnuPG::Interface} and its associated modules are
566 designed to provide an object-oriented method for interacting with GnuPG,
567 being able to perform functions such as but not limited to encrypting,
568 signing, decryption, verification, and key-listing parsing.")
569 (license license:perl-license)))
578 "https://github.com/jaymzh/pius/releases/download/v"
579 version "/pius-" version ".tar.bz2"))
582 "0lgc0ipwdfqbq16zax8kn17wbv8xyw4ygc09fawl2yp459z0ql4n"))))
583 (build-system python-build-system)
584 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
588 #:python ,python-2 ;uses the Python 2 'print' syntax
590 (modify-phases %standard-phases
592 'build 'set-gpg-file-name
593 (lambda* (#:key inputs outputs #:allow-other-keys)
594 (let* ((gpg (string-append (assoc-ref inputs "gpg")
596 (substitute* "libpius/constants.py"
597 (("/usr/bin/gpg2") gpg))
599 (synopsis "Programs to simplify GnuPG key signing")
601 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
602 parties. It is the main utility and makes it possible to quickly and easily
603 sign each UID on a set of PGP keys. It is designed to take the pain out of
604 the sign-all-the-keys part of PGP Keysigning Party while adding security
607 pius-keyring-mgr and pius-party-worksheet help organisers of
608 PGP keysigning parties.")
609 (license license:gpl2)
610 (home-page "https://www.phildev.net/pius/index.shtml")))
612 (define-public signing-party
614 (name "signing-party")
618 (uri (string-append "mirror://debian/pool/main/s/signing-party/"
619 "signing-party_" version ".orig.tar.gz"))
621 "1n5bpcfpl9vg1xp6r1jhbyahrgdyxp05b5pria1rh4m0qnv8sifr"))))
622 (build-system gnu-build-system)
624 `(("autoconf" ,(autoconf-wrapper))
625 ("automake" ,automake)))
626 (inputs `(("perl" ,perl)
627 ("perl-text-template" ,perl-text-template)
628 ("perl-mime-tools" ,perl-mime-tools)
629 ("perl-gnupg-interface" ,perl-gnupg-interface)
630 ("perl-net-idn-encode" ,perl-net-idn-encode)
635 (modify-phases %standard-phases
636 (add-before 'configure 'change-directory
638 ;; The build system in the unpack phase changes to a less useful
639 ;; subdirectory, so move up one level
640 (chdir (dirname (getcwd)))))
642 (lambda* (#:key outputs #:allow-other-keys)
643 (let ((out (assoc-ref outputs "out")))
644 (substitute* "keyanalyze/Makefile"
645 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
646 (substitute* "keyanalyze/Makefile"
647 (("\\./configure") (string-append "./configure --prefix=" out)))
648 (substitute* "gpgwrap/src/Makefile"
650 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
651 out "/bin/gpgwrap\n")))
652 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
653 "keylookup/Makefile" "sig2dot/Makefile"
654 "springgraph/Makefile")
656 (setenv "CONFIG_SHELL" (which "sh")))))
658 (lambda* (#:key outputs #:allow-other-keys #:rest args)
659 (let ((out (assoc-ref outputs "out"))
660 (install (assoc-ref %standard-phases 'install)))
664 (copy-file (string-append dir "/" file)
665 (string-append out "/bin/" file)))
666 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
667 "gpglist" "gpg-mailkeys" "gpgparticipants")
668 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
669 "gpglist" "gpg-mailkeys" "gpgparticipants"))
672 (copy-file (string-append dir "/" file)
673 (string-append out "/share/man/man1/" file)))
674 '("caff" "caff" "caff" "gpgdir"
675 "gpg-key2ps" "gpglist" "gpg-mailkeys"
676 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
677 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
678 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
679 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
680 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
681 "process_keys.1" "pgpring.1" "keyanalyze.1")))))
682 (add-after 'install 'wrap-programs
683 (lambda* (#:key outputs #:allow-other-keys)
684 (let* ((out (assoc-ref outputs "out")))
686 (string-append out "/bin/caff")
687 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))))))
688 (synopsis "Collection of scripts for simplifying gnupg key signing")
690 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
691 including tools for signing keys, keyring analysis, and party preparation.
693 @item caff: CA - Fire and Forget signs and mails a key
694 @item pgp-clean: removes all non-self signatures from key
695 @item pgp-fixkey: removes broken packets from keys
696 @item gpg-mailkeys: simply mail out a signed key to its owner
697 @item gpg-key2ps: generate PostScript file with fingerprint paper strips
698 @item gpgdir: recursive directory encryption tool
699 @item gpglist: show who signed which of your UIDs
700 @item gpgsigs: annotates list of GnuPG keys with already done signatures
701 @item gpgparticipants: create list of party participants for the organiser
702 @item gpgwrap: a passphrase wrapper
703 @item keyanalyze: minimum signing distance (MSD) analysis on keyrings
704 @item keylookup: ncurses wrapper around gpg --search
705 @item sig2dot: converts a list of GnuPG signatures to a .dot file
706 @item springgraph: creates a graph from a .dot file
708 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
709 ;; and caff and gpgsigs: bsd-3, see
710 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
711 (license license:gpl2)
712 (home-page "https://pgp-tools.alioth.debian.org/")))
714 (define-public pinentry-tty
716 (name "pinentry-tty")
720 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
724 "0ni7g4plq6x78p32al7m8h2zsakvg1rhfz0qbc3kdc7yq7nw4whn"))))
725 (build-system gnu-build-system)
727 `(#:configure-flags '("--enable-pinentry-tty")))
729 `(("ncurses" ,ncurses)
730 ("libassuan" ,libassuan)
731 ("libsecret" ,libsecret "out")))
733 `(("pkg-config" ,pkg-config)))
734 (home-page "https://gnupg.org/aegypten2/")
735 (synopsis "GnuPG's interface to passphrase input")
737 "Pinentry provides a console that allows users to enter a passphrase when
738 @code{gpg} is run and needs it.")
739 (license license:gpl2+)))
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+)))