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