archive: Add '--authorize'.
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
84a3e3b7 2;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
ea4d96c6 3;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
8d1939e4 4;;;
233e7676 5;;; This file is part of GNU Guix.
8d1939e4 6;;;
233e7676 7;;; GNU Guix is free software; you can redistribute it and/or modify it
8d1939e4
LC
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
233e7676 12;;; GNU Guix is distributed in the hope that it will be useful, but
8d1939e4
LC
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
233e7676 18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
8d1939e4 19
1ffa7090 20(define-module (gnu packages gnupg)
4a44e743 21 #:use-module (guix licenses)
01e11826
AE
22 #:use-module (gnu packages curl)
23 #:use-module (gnu packages openldap)
ea4d96c6 24 #:use-module (gnu packages perl)
1ffa7090 25 #:use-module (gnu packages pth)
ea4d96c6 26 #:use-module (gnu packages python)
1ffa7090
LC
27 #:use-module (gnu packages readline)
28 #:use-module ((gnu packages compression)
4a44e743 29 #:renamer (symbol-prefix-proc 'guix:))
8d1939e4 30 #:use-module (guix packages)
87f5d366 31 #:use-module (guix download)
8d1939e4
LC
32 #:use-module (guix build-system gnu))
33
34(define-public libgpg-error
35 (package
36 (name "libgpg-error")
e0bb2e6b 37 (version "1.12")
8d1939e4
LC
38 (source
39 (origin
87f5d366 40 (method url-fetch)
0db342a5 41 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
8d1939e4
LC
42 version ".tar.bz2"))
43 (sha256
44 (base32
e0bb2e6b 45 "0pz58vr12qihq2f0bypjxsb6cf6ajq5258fmfm8s6lvwm3b9xz6a"))))
8d1939e4 46 (build-system gnu-build-system)
e766f699
JD
47 (arguments
48 (if (%current-target-system)
49 '(#:configure-flags '("CC_FOR_BUILD=gcc"))
50 '()))
8d1939e4
LC
51 (home-page "http://gnupg.org")
52 (synopsis
53 "Libgpg-error, a small library that defines common error values for all GnuPG components")
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")
375c6297 64 (version "1.6.0")
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
375c6297 71 "024plbybsmnxbp39hs92lp6dzvkz2cb70nv69qrwr55d02350bb6"))))
8d1939e4
LC
72 (build-system gnu-build-system)
73 (propagated-inputs
74 `(("libgpg-error" ,libgpg-error)))
e766f699
JD
75 (native-inputs
76 ;; Needed here for the 'gpg-error' program.
77 `(("libgpg-error" ,libgpg-error)))
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="
84 (assoc-ref %build-inputs "libgpg-error")))))
8d1939e4 85 (home-page "http://gnupg.org/")
f50d2669 86 (synopsis "Cryptographic function library")
8d1939e4 87 (description
a22dc0c4
LC
88 "Libgcrypt is a general-purpose cryptographic library. It provides the
89standard cryptographic building blocks such as symmetric ciphers, hash
90algorithms, public key algorithms, large integer functions and random number
91generation.")
4a44e743 92 (license lgpl2.0+)))
8d1939e4 93
a53421fd
AE
94(define-public libgcrypt-1.5
95 (package (inherit libgcrypt)
96 (version "1.5.3")
97 (source
98 (origin
99 (method url-fetch)
100 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
101 version ".tar.bz2"))
102 (sha256
103 (base32
104 "1lar8y3lh61zl5flljpz540d78g99h4d5idfwrfw8lm3gm737xdw"))))))
105
8d1939e4
LC
106(define-public libassuan
107 (package
108 (name "libassuan")
e0bb2e6b 109 (version "2.1.1")
8d1939e4
LC
110 (source
111 (origin
87f5d366 112 (method url-fetch)
0db342a5 113 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
8d1939e4
LC
114 version ".tar.bz2"))
115 (sha256
116 (base32
e0bb2e6b 117 "1783nb0b6nr9yjhb5wfh8ykc5w89f4anppz1kz9913mqg5vxdqi3"))))
8d1939e4
LC
118 (build-system gnu-build-system)
119 (propagated-inputs
120 `(("libgpg-error" ,libgpg-error) ("pth" ,pth)))
121 (home-page "http://gnupg.org")
122 (synopsis
123 "Libassuan, the IPC library used by GnuPG and related software")
124 (description
125 "Libassuan is a small library implementing the so-called Assuan
126protocol. This protocol is used for IPC between most newer
127GnuPG components. Both, server and client side functions are
128provided.")
4a44e743 129 (license lgpl2.0+)))
8d1939e4
LC
130
131(define-public libksba
132 (package
133 (name "libksba")
98fbd7ce 134 (version "1.3.0")
8d1939e4
LC
135 (source
136 (origin
87f5d366 137 (method url-fetch)
8d1939e4 138 (uri (string-append
0db342a5 139 "mirror://gnupg/libksba/libksba-"
8d1939e4
LC
140 version ".tar.bz2"))
141 (sha256
142 (base32
98fbd7ce 143 "0w8rfb6yhcwkwzvjafrashcygy4hd9xwwmvlnkfd1m2h0paywqas"))))
8d1939e4
LC
144 (build-system gnu-build-system)
145 (propagated-inputs
146 `(("libgpg-error" ,libgpg-error)))
e766f699
JD
147 (native-inputs
148 `(("libgpg-error" ,libgpg-error)))
149 (arguments
150 `(#:configure-flags
151 (list ,@(if (%current-target-system)
152 '("CC_FOR_BUILD=gcc")
153 '())
154 (string-append "--with-gpg-error-prefix="
155 (assoc-ref %build-inputs "libgpg-error")))))
8d1939e4
LC
156 (home-page "http://www.gnupg.org")
157 (synopsis
158 "Libksba is a CMS and X.509 access library under development")
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
LC
164
165(define-public gnupg
166 (package
167 (name "gnupg")
de73a878 168 (version "2.0.22")
8d1939e4
LC
169 (source
170 (origin
87f5d366 171 (method url-fetch)
0db342a5
LC
172 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
173 ".tar.bz2"))
8d1939e4
LC
174 (sha256
175 (base32
de73a878 176 "0lg210acj2rxq291q4cwamg9gx6gh2prb1xa93y5jhw5b6r0lza3"))))
8d1939e4
LC
177 (build-system gnu-build-system)
178 (inputs
f1be8061 179 `(("bzip2" ,guix:bzip2)
01e11826 180 ("curl" ,curl)
8d1939e4
LC
181 ("libassuan" ,libassuan)
182 ("libgcrypt" ,libgcrypt)
01e11826 183 ("libgpg-error" ,libgpg-error)
8d1939e4
LC
184 ("libksba" ,libksba)
185 ("pth" ,pth)
01e11826 186 ("openldap" ,openldap)
4a44e743 187 ("zlib" ,guix:zlib)
8d1939e4 188 ("readline" ,readline)))
30e9cbb4
AE
189 (arguments
190 `(#:phases
191 (alist-replace
192 'configure
193 (lambda* (#:key #:allow-other-keys #:rest args)
194 (let ((configure (assoc-ref %standard-phases 'configure)))
195 (substitute* "tests/openpgp/Makefile.in"
196 (("/bin/sh") (which "bash")))
197 (apply configure args)))
198 %standard-phases)))
8d1939e4 199 (home-page "http://gnupg.org/")
f50d2669 200 (synopsis "GNU Privacy Guard")
8d1939e4 201 (description
a22dc0c4
LC
202 "The GNU Privacy Guard is a complete implementation of the OpenPGP
203standard. It is used to encrypt and sign data and communication. It
204features powerful key management and the ability to access public key
79c311b8
LC
205servers. It includes several libraries: libassuan (IPC between GnuPG
206components), libgpg-error (centralized GnuPG error values), and libskba
207(working with X.509 certificates and CMS data).")
4a44e743 208 (license gpl3+)))
ea4d96c6 209
09d5c166
AE
210(define-public gpgme
211 (package
212 (name "gpgme")
213 (version "1.4.3")
214 (source
215 (origin
216 (method url-fetch)
217 (uri (string-append "mirror://gnupg/gpgme/gpgme-" version
218 ".tar.bz2"))
219 (sha256
220 (base32
221 "15h429h6pd67iiv580bjmwbkadpxsdppw0xrqpcm4dvm24jc271d"))))
222 (build-system gnu-build-system)
223 (inputs
224 `(("gnupg" ,gnupg)
225 ("libassuan" ,libassuan)
226 ("libgpg-error" ,libgpg-error)))
227 (home-page "http://www.gnupg.org/related_software/gpgme/")
228 (synopsis "library providing simplified access to GnuPG functionality")
229 (description
230 "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
231easier for applications. It provides a High-Level Crypto API for encryption,
232decryption, signing, signature verification and key management. Currently
233it uses GnuPG as its backend but the API isn't restricted to this engine.
234
235Because the direct use of GnuPG from an application can be a complicated
236programming task, it is suggested that all software should try to use GPGME
237instead. This way bug fixes or improvements can be done at a central place
238and every application benefits from this.")
239 (license lgpl2.1+)))
240
ea4d96c6
AE
241(define-public pius
242 (package
243 (name "pius")
244 (version "2.0.9")
245 (source (origin
246 (method url-fetch)
247 (uri (string-append "mirror://sourceforge/pgpius/pius/"
248 version "/pius-"
249 version ".tar.bz2"))
250 (sha256 (base32
251 "1g1jly3wl4ks6h8ydkygyl2c4i7v3z91rg42005m6vm70y1d8b3d"))))
252 (build-system gnu-build-system)
253 (inputs `(("perl" ,perl)
ee3e314b 254 ("python" ,python-wrapper)
9eed6f9b 255 ("gpg" ,gnupg)))
ea4d96c6
AE
256 (arguments
257 `(#:tests? #f
258 #:phases
259 (alist-replace
260 'configure
261 (lambda* (#:key #:allow-other-keys) #t)
262 (alist-replace
263 'build
264 (lambda* (#:key #:allow-other-keys) #t)
265 (alist-replace
266 'install
9eed6f9b
LC
267 (lambda* (#:key inputs outputs #:allow-other-keys)
268 (let* ((out (assoc-ref outputs "out"))
269 (gpg (string-append (assoc-ref inputs "gpg")
270 "/bin/gpg2")))
ea4d96c6
AE
271 (mkdir out)
272 (mkdir (string-append out "/bin"))
9eed6f9b
LC
273 (for-each (lambda (file)
274 (substitute* file
275 (("/usr/bin/gpg") gpg))
276 (copy-file file (string-append out "/bin/" file)))
277 '("pius" "pius-keyring-mgr" "pius-party-worksheet"))))
ea4d96c6 278 %standard-phases)))))
9eed6f9b 279 (synopsis "Programs to simplify GnuPG key signing")
ea4d96c6
AE
280 (description
281 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
282parties. It is the main utility and makes it possible to quickly and easily
283sign each UID on a set of PGP keys. It is designed to take the pain out of
284the sign-all-the-keys part of PGP Keysigning Party while adding security
285to the process.
286
287pius-keyring-mgr and pius-party-worksheet help organisers of
288PGP keysigning parties.")
289 (license gpl2)
290 (home-page "http://www.phildev.net/pius/index.shtml")))
96be765c
AE
291
292(define-public signing-party
293 (package
294 (name "signing-party")
295 (version "1.1.4")
296 (source (origin
297 (method url-fetch)
298 (uri (string-append "http://ftp.debian.org/debian/pool/main/s/signing-party/signing-party_"
299 version ".orig.tar.gz"))
300 (sha256 (base32
301 "188gp0prbh8qs29lq3pbf0qibfd6jq4fk7i0pfrybl8aahvm84rx"))))
302 (build-system gnu-build-system)
303 (inputs `(("perl" ,perl)))
304 (arguments
305 `(#:tests? #f
306 #:phases
307 (alist-replace
308 'unpack
309 (lambda* (#:key #:allow-other-keys #:rest args)
310 (let ((unpack (assoc-ref %standard-phases 'unpack)))
311 (apply unpack args)
312 ;; remove spurious symlink
313 (delete-file "keyanalyze/pgpring/depcomp")))
314 (alist-replace
315 'configure
316 (lambda* (#:key outputs #:allow-other-keys)
317 (let ((out (assoc-ref outputs "out")))
318 (substitute* "keyanalyze/Makefile"
319 (("LDLIBS") (string-append "CC=" (which "gcc") "\nLDLIBS")))
320 (substitute* "keyanalyze/Makefile"
321 (("./configure") (string-append "./configure --prefix=" out)))
322 (substitute* "keyanalyze/pgpring/configure"
323 (("/bin/sh") (which "bash")))
324 (substitute* "gpgwrap/Makefile"
325 (("\\} clean") (string-append "} clean\ninstall:\n\tinstall -D bin/gpgwrap "
326 out "/bin/gpgwrap\n")))
327 (substitute* '("gpgsigs/Makefile" "keyanalyze/Makefile"
328 "keylookup/Makefile" "sig2dot/Makefile"
329 "springgraph/Makefile")
330 (("/usr") out))))
331 (alist-replace
332 'install
333 (lambda* (#:key outputs #:allow-other-keys #:rest args)
334 (let ((out (assoc-ref outputs "out"))
335 (install (assoc-ref %standard-phases 'install)))
336 (apply install args)
337 (for-each
338 (lambda (dir file)
339 (copy-file (string-append dir "/" file)
340 (string-append out "/bin/" file)))
341 '("caff" "caff" "caff" "gpgdir" "gpg-key2ps"
342 "gpglist" "gpg-mailkeys" "gpgparticipants")
343 '("caff" "pgp-clean" "pgp-fixkey" "gpgdir" "gpg-key2ps"
344 "gpglist" "gpg-mailkeys" "gpgparticipants"))
345 (for-each
346 (lambda (dir file)
347 (copy-file (string-append dir "/" file)
348 (string-append out "/share/man/man1/" file)))
349 '("caff" "caff" "caff" "gpgdir"
350 "gpg-key2ps" "gpglist" "gpg-mailkeys"
351 "gpgparticipants" "gpgsigs" "gpgwrap/doc"
352 "keyanalyze" "keyanalyze/pgpring" "keyanalyze")
353 '("caff.1" "pgp-clean.1" "pgp-fixkey.1" "gpgdir.1"
354 "gpg-key2ps.1" "gpglist.1" "gpg-mailkeys.1"
355 "gpgparticipants.1" "gpgsigs.1" "gpgwrap.1"
356 "process_keys.1" "pgpring.1" "keyanalyze.1"))))
357 %standard-phases)))))
358 (synopsis "collection of scripts for simplifying gnupg key signing")
359 (description
360 "signing-party is a collection for all kinds of PGP/GnuPG related things,
361including tools for signing keys, keyring analysis, and party preparation.
362
363 * caff: CA - Fire and Forget signs and mails a key
364
365 * pgp-clean: removes all non-self signatures from key
366
367 * pgp-fixkey: removes broken packets from keys
368
369 * gpg-mailkeys: simply mail out a signed key to its owner
370
371 * gpg-key2ps: generate PostScript file with fingerprint paper strips
372
373 * gpgdir: recursive directory encryption tool
374
375 * gpglist: show who signed which of your UIDs
376
377 * gpgsigs: annotates list of GnuPG keys with already done signatures
378
379 * gpgparticipants: create list of party participants for the organiser
380
381 * gpgwrap: a passphrase wrapper
382
383 * keyanalyze: minimum signing distance (MSD) analysis on keyrings
384
385 * keylookup: ncurses wrapper around gpg --search
386
387 * sig2dot: converts a list of GnuPG signatures to a .dot file
388
389 * springgraph: creates a graph from a .dot file")
390 ;; gpl2+ for almost all programs, except for keyanalyze: gpl2
391 ;; and caff and gpgsigs: bsd-3, see
392 ;; http://packages.debian.org/changelogs/pool/main/s/signing-party/current/copyright
393 (license gpl2)
394 (home-page "http://pgp-tools.alioth.debian.org/")))