Commit | Line | Data |
---|---|---|
2357f850 | 1 | ;;; GNU Guix --- Functional package management for GNU |
c7ab5a12 | 2 | ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> |
fe3711bc | 3 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
f9975b5a | 4 | ;;; |
2357f850 | 5 | ;;; This file is part of GNU Guix. |
f9975b5a | 6 | ;;; |
2357f850 | 7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
f9975b5a AE |
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 | ;;; | |
2357f850 | 12 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
f9975b5a AE |
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 | |
2357f850 | 18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
f9975b5a | 19 | |
1ffa7090 | 20 | (define-module (gnu packages openssl) |
59a43334 | 21 | #:use-module (gnu packages) |
1ffa7090 | 22 | #:use-module (gnu packages perl) |
b5b73a82 | 23 | #:use-module ((guix licenses) #:prefix license:) |
f9975b5a AE |
24 | #:use-module (guix packages) |
25 | #:use-module (guix download) | |
a16e9204 EB |
26 | #:use-module (guix build-system gnu) |
27 | #:use-module (guix build-system perl)) | |
f9975b5a AE |
28 | |
29 | (define-public openssl | |
30 | (package | |
31 | (name "openssl") | |
1a802c7e | 32 | (version "1.0.2c") |
f9975b5a AE |
33 | (source (origin |
34 | (method url-fetch) | |
35 | (uri (string-append "ftp://ftp.openssl.org/source/openssl-" version | |
36 | ".tar.gz")) | |
5d2933ae LC |
37 | (sha256 |
38 | (base32 | |
1a802c7e | 39 | "10vasdg52qiyqvgbp14n9z7ghglmhzvag9qpiz2nfqssycvvlf00")) |
3e462da5 | 40 | (patches (list (search-patch "openssl-runpath.patch"))))) |
f9975b5a | 41 | (build-system gnu-build-system) |
94e45081 | 42 | (native-inputs `(("perl" ,perl))) |
f9975b5a | 43 | (arguments |
12abb19d LC |
44 | '(#:parallel-build? #f |
45 | #:parallel-tests? #f | |
46 | #:test-target "test" | |
47 | #:phases | |
48 | (alist-replace | |
49 | 'configure | |
50 | (lambda* (#:key outputs #:allow-other-keys) | |
51 | (let ((out (assoc-ref outputs "out"))) | |
52 | (zero? | |
53 | (system* "./config" | |
54 | "shared" ; build shared libraries | |
55 | "--libdir=lib" | |
56 | (string-append "--prefix=" out))))) | |
57 | (alist-cons-before | |
58 | 'patch-source-shebangs 'patch-tests | |
94e45081 JD |
59 | (lambda* (#:key inputs native-inputs #:allow-other-keys) |
60 | (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) | |
12abb19d LC |
61 | (substitute* (find-files "test" ".*") |
62 | (("/bin/sh") | |
63 | (string-append bash "/bin/bash")) | |
64 | (("/bin/rm") | |
65 | "rm")))) | |
66 | %standard-phases)))) | |
148cb1c2 | 67 | (native-search-paths |
da699774 LC |
68 | ;; FIXME: These two variables must designate a single file or directory |
69 | ;; and are not actually "search paths." In practice it works OK in user | |
70 | ;; profiles because there's always just one item that matches the | |
71 | ;; specification. | |
72 | (list (search-path-specification | |
148cb1c2 | 73 | (variable "SSL_CERT_DIR") |
da699774 LC |
74 | (files '("etc/ssl/certs"))) |
75 | (search-path-specification | |
76 | (variable "SSL_CERT_FILE") | |
77 | (files '("etc/ssl/certs/ca-certificates.crt"))))) | |
35b9e423 | 78 | (synopsis "SSL/TLS implementation") |
f9975b5a AE |
79 | (description |
80 | "OpenSSL is an implementation of SSL/TLS") | |
85a8a5f5 | 81 | (license license:openssl) |
f9975b5a | 82 | (home-page "http://www.openssl.org/"))) |
a16e9204 EB |
83 | |
84 | (define-public perl-net-ssleay | |
85 | (package | |
86 | (name "perl-net-ssleay") | |
fc2bf70d | 87 | (version "1.68") |
a16e9204 EB |
88 | (source (origin |
89 | (method url-fetch) | |
90 | (uri (string-append "mirror://cpan/authors/id/M/MI/MIKEM/" | |
91 | "Net-SSLeay-" version ".tar.gz")) | |
92 | (sha256 | |
93 | (base32 | |
0ad8f76f MW |
94 | "1m2wwzhjwsg0drlhp9w12fl6bsgj69v8gdz72jqrqll3qr7f408p")) |
95 | (patches | |
96 | ;; XXX Try removing this patch for perl-net-ssleay > 1.68 | |
97 | (list (search-patch "perl-net-ssleay-disable-ede-test.patch"))))) | |
a16e9204 EB |
98 | (build-system perl-build-system) |
99 | (inputs `(("openssl" ,openssl))) | |
100 | (arguments | |
101 | `(#:phases (alist-cons-before | |
102 | 'configure 'set-ssl-prefix | |
103 | (lambda* (#:key inputs #:allow-other-keys) | |
104 | (setenv "OPENSSL_PREFIX" (assoc-ref inputs "openssl"))) | |
105 | %standard-phases))) | |
106 | (synopsis "Perl extension for using OpenSSL") | |
107 | (description | |
108 | "This module offers some high level convenience functions for accessing | |
109 | web pages on SSL servers (for symmetry, the same API is offered for accessing | |
110 | http servers, too), an sslcat() function for writing your own clients, and | |
111 | finally access to the SSL api of the SSLeay/OpenSSL package so you can write | |
112 | servers or clients for more complicated applications.") | |
113 | (license (package-license perl)) | |
114 | (home-page "http://search.cpan.org/~mikem/Net-SSLeay-1.66/"))) | |
115 | ||
116 |