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