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> |
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 | |
75 | for all GnuPG components. Among these are GPG, GPGSM, GPGME, | |
76 | GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard | |
77 | Daemon 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 |
111 | standard cryptographic building blocks such as symmetric ciphers, hash | |
112 | algorithms, public key algorithms, large integer functions and random number | |
113 | generation.") | |
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 | |
150 | protocol. This protocol is used for IPC between most newer | |
151 | GnuPG components. Both, server and client side functions are | |
152 | provided.") | |
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 | |
186 | as well as the CMS easily accessible by other applications. Both | |
187 | specifications 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 | |
210 | threads implementation. | |
211 | ||
212 | In contrast to GNU Pth is is based on the system's standard threads | |
213 | implementation. This allows the use of libraries which are not | |
214 | compatible 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") | |
f11275c9 | 220 | (version "2.1.19") |
58970d6a LC |
221 | (source (origin |
222 | (method url-fetch) | |
223 | (uri (string-append "mirror://gnupg/gnupg/gnupg-" version | |
224 | ".tar.bz2")) | |
f11275c9 | 225 | (patches (search-patches "gnupg-2.1-fix-Y2038-test-failure.patch")) |
58970d6a LC |
226 | (sha256 |
227 | (base32 | |
f11275c9 | 228 | "1w4vccmb5l50lm4yrz9vkdj7whbfvzx543r55362kkj1aqgyvk26")))) |
8d1939e4 | 229 | (build-system gnu-build-system) |
08fa45b1 MW |
230 | (native-inputs |
231 | `(("pkg-config" ,pkg-config))) | |
8d1939e4 | 232 | (inputs |
e31d35de | 233 | `(("bzip2" ,bzip2) |
01e11826 | 234 | ("curl" ,curl) |
08fa45b1 | 235 | ("gnutls" ,gnutls) |
8d1939e4 LC |
236 | ("libassuan" ,libassuan) |
237 | ("libgcrypt" ,libgcrypt) | |
01e11826 | 238 | ("libgpg-error" ,libgpg-error) |
8d1939e4 | 239 | ("libksba" ,libksba) |
cd064df7 | 240 | ("npth" ,npth) |
01e11826 | 241 | ("openldap" ,openldap) |
cd9ed6c1 | 242 | ("pcsc-lite" ,pcsc-lite) |
2d12284d EF |
243 | ("readline" ,readline) |
244 | ("sqlite" ,sqlite) | |
245 | ("zlib" ,zlib))) | |
30e9cbb4 | 246 | (arguments |
f11275c9 LF |
247 | `(#:configure-flags '("--enable-gpg2-is-gpg" |
248 | ;; Otherwise, the test suite looks for the `gpg` | |
249 | ;; executable in its installation directory in | |
250 | ;; /gnu/store before it has been installed. | |
251 | "--enable-gnupg-builddir-envvar") | |
163708a6 | 252 | #:phases |
45477c6a | 253 | (modify-phases %standard-phases |
cd9ed6c1 MG |
254 | (add-before 'configure 'patch-paths |
255 | (lambda* (#:key inputs #:allow-other-keys) | |
cd9ed6c1 MG |
256 | (substitute* "scd/scdaemon.c" |
257 | (("\"(libpcsclite\\.so[^\"]*)\"" _ name) | |
258 | (string-append "\"" (assoc-ref inputs "pcsc-lite") | |
259 | "/lib/" name "\""))) | |
7deb5ee8 LF |
260 | #t)) |
261 | (add-after 'build 'patch-scheme-tests | |
262 | (lambda _ | |
263 | (substitute* (find-files "tests" ".\\.scm$") | |
264 | (("/usr/bin/env gpgscm") | |
764c5662 LF |
265 | (string-append (getcwd) "/tests/gpgscm/gpgscm"))) |
266 | #t)) | |
f11275c9 LF |
267 | (add-before 'build 'patch-test-paths |
268 | (lambda* (#:key inputs #:allow-other-keys) | |
269 | (let* ((coreutils (assoc-ref inputs "coreutils")) | |
270 | (cat (string-append coreutils "/bin/cat")) | |
271 | (pwd (string-append coreutils "/bin/pwd")) | |
272 | (true (string-append coreutils "/bin/true")) | |
273 | (false (string-append coreutils "/bin/false"))) | |
274 | (substitute* '("tests/inittests" | |
275 | "tests/pkits/inittests" | |
276 | "tests/Makefile" | |
277 | "tests/pkits/common.sh" | |
278 | "tests/pkits/Makefile" | |
279 | ) | |
280 | (("/bin/pwd") pwd)) | |
281 | (substitute* "common/t-exectool.c" | |
282 | (("/bin/cat") cat)) | |
283 | (substitute* "common/t-exectool.c" | |
284 | (("/bin/true") true)) | |
285 | (substitute* "common/t-exectool.c" | |
286 | (("/bin/false") false)) | |
287 | #t)))))) | |
72fb1b24 | 288 | (home-page "https://gnupg.org/") |
f50d2669 | 289 | (synopsis "GNU Privacy Guard") |
8d1939e4 | 290 | (description |
a22dc0c4 LC |
291 | "The GNU Privacy Guard is a complete implementation of the OpenPGP |
292 | standard. It is used to encrypt and sign data and communication. It | |
293 | features powerful key management and the ability to access public key | |
79c311b8 | 294 | servers. It includes several libraries: libassuan (IPC between GnuPG |
58970d6a LC |
295 | components), libgpg-error (centralized GnuPG error values), and |
296 | libskba (working with X.509 certificates and CMS data).") | |
63e8bb12 LC |
297 | (license license:gpl3+) |
298 | (properties '((ftp-server . "ftp.gnupg.org") | |
299 | (ftp-directory . "/gcrypt/gnupg"))))) | |
ea4d96c6 | 300 | |
cd064df7 AE |
301 | (define-public gnupg-2.0 |
302 | (package (inherit gnupg) | |
b5afe6f0 | 303 | (version "2.0.30") |
cd064df7 AE |
304 | (source (origin |
305 | (method url-fetch) | |
306 | (uri (string-append "mirror://gnupg/gnupg/gnupg-" version | |
307 | ".tar.bz2")) | |
308 | (sha256 | |
309 | (base32 | |
b5afe6f0 | 310 | "0wax4cy14hh0h7kg9hj0hjn9424b71z8lrrc5kbsasrn9xd7hag3")))) |
08fa45b1 | 311 | (native-inputs '()) |
cd064df7 | 312 | (inputs |
7b40296f EF |
313 | `(("adns" ,adns) |
314 | ("bzip2" ,bzip2) | |
cd064df7 AE |
315 | ("curl" ,curl) |
316 | ("libassuan" ,libassuan) | |
317 | ("libgcrypt" ,libgcrypt) | |
318 | ("libgpg-error" ,libgpg-error) | |
319 | ("libksba" ,libksba) | |
320 | ("pth" ,pth) | |
321 | ("openldap" ,openldap) | |
07157e8a | 322 | ("zlib" ,zlib) |
cd064df7 AE |
323 | ("readline" ,readline))) |
324 | (arguments | |
325 | `(#:phases | |
80c47cf8 | 326 | (modify-phases %standard-phases |
6b547d22 LC |
327 | (add-before 'configure 'patch-config-files |
328 | (lambda _ | |
329 | (substitute* "tests/openpgp/Makefile.in" | |
3a534f42 | 330 | (("/bin/sh") (which "sh"))) |
bc85b127 LC |
331 | #t)) |
332 | (add-after 'install 'rename-v2-commands | |
333 | (lambda* (#:key outputs #:allow-other-keys) | |
334 | ;; Upstream suggests removing the trailing '2' from command names: | |
335 | ;; <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22883#58>. | |
336 | (let ((out (assoc-ref outputs "out"))) | |
337 | (with-directory-excursion (string-append out "/bin") | |
338 | (rename-file "gpgv2" "gpgv") | |
339 | (rename-file "gpg2" "gpg") | |
340 | ||
341 | ;; Keep the old name around to ease transition. | |
342 | (symlink "gpgv" "gpgv2") | |
343 | (symlink "gpg" "gpg2") | |
344 | #t))))))))) | |
cd064df7 | 345 | |
5249045c MW |
346 | (define-public gnupg-1 |
347 | (package (inherit gnupg) | |
866b05fd | 348 | (version "1.4.21") |
58970d6a LC |
349 | (source (origin |
350 | (method url-fetch) | |
351 | (uri (string-append "mirror://gnupg/gnupg/gnupg-" version | |
352 | ".tar.bz2")) | |
353 | (sha256 | |
354 | (base32 | |
866b05fd | 355 | "0xi2mshq8f6zbarb5f61c9w2qzwrdbjm4q8fqsrwlzc51h8a6ivb")))) |
08fa45b1 | 356 | (native-inputs '()) |
5249045c | 357 | (inputs |
07157e8a LC |
358 | `(("zlib" ,zlib) |
359 | ("bzip2" ,bzip2) | |
5249045c MW |
360 | ("curl" ,curl) |
361 | ("readline" ,readline) | |
362 | ("libgpg-error" ,libgpg-error))) | |
363 | (arguments | |
29d90757 LF |
364 | `(#:phases |
365 | (modify-phases %standard-phases | |
366 | (add-after 'unpack 'patch-check-sh | |
367 | (lambda _ | |
368 | (substitute* "checks/Makefile.in" | |
2e4b67b9 | 369 | (("/bin/sh") (which "sh")))))))))) |
5249045c | 370 | |
09d5c166 AE |
371 | (define-public gpgme |
372 | (package | |
373 | (name "gpgme") | |
9e0f16f2 | 374 | (version "1.8.0") |
09d5c166 AE |
375 | (source |
376 | (origin | |
377 | (method url-fetch) | |
378 | (uri (string-append "mirror://gnupg/gpgme/gpgme-" version | |
379 | ".tar.bz2")) | |
380 | (sha256 | |
381 | (base32 | |
9e0f16f2 | 382 | "0csx3qnycwm0n90ql6gs65if5xi4gqyzzy21fxs2xqicghjrfq2r")))) |
09d5c166 | 383 | (build-system gnu-build-system) |
68640c3c MW |
384 | (propagated-inputs |
385 | ;; Needs to be propagated because gpgme.h includes gpg-error.h. | |
386 | `(("libgpg-error" ,libgpg-error))) | |
09d5c166 | 387 | (inputs |
ae3bded6 | 388 | `(("gnupg" ,gnupg-2.0) |
68640c3c | 389 | ("libassuan" ,libassuan))) |
e10872cc TD |
390 | (arguments |
391 | `(#:phases | |
392 | (modify-phases %standard-phases | |
393 | (add-after 'configure 'patch-cmake-file | |
394 | (lambda _ | |
395 | ;; Work around <https://bugs.gnupg.org/gnupg/issue2877>. | |
396 | (substitute* "lang/cpp/src/GpgmeppConfig.cmake.in" | |
397 | (("@libsuffix@") ".so")) | |
398 | #t))))) | |
72fb1b24 | 399 | (home-page "https://www.gnupg.org/related_software/gpgme/") |
35b9e423 | 400 | (synopsis "Library providing simplified access to GnuPG functionality") |
09d5c166 AE |
401 | (description |
402 | "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG | |
403 | easier for applications. It provides a High-Level Crypto API for encryption, | |
404 | decryption, signing, signature verification and key management. Currently | |
405 | it uses GnuPG as its backend but the API isn't restricted to this engine. | |
406 | ||
407 | Because the direct use of GnuPG from an application can be a complicated | |
408 | programming task, it is suggested that all software should try to use GPGME | |
409 | instead. This way bug fixes or improvements can be done at a central place | |
410 | and every application benefits from this.") | |
07157e8a | 411 | (license license:lgpl2.1+))) |
09d5c166 | 412 | |
e3dd1f0c LF |
413 | (define-public python-gpg |
414 | (package | |
415 | (name "python-gpg") | |
416 | (version (package-version gpgme)) | |
417 | (source (origin | |
418 | (method url-fetch) | |
419 | (uri (pypi-uri "gpg" version)) | |
420 | (sha256 | |
421 | (base32 | |
422 | "1x74i6q713c0bckls7rdm8kgsmllf9qvy9x62jghszlhgjkyh9nd")))) | |
423 | (build-system python-build-system) | |
424 | (arguments | |
425 | '(#:tests? #f)) ; No test suite. | |
426 | (inputs | |
427 | `(("gpgme" ,gpgme))) | |
428 | (native-inputs | |
429 | `(("swig" ,swig))) | |
430 | (home-page (package-home-page gpgme)) | |
431 | (synopsis "Python bindings for GPGME GnuPG cryptography library") | |
432 | (description "This package provides Python bindings to the GPGME GnuPG | |
433 | cryptographic library. It is developed in the GPGME source code, and then | |
434 | distributed separately.") | |
435 | (license license:lgpl2.1+))) | |
436 | ||
437 | (define-public python2-gpg | |
438 | (package-with-python2 python-gpg)) | |
439 | ||
a05d1d82 CAW |
440 | (define-public python-pygpgme |
441 | (package | |
442 | (name "python-pygpgme") | |
443 | (version "0.3") | |
444 | (source | |
445 | (origin | |
446 | (method url-fetch) | |
447 | (uri (pypi-uri "pygpgme" version)) | |
448 | (sha256 | |
449 | (base32 | |
450 | "1q82p3gs6lwq8j8dxk4pvrwk3jpww1zqcjrzznl9clh10z28gn2z")) | |
451 | ;; Unfortunately, we have to disable some tests due to some gpg-agent | |
452 | ;; goofiness... see: | |
453 | ;; https://bugs.launchpad.net/pygpgme/+bug/999949 | |
1c9cea74 LF |
454 | (patches (search-patches "pygpgme-disable-problematic-tests.patch" |
455 | "python-pygpgme-fix-pinentry-tests.patch")))) | |
a05d1d82 CAW |
456 | (arguments |
457 | `(#:phases | |
458 | (modify-phases %standard-phases | |
459 | (add-before 'build 'make-build | |
460 | (lambda _ | |
461 | (zero? (system* "make" "build")))) | |
462 | (replace 'check | |
463 | (lambda _ | |
464 | (zero? (system* "make" "check"))))))) | |
465 | (build-system python-build-system) | |
466 | (inputs | |
a7843522 | 467 | `(("gnupg" ,gnupg-2.0) |
a05d1d82 CAW |
468 | ("gpgme" ,gpgme))) |
469 | (home-page "https://launchpad.net/pygpgme") | |
470 | (synopsis "Python module for working with OpenPGP messages") | |
471 | (description | |
472 | "PyGPGME is a Python module that lets you sign, verify, encrypt and | |
473 | decrypt messages using the OpenPGP format by making use of GPGME.") | |
474 | (license license:lgpl2.1+))) | |
475 | ||
476 | (define-public python2-pygpgme | |
5c31f4aa | 477 | (package-with-python2 python-pygpgme)) |
a05d1d82 | 478 | |
22af9029 RW |
479 | (define-public python-gnupg |
480 | (package | |
481 | (name "python-gnupg") | |
5b669ba1 | 482 | (version "0.3.8") |
22af9029 RW |
483 | (source |
484 | (origin | |
485 | (method url-fetch) | |
5b669ba1 | 486 | (uri (pypi-uri "python-gnupg" version)) |
22af9029 RW |
487 | (sha256 |
488 | (base32 | |
5b669ba1 | 489 | "0nkbs9c8f30lra7ca39kg91x8cyxn0jb61vih4qky839gpbwwwiq")))) |
22af9029 RW |
490 | (build-system python-build-system) |
491 | (arguments | |
492 | `(#:phases | |
493 | (modify-phases %standard-phases | |
494 | (replace 'check | |
ec089763 RW |
495 | (lambda _ |
496 | (substitute* "test_gnupg.py" | |
497 | ;; Exported keys don't have a version line! | |
498 | (("del k1\\[1\\]") "#") | |
499 | ;; Unsure why this test fails. | |
500 | (("'test_search_keys'") "True") | |
501 | (("def test_search_keys") "def disabled__search_keys")) | |
502 | (setenv "USERNAME" "guixbuilder") | |
503 | ;; The doctests are extremely slow and sometimes time out, | |
504 | ;; so we disable them. | |
505 | (zero? (system* "python" | |
506 | "test_gnupg.py" "--no-doctests"))))))) | |
22af9029 RW |
507 | (native-inputs |
508 | `(("gnupg" ,gnupg-1))) | |
72fb1b24 | 509 | (home-page "https://packages.python.org/python-gnupg/index.html") |
22af9029 RW |
510 | (synopsis "Wrapper for the GNU Privacy Guard") |
511 | (description | |
512 | "This module allows easy access to GnuPG’s key management, encryption | |
513 | and signature functionality from Python programs.") | |
514 | (license license:bsd-3))) | |
515 | ||
516 | (define-public python2-gnupg | |
517 | (package-with-python2 python-gnupg)) | |
518 | ||
ea4d96c6 | 519 | (define-public pius |
cda0ef04 TS |
520 | (package |
521 | (name "pius") | |
522 | (version "2.2.3") | |
523 | (source (origin | |
524 | (method url-fetch) | |
525 | (uri (string-append | |
526 | "https://github.com/jaymzh/pius/releases/download/v" | |
527 | version "/pius-" version ".tar.bz2")) | |
528 | (sha256 | |
529 | (base32 | |
530 | "0iy0gnms6lv9hpvk29313kc495a2f7pq2mg6ljxhy233vxsmjsk6")))) | |
531 | (build-system python-build-system) | |
532 | (inputs `(("perl" ,perl) ;for 'pius-party-worksheet' | |
533 | ("gpg" ,gnupg))) | |
534 | (arguments | |
535 | `(#:tests? #f | |
536 | #:python ,python-2 ;uses the Python 2 'print' syntax | |
537 | #:phases | |
538 | (modify-phases %standard-phases | |
539 | (add-before | |
540 | 'build 'set-gpg-file-name | |
541 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
542 | (let* ((gpg (string-append (assoc-ref inputs "gpg") | |
543 | "/bin/gpg"))) | |
544 | (substitute* "libpius/constants.py" | |
545 | (("/usr/bin/gpg2") gpg)) | |
546 | #t)))))) | |
547 | (synopsis "Programs to simplify GnuPG key signing") | |
548 | (description | |
549 | "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning | |
35b9e423 EB |
550 | parties. It is the main utility and makes it possible to quickly and easily |
551 | sign each UID on a set of PGP keys. It is designed to take the pain out of | |
ea4d96c6 AE |
552 | the sign-all-the-keys part of PGP Keysigning Party while adding security |
553 | to the process. | |
554 | ||
555 | pius-keyring-mgr and pius-party-worksheet help organisers of | |
556 | PGP keysigning parties.") | |
cda0ef04 TS |
557 | (license license:gpl2) |
558 | (home-page "https://www.phildev.net/pius/index.shtml"))) | |
96be765c AE |
559 | |
560 | (define-public signing-party | |
561 | (package | |
562 | (name "signing-party") | |
563 | (version "1.1.4") | |
564 | (source (origin | |
565 | (method url-fetch) | |
807143b6 EF |
566 | (uri (string-append "mirror://debian/pool/main/s/signing-party/" |
567 | "signing-party_" version ".orig.tar.gz")) | |
96be765c AE |
568 | (sha256 (base32 |
569 | "188gp0prbh8qs29lq3pbf0qibfd6jq4fk7i0pfrybl8aahvm84rx")))) | |
570 | (build-system gnu-build-system) | |
571 | (inputs `(("perl" ,perl))) | |
572 | (arguments | |
573 | `(#:tests? #f | |
574 | #:phases | |
6a90a614 EF |
575 | (modify-phases %standard-phases |
576 | (add-after 'unpack 'remove-spurious-links | |
577 | (lambda _ (delete-file "keyanalyze/pgpring/depcomp"))) | |
578 | (replace 'configure | |
579 | (lambda* (#:key outputs #:allow-other-keys) | |
580 | (let ((out (assoc-ref outputs "out"))) | |
581 | (substitute* "keyanalyze/Makefile" | |
582 | (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS"))) | |
583 | (substitute* "keyanalyze/Makefile" | |
584 | (("./configure") (string-append "./configure --prefix=" out))) | |
585 | (substitute* "keyanalyze/pgpring/configure" | |
7ba02492 | 586 | (("/bin/sh") (which "sh"))) |
6a90a614 EF |
587 | (substitute* "gpgwrap/Makefile" |
588 | (("\\} clean") | |
589 | (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap " | |
590 | out "/bin/gpgwrap\n"))) | |
591 | (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile" | |
592 | "keylookup/Makefile" "sig2dot/Makefile" | |
593 | "springgraph/Makefile") | |
594 | (("/usr") out))))) | |
595 | (replace 'install | |
596 | (lambda* (#:key outputs #:allow-other-keys #:rest args) | |
597 | (let ((out (assoc-ref outputs "out")) | |
598 | (install (assoc-ref %standard-phases 'install))) | |
599 | (apply install args) | |
600 | (for-each | |
601 | (lambda (dir file) | |
602 | (copy-file (string-append dir "/" file) | |
603 | (string-append out "/bin/" file))) | |
604 | '("caff" "caff" "caff" "gpgdir" "gpg-key2ps" | |
605 | "gpglist" "gpg-mailkeys" "gpgparticipants") | |
606 | '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps" | |
607 | "gpglist" "gpg-mailkeys" "gpgparticipants")) | |
608 | (for-each | |
609 | (lambda (dir file) | |
610 | (copy-file (string-append dir "/" file) | |
611 | (string-append out "/share/man/man1/" file))) | |
612 | '("caff" "caff" "caff" "gpgdir" | |
613 | "gpg-key2ps" "gpglist" "gpg-mailkeys" | |
614 | "gpgparticipants" "gpgsigs" "gpgwrap/doc" | |
615 | "keyanalyze" "keyanalyze/pgpring" "keyanalyze") | |
616 | '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1" | |
617 | "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1" | |
618 | "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1" | |
619 | "process_keys.1" "pgpring.1" "keyanalyze.1")))))))) | |
35b9e423 | 620 | (synopsis "Collection of scripts for simplifying gnupg key signing") |
96be765c | 621 | (description |
35b9e423 | 622 | "Signing-party is a collection for all kinds of PGP/GnuPG related things, |
96be765c | 623 | including tools for signing keys, keyring analysis, and party preparation. |
7ac53403 EF |
624 | @enumerate |
625 | @item caff: CA - Fire and Forget signs and mails a key | |
626 | @item pgp-clean: removes all non-self signatures from key | |
627 | @item pgp-fixkey: removes broken packets from keys | |
628 | @item gpg-mailkeys: simply mail out a signed key to its owner | |
629 | @item gpg-key2ps: generate PostScript file with fingerprint paper strips | |
630 | @item gpgdir: recursive directory encryption tool | |
631 | @item gpglist: show who signed which of your UIDs | |
632 | @item gpgsigs: annotates list of GnuPG keys with already done signatures | |
633 | @item gpgparticipants: create list of party participants for the organiser | |
634 | @item gpgwrap: a passphrase wrapper | |
635 | @item keyanalyze: minimum signing distance (MSD) analysis on keyrings | |
636 | @item keylookup: ncurses wrapper around gpg --search | |
637 | @item sig2dot: converts a list of GnuPG signatures to a .dot file | |
638 | @item springgraph: creates a graph from a .dot file | |
639 | @end enumerate") | |
96be765c AE |
640 | ;; gpl2+ for almost all programs, except for keyanalyze: gpl2 |
641 | ;; and caff and gpgsigs: bsd-3, see | |
642 | ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright | |
07157e8a | 643 | (license license:gpl2) |
72fb1b24 | 644 | (home-page "https://pgp-tools.alioth.debian.org/"))) |
40d806af | 645 | |
c607b701 | 646 | (define-public pinentry-tty |
40d806af | 647 | (package |
c607b701 | 648 | (name "pinentry-tty") |
9b1d77f6 | 649 | (version "1.0.0") |
40d806af LC |
650 | (source (origin |
651 | (method url-fetch) | |
652 | (uri (string-append "mirror://gnupg/pinentry/pinentry-" | |
653 | version ".tar.bz2")) | |
654 | (sha256 | |
655 | (base32 | |
9b1d77f6 | 656 | "0ni7g4plq6x78p32al7m8h2zsakvg1rhfz0qbc3kdc7yq7nw4whn")))) |
40d806af | 657 | (build-system gnu-build-system) |
c607b701 EF |
658 | (arguments |
659 | `(#:configure-flags '("--enable-pinentry-tty"))) | |
40d806af LC |
660 | (inputs |
661 | `(("ncurses" ,ncurses) | |
18ed97d6 | 662 | ("libassuan" ,libassuan) |
c607b701 | 663 | ("libsecret" ,libsecret "out"))) |
40d806af LC |
664 | (native-inputs |
665 | `(("pkg-config" ,pkg-config))) | |
547cb17d | 666 | (home-page "https://gnupg.org/aegypten2/") |
40d806af LC |
667 | (synopsis "GnuPG's interface to passphrase input") |
668 | (description | |
c607b701 | 669 | "Pinentry provides a console that allows users to enter a passphrase when |
9614897b | 670 | @code{gpg} is run and needs it.") |
07157e8a | 671 | (license license:gpl2+))) |
4380a7b4 | 672 | |
c607b701 EF |
673 | (define-public pinentry-gtk2 |
674 | (package | |
675 | (inherit pinentry-tty) | |
676 | (name "pinentry-gtk2") | |
677 | (inputs | |
678 | `(("gtk+" ,gtk+-2) | |
679 | ("glib" ,glib) | |
680 | ,@(package-inputs pinentry-tty))) | |
681 | (description | |
682 | "Pinentry provides a console and a GTK+ GUI that allows users to enter a | |
9614897b | 683 | passphrase when @code{gpg} is run and needs it."))) |
c607b701 | 684 | |
41edb23f CB |
685 | (define-public pinentry-gnome3 |
686 | (package | |
687 | (inherit pinentry-tty) | |
688 | (name "pinentry-gnome3") | |
689 | (inputs | |
690 | `(("gtk+" ,gtk+-2) | |
691 | ("gcr" ,gcr) | |
692 | ("glib" ,glib) | |
693 | ,@(package-inputs pinentry-tty))) | |
694 | (arguments | |
695 | `(#:configure-flags '("--enable-pinentry-gnome3"))) | |
696 | (description | |
697 | "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3 | |
698 | that allows users to enter a passphrase when required by @code{gpg} or other | |
699 | software."))) | |
c607b701 | 700 | |
54df7558 EF |
701 | (define-public pinentry-qt |
702 | (package | |
703 | (inherit pinentry-tty) | |
704 | (name "pinentry-qt") | |
705 | (inputs | |
e2788cef | 706 | `(("qtbase" ,qtbase) |
54df7558 | 707 | ,@(package-inputs pinentry-tty))) |
984ad832 DC |
708 | (arguments |
709 | `(#:configure-flags '("CXXFLAGS=-std=gnu++11"))) | |
54df7558 EF |
710 | (description |
711 | "Pinentry provides a console and a Qt GUI that allows users to enter a | |
9614897b | 712 | passphrase when @code{gpg} is run and needs it."))) |
54df7558 | 713 | |
940f8d39 EF |
714 | (define-public pinentry |
715 | (package (inherit pinentry-gtk2) | |
716 | (name "pinentry"))) | |
717 | ||
4380a7b4 EB |
718 | (define-public paperkey |
719 | (package | |
720 | (name "paperkey") | |
721 | (version "1.3") | |
722 | (source (origin | |
723 | (method url-fetch) | |
724 | (uri (string-append "http://www.jabberwocky.com/" | |
725 | "software/paperkey/paperkey-" | |
726 | version ".tar.gz")) | |
727 | (sha256 | |
728 | (base32 | |
729 | "1yybj8bj68v4lxwpn596b6ismh2fyixw5vlqqg26byrn4d9dfmsv")))) | |
730 | (build-system gnu-build-system) | |
731 | (arguments | |
732 | `(#:phases | |
e379d85c EF |
733 | (modify-phases %standard-phases |
734 | (add-before 'check 'patch-check-scripts | |
735 | (lambda _ | |
736 | (substitute* '("checks/roundtrip.sh" | |
737 | "checks/roundtrip-raw.sh") | |
738 | (("/bin/echo") "echo")) | |
739 | #t))))) | |
4380a7b4 EB |
740 | (home-page "http://www.jabberwocky.com/software/paperkey/") |
741 | (synopsis "Backup OpenPGP keys to paper") | |
742 | (description | |
743 | "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key | |
744 | for printing with paper and ink, which have amazingly long retention | |
745 | qualities. To reconstruct a secret key, you re-enter those | |
746 | bytes (whether by hand, OCR, QR code, or the like) and paperkey can use | |
747 | them to transform your existing public key into a secret key.") | |
07157e8a | 748 | (license license:gpl2+))) |