gnu: gnutls: Add debug output.
[jackhill/guix/guix.git] / gnu / packages / gnutls.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
5 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
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
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages gnutls)
23 #:use-module ((guix licenses) #:select (lgpl2.0+ lgpl2.1+ bsd-3))
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix utils)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages guile)
31 #:use-module (gnu packages libffi)
32 #:use-module (gnu packages nettle)
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages texinfo)
36 #:use-module (gnu packages base))
37
38 (define-public libtasn1
39 (package
40 (name "libtasn1")
41 (version "4.4")
42 (source
43 (origin
44 (method url-fetch)
45 (uri (string-append "mirror://gnu/libtasn1/libtasn1-"
46 version ".tar.gz"))
47 (sha256
48 (base32
49 "0p8c5s1gm3z3nn4s9qc6gs18grbk45mx44byqw2l2qzynjqrsd7q"))))
50 (build-system gnu-build-system)
51 (native-inputs `(("perl" ,perl)
52
53 ;; XXX: For some reason, libtasn1.info wants to be
54 ;; rebuilt, so we must provide 'makeinfo'.
55 ("texinfo" ,texinfo)))
56 (home-page "http://www.gnu.org/software/libtasn1/")
57 (synopsis "ASN.1 library")
58 (description
59 "GNU libtasn1 is a library implementing the ASN.1 notation. It is used
60 for transmitting machine-neutral encodings of data objects in computer
61 networking, allowing for formal validation of data according to some
62 specifications.")
63 (license lgpl2.0+)))
64
65 (define-public p11-kit
66 (package
67 (name "p11-kit")
68 (version "0.22.1")
69 (source
70 (origin
71 (method url-fetch)
72 (uri (string-append "http://p11-glue.freedesktop.org/releases/p11-kit-"
73 version ".tar.gz"))
74 (sha256
75 (base32
76 "0p4sadq2c70jdm7b5a5xw8mk2mqy36krpxr3ihnf783arygk6fpg"))
77 (modules '((guix build utils))) ; for substitute*
78 (snippet
79 '(begin
80 ;; Drop one test that fails, also when trying to compile manually.
81 ;; Reported upstream at
82 ;; https://bugs.freedesktop.org/show_bug.cgi?id=89027
83 (substitute* "Makefile.in"
84 (("test-module\\$\\(EXEEXT\\) ") ""))))))
85 (build-system gnu-build-system)
86 (native-inputs
87 `(("pkg-config" ,pkg-config)))
88 (inputs
89 `(("libffi" ,libffi)
90 ("libtasn1" ,libtasn1)))
91 (arguments
92 `(#:configure-flags '("--without-trust-paths")))
93 (home-page "http://p11-glue.freedesktop.org/p11-kit.html")
94 (synopsis "PKCS#11 library")
95 (description
96 "p11-kit provides a way to load and enumerate PKCS#11 modules. It
97 provides a standard configuration setup for installing PKCS#11 modules
98 in such a way that they are discoverable. It also solves problems with
99 coordinating the use of PKCS#11 by different components or libraries
100 living in the same process.")
101 (license bsd-3)))
102
103 (define-public gnutls
104 (package
105 (name "gnutls")
106 (version "3.3.14")
107 (source (origin
108 (method url-fetch)
109 (uri
110 ;; Note: Releases are no longer on ftp.gnu.org since the
111 ;; schism (after version 3.1.5).
112 (string-append "mirror://gnupg/gnutls/v"
113 (version-major+minor version)
114 "/gnutls-" version ".tar.xz"))
115 (sha256
116 (base32
117 "0lpcgkp8bb1b7f9z935f7h9c0srd4fc52404x70hk2ddz8q01yhd"))))
118 (build-system gnu-build-system)
119 (arguments
120 '(#:configure-flags
121 (list (string-append "--with-guile-site-dir="
122 (assoc-ref %outputs "out")
123 "/share/guile/site/2.0")
124 ;; GnuTLS doesn't consult any environment variables to specify
125 ;; the location of the system-wide trust store. Instead it has a
126 ;; configure-time option. Unless specified, its configure script
127 ;; attempts to auto-detect the location by looking for common
128 ;; places in the filesystem, none of which are present in our
129 ;; chroot build environment. If not found, then no default trust
130 ;; store is used, so each program has to provide its own
131 ;; fallback, and users have to configure each program
132 ;; independently. This seems suboptimal.
133 "--with-default-trust-store-dir=/etc/ssl/certs")))
134 (outputs '("out" "debug"))
135 (native-inputs
136 `(("pkg-config" ,pkg-config)
137 ("which" ,which)))
138 (inputs
139 `(("guile" ,guile-2.0)
140 ("perl" ,perl)))
141 (propagated-inputs
142 ;; These are all in the 'Requires.private' field of gnutls.pc.
143 `(("libtasn1" ,libtasn1)
144 ("nettle" ,nettle-2)
145 ("zlib" ,zlib)))
146 (home-page "http://www.gnu.org/software/gnutls/")
147 (synopsis "Transport layer security library")
148 (description
149 "GnuTLS is a secure communications library implementing the SSL, TLS
150 and DTLS protocols. It is provided in the form of a C library to support the
151 protocols, as well as to parse and write X.5009, PKCS 12, OpenPGP and other
152 required structures.")
153 (license lgpl2.1+)))