gnu: gnupg: Patch out /bin/sh in generated file.
[jackhill/guix/guix.git] / gnu / packages / gnupg.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
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
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages gnupg)
21 #:use-module (guix licenses)
22 #:use-module (gnu packages perl)
23 #:use-module (gnu packages pth)
24 #:use-module (gnu packages python)
25 #:use-module (gnu packages readline)
26 #:use-module ((gnu packages compression)
27 #:renamer (symbol-prefix-proc 'guix:))
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu))
31
32 (define-public libgpg-error
33 (package
34 (name "libgpg-error")
35 (version "1.10")
36 (source
37 (origin
38 (method url-fetch)
39 (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
40 version ".tar.bz2"))
41 (sha256
42 (base32
43 "0cal3jdnzdailr13qcy74grfbplbghkgr3qwk6qjjp4bass2j1jj"))))
44 (build-system gnu-build-system)
45 (home-page "http://gnupg.org")
46 (synopsis
47 "Libgpg-error, a small library that defines common error values for all GnuPG components")
48 (description
49 "Libgpg-error is a small library that defines common error values
50 for all GnuPG components. Among these are GPG, GPGSM, GPGME,
51 GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard
52 Daemon and possibly more in the future.")
53 (license lgpl2.0+)))
54
55 (define-public libgcrypt
56 (package
57 (name "libgcrypt")
58 (version "1.5.0")
59 (source
60 (origin
61 (method url-fetch)
62 (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-"
63 version ".tar.bz2"))
64 (sha256
65 (base32
66 "1ykkh7dm0gyndz7bbpvn3agijj8xb2h02m02f42hm504c18zqqjb"))))
67 (build-system gnu-build-system)
68 (propagated-inputs
69 `(("libgpg-error" ,libgpg-error)))
70 (home-page "http://gnupg.org/")
71 (synopsis
72 "GNU Libgcrypt, a general-pupose cryptographic library")
73 (description
74 "GNU Libgcrypt is a general purpose cryptographic library based on
75 the code from GnuPG. It provides functions for all
76 cryptographic building blocks: symmetric ciphers, hash
77 algorithms, MACs, public key algorithms, large integer
78 functions, random numbers and a lot of supporting functions.")
79 (license lgpl2.0+)))
80
81 (define-public libassuan
82 (package
83 (name "libassuan")
84 (version "2.0.3")
85 (source
86 (origin
87 (method url-fetch)
88 (uri (string-append "mirror://gnupg/libassuan/libassuan-"
89 version ".tar.bz2"))
90 (sha256
91 (base32
92 "06xckkvxxlx7cj77803m8x58gxksap4k8yhspc5cqsy7fhinimds"))))
93 (build-system gnu-build-system)
94 (propagated-inputs
95 `(("libgpg-error" ,libgpg-error) ("pth" ,pth)))
96 (home-page "http://gnupg.org")
97 (synopsis
98 "Libassuan, the IPC library used by GnuPG and related software")
99 (description
100 "Libassuan is a small library implementing the so-called Assuan
101 protocol. This protocol is used for IPC between most newer
102 GnuPG components. Both, server and client side functions are
103 provided.")
104 (license lgpl2.0+)))
105
106 (define-public libksba
107 (package
108 (name "libksba")
109 (version "1.2.0")
110 (source
111 (origin
112 (method url-fetch)
113 (uri (string-append
114 "mirror://gnupg/libksba/libksba-"
115 version ".tar.bz2"))
116 (sha256
117 (base32
118 "0jwk7hm3x3g4hd7l12z3d79dy7359x7lc88dq6z7q0ixn1jwxbq9"))))
119 (build-system gnu-build-system)
120 (propagated-inputs
121 `(("libgpg-error" ,libgpg-error)))
122 (home-page "http://www.gnupg.org")
123 (synopsis
124 "Libksba is a CMS and X.509 access library under development")
125 (description
126 "KSBA (pronounced Kasbah) is a library to make X.509 certificates
127 as well as the CMS easily accessible by other applications. Both
128 specifications are building blocks of S/MIME and TLS.")
129 (license gpl3+)))
130
131 (define-public gnupg
132 (package
133 (name "gnupg")
134 (version "2.0.19")
135 (source
136 (origin
137 (method url-fetch)
138 (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
139 ".tar.bz2"))
140 (sha256
141 (base32
142 "08n636sfffs5qvg9ppiprvsh00q0dmdw425psg3m3nssja53m8pg"))))
143 (build-system gnu-build-system)
144 (inputs
145 `(;; TODO: Add missing optional deps.
146 ;; ("curl" ,curl)
147 ;; ("libusb" ,libusb)
148 ;; ("openldap" ,openldap)
149
150 ("bzip2" ,guix:bzip2)
151 ("libassuan" ,libassuan)
152 ("libgcrypt" ,libgcrypt)
153 ("libksba" ,libksba)
154 ("pth" ,pth)
155 ("libgpg-error" ,libgpg-error)
156 ("zlib" ,guix:zlib)
157 ("readline" ,readline)))
158 (arguments
159 `(#:phases
160 (alist-replace
161 'configure
162 (lambda* (#:key #:allow-other-keys #:rest args)
163 (let ((configure (assoc-ref %standard-phases 'configure)))
164 (substitute* "tests/openpgp/Makefile.in"
165 (("/bin/sh") (which "bash")))
166 (apply configure args)))
167 %standard-phases)))
168 (home-page "http://gnupg.org/")
169 (synopsis
170 "GNU Privacy Guard (GnuPG), GNU Project's implementation of the OpenPGP standard")
171 (description
172 "GnuPG is the GNU project's complete and free implementation of
173 the OpenPGP standard as defined by RFC4880. GnuPG allows to
174 encrypt and sign your data and communication, features a
175 versatile key managment system as well as access modules for all
176 kind of public key directories. GnuPG, also known as GPG, is a
177 command line tool with features for easy integration with other
178 applications. A wealth of frontend applications and libraries
179 are available. Version 2 of GnuPG also provides support for
180 S/MIME.")
181 (license gpl3+)))
182
183 (define-public pius
184 (package
185 (name "pius")
186 (version "2.0.9")
187 (source (origin
188 (method url-fetch)
189 (uri (string-append "mirror://sourceforge/pgpius/pius/"
190 version "/pius-"
191 version ".tar.bz2"))
192 (sha256 (base32
193 "1g1jly3wl4ks6h8ydkygyl2c4i7v3z91rg42005m6vm70y1d8b3d"))))
194 (build-system gnu-build-system)
195 (inputs `(("perl" ,perl)
196 ("python" ,python)))
197 (arguments
198 `(#:tests? #f
199 #:phases
200 (alist-replace
201 'configure
202 (lambda* (#:key #:allow-other-keys) #t)
203 (alist-replace
204 'build
205 (lambda* (#:key #:allow-other-keys) #t)
206 (alist-replace
207 'install
208 (lambda* (#:key outputs #:allow-other-keys)
209 (let ((out (assoc-ref outputs "out")))
210 (mkdir out)
211 (mkdir (string-append out "/bin"))
212 (for-each
213 (lambda (filename)
214 (copy-file filename (string-append out "/bin/" filename)))
215 '("pius" "pius-keyring-mgr" "pius-party-worksheet"))))
216 %standard-phases)))))
217 (synopsis "programs to simplify gnupg key signing")
218 (description
219 "Pius (PGP Individual UID Signer) helps attendees of PGP keysigning
220 parties. It is the main utility and makes it possible to quickly and easily
221 sign each UID on a set of PGP keys. It is designed to take the pain out of
222 the sign-all-the-keys part of PGP Keysigning Party while adding security
223 to the process.
224
225 pius-keyring-mgr and pius-party-worksheet help organisers of
226 PGP keysigning parties.")
227 (license gpl2)
228 (home-page "http://www.phildev.net/pius/index.shtml")))