gnu: glibc: Disable parallel build.
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
40d806af 2;;; Copyright © 2012, 2013, 2014 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>
5249045c 5;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
8d1939e4 6;;;
233e7676 7;;; This file is part of GNU Guix.
8d1939e4 8;;;
233e7676 9;;; GNU Guix is free software; you can redistribute it and/or modify it
8d1939e4
LC
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
233e7676 14;;; GNU Guix is distributed in the hope that it will be useful, but
8d1939e4
LC
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
233e7676 20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
8d1939e4 21
1ffa7090 22(define-module (gnu packages gnupg)
4a44e743 23 #:use-module (guix licenses)
01e11826
AE
24 #:use-module (gnu packages curl)
25 #:use-module (gnu packages openldap)
ea4d96c6 26 #:use-module (gnu packages perl)
1ffa7090 27 #:use-module (gnu packages pth)
ea4d96c6 28 #:use-module (gnu packages python)
1ffa7090 29 #:use-module (gnu packages readline)
b5b73a82 30 #:use-module ((gnu packages compression) #:prefix guix:)
40d806af
LC
31 #:use-module (gnu packages gtk)
32 #:use-module (gnu packages glib)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages ncurses)
8d1939e4 35 #:use-module (guix packages)
87f5d366 36 #:use-module (guix download)
8d1939e4
LC
37 #:use-module (guix build-system gnu))
38
39(define-public libgpg-error
40 (package
41 (name "libgpg-error")
a02ee3d7 42 (version "1.18")
8d1939e4
LC
43 (source
44 (origin
87f5d366 45 (method url-fetch)
0db342a5 46 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
8d1939e4
LC
47 version ".tar.bz2"))
48 (sha256
49 (base32
a02ee3d7 50 "0408v19h3h0q6w61g51hgbdg6cyw81nyzkh70qfprvsc3pkddwcz"))))
8d1939e4
LC
51 (build-system gnu-build-system)
52 (home-page "http://gnupg.org")
35b9e423 53 (synopsis "Library of error values for GnuPG components")
8d1939e4
LC
54 (description
55 "Libgpg-error is a small library that defines common error values
56for all GnuPG components. Among these are GPG, GPGSM, GPGME,
57GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
58Daemon and possibly more in the future.")
4a44e743 59 (license lgpl2.0+)))
8d1939e4
LC
60
61(define-public libgcrypt
62 (package
63 (name "libgcrypt")
bcac69f6 64 (version "1.6.2")
84a3e3b7
LC
65 (source (origin
66 (method url-fetch)
67 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
68 version ".tar.bz2"))
69 (sha256
70 (base32
bcac69f6 71 "0k2wi34qhp5hq71w1ab3kw1gfsx7xff79bvynqkxp35kls94826y"))))
8d1939e4
LC
72 (build-system gnu-build-system)
73 (propagated-inputs
e0932742 74 `(("libgpg-error-host" ,libgpg-error)))
e766f699
JD
75 (native-inputs
76 ;; Needed here for the 'gpg-error' program.
e0932742 77 `(("libgpg-error-native" ,libgpg-error)))
e766f699
JD
78 (arguments
79 ;; The '--with-gpg-error-prefix' argument is needed because otherwise
80 ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and
81 ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one.
82 `(#:configure-flags
83 (list (string-append "--with-gpg-error-prefix="
e0932742 84 (assoc-ref %build-inputs "libgpg-error-host")))))
40fed2d8 85 (outputs '("out" "debug"))
8d1939e4 86 (home-page "http://gnupg.org/")
f50d2669 87 (synopsis "Cryptographic function library")
8d1939e4 88 (description
a22dc0c4
LC
89 "Libgcrypt is a general-purpose cryptographic library. It provides the
90standard cryptographic building blocks such as symmetric ciphers, hash
91algorithms, public key algorithms, large integer functions and random number
92generation.")
4a44e743 93 (license lgpl2.0+)))
8d1939e4 94
a53421fd
AE
95(define-public libgcrypt-1.5
96 (package (inherit libgcrypt)
460f97f8 97 (version "1.5.4")
a53421fd
AE
98 (source
99 (origin
100 (method url-fetch)
101 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
102 version ".tar.bz2"))
103 (sha256
104 (base32
460f97f8 105 "0czvqxkzd5y872ipy6s010ifwdwv29sqbnqc4pf56sd486gqvy6m"))))))
a53421fd 106
8d1939e4
LC
107(define-public libassuan
108 (package
109 (name "libassuan")
2b8ae65e 110 (version "2.2.0")
8d1939e4
LC
111 (source
112 (origin
87f5d366 113 (method url-fetch)
0db342a5 114 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
8d1939e4
LC
115 version ".tar.bz2"))
116 (sha256
117 (base32
2b8ae65e 118 "1ikf9whfi7rg71qa610ynyv12qrw20zkn7zxgvvr9dp41gbqxxbx"))))
8d1939e4
LC
119 (build-system gnu-build-system)
120 (propagated-inputs
121 `(("libgpg-error" ,libgpg-error) ("pth" ,pth)))
122 (home-page "http://gnupg.org")
123 (synopsis
35b9e423 124 "IPC library used by GnuPG and related software")
8d1939e4
LC
125 (description
126 "Libassuan is a small library implementing the so-called Assuan
127protocol. This protocol is used for IPC between most newer
128GnuPG components. Both, server and client side functions are
129provided.")
4a44e743 130 (license lgpl2.0+)))
8d1939e4
LC
131
132(define-public libksba
133 (package
134 (name "libksba")
6eef465e 135 (version "1.3.2")
8d1939e4
LC
136 (source
137 (origin
87f5d366 138 (method url-fetch)
8d1939e4 139 (uri (string-append
0db342a5 140 "mirror://gnupg/libksba/libksba-"
8d1939e4
LC
141 version ".tar.bz2"))
142 (sha256
143 (base32
6eef465e 144 "01l4hvcknk9nb4bvyb6aqaid19jg0wv3ik54j1b89hnzamwm75gb"))))
8d1939e4
LC
145 (build-system gnu-build-system)
146 (propagated-inputs
147 `(("libgpg-error" ,libgpg-error)))
e766f699
JD
148 (native-inputs
149 `(("libgpg-error" ,libgpg-error)))
150 (arguments
151 `(#:configure-flags
152 (list ,@(if (%current-target-system)
153 '("CC_FOR_BUILD=gcc")
154 '())
155 (string-append "--with-gpg-error-prefix="
156 (assoc-ref %build-inputs "libgpg-error")))))
8d1939e4 157 (home-page "http://www.gnupg.org")
35b9e423 158 (synopsis "CMS and X.509 access library")
8d1939e4
LC
159 (description
160 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
161as well as the CMS easily accessible by other applications. Both
162specifications are building blocks of S/MIME and TLS.")
4a44e743 163 (license gpl3+)))
8d1939e4 164
c18ea90f
AE
165(define-public npth
166 (package
167 (name "npth")
168 (version "1.1")
169 (source
170 (origin
171 (method url-fetch)
172 (uri (string-append
173 "mirror://gnupg/npth/npth-"
174 version ".tar.bz2"))
175 (sha256
176 (base32
177 "0zyzwmk4mp6pas87jz35zx0jvwdz7x5b13w225gs73gcn8g5cv49"))))
178 (build-system gnu-build-system)
179 (home-page "http://www.gnupg.org")
180 (synopsis "Non-preemptive thread library")
181 (description
182 "Npth is a library to provide the GNU Pth API and thus a non-preemptive
183threads implementation.
184
185In contrast to GNU Pth is is based on the system's standard threads
186implementation. This allows the use of libraries which are not
187compatible to GNU Pth.")
188 (license (list lgpl3+ gpl2+)))) ; dual license
189
8d1939e4
LC
190(define-public gnupg
191 (package
192 (name "gnupg")
e69a4dd0 193 (version "2.0.26")
58970d6a
LC
194 (source (origin
195 (method url-fetch)
196 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
197 ".tar.bz2"))
198 (sha256
199 (base32
e69a4dd0 200 "1q5qcl5panrvcvpwvz6nl9gayl5a6vwvfhgdcxqpmbl2qc6y6n3p"))))
8d1939e4
LC
201 (build-system gnu-build-system)
202 (inputs
f1be8061 203 `(("bzip2" ,guix:bzip2)
01e11826 204 ("curl" ,curl)
8d1939e4
LC
205 ("libassuan" ,libassuan)
206 ("libgcrypt" ,libgcrypt)
01e11826 207 ("libgpg-error" ,libgpg-error)
8d1939e4
LC
208 ("libksba" ,libksba)
209 ("pth" ,pth)
01e11826 210 ("openldap" ,openldap)
4a44e743 211 ("zlib" ,guix:zlib)
8d1939e4 212 ("readline" ,readline)))
30e9cbb4
AE
213 (arguments
214 `(#:phases
d4bf49b1
EB
215 (alist-cons-before
216 'configure 'patch-config-files
217 (lambda _
218 (substitute* "tests/openpgp/Makefile.in"
219 (("/bin/sh") (which "bash"))))
30e9cbb4 220 %standard-phases)))
8d1939e4 221 (home-page "http://gnupg.org/")
f50d2669 222 (synopsis "GNU Privacy Guard")
8d1939e4 223 (description
a22dc0c4
LC
224 "The GNU Privacy Guard is a complete implementation of the OpenPGP
225standard. It is used to encrypt and sign data and communication. It
226features powerful key management and the ability to access public key
79c311b8 227servers. It includes several libraries: libassuan (IPC between GnuPG
58970d6a
LC
228components), libgpg-error (centralized GnuPG error values), and
229libskba (working with X.509 certificates and CMS data).")
4a44e743 230 (license gpl3+)))
ea4d96c6 231
5249045c
MW
232(define-public gnupg-1
233 (package (inherit gnupg)
8ee380ba 234 (version "1.4.18")
58970d6a
LC
235 (source (origin
236 (method url-fetch)
237 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
238 ".tar.bz2"))
239 (sha256
240 (base32
8ee380ba 241 "1233bppjvdpbbl425ii6l7xvgy0879ghhnmwrph5b6c4g3dgvddp"))))
5249045c
MW
242 (inputs
243 `(("zlib" ,guix:zlib)
244 ("bzip2" ,guix:bzip2)
245 ("curl" ,curl)
246 ("readline" ,readline)
247 ("libgpg-error" ,libgpg-error)))
248 (arguments
249 `(#:phases (alist-cons-after
250 'unpack 'patch-check-sh
251 (lambda _
252 (substitute* "checks/Makefile.in"
253 (("/bin/sh") (which "bash"))))
254 %standard-phases)))))
255
09d5c166
AE
256(define-public gpgme
257 (package
258 (name "gpgme")
456cf627 259 (version "1.5.3")
09d5c166
AE
260 (source
261 (origin
262 (method url-fetch)
263 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
264 ".tar.bz2"))
265 (sha256
266 (base32
456cf627 267 "1jgwmra6cf0i5x2prj92w77vl7hmj276qmmll3lwysbyn32l1c0d"))))
09d5c166 268 (build-system gnu-build-system)
68640c3c
MW
269 (propagated-inputs
270 ;; Needs to be propagated because gpgme.h includes gpg-error.h.
271 `(("libgpg-error" ,libgpg-error)))
09d5c166
AE
272 (inputs
273 `(("gnupg" ,gnupg)
68640c3c 274 ("libassuan" ,libassuan)))
e6a83df1 275 (arguments '(#:make-flags '("GPG=gpg2")))
09d5c166 276 (home-page "http://www.gnupg.org/related_software/gpgme/")
35b9e423 277 (synopsis "Library providing simplified access to GnuPG functionality")
09d5c166
AE
278 (description
279 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
280easier for applications. It provides a High-Level Crypto API for encryption,
281decryption, signing, signature verification and key management. Currently
282it uses GnuPG as its backend but the API isn't restricted to this engine.
283
284Because the direct use of GnuPG from an application can be a complicated
285programming task, it is suggested that all software should try to use GPGME
286instead. This way bug fixes or improvements can be done at a central place
287and every application benefits from this.")
288 (license lgpl2.1+)))
289
ea4d96c6
AE
290(define-public pius
291 (package
292 (name "pius")
2249a168 293 (version "2.0.11")
ea4d96c6
AE
294 (source (origin
295 (method url-fetch)
296 (uri (string-append "mirror://sourceforge/pgpius/pius/"
297 version "/pius-"
298 version ".tar.bz2"))
299 (sha256 (base32
2249a168 300 "0pdbyqz6k0bm182cz81ss7yckmpms5qhrrw0wcr4a1srzcjyzf5f"))))
ea4d96c6
AE
301 (build-system gnu-build-system)
302 (inputs `(("perl" ,perl)
94e3029a 303 ("python" ,python-2) ; uses the Python 2 'print' syntax
9eed6f9b 304 ("gpg" ,gnupg)))
ea4d96c6
AE
305 (arguments
306 `(#:tests? #f
307 #:phases
d4bf49b1 308 (alist-delete
ea4d96c6 309 'configure
d4bf49b1 310 (alist-delete
ea4d96c6 311 'build
ea4d96c6
AE
312 (alist-replace
313 'install
9eed6f9b
LC
314 (lambda* (#:key inputs outputs #:allow-other-keys)
315 (let* ((out (assoc-ref outputs "out"))
316 (gpg (string-append (assoc-ref inputs "gpg")
317 "/bin/gpg2")))
ea4d96c6
AE
318 (mkdir out)
319 (mkdir (string-append out "/bin"))
9eed6f9b
LC
320 (for-each (lambda (file)
321 (substitute* file
322 (("/usr/bin/gpg") gpg))
323 (copy-file file (string-append out "/bin/" file)))
324 '("pius" "pius-keyring-mgr" "pius-party-worksheet"))))
ea4d96c6 325 %standard-phases)))))
9eed6f9b 326 (synopsis "Programs to simplify GnuPG key signing")
ea4d96c6
AE
327 (description
328 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
35b9e423
EB
329parties. It is the main utility and makes it possible to quickly and easily
330sign each UID on a set of PGP keys. It is designed to take the pain out of
ea4d96c6
AE
331the sign-all-the-keys part of PGP Keysigning Party while adding security
332to the process.
333
334pius-keyring-mgr and pius-party-worksheet help organisers of
335PGP keysigning parties.")
336 (license gpl2)
337 (home-page "http://www.phildev.net/pius/index.shtml")))
96be765c
AE
338
339(define-public signing-party
340 (package
341 (name "signing-party")
342 (version "1.1.4")
343 (source (origin
344 (method url-fetch)
345 (uri (string-append "http://ftp.debian.org/debian/pool/main/s/signing-party/signing-party_"
346 version ".orig.tar.gz"))
347 (sha256 (base32
348 "188gp0prbh8qs29lq3pbf0qibfd6jq4fk7i0pfrybl8aahvm84rx"))))
349 (build-system gnu-build-system)
350 (inputs `(("perl" ,perl)))
351 (arguments
352 `(#:tests? #f
353 #:phases
d4bf49b1
EB
354 (alist-cons-after
355 'unpack 'remove-spurious-links
356 (lambda _ (delete-file "keyanalyze/pgpring/depcomp"))
96be765c
AE
357 (alist-replace
358 'configure
359 (lambda* (#:key outputs #:allow-other-keys)
360 (let ((out (assoc-ref outputs "out")))
361 (substitute* "keyanalyze/Makefile"
362 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
363 (substitute* "keyanalyze/Makefile"
364 (("./configure") (string-append "./configure --prefix=" out)))
365 (substitute* "keyanalyze/pgpring/configure"
366 (("/bin/sh") (which "bash")))
367 (substitute* "gpgwrap/Makefile"
368 (("\\} clean") (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
369 out "/bin/gpgwrap\n")))
370 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
371 "keylookup/Makefile" "sig2dot/Makefile"
372 "springgraph/Makefile")
373 (("/usr") out))))
374 (alist-replace
375 'install
376 (lambda* (#:key outputs #:allow-other-keys #:rest args)
377 (let ((out (assoc-ref outputs "out"))
378 (install (assoc-ref %standard-phases 'install)))
379 (apply install args)
380 (for-each
381 (lambda (dir file)
382 (copy-file (string-append dir "/" file)
383 (string-append out "/bin/" file)))
384 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
385 "gpglist" "gpg-mailkeys" "gpgparticipants")
386 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
387 "gpglist" "gpg-mailkeys" "gpgparticipants"))
388 (for-each
389 (lambda (dir file)
390 (copy-file (string-append dir "/" file)
391 (string-append out "/share/man/man1/" file)))
392 '("caff" "caff" "caff" "gpgdir"
393 "gpg-key2ps" "gpglist" "gpg-mailkeys"
394 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
395 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
396 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
397 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
398 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
399 "process_keys.1" "pgpring.1" "keyanalyze.1"))))
400 %standard-phases)))))
35b9e423 401 (synopsis "Collection of scripts for simplifying gnupg key signing")
96be765c 402 (description
35b9e423 403 "Signing-party is a collection for all kinds of PGP/GnuPG related things,
96be765c
AE
404including tools for signing keys, keyring analysis, and party preparation.
405
406 * caff: CA - Fire and Forget signs and mails a key
407
408 * pgp-clean: removes all non-self signatures from key
409
410 * pgp-fixkey: removes broken packets from keys
411
412 * gpg-mailkeys: simply mail out a signed key to its owner
413
414 * gpg-key2ps: generate PostScript file with fingerprint paper strips
415
416 * gpgdir: recursive directory encryption tool
417
418 * gpglist: show who signed which of your UIDs
419
420 * gpgsigs: annotates list of GnuPG keys with already done signatures
421
422 * gpgparticipants: create list of party participants for the organiser
423
424 * gpgwrap: a passphrase wrapper
425
426 * keyanalyze: minimum signing distance (MSD) analysis on keyrings
427
428 * keylookup: ncurses wrapper around gpg --search
429
430 * sig2dot: converts a list of GnuPG signatures to a .dot file
431
432 * springgraph: creates a graph from a .dot file")
433 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
434 ;; and caff and gpgsigs: bsd-3, see
435 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
436 (license gpl2)
437 (home-page "http://pgp-tools.alioth.debian.org/")))
40d806af
LC
438
439(define-public pinentry
440 (package
441 (name "pinentry")
3e74dcd0 442 (version "0.9.0")
40d806af
LC
443 (source (origin
444 (method url-fetch)
445 (uri (string-append "mirror://gnupg/pinentry/pinentry-"
446 version ".tar.bz2"))
447 (sha256
448 (base32
3e74dcd0 449 "1awhajq21hcjgqfxg9czaxg555gij4bba6axrwg8w6lfmc3ml14h"))))
40d806af
LC
450 (build-system gnu-build-system)
451 (inputs
452 `(("ncurses" ,ncurses)
453 ("gtk+" ,gtk+-2)
454 ("glib" ,glib)))
455 (native-inputs
456 `(("pkg-config" ,pkg-config)))
457 (home-page "http://gnupg.org/aegypten2/")
458 (synopsis "GnuPG's interface to passphrase input")
459 (description
460 "Pinentry provides a console and a GTK+ GUI that allows users to
461enter a passphrase when `gpg' or `gpg2' is run and needs it.")
462 (license gpl2+)))
4380a7b4
EB
463
464(define-public paperkey
465 (package
466 (name "paperkey")
467 (version "1.3")
468 (source (origin
469 (method url-fetch)
470 (uri (string-append "http://www.jabberwocky.com/"
471 "software/paperkey/paperkey-"
472 version ".tar.gz"))
473 (sha256
474 (base32
475 "1yybj8bj68v4lxwpn596b6ismh2fyixw5vlqqg26byrn4d9dfmsv"))))
476 (build-system gnu-build-system)
477 (arguments
478 `(#:phases
d4bf49b1
EB
479 (alist-cons-before
480 'check 'patch-check-scripts
481 (lambda _
482 (substitute* '("checks/roundtrip.sh"
483 "checks/roundtrip-raw.sh")
484 (("/bin/echo") "echo")))
4380a7b4
EB
485 %standard-phases)))
486 (home-page "http://www.jabberwocky.com/software/paperkey/")
487 (synopsis "Backup OpenPGP keys to paper")
488 (description
489 "Paperkey extracts the secret bytes from an OpenPGP (GnuPG, PGP, etc) key
490for printing with paper and ink, which have amazingly long retention
491qualities. To reconstruct a secret key, you re-enter those
492bytes (whether by hand, OCR, QR code, or the like) and paperkey can use
493them to transform your existing public key into a secret key.")
494 (license gpl2+)))