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") | |
402efb61 | 191 | (version "1.3") |
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 | |
402efb61 | 200 | "0am86vblapwz84254qpmhz0chk70g6qzh3wdxcs0gvba8d01ka5w")))) |
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") | |
06fcd4a8 | 216 | (version "2.1.17") |
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 | |
059b3aa9 MB |
223 | "1js308b46ifx1gim0c9nivr5yxhans7iq1yvkf7zl2928gdm9p65")) |
224 | (patches | |
225 | ;; This fixes a test failure on 32bit. Remove for next version. | |
226 | ;; https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00869.html | |
227 | (search-patches "gnupg-test-segfault-on-32bit-arch.patch")))) | |
8d1939e4 | 228 | (build-system gnu-build-system) |
08fa45b1 MW |
229 | (native-inputs |
230 | `(("pkg-config" ,pkg-config))) | |
8d1939e4 | 231 | (inputs |
e31d35de | 232 | `(("bzip2" ,bzip2) |
01e11826 | 233 | ("curl" ,curl) |
08fa45b1 | 234 | ("gnutls" ,gnutls) |
8d1939e4 LC |
235 | ("libassuan" ,libassuan) |
236 | ("libgcrypt" ,libgcrypt) | |
01e11826 | 237 | ("libgpg-error" ,libgpg-error) |
8d1939e4 | 238 | ("libksba" ,libksba) |
cd064df7 | 239 | ("npth" ,npth) |
01e11826 | 240 | ("openldap" ,openldap) |
cd9ed6c1 | 241 | ("pcsc-lite" ,pcsc-lite) |
2d12284d EF |
242 | ("readline" ,readline) |
243 | ("sqlite" ,sqlite) | |
244 | ("zlib" ,zlib))) | |
30e9cbb4 | 245 | (arguments |
163708a6 LF |
246 | `(#:configure-flags '("--enable-gpg2-is-gpg") |
247 | #:phases | |
45477c6a | 248 | (modify-phases %standard-phases |
cd9ed6c1 MG |
249 | (add-before 'configure 'patch-paths |
250 | (lambda* (#:key inputs #:allow-other-keys) | |
cd9ed6c1 MG |
251 | (substitute* "scd/scdaemon.c" |
252 | (("\"(libpcsclite\\.so[^\"]*)\"" _ name) | |
253 | (string-append "\"" (assoc-ref inputs "pcsc-lite") | |
254 | "/lib/" name "\""))) | |
7deb5ee8 LF |
255 | #t)) |
256 | (add-after 'build 'patch-scheme-tests | |
257 | (lambda _ | |
258 | (substitute* (find-files "tests" ".\\.scm$") | |
259 | (("/usr/bin/env gpgscm") | |
764c5662 LF |
260 | (string-append (getcwd) "/tests/gpgscm/gpgscm"))) |
261 | #t)) | |
262 | ;; If this variable is undefined, /bin/pwd is invoked. | |
263 | (add-before 'check 'set-gnupg-home | |
dd582f4a | 264 | (lambda _ |
764c5662 | 265 | (setenv "GNUPGHOME" (getcwd)) |
dd582f4a | 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 | |
5c31f4aa | 420 | (package-with-python2 python-pygpgme)) |
a05d1d82 | 421 | |
22af9029 RW |
422 | (define-public python-gnupg |
423 | (package | |
424 | (name "python-gnupg") | |
5b669ba1 | 425 | (version "0.3.8") |
22af9029 RW |
426 | (source |
427 | (origin | |
428 | (method url-fetch) | |
5b669ba1 | 429 | (uri (pypi-uri "python-gnupg" version)) |
22af9029 RW |
430 | (sha256 |
431 | (base32 | |
5b669ba1 | 432 | "0nkbs9c8f30lra7ca39kg91x8cyxn0jb61vih4qky839gpbwwwiq")))) |
22af9029 RW |
433 | (build-system python-build-system) |
434 | (arguments | |
435 | `(#:phases | |
436 | (modify-phases %standard-phases | |
437 | (replace 'check | |
ec089763 RW |
438 | (lambda _ |
439 | (substitute* "test_gnupg.py" | |
440 | ;; Exported keys don't have a version line! | |
441 | (("del k1\\[1\\]") "#") | |
442 | ;; Unsure why this test fails. | |
443 | (("'test_search_keys'") "True") | |
444 | (("def test_search_keys") "def disabled__search_keys")) | |
445 | (setenv "USERNAME" "guixbuilder") | |
446 | ;; The doctests are extremely slow and sometimes time out, | |
447 | ;; so we disable them. | |
448 | (zero? (system* "python" | |
449 | "test_gnupg.py" "--no-doctests"))))))) | |
22af9029 RW |
450 | (native-inputs |
451 | `(("gnupg" ,gnupg-1))) | |
72fb1b24 | 452 | (home-page "https://packages.python.org/python-gnupg/index.html") |
22af9029 RW |
453 | (synopsis "Wrapper for the GNU Privacy Guard") |
454 | (description | |
455 | "This module allows easy access to GnuPG’s key management, encryption | |
456 | and signature functionality from Python programs.") | |
457 | (license license:bsd-3))) | |
458 | ||
459 | (define-public python2-gnupg | |
460 | (package-with-python2 python-gnupg)) | |
461 | ||
ea4d96c6 AE |
462 | (define-public pius |
463 | (package | |
464 | (name "pius") | |
11b953a1 | 465 | (version "2.2.2") |
ea4d96c6 AE |
466 | (source (origin |
467 | (method url-fetch) | |
e2e3600f LC |
468 | (uri (string-append |
469 | "https://github.com/jaymzh/pius/releases/download/v" | |
470 | version "/pius-" version ".tar.bz2")) | |
471 | (sha256 | |
472 | (base32 | |
11b953a1 | 473 | "0k94mlr7l12mplph7pdgjbampqha47d8mfjq69n4xm80qwbn1rq1")))) |
14e2e44d LC |
474 | (build-system python-build-system) |
475 | (inputs `(("perl" ,perl) ;for 'pius-party-worksheet' | |
31fbf4b6 | 476 | ("gpg" ,gnupg-2.0))) ;2.1 fails to talk to gpg-agent 2.0 |
ea4d96c6 AE |
477 | (arguments |
478 | `(#:tests? #f | |
14e2e44d | 479 | #:python ,python-2 ;uses the Python 2 'print' syntax |
ea4d96c6 | 480 | #:phases |
14e2e44d LC |
481 | (modify-phases %standard-phases |
482 | (add-before | |
483 | 'build 'set-gpg-file-name | |
484 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
485 | (let* ((gpg (string-append (assoc-ref inputs "gpg") | |
d4b1977f | 486 | "/bin/gpg"))) |
14e2e44d | 487 | (substitute* "libpius/constants.py" |
e2e3600f | 488 | (("/usr/bin/gpg2") gpg)))))))) |
9eed6f9b | 489 | (synopsis "Programs to simplify GnuPG key signing") |
ea4d96c6 AE |
490 | (description |
491 | "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning | |
35b9e423 EB |
492 | parties. It is the main utility and makes it possible to quickly and easily |
493 | sign each UID on a set of PGP keys. It is designed to take the pain out of | |
ea4d96c6 AE |
494 | the sign-all-the-keys part of PGP Keysigning Party while adding security |
495 | to the process. | |
496 | ||
497 | pius-keyring-mgr and pius-party-worksheet help organisers of | |
498 | PGP keysigning parties.") | |
07157e8a | 499 | (license license:gpl2) |
72fb1b24 | 500 | (home-page "https://www.phildev.net/pius/index.shtml"))) |
96be765c AE |
501 | |
502 | (define-public signing-party | |
503 | (package | |
504 | (name "signing-party") | |
505 | (version "1.1.4") | |
506 | (source (origin | |
507 | (method url-fetch) | |
807143b6 EF |
508 | (uri (string-append "mirror://debian/pool/main/s/signing-party/" |
509 | "signing-party_" version ".orig.tar.gz")) | |
96be765c AE |
510 | (sha256 (base32 |
511 | "188gp0prbh8qs29lq3pbf0qibfd6jq4fk7i0pfrybl8aahvm84rx")))) | |
512 | (build-system gnu-build-system) | |
513 | (inputs `(("perl" ,perl))) | |
514 | (arguments | |
515 | `(#:tests? #f | |
516 | #:phases | |
6a90a614 EF |
517 | (modify-phases %standard-phases |
518 | (add-after 'unpack 'remove-spurious-links | |
519 | (lambda _ (delete-file "keyanalyze/pgpring/depcomp"))) | |
520 | (replace 'configure | |
521 | (lambda* (#:key outputs #:allow-other-keys) | |
522 | (let ((out (assoc-ref outputs "out"))) | |
523 | (substitute* "keyanalyze/Makefile" | |
524 | (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS"))) | |
525 | (substitute* "keyanalyze/Makefile" | |
526 | (("./configure") (string-append "./configure --prefix=" out))) | |
527 | (substitute* "keyanalyze/pgpring/configure" | |
528 | (("/bin/sh") (which "bash"))) | |
529 | (substitute* "gpgwrap/Makefile" | |
530 | (("\\} clean") | |
531 | (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap " | |
532 | out "/bin/gpgwrap\n"))) | |
533 | (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile" | |
534 | "keylookup/Makefile" "sig2dot/Makefile" | |
535 | "springgraph/Makefile") | |
536 | (("/usr") out))))) | |
537 | (replace 'install | |
538 | (lambda* (#:key outputs #:allow-other-keys #:rest args) | |
539 | (let ((out (assoc-ref outputs "out")) | |
540 | (install (assoc-ref %standard-phases 'install))) | |
541 | (apply install args) | |
542 | (for-each | |
543 | (lambda (dir file) | |
544 | (copy-file (string-append dir "/" file) | |
545 | (string-append out "/bin/" file))) | |
546 | '("caff" "caff" "caff" "gpgdir" "gpg-key2ps" | |
547 | "gpglist" "gpg-mailkeys" "gpgparticipants") | |
548 | '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps" | |
549 | "gpglist" "gpg-mailkeys" "gpgparticipants")) | |
550 | (for-each | |
551 | (lambda (dir file) | |
552 | (copy-file (string-append dir "/" file) | |
553 | (string-append out "/share/man/man1/" file))) | |
554 | '("caff" "caff" "caff" "gpgdir" | |
555 | "gpg-key2ps" "gpglist" "gpg-mailkeys" | |
556 | "gpgparticipants" "gpgsigs" "gpgwrap/doc" | |
557 | "keyanalyze" "keyanalyze/pgpring" "keyanalyze") | |
558 | '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1" | |
559 | "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1" | |
560 | "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1" | |
561 | "process_keys.1" "pgpring.1" "keyanalyze.1")))))))) | |
35b9e423 | 562 | (synopsis "Collection of scripts for simplifying gnupg key signing") |
96be765c | 563 | (description |
35b9e423 | 564 | "Signing-party is a collection for all kinds of PGP/GnuPG related things, |
96be765c | 565 | including tools for signing keys, keyring analysis, and party preparation. |
7ac53403 EF |
566 | @enumerate |
567 | @item caff: CA - Fire and Forget signs and mails a key | |
568 | @item pgp-clean: removes all non-self signatures from key | |
569 | @item pgp-fixkey: removes broken packets from keys | |
570 | @item gpg-mailkeys: simply mail out a signed key to its owner | |
571 | @item gpg-key2ps: generate PostScript file with fingerprint paper strips | |
572 | @item gpgdir: recursive directory encryption tool | |
573 | @item gpglist: show who signed which of your UIDs | |
574 | @item gpgsigs: annotates list of GnuPG keys with already done signatures | |
575 | @item gpgparticipants: create list of party participants for the organiser | |
576 | @item gpgwrap: a passphrase wrapper | |
577 | @item keyanalyze: minimum signing distance (MSD) analysis on keyrings | |
578 | @item keylookup: ncurses wrapper around gpg --search | |
579 | @item sig2dot: converts a list of GnuPG signatures to a .dot file | |
580 | @item springgraph: creates a graph from a .dot file | |
581 | @end enumerate") | |
96be765c AE |
582 | ;; gpl2+ for almost all programs, except for keyanalyze: gpl2 |
583 | ;; and caff and gpgsigs: bsd-3, see | |
584 | ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright | |
07157e8a | 585 | (license license:gpl2) |
72fb1b24 | 586 | (home-page "https://pgp-tools.alioth.debian.org/"))) |
40d806af | 587 | |
c607b701 | 588 | (define-public pinentry-tty |
40d806af | 589 | (package |
c607b701 | 590 | (name "pinentry-tty") |
9b1d77f6 | 591 | (version "1.0.0") |
40d806af LC |
592 | (source (origin |
593 | (method url-fetch) | |
594 | (uri (string-append "mirror://gnupg/pinentry/pinentry-" | |
595 | version ".tar.bz2")) | |
596 | (sha256 | |
597 | (base32 | |
9b1d77f6 | 598 | "0ni7g4plq6x78p32al7m8h2zsakvg1rhfz0qbc3kdc7yq7nw4whn")))) |
40d806af | 599 | (build-system gnu-build-system) |
c607b701 EF |
600 | (arguments |
601 | `(#:configure-flags '("--enable-pinentry-tty"))) | |
40d806af LC |
602 | (inputs |
603 | `(("ncurses" ,ncurses) | |
18ed97d6 | 604 | ("libassuan" ,libassuan) |
c607b701 | 605 | ("libsecret" ,libsecret "out"))) |
40d806af LC |
606 | (native-inputs |
607 | `(("pkg-config" ,pkg-config))) | |
547cb17d | 608 | (home-page "https://gnupg.org/aegypten2/") |
40d806af LC |
609 | (synopsis "GnuPG's interface to passphrase input") |
610 | (description | |
c607b701 | 611 | "Pinentry provides a console that allows users to enter a passphrase when |
9614897b | 612 | @code{gpg} is run and needs it.") |
07157e8a | 613 | (license license:gpl2+))) |
4380a7b4 | 614 | |
c607b701 EF |
615 | (define-public pinentry-gtk2 |
616 | (package | |
617 | (inherit pinentry-tty) | |
618 | (name "pinentry-gtk2") | |
619 | (inputs | |
620 | `(("gtk+" ,gtk+-2) | |
621 | ("glib" ,glib) | |
622 | ,@(package-inputs pinentry-tty))) | |
623 | (description | |
624 | "Pinentry provides a console and a GTK+ GUI that allows users to enter a | |
9614897b | 625 | passphrase when @code{gpg} is run and needs it."))) |
c607b701 | 626 | |
41edb23f CB |
627 | (define-public pinentry-gnome3 |
628 | (package | |
629 | (inherit pinentry-tty) | |
630 | (name "pinentry-gnome3") | |
631 | (inputs | |
632 | `(("gtk+" ,gtk+-2) | |
633 | ("gcr" ,gcr) | |
634 | ("glib" ,glib) | |
635 | ,@(package-inputs pinentry-tty))) | |
636 | (arguments | |
637 | `(#:configure-flags '("--enable-pinentry-gnome3"))) | |
638 | (description | |
639 | "Pinentry provides a console and a GUI designed for use with GNOME@tie{}3 | |
640 | that allows users to enter a passphrase when required by @code{gpg} or other | |
641 | software."))) | |
c607b701 | 642 | |
54df7558 EF |
643 | (define-public pinentry-qt |
644 | (package | |
645 | (inherit pinentry-tty) | |
646 | (name "pinentry-qt") | |
647 | (inputs | |
e2788cef | 648 | `(("qtbase" ,qtbase) |
54df7558 | 649 | ,@(package-inputs pinentry-tty))) |
984ad832 DC |
650 | (arguments |
651 | `(#:configure-flags '("CXXFLAGS=-std=gnu++11"))) | |
54df7558 EF |
652 | (description |
653 | "Pinentry provides a console and a Qt GUI that allows users to enter a | |
9614897b | 654 | passphrase when @code{gpg} is run and needs it."))) |
54df7558 | 655 | |
940f8d39 EF |
656 | (define-public pinentry |
657 | (package (inherit pinentry-gtk2) | |
658 | (name "pinentry"))) | |
659 | ||
4380a7b4 EB |
660 | (define-public paperkey |
661 | (package | |
662 | (name "paperkey") | |
663 | (version "1.3") | |
664 | (source (origin | |
665 | (method url-fetch) | |
666 | (uri (string-append "http://www.jabberwocky.com/" | |
667 | "software/paperkey/paperkey-" | |
668 | version ".tar.gz")) | |
669 | (sha256 | |
670 | (base32 | |
671 | "1yybj8bj68v4lxwpn596b6ismh2fyixw5vlqqg26byrn4d9dfmsv")))) | |
672 | (build-system gnu-build-system) | |
673 | (arguments | |
674 | `(#:phases | |
e379d85c EF |
675 | (modify-phases %standard-phases |
676 | (add-before 'check 'patch-check-scripts | |
677 | (lambda _ | |
678 | (substitute* '("checks/roundtrip.sh" | |
679 | "checks/roundtrip-raw.sh") | |
680 | (("/bin/echo") "echo")) | |
681 | #t))))) | |
4380a7b4 EB |
682 | (home-page "http://www.jabberwocky.com/software/paperkey/") |
683 | (synopsis "Backup OpenPGP keys to paper") | |
684 | (description | |
685 | "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key | |
686 | for printing with paper and ink, which have amazingly long retention | |
687 | qualities. To reconstruct a secret key, you re-enter those | |
688 | bytes (whether by hand, OCR, QR code, or the like) and paperkey can use | |
689 | them to transform your existing public key into a secret key.") | |
07157e8a | 690 | (license license:gpl2+))) |