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