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