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