Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
caeadfdd | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> |
80cc3a0a | 3 | ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org> |
29a7c98a | 4 | ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> |
cc2b77df | 5 | ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> |
9fd0838b | 6 | ;;; Copyright © 2015 David Thompson <davet@gnu.org> |
7890e3ba | 7 | ;;; Copyright © 2015 Leo Famulari <leo@famulari.name> |
3ea110b7 | 8 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
7b150a24 | 9 | ;;; Copyright © 2016 Nils Gillmann <niasterisk@grrlz.net> |
7543f865 | 10 | ;;; |
233e7676 | 11 | ;;; This file is part of GNU Guix. |
7543f865 | 12 | ;;; |
233e7676 | 13 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
7543f865 LC |
14 | ;;; under the terms of the GNU General Public License as published by |
15 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
16 | ;;; your option) any later version. | |
17 | ;;; | |
233e7676 | 18 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
7543f865 LC |
19 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;;; GNU General Public License for more details. | |
22 | ;;; | |
23 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 24 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
7543f865 | 25 | |
a7fd7b68 | 26 | (define-module (gnu packages tls) |
e9aa8d0c | 27 | #:use-module ((guix licenses) #:prefix license:) |
7543f865 LC |
28 | #:use-module (guix packages) |
29 | #:use-module (guix download) | |
29a7c98a | 30 | #:use-module (guix utils) |
7543f865 | 31 | #:use-module (guix build-system gnu) |
cc2b77df | 32 | #:use-module (guix build-system perl) |
7890e3ba | 33 | #:use-module (guix build-system python) |
f61e0e79 | 34 | #:use-module (gnu packages compression) |
013ce67b | 35 | #:use-module (gnu packages) |
1ffa7090 | 36 | #:use-module (gnu packages guile) |
27e86bed | 37 | #:use-module (gnu packages libffi) |
866f469e | 38 | #:use-module (gnu packages libidn) |
7890e3ba | 39 | #:use-module (gnu packages ncurses) |
27e86bed | 40 | #:use-module (gnu packages nettle) |
1ffa7090 | 41 | #:use-module (gnu packages perl) |
27e86bed | 42 | #:use-module (gnu packages pkg-config) |
7890e3ba | 43 | #:use-module (gnu packages python) |
a31f4d35 | 44 | #:use-module (gnu packages texinfo) |
ce0614dd | 45 | #:use-module (gnu packages base)) |
7543f865 LC |
46 | |
47 | (define-public libtasn1 | |
48 | (package | |
49 | (name "libtasn1") | |
dffded62 | 50 | (version "4.8") |
7543f865 LC |
51 | (source |
52 | (origin | |
53 | (method url-fetch) | |
54 | (uri (string-append "mirror://gnu/libtasn1/libtasn1-" | |
55 | version ".tar.gz")) | |
56 | (sha256 | |
57 | (base32 | |
dffded62 | 58 | "04y5m29pqmvkfdbppmsdifyx89v8xclxzklpfc7a1fkr9p4jz07s")))) |
7543f865 | 59 | (build-system gnu-build-system) |
3ea110b7 | 60 | (native-inputs `(("perl" ,perl))) |
7543f865 | 61 | (home-page "http://www.gnu.org/software/libtasn1/") |
f50d2669 | 62 | (synopsis "ASN.1 library") |
7543f865 | 63 | (description |
79c311b8 LC |
64 | "GNU libtasn1 is a library implementing the ASN.1 notation. It is used |
65 | for transmitting machine-neutral encodings of data objects in computer | |
a22dc0c4 LC |
66 | networking, allowing for formal validation of data according to some |
67 | specifications.") | |
e9aa8d0c | 68 | (license license:lgpl2.0+))) |
7543f865 | 69 | |
27e86bed AE |
70 | (define-public p11-kit |
71 | (package | |
72 | (name "p11-kit") | |
14fe9488 | 73 | (version "0.23.1") |
27e86bed AE |
74 | (source |
75 | (origin | |
76 | (method url-fetch) | |
5cc3096c | 77 | (uri (string-append "https://p11-glue.freedesktop.org/releases/p11-kit-" |
27e86bed AE |
78 | version ".tar.gz")) |
79 | (sha256 | |
80 | (base32 | |
14fe9488 | 81 | "1i3a1wdpagm0p3y1bwaz5x5rjhcpqbcrnhkcp10p259vkxk72wz5")) |
27e86bed AE |
82 | (modules '((guix build utils))) ; for substitute* |
83 | (snippet | |
84 | '(begin | |
85 | ;; Drop one test that fails, also when trying to compile manually. | |
86 | ;; Reported upstream at | |
87 | ;; https://bugs.freedesktop.org/show_bug.cgi?id=89027 | |
88 | (substitute* "Makefile.in" | |
89 | (("test-module\\$\\(EXEEXT\\) ") "")))))) | |
90 | (build-system gnu-build-system) | |
91 | (native-inputs | |
92 | `(("pkg-config" ,pkg-config))) | |
93 | (inputs | |
94 | `(("libffi" ,libffi) | |
95 | ("libtasn1" ,libtasn1))) | |
96 | (arguments | |
97 | `(#:configure-flags '("--without-trust-paths"))) | |
98 | (home-page "http://p11-glue.freedesktop.org/p11-kit.html") | |
99 | (synopsis "PKCS#11 library") | |
100 | (description | |
101 | "p11-kit provides a way to load and enumerate PKCS#11 modules. It | |
102 | provides a standard configuration setup for installing PKCS#11 modules | |
103 | in such a way that they are discoverable. It also solves problems with | |
104 | coordinating the use of PKCS#11 by different components or libraries | |
105 | living in the same process.") | |
e9aa8d0c | 106 | (license license:bsd-3))) |
27e86bed | 107 | |
7543f865 LC |
108 | (define-public gnutls |
109 | (package | |
110 | (name "gnutls") | |
c19700c3 | 111 | (version "3.5.0") |
d7d408d5 LC |
112 | (source (origin |
113 | (method url-fetch) | |
114 | (uri | |
115 | ;; Note: Releases are no longer on ftp.gnu.org since the | |
116 | ;; schism (after version 3.1.5). | |
d93627e4 | 117 | (string-append "mirror://gnupg/gnutls/v" |
29a7c98a | 118 | (version-major+minor version) |
d93627e4 | 119 | "/gnutls-" version ".tar.xz")) |
d7d408d5 LC |
120 | (sha256 |
121 | (base32 | |
c19700c3 | 122 | "09dfb0fn4spmdja6hs2yl470fn85fx0pa5nn9njnq7j19ma3nszw")))) |
7543f865 | 123 | (build-system gnu-build-system) |
b94ae0b8 AK |
124 | (arguments |
125 | '(#:configure-flags | |
126 | (list (string-append "--with-guile-site-dir=" | |
127 | (assoc-ref %outputs "out") | |
aa7c7f21 MW |
128 | "/share/guile/site/2.0") |
129 | ;; GnuTLS doesn't consult any environment variables to specify | |
130 | ;; the location of the system-wide trust store. Instead it has a | |
131 | ;; configure-time option. Unless specified, its configure script | |
132 | ;; attempts to auto-detect the location by looking for common | |
133 | ;; places in the filesystem, none of which are present in our | |
134 | ;; chroot build environment. If not found, then no default trust | |
135 | ;; store is used, so each program has to provide its own | |
136 | ;; fallback, and users have to configure each program | |
137 | ;; independently. This seems suboptimal. | |
866f469e MW |
138 | "--with-default-trust-store-dir=/etc/ssl/certs" |
139 | ||
140 | ;; FIXME: Temporarily disable p11-kit support since it is not | |
141 | ;; working on mips64el. | |
606c6380 LC |
142 | "--without-p11-kit") |
143 | ||
144 | #:phases (modify-phases %standard-phases | |
145 | (add-after | |
146 | 'install 'move-doc | |
147 | (lambda* (#:key outputs #:allow-other-keys) | |
148 | ;; Copy the 4.1 MiB of section 3 man pages to "doc". | |
149 | (let* ((out (assoc-ref outputs "out")) | |
150 | (doc (assoc-ref outputs "doc")) | |
9cdce047 | 151 | (mandir (string-append doc "/share/man/man3")) |
606c6380 LC |
152 | (oldman (string-append out "/share/man/man3"))) |
153 | (mkdir-p mandir) | |
154 | (copy-recursively oldman mandir) | |
155 | (delete-file-recursively oldman) | |
156 | #t)))))) | |
157 | (outputs '("out" ;4.4 MiB | |
158 | "debug" | |
159 | "doc")) ;4.1 MiB of man pages | |
a1db0975 | 160 | (native-inputs |
d2fcfd3d SB |
161 | `(("pkg-config" ,pkg-config) |
162 | ("which" ,which))) | |
7543f865 LC |
163 | (inputs |
164 | `(("guile" ,guile-2.0) | |
0cb9b456 | 165 | ("perl" ,perl))) |
7543f865 | 166 | (propagated-inputs |
d2fcfd3d | 167 | ;; These are all in the 'Requires.private' field of gnutls.pc. |
7543f865 | 168 | `(("libtasn1" ,libtasn1) |
866f469e MW |
169 | ("libidn" ,libidn) |
170 | ("nettle" ,nettle) | |
f61e0e79 | 171 | ("zlib" ,zlib))) |
c19700c3 | 172 | (home-page "https://www.gnu.org/software/gnutls/") |
f50d2669 | 173 | (synopsis "Transport layer security library") |
7543f865 | 174 | (description |
a22dc0c4 | 175 | "GnuTLS is a secure communications library implementing the SSL, TLS |
79c311b8 | 176 | and DTLS protocols. It is provided in the form of a C library to support the |
a22dc0c4 LC |
177 | protocols, as well as to parse and write X.5009, PKCS 12, OpenPGP and other |
178 | required structures.") | |
63e8bb12 LC |
179 | (license license:lgpl2.1+) |
180 | (properties '((ftp-server . "ftp.gnutls.org") | |
181 | (ftp-directory . "/gcrypt/gnutls"))))) | |
cc2b77df AE |
182 | |
183 | (define-public openssl | |
184 | (package | |
185 | (name "openssl") | |
1d30d554 | 186 | (version "1.0.2h") |
cc2b77df | 187 | (source (origin |
4cff124b LC |
188 | (method url-fetch) |
189 | (uri (list (string-append "ftp://ftp.openssl.org/source/" | |
190 | name "-" version ".tar.gz") | |
191 | (string-append "ftp://ftp.openssl.org/source/old/" | |
192 | (string-trim-right version char-set:letter) | |
193 | "/" name "-" version ".tar.gz"))) | |
194 | (sha256 | |
195 | (base32 | |
1d30d554 | 196 | "06996ds1rk8xhnyb5y273a7xkcxhggp4bq1g02rab55d7bjhfh0x")) |
fc1adab1 | 197 | (patches (search-patches "openssl-runpath.patch" |
c0eeccbc LC |
198 | "openssl-c-rehash-in.patch" |
199 | "openssl-CVE-2016-2177.patch" | |
200 | "openssl-CVE-2016-2178.patch")))) | |
cc2b77df | 201 | (build-system gnu-build-system) |
8c78aeb7 | 202 | (outputs '("out" |
a909b576 | 203 | "doc" ;1.5MiB of man3 pages |
8c78aeb7 | 204 | "static")) ;6MiB of .a files |
cc2b77df AE |
205 | (native-inputs `(("perl" ,perl))) |
206 | (arguments | |
d03781c3 LC |
207 | `(#:disallowed-references (,perl) |
208 | #:parallel-build? #f | |
cc2b77df AE |
209 | #:parallel-tests? #f |
210 | #:test-target "test" | |
8c9ec203 LF |
211 | |
212 | ;; Changes to OpenSSL sometimes cause Perl to "sneak in" to the closure, | |
213 | ;; so we explicitly disallow it here. | |
214 | #:disallowed-references ,(list (canonical-package perl)) | |
cc2b77df | 215 | #:phases |
b6cb1358 | 216 | (modify-phases %standard-phases |
4fb254a3 | 217 | (add-before |
86c8f1da | 218 | 'configure 'patch-Makefile.org |
4fb254a3 LC |
219 | (lambda* (#:key outputs #:allow-other-keys) |
220 | ;; The default MANDIR is some unusual place. Fix that. | |
221 | (let ((out (assoc-ref outputs "out"))) | |
86c8f1da | 222 | (patch-makefile-SHELL "Makefile.org") |
4fb254a3 LC |
223 | (substitute* "Makefile.org" |
224 | (("^MANDIR[[:blank:]]*=.*$") | |
225 | (string-append "MANDIR = " out "/share/man\n"))) | |
226 | #t))) | |
b6cb1358 LC |
227 | (replace |
228 | 'configure | |
229 | (lambda* (#:key outputs #:allow-other-keys) | |
230 | (let ((out (assoc-ref outputs "out"))) | |
231 | (zero? | |
232 | (system* "./config" | |
233 | "shared" ;build shared libraries | |
234 | "--libdir=lib" | |
4fb254a3 LC |
235 | |
236 | ;; The default for this catch-all directory is | |
237 | ;; PREFIX/ssl. Change that to something more | |
238 | ;; conventional. | |
239 | (string-append "--openssldir=" out | |
240 | "/share/openssl-" ,version) | |
241 | ||
8af5cac5 MW |
242 | (string-append "--prefix=" out) |
243 | ||
244 | ;; XXX FIXME: Work around a code generation bug in GCC | |
245 | ;; 4.9.3 on ARM when compiled with -mfpu=neon. See: | |
246 | ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66917> | |
247 | ,@(if (and (not (%current-target-system)) | |
248 | (string-prefix? "armhf" (%current-system))) | |
249 | '("-mfpu=vfpv3") | |
250 | '())))))) | |
fe8199a8 LC |
251 | (add-after |
252 | 'install 'make-libraries-writable | |
253 | (lambda* (#:key outputs #:allow-other-keys) | |
254 | ;; Make libraries writable so that 'strip' does its job. | |
255 | (let ((out (assoc-ref outputs "out"))) | |
256 | (for-each (lambda (file) | |
257 | (chmod file #o644)) | |
258 | (find-files (string-append out "/lib") | |
259 | "\\.so")) | |
260 | #t))) | |
8c78aeb7 LC |
261 | (add-after 'install 'move-static-libraries |
262 | (lambda* (#:key outputs #:allow-other-keys) | |
263 | ;; Move static libraries to the "static" output. | |
264 | (let* ((out (assoc-ref outputs "out")) | |
265 | (lib (string-append out "/lib")) | |
266 | (static (assoc-ref outputs "static")) | |
267 | (slib (string-append static "/lib"))) | |
268 | (mkdir-p slib) | |
269 | (for-each (lambda (file) | |
270 | (install-file file slib) | |
271 | (delete-file file)) | |
272 | (find-files lib "\\.a$")) | |
273 | #t))) | |
a909b576 LC |
274 | (add-after 'install 'move-man3-pages |
275 | (lambda* (#:key outputs #:allow-other-keys) | |
276 | ;; Move section 3 man pages to "doc". | |
277 | (let* ((out (assoc-ref outputs "out")) | |
278 | (man3 (string-append out "/share/man/man3")) | |
279 | (doc (assoc-ref outputs "doc")) | |
280 | (target (string-append doc "/share/man/man3"))) | |
281 | (mkdir-p target) | |
282 | (for-each (lambda (file) | |
283 | (rename-file file | |
284 | (string-append target "/" | |
285 | (basename file)))) | |
286 | (find-files man3)) | |
287 | #t))) | |
b6cb1358 LC |
288 | (add-before |
289 | 'patch-source-shebangs 'patch-tests | |
290 | (lambda* (#:key inputs native-inputs #:allow-other-keys) | |
291 | (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) | |
292 | (substitute* (find-files "test" ".*") | |
293 | (("/bin/sh") | |
294 | (string-append bash "/bin/bash")) | |
295 | (("/bin/rm") | |
86c8f1da MW |
296 | "rm")) |
297 | #t))) | |
784d6e91 LC |
298 | (add-after |
299 | 'install 'remove-miscellany | |
300 | (lambda* (#:key outputs #:allow-other-keys) | |
301 | ;; The 'misc' directory contains random undocumented shell and Perl | |
302 | ;; scripts. Remove them to avoid retaining a reference on Perl. | |
303 | (let ((out (assoc-ref outputs "out"))) | |
304 | (delete-file-recursively (string-append out "/share/openssl-" | |
305 | ,version "/misc")) | |
306 | #t)))))) | |
cc2b77df AE |
307 | (native-search-paths |
308 | ;; FIXME: These two variables must designate a single file or directory | |
309 | ;; and are not actually "search paths." In practice it works OK in user | |
310 | ;; profiles because there's always just one item that matches the | |
311 | ;; specification. | |
312 | (list (search-path-specification | |
313 | (variable "SSL_CERT_DIR") | |
314 | (files '("etc/ssl/certs"))) | |
315 | (search-path-specification | |
316 | (variable "SSL_CERT_FILE") | |
317 | (files '("etc/ssl/certs/ca-certificates.crt"))))) | |
318 | (synopsis "SSL/TLS implementation") | |
319 | (description | |
e881752c | 320 | "OpenSSL is an implementation of SSL/TLS.") |
e9aa8d0c | 321 | (license license:openssl) |
cc2b77df AE |
322 | (home-page "http://www.openssl.org/"))) |
323 | ||
cb6a802c AE |
324 | (define-public libressl |
325 | (package | |
326 | (name "libressl") | |
f663e097 | 327 | (version "2.3.6") |
cb6a802c AE |
328 | (source |
329 | (origin | |
330 | (method url-fetch) | |
331 | (uri (string-append | |
332 | "http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-" | |
333 | version ".tar.gz")) | |
1a957c21 LF |
334 | (sha256 |
335 | (base32 | |
f663e097 | 336 | "1yipsp1ici207nbminbf1knh252kzvqg036v0xpx0fw1wrwlg2im")))) |
cb6a802c AE |
337 | (build-system gnu-build-system) |
338 | (native-search-paths | |
339 | ;; FIXME: These two variables must designate a single file or directory | |
340 | ;; and are not actually "search paths." In practice it works OK in | |
341 | ;; user profiles because there's always just one item that matches the | |
342 | ;; specification. | |
343 | (list (search-path-specification | |
344 | (variable "SSL_CERT_DIR") | |
345 | (files '("etc/ssl/certs"))) | |
346 | (search-path-specification | |
347 | (variable "SSL_CERT_FILE") | |
348 | (files '("etc/ssl/certs/ca-certificates.crt"))))) | |
349 | (home-page "http://www.libressl.org/") | |
350 | (synopsis "SSL/TLS implementation") | |
351 | (description "LibreSSL is a version of the TLS/crypto stack forked | |
352 | from OpenSSL in 2014, with the goals of modernizing the codebase, improving | |
353 | security, and applying best practice development processes.") | |
354 | ;; Files taken from OpenSSL keep their license, others are under various | |
355 | ;; non-copyleft licenses. | |
356 | (license (list license:openssl | |
357 | (license:non-copyleft | |
358 | "file://COPYING" | |
359 | "See COPYING in the distribution."))))) | |
360 | ||
6cefd53d | 361 | (define-public python-acme |
7890e3ba | 362 | (package |
6cefd53d | 363 | (name "python-acme") |
65924b10 | 364 | (version "0.8.1") |
7890e3ba | 365 | (source (origin |
9495cf9a LF |
366 | (method url-fetch) |
367 | (uri (string-append | |
368 | "https://pypi.python.org/packages/" | |
65924b10 | 369 | "f5/7a/11a99b5d1d1c692f6eed27cfab69e6ba4d2f0c2a461d2607e6a930ff2c68/" |
9495cf9a | 370 | "acme-" version ".tar.gz")) |
7890e3ba LF |
371 | (sha256 |
372 | (base32 | |
65924b10 | 373 | "17vx2miczpd8ww4xizmc0nca2c7jf04wnhfnswx2bxhb537lmsnk")))) |
7890e3ba LF |
374 | (build-system python-build-system) |
375 | (arguments | |
6cefd53d | 376 | `(#:phases |
9bee9d87 LF |
377 | (modify-phases %standard-phases |
378 | (add-before 'install 'disable-egg-compression | |
379 | (lambda _ | |
380 | ;; Do not compress the egg. | |
381 | ;; See <http://bugs.gnu.org/20765>. | |
382 | (let ((port (open-file "setup.cfg" "a"))) | |
383 | (display "\n[easy_install]\nzip_ok = 0\n" | |
384 | port) | |
385 | (close-port port) | |
50a7963a LF |
386 | #t))) |
387 | (add-after 'install 'docs | |
388 | (lambda* (#:key outputs #:allow-other-keys) | |
389 | (let* ((out (assoc-ref outputs "out")) | |
390 | (man (string-append out "/share/man/man1")) | |
391 | (info (string-append out "/info"))) | |
392 | (and (zero? (system* "make" "-C" "docs" "man" "info")) | |
393 | (install-file "docs/_build/texinfo/acme-python.info" info) | |
394 | (install-file "docs/_build/man/acme-python.1" man) | |
395 | #t))))))) | |
396 | ;; TODO: Add optional inputs for testing. | |
7890e3ba | 397 | (native-inputs |
6cefd53d | 398 | `(("python-mock" ,python-mock) |
50a7963a LF |
399 | ;; For documentation |
400 | ("python-sphinx" ,python-sphinx) | |
401 | ("python-sphinxcontrib-programoutput" ,python-sphinxcontrib-programoutput) | |
402 | ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) | |
403 | ("python-setuptools" ,python-setuptools) | |
404 | ("texinfo" ,texinfo))) | |
7890e3ba | 405 | (propagated-inputs |
6cefd53d LF |
406 | `(("python-ndg-httpsclient" ,python-ndg-httpsclient) |
407 | ("python-werkzeug" ,python-werkzeug) | |
408 | ("python-six" ,python-six) | |
409 | ("python-requests" ,python-requests) | |
410 | ("python-pytz" ,python-pytz) | |
411 | ("python-pyrfc3339" ,python-pyrfc3339) | |
412 | ("python-pyasn1" ,python-pyasn1) | |
413 | ("python-cryptography" ,python-cryptography) | |
414 | ("python-pyopenssl" ,python-pyopenssl))) | |
7890e3ba LF |
415 | (home-page "https://github.com/letsencrypt/letsencrypt") |
416 | (synopsis "ACME protocol implementation in Python") | |
417 | (description "ACME protocol implementation in Python") | |
418 | (license license:asl2.0))) | |
419 | ||
6cefd53d LF |
420 | (define-public python2-acme |
421 | (package-with-python2 python-acme)) | |
422 | ||
9495cf9a | 423 | (define-public certbot |
9fd0838b | 424 | (package |
9495cf9a | 425 | (name "certbot") |
65924b10 | 426 | (version "0.8.1") |
9fd0838b DT |
427 | (source (origin |
428 | (method url-fetch) | |
9495cf9a LF |
429 | (uri (string-append |
430 | "https://pypi.python.org/packages/" | |
65924b10 | 431 | "a2/3b/4756e6a0ceb14e084042a2a65c615d68d25621c6fd446d0fc10d14c4ce7d/" |
9495cf9a | 432 | name "-" version ".tar.gz")) |
9fd0838b DT |
433 | (sha256 |
434 | (base32 | |
65924b10 | 435 | "0w972cf2mk74aji5d8dylg3jw6wczg01gb4asf3ndv8c64yxza3c")))) |
9fd0838b DT |
436 | (build-system python-build-system) |
437 | (arguments | |
f9263d9a LF |
438 | `(#:python ,python-2 |
439 | #:phases | |
440 | (modify-phases %standard-phases | |
234d0b69 | 441 | (add-after 'build 'docs |
f9263d9a LF |
442 | (lambda* (#:key outputs #:allow-other-keys) |
443 | (let* ((out (assoc-ref outputs "out")) | |
444 | (man1 (string-append out "/share/man/man1")) | |
445 | (man7 (string-append out "/share/man/man7")) | |
446 | (info (string-append out "/info"))) | |
f9263d9a LF |
447 | (and |
448 | (zero? (system* "make" "-C" "docs" "man" "info")) | |
9495cf9a LF |
449 | (install-file "docs/_build/texinfo/Certbot.info" info) |
450 | (install-file "docs/_build/man/certbot.1" man1) | |
451 | (install-file "docs/_build/man/certbot.7" man7) | |
f9263d9a LF |
452 | #t))))))) |
453 | ;; TODO: Add optional inputs for testing. | |
9fd0838b DT |
454 | (native-inputs |
455 | `(("python2-nose" ,python2-nose) | |
f9263d9a LF |
456 | ("python2-mock" ,python2-mock) |
457 | ;; For documentation | |
458 | ("python2-sphinx" ,python2-sphinx) | |
459 | ("python2-sphinx-rtd-theme" ,python2-sphinx-rtd-theme) | |
460 | ("python2-sphinx-repoze-autointerface" ,python2-sphinx-repoze-autointerface) | |
461 | ("python2-sphinxcontrib-programoutput" ,python2-sphinxcontrib-programoutput) | |
462 | ("texinfo" ,texinfo))) | |
9fd0838b | 463 | (propagated-inputs |
6cefd53d | 464 | `(("python2-acme" ,python2-acme) |
9fd0838b DT |
465 | ("python2-zope-interface" ,python2-zope-interface) |
466 | ("python2-pythondialog" ,python2-pythondialog) | |
467 | ("python2-pyrfc3339" ,python2-pyrfc3339) | |
468 | ("python2-pyopenssl" ,python2-pyopenssl) | |
469 | ("python2-configobj" ,python2-configobj) | |
470 | ("python2-configargparse" ,python2-configargparse) | |
471 | ("python2-zope-component" ,python2-zope-component) | |
472 | ("python2-parsedatetime" ,python2-parsedatetime) | |
473 | ("python2-six" ,python2-six) | |
474 | ("python2-psutil" ,python2-psutil) | |
475 | ("python2-requests" ,python2-requests) | |
476 | ("python2-pytz" ,python2-pytz))) | |
477 | (synopsis "Let's Encrypt client") | |
478 | (description "Tool to automatically receive and install X.509 certificates | |
479 | to enable TLS on servers. The client will interoperate with the Let’s Encrypt CA which | |
480 | will be issuing browser-trusted certificates for free.") | |
24778368 | 481 | (home-page "https://certbot.eff.org/") |
9fd0838b DT |
482 | (license license:asl2.0))) |
483 | ||
9495cf9a LF |
484 | (define-public letsencrypt |
485 | (package (inherit certbot) | |
486 | (name "letsencrypt"))) | |
487 | ||
cc2b77df AE |
488 | (define-public perl-net-ssleay |
489 | (package | |
490 | (name "perl-net-ssleay") | |
491 | (version "1.68") | |
492 | (source (origin | |
493 | (method url-fetch) | |
494 | (uri (string-append "mirror://cpan/authors/id/M/MI/MIKEM/" | |
495 | "Net-SSLeay-" version ".tar.gz")) | |
496 | (sha256 | |
497 | (base32 | |
1084ec08 | 498 | "1m2wwzhjwsg0drlhp9w12fl6bsgj69v8gdz72jqrqll3qr7f408p")))) |
cc2b77df | 499 | (build-system perl-build-system) |
1084ec08 MW |
500 | (native-inputs |
501 | `(("patch" ,patch) | |
502 | ("patch/disable-ede-test" | |
503 | ,(search-patch "perl-net-ssleay-disable-ede-test.patch")))) | |
cc2b77df AE |
504 | (inputs `(("openssl" ,openssl))) |
505 | (arguments | |
1084ec08 MW |
506 | `(#:phases |
507 | (modify-phases %standard-phases | |
508 | (add-after | |
509 | 'unpack 'apply-patch | |
510 | (lambda* (#:key inputs #:allow-other-keys) | |
511 | ;; XXX We apply this patch here instead of in the 'origin' because | |
512 | ;; this package's build system fails badly when the source file | |
513 | ;; times are zeroed. | |
514 | ;; XXX Try removing this patch for perl-net-ssleay > 1.68 | |
515 | (zero? (system* "patch" "--force" "-p1" "-i" | |
516 | (assoc-ref inputs "patch/disable-ede-test"))))) | |
517 | (add-before | |
518 | 'configure 'set-ssl-prefix | |
519 | (lambda* (#:key inputs #:allow-other-keys) | |
520 | (setenv "OPENSSL_PREFIX" (assoc-ref inputs "openssl")) | |
521 | #t))))) | |
cc2b77df AE |
522 | (synopsis "Perl extension for using OpenSSL") |
523 | (description | |
524 | "This module offers some high level convenience functions for accessing | |
525 | web pages on SSL servers (for symmetry, the same API is offered for accessing | |
526 | http servers, too), an sslcat() function for writing your own clients, and | |
527 | finally access to the SSL api of the SSLeay/OpenSSL package so you can write | |
528 | servers or clients for more complicated applications.") | |
529 | (license (package-license perl)) | |
530 | (home-page "http://search.cpan.org/~mikem/Net-SSLeay-1.66/"))) |