gnu: sane-backends: Update to 1.0.25.
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
63e8bb12 2;;; Copyright © 2012, 2013, 2014, 2015, 2016 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>
4f2ca234 7;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
ec089763 8;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
a05d1d82 9;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
81068f17 10;;; Copyright © 2016 Nils Gillmann <ng0@libertad.pw>
8d1939e4 11;;;
233e7676 12;;; This file is part of GNU Guix.
8d1939e4 13;;;
233e7676 14;;; GNU Guix is free software; you can redistribute it and/or modify it
8d1939e4
LC
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
233e7676 19;;; GNU Guix is distributed in the hope that it will be useful, but
8d1939e4
LC
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
233e7676 25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
8d1939e4 26
1ffa7090 27(define-module (gnu packages gnupg)
07157e8a 28 #:use-module ((guix licenses) #:prefix license:)
a05d1d82 29 #:use-module (gnu packages)
7b40296f 30 #:use-module (gnu packages adns)
01e11826
AE
31 #:use-module (gnu packages curl)
32 #:use-module (gnu packages openldap)
ea4d96c6 33 #:use-module (gnu packages perl)
1ffa7090 34 #:use-module (gnu packages pth)
ea4d96c6 35 #:use-module (gnu packages python)
54df7558 36 #:use-module (gnu packages qt)
1ffa7090 37 #:use-module (gnu packages readline)
07157e8a 38 #:use-module (gnu packages compression)
2d12284d 39 #:use-module (gnu packages databases)
40d806af
LC
40 #:use-module (gnu packages gtk)
41 #:use-module (gnu packages glib)
d1d75c6a 42 #:use-module (gnu packages gnome)
40d806af
LC
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages ncurses)
a7fd7b68 45 #:use-module (gnu packages tls)
8d1939e4 46 #:use-module (guix packages)
87f5d366 47 #:use-module (guix download)
14e2e44d
LC
48 #:use-module (guix build-system gnu)
49 #:use-module (guix build-system python))
8d1939e4
LC
50
51(define-public libgpg-error
52 (package
53 (name "libgpg-error")
f10e7ef4 54 (version "1.22")
8d1939e4
LC
55 (source
56 (origin
87f5d366 57 (method url-fetch)
0db342a5 58 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
8d1939e4
LC
59 version ".tar.bz2"))
60 (sha256
61 (base32
f10e7ef4 62 "0ywxwswizmkyciy480kzczxn6nhbgzf3z8my4nk43nvv67k4x87j"))))
8d1939e4 63 (build-system gnu-build-system)
72fb1b24 64 (home-page "https://gnupg.org")
35b9e423 65 (synopsis "Library of error values for GnuPG components")
8d1939e4
LC
66 (description
67 "Libgpg-error is a small library that defines common error values
68for all GnuPG components. Among these are GPG, GPGSM, GPGME,
69GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
70Daemon and possibly more in the future.")
63e8bb12
LC
71 (license license:lgpl2.0+)
72 (properties '((ftp-server . "ftp.gnupg.org")
73 (ftp-directory . "/gcrypt/libgpg-error")))))
8d1939e4
LC
74
75(define-public libgcrypt
76 (package
77 (name "libgcrypt")
67f5adba 78 (replacement libgcrypt-1.7.3)
81068f17 79 (version "1.7.0")
84a3e3b7
LC
80 (source (origin
81 (method url-fetch)
82 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
83 version ".tar.bz2"))
84 (sha256
85 (base32
81068f17 86 "14pspxwrqcgfklw3dgmywbxqwdzcym7fznfrqh9rk4vl8jkpxrmh"))))
8d1939e4
LC
87 (build-system gnu-build-system)
88 (propagated-inputs
e0932742 89 `(("libgpg-error-host" ,libgpg-error)))
e766f699
JD
90 (native-inputs
91 ;; Needed here for the 'gpg-error' program.
e0932742 92 `(("libgpg-error-native" ,libgpg-error)))
e766f699
JD
93 (arguments
94 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
95 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
96 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
97 `(#:configure-flags
98 (list (string-append "--with-gpg-error-prefix="
e0932742 99 (assoc-ref %build-inputs "libgpg-error-host")))))
40fed2d8 100 (outputs '("out" "debug"))
72fb1b24 101 (home-page "https://gnupg.org/")
f50d2669 102 (synopsis "Cryptographic function library")
8d1939e4 103 (description
a22dc0c4
LC
104 "Libgcrypt is a general-purpose cryptographic library. It provides the
105standard cryptographic building blocks such as symmetric ciphers, hash
106algorithms, public key algorithms, large integer functions and random number
107generation.")
63e8bb12
LC
108 (license license:lgpl2.0+)
109 (properties '((ftp-server . "ftp.gnupg.org")
110 (ftp-directory . "/gcrypt/libgcrypt")))))
8d1939e4 111
69aa6e09 112(define libgcrypt-1.7.3
67f5adba
MW
113 (package
114 (inherit libgcrypt)
b1cb9f28
LC
115 (version "1.7.3")
116 (source (origin
117 (method url-fetch)
118 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
119 version ".tar.bz2"))
120 (sha256
121 (base32
122 "0wbh6fq5zi9wg2xcfvfpwh7dv52jihivx1vm4h91c2kx0w8n3b6x"))))))
67f5adba 123
a53421fd
AE
124(define-public libgcrypt-1.5
125 (package (inherit libgcrypt)
90e20240 126 (replacement libgcrypt-1.5.6)
460f97f8 127 (version "1.5.4")
a53421fd
AE
128 (source
129 (origin
130 (method url-fetch)
131 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
132 version ".tar.bz2"))
133 (sha256
134 (base32
460f97f8 135 "0czvqxkzd5y872ipy6s010ifwdwv29sqbnqc4pf56sd486gqvy6m"))))))
a53421fd 136
69aa6e09 137(define libgcrypt-1.5.6
90e20240
MW
138 (package
139 (inherit libgcrypt-1.5)
140 (source
141 (let ((version "1.5.6"))
142 (origin
143 (method url-fetch)
144 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
145 version ".tar.bz2"))
146 (sha256
147 (base32
148 "0ydy7bgra5jbq9mxl5x031nif3m6y3balc6ndw2ngj11wnsjc61h")))))))
149
8d1939e4
LC
150(define-public libassuan
151 (package
152 (name "libassuan")
f04a7943 153 (version "2.4.3")
8d1939e4
LC
154 (source
155 (origin
87f5d366 156 (method url-fetch)
0db342a5 157 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
8d1939e4
LC
158 version ".tar.bz2"))
159 (sha256
160 (base32
f04a7943 161 "0w9bmasln4z8mn16s1is55a06w3nv8jbyal496z5jvr5vcxkm112"))))
8d1939e4
LC
162 (build-system gnu-build-system)
163 (propagated-inputs
164 `(("libgpg-error" ,libgpg-error) ("pth" ,pth)))
72fb1b24 165 (home-page "https://gnupg.org")
8d1939e4 166 (synopsis
35b9e423 167 "IPC library used by GnuPG and related software")
8d1939e4
LC
168 (description
169 "Libassuan is a small library implementing the so-called Assuan
170protocol. This protocol is used for IPC between most newer
171GnuPG components. Both, server and client side functions are
172provided.")
63e8bb12
LC
173 (license license:lgpl2.0+)
174 (properties '((ftp-server . "ftp.gnupg.org")
175 (ftp-directory . "/gcrypt/libassuan")))))
8d1939e4
LC
176
177(define-public libksba
178 (package
179 (name "libksba")
c95f7160 180 (version "1.3.5")
8d1939e4
LC
181 (source
182 (origin
87f5d366 183 (method url-fetch)
8d1939e4 184 (uri (string-append
0db342a5 185 "mirror://gnupg/libksba/libksba-"
8d1939e4
LC
186 version ".tar.bz2"))
187 (sha256
188 (base32
c95f7160 189 "0h53q4sns1jz1pkmhcz5wp9qrfn9f5g9i3vjv6dafwzzlvblyi21"))))
8d1939e4
LC
190 (build-system gnu-build-system)
191 (propagated-inputs
192 `(("libgpg-error" ,libgpg-error)))
e766f699
JD
193 (native-inputs
194 `(("libgpg-error" ,libgpg-error)))
195 (arguments
196 `(#:configure-flags
197 (list ,@(if (%current-target-system)
198 '("CC_FOR_BUILD=gcc")
199 '())
200 (string-append "--with-gpg-error-prefix="
201 (assoc-ref %build-inputs "libgpg-error")))))
72fb1b24 202 (home-page "https://www.gnupg.org")
35b9e423 203 (synopsis "CMS and X.509 access library")
8d1939e4
LC
204 (description
205 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
206as well as the CMS easily accessible by other applications. Both
207specifications are building blocks of S/MIME and TLS.")
63e8bb12
LC
208 (license license:gpl3+)
209 (properties '((ftp-server . "ftp.gnupg.org")
210 (ftp-directory . "/gcrypt/libksba")))))
8d1939e4 211
c18ea90f
AE
212(define-public npth
213 (package
214 (name "npth")
b96485b9 215 (version "1.2")
c18ea90f
AE
216 (source
217 (origin
218 (method url-fetch)
219 (uri (string-append
220 "mirror://gnupg/npth/npth-"
221 version ".tar.bz2"))
222 (sha256
223 (base32
b96485b9 224 "12n0nvhw4fzwp0k7gjv3rc6pdml0qiinbbfiz4ilg6pl5kdxvnvd"))))
c18ea90f 225 (build-system gnu-build-system)
72fb1b24 226 (home-page "https://www.gnupg.org")
c18ea90f
AE
227 (synopsis "Non-preemptive thread library")
228 (description
229 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
230threads implementation.
231
232In contrast to GNU Pth is is based on the system's standard threads
233implementation. This allows the use of libraries which are not
234compatible to GNU Pth.")
07157e8a 235 (license (list license:lgpl3+ license:gpl2+)))) ; dual license
c18ea90f 236
8d1939e4
LC
237(define-public gnupg
238 (package
239 (name "gnupg")
1ee4274c 240 (version "2.1.13")
58970d6a
LC
241 (source (origin
242 (method url-fetch)
243 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
244 ".tar.bz2"))
d404a6f9 245 (patches (search-patches "gnupg-fix-expired-test.patch"))
58970d6a
LC
246 (sha256
247 (base32
1ee4274c 248 "0xcn46vcb5x5qx0bc803vpzhzhnn6wfhp7x71w9n1ahx4ak877ag"))))
8d1939e4 249 (build-system gnu-build-system)
08fa45b1
MW
250 (native-inputs
251 `(("pkg-config" ,pkg-config)))
8d1939e4 252 (inputs
b65249cc
EF
253 `(("adns" ,adns)
254 ("bzip2" ,bzip2)
01e11826 255 ("curl" ,curl)
08fa45b1 256 ("gnutls" ,gnutls)
8d1939e4
LC
257 ("libassuan" ,libassuan)
258 ("libgcrypt" ,libgcrypt)
01e11826 259 ("libgpg-error" ,libgpg-error)
8d1939e4 260 ("libksba" ,libksba)
cd064df7 261 ("npth" ,npth)
01e11826 262 ("openldap" ,openldap)
2d12284d
EF
263 ("readline" ,readline)
264 ("sqlite" ,sqlite)
265 ("zlib" ,zlib)))
30e9cbb4 266 (arguments
163708a6
LF
267 `(#:configure-flags '("--enable-gpg2-is-gpg")
268 #:phases
45477c6a
EF
269 (modify-phases %standard-phases
270 (add-before 'configure 'patch-config-files
271 (lambda _
272 (substitute* "tests/openpgp/defs.inc"
273 (("/bin/pwd") (which "pwd")))
274 #t)))))
72fb1b24 275 (home-page "https://gnupg.org/")
f50d2669 276 (synopsis "GNU Privacy Guard")
8d1939e4 277 (description
a22dc0c4
LC
278 "The GNU Privacy Guard is a complete implementation of the OpenPGP
279standard. It is used to encrypt and sign data and communication. It
280features powerful key management and the ability to access public key
79c311b8 281servers. It includes several libraries: libassuan (IPC between GnuPG
58970d6a
LC
282components), libgpg-error (centralized GnuPG error values), and
283libskba (working with X.509 certificates and CMS data).")
63e8bb12
LC
284 (license license:gpl3+)
285 (properties '((ftp-server . "ftp.gnupg.org")
286 (ftp-directory . "/gcrypt/gnupg")))))
ea4d96c6 287
cd064df7
AE
288(define-public gnupg-2.0
289 (package (inherit gnupg)
b5afe6f0 290 (version "2.0.30")
cd064df7
AE
291 (source (origin
292 (method url-fetch)
293 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
294 ".tar.bz2"))
295 (sha256
296 (base32
b5afe6f0 297 "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3"))))
08fa45b1 298 (native-inputs '())
cd064df7 299 (inputs
7b40296f
EF
300 `(("adns" ,adns)
301 ("bzip2" ,bzip2)
cd064df7
AE
302 ("curl" ,curl)
303 ("libassuan" ,libassuan)
304 ("libgcrypt" ,libgcrypt)
305 ("libgpg-error" ,libgpg-error)
306 ("libksba" ,libksba)
307 ("pth" ,pth)
308 ("openldap" ,openldap)
07157e8a 309 ("zlib" ,zlib)
cd064df7
AE
310 ("readline" ,readline)))
311 (arguments
312 `(#:phases
80c47cf8 313 (modify-phases %standard-phases
6b547d22
LC
314 (add-before 'configure 'patch-config-files
315 (lambda _
316 (substitute* "tests/openpgp/Makefile.in"
80c47cf8 317 (("/bin/sh") (which "bash")))
bc85b127
LC
318 #t))
319 (add-after 'install 'rename-v2-commands
320 (lambda* (#:key outputs #:allow-other-keys)
321 ;; Upstream suggests removing the trailing '2' from command names:
322 ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>.
323 (let ((out (assoc-ref outputs "out")))
324 (with-directory-excursion (string-append out "/bin")
325 (rename-file "gpgv2" "gpgv")
326 (rename-file "gpg2" "gpg")
327
328 ;; Keep the old name around to ease transition.
329 (symlink "gpgv" "gpgv2")
330 (symlink "gpg" "gpg2")
331 #t)))))))))
cd064df7 332
5249045c
MW
333(define-public gnupg-1
334 (package (inherit gnupg)
866b05fd 335 (version "1.4.21")
58970d6a
LC
336 (source (origin
337 (method url-fetch)
338 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
339 ".tar.bz2"))
340 (sha256
341 (base32
866b05fd 342 "0xi2mshq8f6zbarb5f61c9w2qzwrdbjm4q8fqsrwlzc51h8a6ivb"))))
08fa45b1 343 (native-inputs '())
5249045c 344 (inputs
07157e8a
LC
345 `(("zlib" ,zlib)
346 ("bzip2" ,bzip2)
5249045c
MW
347 ("curl" ,curl)
348 ("readline" ,readline)
349 ("libgpg-error" ,libgpg-error)))
350 (arguments
29d90757
LF
351 `(#:phases
352 (modify-phases %standard-phases
353 (add-after 'unpack 'patch-check-sh
354 (lambda _
355 (substitute* "checks/Makefile.in"
356 (("/bin/sh") (which "bash"))))))))))
5249045c 357
09d5c166
AE
358(define-public gpgme
359 (package
360 (name "gpgme")
231dd023 361 (version "1.6.0")
09d5c166
AE
362 (source
363 (origin
364 (method url-fetch)
365 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
366 ".tar.bz2"))
367 (sha256
368 (base32
231dd023 369 "17892sclz3yg45wbyqqrzzpq3l0icbnfl28f101b3062g8cy97dh"))))
09d5c166 370 (build-system gnu-build-system)
68640c3c
MW
371 (propagated-inputs
372 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
373 `(("libgpg-error" ,libgpg-error)))
09d5c166 374 (inputs
ae3bded6 375 `(("gnupg" ,gnupg-2.0)
68640c3c 376 ("libassuan" ,libassuan)))
e6a83df1 377 (arguments '(#:make-flags '("GPG=gpg2")))
72fb1b24 378 (home-page "https://www.gnupg.org/related_software/gpgme/")
35b9e423 379 (synopsis "Library providing simplified access to GnuPG functionality")
09d5c166
AE
380 (description
381 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
382easier for applications. It provides a High-Level Crypto API for encryption,
383decryption, signing, signature verification and key management. Currently
384it uses GnuPG as its backend but the API isn't restricted to this engine.
385
386Because the direct use of GnuPG from an application can be a complicated
387programming task, it is suggested that all software should try to use GPGME
388instead. This way bug fixes or improvements can be done at a central place
389and every application benefits from this.")
07157e8a 390 (license license:lgpl2.1+)))
09d5c166 391
a05d1d82
CAW
392(define-public python-pygpgme
393 (package
394 (name "python-pygpgme")
395 (version "0.3")
396 (source
397 (origin
398 (method url-fetch)
399 (uri (pypi-uri "pygpgme" version))
400 (sha256
401 (base32
402 "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z"))
403 ;; Unfortunately, we have to disable some tests due to some gpg-agent
404 ;; goofiness... see:
405 ;; https://bugs.launchpad.net/pygpgme/+bug/999949
fc1adab1 406 (patches (search-patches "pygpgme-disable-problematic-tests.patch"))))
a05d1d82
CAW
407 (arguments
408 `(#:phases
409 (modify-phases %standard-phases
410 (add-before 'build 'make-build
411 (lambda _
412 (zero? (system* "make" "build"))))
413 (replace 'check
414 (lambda _
415 (zero? (system* "make" "check")))))))
416 (build-system python-build-system)
417 (inputs
a7843522 418 `(("gnupg" ,gnupg-2.0)
a05d1d82
CAW
419 ("gpgme" ,gpgme)))
420 (home-page "https://launchpad.net/pygpgme")
421 (synopsis "Python module for working with OpenPGP messages")
422 (description
423 "PyGPGME is a Python module that lets you sign, verify, encrypt and
424decrypt messages using the OpenPGP format by making use of GPGME.")
425 (license license:lgpl2.1+)))
426
427(define-public python2-pygpgme
a7843522
EF
428 (let ((base (package-with-python2 python-pygpgme)))
429 (package
430 (inherit base)
431 (native-inputs
432 `(("python2-setuptools" ,python2-setuptools)
433 ,@(package-native-inputs base))))))
a05d1d82 434
22af9029
RW
435(define-public python-gnupg
436 (package
437 (name "python-gnupg")
5b669ba1 438 (version "0.3.8")
22af9029
RW
439 (source
440 (origin
441 (method url-fetch)
5b669ba1 442 (uri (pypi-uri "python-gnupg" version))
22af9029
RW
443 (sha256
444 (base32
5b669ba1 445 "0nkbs9c8f30lra7ca39kg91x8cyxn0jb61vih4qky839gpbwwwiq"))))
22af9029
RW
446 (build-system python-build-system)
447 (arguments
448 `(#:phases
449 (modify-phases %standard-phases
450 (replace 'check
ec089763
RW
451 (lambda _
452 (substitute* "test_gnupg.py"
453 ;; Exported keys don't have a version line!
454 (("del k1\\[1\\]") "#")
455 ;; Unsure why this test fails.
456 (("'test_search_keys'") "True")
457 (("def test_search_keys") "def disabled__search_keys"))
458 (setenv "USERNAME" "guixbuilder")
459 ;; The doctests are extremely slow and sometimes time out,
460 ;; so we disable them.
461 (zero? (system* "python"
462 "test_gnupg.py" "--no-doctests")))))))
22af9029
RW
463 (native-inputs
464 `(("gnupg" ,gnupg-1)))
72fb1b24 465 (home-page "https://packages.python.org/python-gnupg/index.html")
22af9029
RW
466 (synopsis "Wrapper for the GNU Privacy Guard")
467 (description
468 "This module allows easy access to GnuPG’s key management, encryption
469and signature functionality from Python programs.")
470 (license license:bsd-3)))
471
472(define-public python2-gnupg
473 (package-with-python2 python-gnupg))
474
ea4d96c6
AE
475(define-public pius
476 (package
477 (name "pius")
11b953a1 478 (version "2.2.2")
ea4d96c6
AE
479 (source (origin
480 (method url-fetch)
e2e3600f
LC
481 (uri (string-append
482 "https://github.com/jaymzh/pius/releases/download/v"
483 version "/pius-" version ".tar.bz2"))
484 (sha256
485 (base32
11b953a1 486 "0k94mlr7l12mplph7pdgjbampqha47d8mfjq69n4xm80qwbn1rq1"))))
14e2e44d
LC
487 (build-system python-build-system)
488 (inputs `(("perl" ,perl) ;for 'pius-party-worksheet'
31fbf4b6 489 ("gpg" ,gnupg-2.0))) ;2.1 fails to talk to gpg-agent 2.0
ea4d96c6
AE
490 (arguments
491 `(#:tests? #f
14e2e44d 492 #:python ,python-2 ;uses the Python 2 'print' syntax
ea4d96c6 493 #:phases
14e2e44d
LC
494 (modify-phases %standard-phases
495 (add-before
496 'build 'set-gpg-file-name
497 (lambda* (#:key inputs outputs #:allow-other-keys)
498 (let* ((gpg (string-append (assoc-ref inputs "gpg")
d4b1977f 499 "/bin/gpg")))
14e2e44d 500 (substitute* "libpius/constants.py"
e2e3600f 501 (("/usr/bin/gpg2") gpg))))))))
9eed6f9b 502 (synopsis "Programs to simplify GnuPG key signing")
ea4d96c6
AE
503 (description
504 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
35b9e423
EB
505parties. It is the main utility and makes it possible to quickly and easily
506sign each UID on a set of PGP keys. It is designed to take the pain out of
ea4d96c6
AE
507the sign-all-the-keys part of PGP Keysigning Party while adding security
508to the process.
509
510pius-keyring-mgr and pius-party-worksheet help organisers of
511PGP keysigning parties.")
07157e8a 512 (license license:gpl2)
72fb1b24 513 (home-page "https://www.phildev.net/pius/index.shtml")))
96be765c
AE
514
515(define-public signing-party
516 (package
517 (name "signing-party")
518 (version "1.1.4")
519 (source (origin
520 (method url-fetch)
807143b6
EF
521 (uri (string-append "mirror://debian/pool/main/s/signing-party/"
522 "signing-party_" version ".orig.tar.gz"))
96be765c
AE
523 (sha256 (base32
524 "188gp0prbh8qs29lq3pbf0qibfd6jq4fk7i0pfrybl8aahvm84rx"))))
525 (build-system gnu-build-system)
526 (inputs `(("perl" ,perl)))
527 (arguments
528 `(#:tests? #f
529 #:phases
6a90a614
EF
530 (modify-phases %standard-phases
531 (add-after 'unpack 'remove-spurious-links
532 (lambda _ (delete-file "keyanalyze/pgpring/depcomp")))
533 (replace 'configure
534 (lambda* (#:key outputs #:allow-other-keys)
535 (let ((out (assoc-ref outputs "out")))
536 (substitute* "keyanalyze/Makefile"
537 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
538 (substitute* "keyanalyze/Makefile"
539 (("./configure") (string-append "./configure --prefix=" out)))
540 (substitute* "keyanalyze/pgpring/configure"
541 (("/bin/sh") (which "bash")))
542 (substitute* "gpgwrap/Makefile"
543 (("\\} clean")
544 (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
545 out "/bin/gpgwrap\n")))
546 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
547 "keylookup/Makefile" "sig2dot/Makefile"
548 "springgraph/Makefile")
549 (("/usr") out)))))
550 (replace 'install
551 (lambda* (#:key outputs #:allow-other-keys #:rest args)
552 (let ((out (assoc-ref outputs "out"))
553 (install (assoc-ref %standard-phases 'install)))
554 (apply install args)
555 (for-each
556 (lambda (dir file)
557 (copy-file (string-append dir "/" file)
558 (string-append out "/bin/" file)))
559 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
560 "gpglist" "gpg-mailkeys" "gpgparticipants")
561 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
562 "gpglist" "gpg-mailkeys" "gpgparticipants"))
563 (for-each
564 (lambda (dir file)
565 (copy-file (string-append dir "/" file)
566 (string-append out "/share/man/man1/" file)))
567 '("caff" "caff" "caff" "gpgdir"
568 "gpg-key2ps" "gpglist" "gpg-mailkeys"
569 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
570 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
571 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
572 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
573 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
574 "process_keys.1" "pgpring.1" "keyanalyze.1"))))))))
35b9e423 575 (synopsis "Collection of scripts for simplifying gnupg key signing")
96be765c 576 (description
35b9e423 577 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
96be765c 578including tools for signing keys, keyring analysis, and party preparation.
7ac53403
EF
579@enumerate
580@item caff: CA - Fire and Forget signs and mails a key
581@item pgp-clean: removes all non-self signatures from key
582@item pgp-fixkey: removes broken packets from keys
583@item gpg-mailkeys: simply mail out a signed key to its owner
584@item gpg-key2ps: generate PostScript file with fingerprint paper strips
585@item gpgdir: recursive directory encryption tool
586@item gpglist: show who signed which of your UIDs
587@item gpgsigs: annotates list of GnuPG keys with already done signatures
588@item gpgparticipants: create list of party participants for the organiser
589@item gpgwrap: a passphrase wrapper
590@item keyanalyze: minimum signing distance (MSD) analysis on keyrings
591@item keylookup: ncurses wrapper around gpg --search
592@item sig2dot: converts a list of GnuPG signatures to a .dot file
593@item springgraph: creates a graph from a .dot file
594@end enumerate")
96be765c
AE
595 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
596 ;; and caff and gpgsigs: bsd-3, see
597 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
07157e8a 598 (license license:gpl2)
72fb1b24 599 (home-page "https://pgp-tools.alioth.debian.org/")))
40d806af 600
c607b701 601(define-public pinentry-tty
40d806af 602 (package
c607b701 603 (name "pinentry-tty")
547cb17d 604 (version "0.9.7")
40d806af
LC
605 (source (origin
606 (method url-fetch)
607 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
608 version ".tar.bz2"))
609 (sha256
610 (base32
547cb17d 611 "1cp7wjqr6nx31mdclr61s2h84ijqjl0ph99kgj4vyawpjj1j1633"))))
40d806af 612 (build-system gnu-build-system)
c607b701
EF
613 (arguments
614 `(#:configure-flags '("--enable-pinentry-tty")))
40d806af
LC
615 (inputs
616 `(("ncurses" ,ncurses)
18ed97d6 617 ("libassuan" ,libassuan)
c607b701 618 ("libsecret" ,libsecret "out")))
40d806af
LC
619 (native-inputs
620 `(("pkg-config" ,pkg-config)))
547cb17d 621 (home-page "https://gnupg.org/aegypten2/")
40d806af
LC
622 (synopsis "GnuPG's interface to passphrase input")
623 (description
c607b701
EF
624 "Pinentry provides a console that allows users to enter a passphrase when
625@code{gpg} or @code{gpg2} is run and needs it.")
07157e8a 626 (license license:gpl2+)))
4380a7b4 627
c607b701
EF
628(define-public pinentry-gtk2
629 (package
630 (inherit pinentry-tty)
631 (name "pinentry-gtk2")
632 (inputs
633 `(("gtk+" ,gtk+-2)
634 ("glib" ,glib)
635 ,@(package-inputs pinentry-tty)))
636 (description
637 "Pinentry provides a console and a GTK+ GUI that allows users to enter a
638passphrase when @code{gpg} or @code{gpg2} is run and needs it.")))
639
54df7558
EF
640(define-public pinentry-qt
641 (package
642 (inherit pinentry-tty)
643 (name "pinentry-qt")
644 (inputs
e2788cef 645 `(("qtbase" ,qtbase)
54df7558 646 ,@(package-inputs pinentry-tty)))
984ad832
DC
647 (arguments
648 `(#:configure-flags '("CXXFLAGS=-std=gnu++11")))
54df7558
EF
649 (description
650 "Pinentry provides a console and a Qt GUI that allows users to enter a
651passphrase when @code{gpg} or @code{gpg2} is run and needs it.")))
652
940f8d39
EF
653(define-public pinentry
654 (package (inherit pinentry-gtk2)
655 (name "pinentry")))
656
4380a7b4
EB
657(define-public paperkey
658 (package
659 (name "paperkey")
660 (version "1.3")
661 (source (origin
662 (method url-fetch)
663 (uri (string-append "http://www.jabberwocky.com/"
664 "software/paperkey/paperkey-"
665 version ".tar.gz"))
666 (sha256
667 (base32
668 "1yybj8bj68v4lxwpn596b6ismh2fyixw5vlqqg26byrn4d9dfmsv"))))
669 (build-system gnu-build-system)
670 (arguments
671 `(#:phases
e379d85c
EF
672 (modify-phases %standard-phases
673 (add-before 'check 'patch-check-scripts
674 (lambda _
675 (substitute* '("checks/roundtrip.sh"
676 "checks/roundtrip-raw.sh")
677 (("/bin/echo") "echo"))
678 #t)))))
4380a7b4
EB
679 (home-page "http://www.jabberwocky.com/software/paperkey/")
680 (synopsis "Backup OpenPGP keys to paper")
681 (description
682 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
683for printing with paper and ink, which have amazingly long retention
684qualities. To reconstruct a secret key, you re-enter those
685bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
686them to transform your existing public key into a secret key.")
07157e8a 687 (license license:gpl2+)))