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