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>
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
93 (replacement libgcrypt/fixed)
98 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
102 "16f1rsv4y4w2pk1il2jbcqggsb6mrlfva5vayd205fp68zm7d0ll"))))
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 libgcrypt/fixed
134 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
138 "1cvqd9jk5qshbh48yh3ixw4zyr4n5k50r3475rrh20xfn7w7aa3s"))))))
140 (define-public libassuan
147 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
151 "0jb4nb4nrjr949gd3lw8lh4v5d6qigxaq6xwy24w5apjnhvnrya7"))))
152 (build-system gnu-build-system)
154 `(("libgpg-error" ,libgpg-error)
156 (home-page "https://gnupg.org")
158 "IPC library used by GnuPG and related software")
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
164 (license license:lgpl2.0+)
165 (properties '((ftp-server . "ftp.gnupg.org")
166 (ftp-directory . "/gcrypt/libassuan")))))
168 (define-public libksba
176 "mirror://gnupg/libksba/libksba-"
180 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
181 (build-system gnu-build-system)
183 `(("libgpg-error" ,libgpg-error)))
185 `(("libgpg-error" ,libgpg-error)))
188 (list ,@(if (%current-target-system)
189 '("CC_FOR_BUILD=gcc")
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")
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")))))
210 (uri (string-append "mirror://gnupg/npth/npth-" version ".tar.bz2"))
213 "1hmkkp6vzyrh8v01c2ynzf9vwikyagp7p1lxhbnr4ysk3w66jji9"))))
214 (build-system gnu-build-system)
215 (home-page "https://www.gnupg.org")
216 (synopsis "Non-preemptive thread library")
218 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
219 threads implementation.
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
232 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
236 "1d4482c4pbi0p1k8cc0f9c4q51k56v8navrbz5samxrrs42p3lyb"))))
237 (build-system gnu-build-system)
239 `(("pkg-config" ,pkg-config)))
244 ("libassuan" ,libassuan)
245 ("libgcrypt" ,libgcrypt)
246 ("libgpg-error" ,libgpg-error)
249 ("openldap" ,openldap)
250 ("pcsc-lite" ,pcsc-lite)
251 ("readline" ,readline)
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")
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")
269 (add-after 'build 'patch-scheme-tests
271 (substitute* (find-files "tests" ".\\.scm$")
272 (("/usr/bin/env gpgscm")
273 (string-append (getcwd) "/tests/gpgscm/gpgscm")))
275 (add-before 'build 'patch-test-paths
277 (substitute* '("tests/inittests"
278 "tests/pkits/inittests"
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")))
288 (home-page "https://gnupg.org/")
289 (synopsis "GNU Privacy Guard")
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")))))
301 (define-public gnupg-2.0
302 (package (inherit gnupg)
306 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
310 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
316 ("libassuan" ,libassuan)
317 ("libgcrypt" ,libgcrypt)
318 ("libgpg-error" ,libgpg-error)
321 ("openldap" ,openldap)
323 ("readline" ,readline)))
326 (modify-phases %standard-phases
327 (add-before 'configure 'patch-config-files
329 (substitute* "tests/openpgp/Makefile.in"
330 (("/bin/sh") (which "sh")))
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")
341 ;; Keep the old name around to ease transition.
342 (symlink "gpgv" "gpgv2")
343 (symlink "gpg" "gpg2")
346 (define-public gnupg-1
347 (package (inherit gnupg)
351 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
355 "1d1hz4szh1kvwhsw7w2zxa6q5ndrk3qy6hj289l1b8k3xi5s554m"))))
361 ("readline" ,readline)
362 ("libgpg-error" ,libgpg-error)))
365 (modify-phases %standard-phases
366 (add-after 'unpack 'patch-check-sh
368 (substitute* "checks/Makefile.in"
369 (("/bin/sh") (which "sh"))))))))))
378 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
382 "1ssc0gs02r4fasabk7c6v6r865k2j02mpb5g1vkpbmzsigdzwa8v"))))
383 (build-system gnu-build-system)
385 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
386 `(("libgpg-error" ,libgpg-error)))
388 `(("gnupg" ,gnupg-2.0)
389 ("libassuan" ,libassuan)))
392 (modify-phases %standard-phases
393 (add-after 'configure 'patch-cmake-file
395 ;; Work around <https://bugs.gnupg.org/gnupg/issue2877>.
396 (substitute* "lang/cpp/src/GpgmeppConfig.cmake.in"
397 (("@libsuffix@") ".so"))
399 (home-page "https://www.gnupg.org/related_software/gpgme/")
400 (synopsis "Library providing simplified access to GnuPG functionality")
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.
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+)))
413 (define-public qgpgme
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")
430 `(("pkg-config" ,pkg-config)))
434 ,@(package-inputs gpgme)))
435 (synopsis "Qt API bindings for gpgme")
436 (description "QGpgme provides a very high level Qt API around GpgMEpp.
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
442 (define-public python-gpg
448 (uri (pypi-uri "gpg" version))
451 "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd"))))
452 (build-system python-build-system)
454 '(#:tests? #f)) ; No test suite.
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+)))
466 (define-public python2-gpg
467 (package-with-python2 python-gpg))
469 (define-public python-pygpgme
471 (name "python-pygpgme")
476 (uri (pypi-uri "pygpgme" version))
479 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
480 ;; Unfortunately, we have to disable some tests due to some gpg-agent
482 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
483 (patches (search-patches "pygpgme-disable-problematic-tests.patch"
484 "python-pygpgme-fix-pinentry-tests.patch"))))
487 (modify-phases %standard-phases
488 (add-before 'build 'make-build
490 (zero? (system* "make" "build"))))
493 (zero? (system* "make" "check")))))))
494 (build-system python-build-system)
496 `(("gnupg" ,gnupg-2.0)
498 (home-page "https://launchpad.net/pygpgme")
499 (synopsis "Python module for working with OpenPGP messages")
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+)))
505 (define-public python2-pygpgme
506 (package-with-python2 python-pygpgme))
508 (define-public python-gnupg
510 (name "python-gnupg")
515 (uri (pypi-uri "python-gnupg" version))
518 "0nkbs9c8f30lra7ca39kg91x8cyxn0jb61vih4qky839gpbwwwiq"))))
519 (build-system python-build-system)
522 (modify-phases %standard-phases
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")))))))
537 `(("gnupg" ,gnupg-1)))
538 (home-page "https://packages.python.org/python-gnupg/index.html")
539 (synopsis "Wrapper for the GNU Privacy Guard")
541 "This module allows easy access to GnuPG’s key management, encryption
542 and signature functionality from Python programs.")
543 (license license:bsd-3)))
545 (define-public python2-gnupg
546 (package-with-python2 python-gnupg))
548 (define-public perl-gnupg-interface
550 (name "perl-gnupg-interface")
554 (uri (string-append "mirror://cpan/authors/id/A/AL/ALEXMV/"
555 "GnuPG-Interface-" version ".tar.gz"))
558 "0dgx8yhdsmhkazcrz14n4flrk1afv7azgl003hl4arxvi1d9yyi4"))))
559 (build-system perl-build-system)
562 (modify-phases %standard-phases
563 ;; FIXME: This test fails for unknown reasons
564 (add-after 'unpack 'delete-broken-test
566 (delete-file "t/encrypt_symmetrically.t")
569 `(("gnupg" ,gnupg-1)))
571 `(("perl-moo" ,perl-moo)
572 ("perl-moox-handlesvia" ,perl-moox-handlesvia)
573 ("perl-moox-late" ,perl-moox-late)))
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)))
592 "https://github.com/jaymzh/pius/releases/download/v"
593 version "/pius-" version ".tar.bz2"))
596 "0lgc0ipwdfqbq16zax8kn17wbv8xyw4ygc09fawl2yp459z0ql4n"))))
597 (build-system python-build-system)
598 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
602 #:python ,python-2 ;uses the Python 2 'print' syntax
604 (modify-phases %standard-phases
606 'build 'set-gpg-file-name
607 (lambda* (#:key inputs outputs #:allow-other-keys)
608 (let* ((gpg (string-append (assoc-ref inputs "gpg")
610 (substitute* "libpius/constants.py"
611 (("/usr/bin/gpg2") gpg))
613 (synopsis "Programs to simplify GnuPG key signing")
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
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")))
626 (define-public signing-party
628 (name "signing-party")
632 (uri (string-append "mirror://debian/pool/main/s/signing-party/"
633 "signing-party_" version ".orig.tar.gz"))
635 "1n5bpcfpl9vg1xp6r1jhbyahrgdyxp05b5pria1rh4m0qnv8sifr"))))
636 (build-system gnu-build-system)
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)
649 (modify-phases %standard-phases
650 (add-before 'configure 'change-directory
652 ;; The build system in the unpack phase changes to a less useful
653 ;; subdirectory, so move up one level
654 (chdir (dirname (getcwd)))))
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"
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")
670 (setenv "CONFIG_SHELL" (which "sh")))))
672 (lambda* (#:key outputs #:allow-other-keys #:rest args)
673 (let ((out (assoc-ref outputs "out"))
674 (install (assoc-ref %standard-phases 'install)))
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"))
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")))
700 (string-append out "/bin/caff")
701 `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))))))
702 (synopsis "Collection of scripts for simplifying gnupg key signing")
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.
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
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/")))
728 (define-public pinentry-tty
730 (name "pinentry-tty")
734 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
738 "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8"))))
739 (build-system gnu-build-system)
741 `(#:configure-flags '("--enable-pinentry-tty")))
743 `(("ncurses" ,ncurses)
744 ("libassuan" ,libassuan)
745 ("libsecret" ,libsecret "out")))
747 `(("pkg-config" ,pkg-config)))
748 (home-page "https://gnupg.org/aegypten2/")
749 (synopsis "GnuPG's interface to passphrase input")
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")))))
758 (define-public pinentry-gtk2
760 (inherit pinentry-tty)
761 (name "pinentry-gtk2")
765 ,@(package-inputs pinentry-tty)))
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.")))
770 (define-public pinentry-gnome3
772 (inherit pinentry-tty)
773 (name "pinentry-gnome3")
778 ,@(package-inputs pinentry-tty)))
780 `(#:configure-flags '("--enable-pinentry-gnome3")))
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
786 (define-public pinentry-qt
788 (inherit pinentry-tty)
792 ,@(package-inputs pinentry-tty)))
794 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
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.")))
799 (define-public pinentry
800 (package (inherit pinentry-gtk2)
803 (define-public paperkey
809 (uri (string-append "http://www.jabberwocky.com/"
810 "software/paperkey/paperkey-"
814 "1yybj8bj68v4lxwpn596b6ismh2fyixw5vlqqg26byrn4d9dfmsv"))))
815 (build-system gnu-build-system)
818 (modify-phases %standard-phases
819 (add-before 'check 'patch-check-scripts
821 (substitute* '("checks/roundtrip.sh"
822 "checks/roundtrip-raw.sh")
823 (("/bin/echo") "echo"))
825 (home-page "http://www.jabberwocky.com/software/paperkey/")
826 (synopsis "Backup OpenPGP keys to paper")
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+)))
841 (uri (string-append "mirror://gnupg/gpa/"
842 name "-" version ".tar.bz2"))
845 "09xphbi2456qynwqq5n0yh0zdmdi2ggrj3wk4hsyh5lrzlvcrff3"))))
846 (build-system gnu-build-system)
848 `(("pkg-config" ,pkg-config)))
852 ("libassuan" ,libassuan)
853 ("libgpg-error" ,libgpg-error)
855 (home-page "https://gnupg.org/software/gpa/")
856 (synopsis "Graphical user interface for GnuPG")
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+)))
863 (define-public parcimonie
869 (uri (string-append "https://gaffer.ptitcanardnoir.org/"
870 "intrigeri/files/parcimonie/App-Parcimonie-"
874 "1kf891117s1f3k6lxvbjdb21va9gxh29vlp9bd664ssgw266rcyb"))))
875 (build-system perl-build-system)
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)))
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"
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")
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")
938 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
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
948 (license license:gpl1+)))