gnu: Add libxklavier.
[jackhill/guix/guix.git] / gnu / packages / gnutls.scm
... / ...
CommitLineData
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013, 2014 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)
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) #:prefix guix:)
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 which))
37
38(define-public libtasn1
39 (package
40 (name "libtasn1")
41 (version "4.2")
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 "1fydwh5hlnmprdzmzn4kiqb939br59qv1001k7ah5b626v5l2fv9"))))
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
60for transmitting machine-neutral encodings of data objects in computer
61networking, allowing for formal validation of data according to some
62specifications.")
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
97provides a standard configuration setup for installing PKCS#11 modules
98in such a way that they are discoverable. It also solves problems with
99coordinating the use of PKCS#11 by different components or libraries
100living in the same process.")
101 (license bsd-3)))
102
103(define-public gnutls
104 (package
105 (name "gnutls")
106 (version "3.3.12")
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 "16r96bzsfqx1rlqrkggmhhx6zbxj1fmc3mwpp0ik73ylqn93xav7"))))
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 (native-inputs
135 `(("pkg-config" ,pkg-config)))
136 (inputs
137 `(("guile" ,guile-2.0)
138 ("perl" ,perl)))
139 (propagated-inputs
140 `(("libtasn1" ,libtasn1)
141 ("nettle" ,nettle)
142 ("which" ,which)
143 ("zlib" ,guix:zlib)))
144 (home-page "http://www.gnu.org/software/gnutls/")
145 (synopsis "Transport layer security library")
146 (description
147 "GnuTLS is a secure communications library implementing the SSL, TLS
148and DTLS protocols. It is provided in the form of a C library to support the
149protocols, as well as to parse and write X.5009, PKCS 12, OpenPGP and other
150required structures.")
151 (license lgpl2.1+)))