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>
7 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
38 (define-public libtasn1
45 (uri (string-append "mirror://gnu/libtasn1/libtasn1-"
49 "1fydwh5hlnmprdzmzn4kiqb939br59qv1001k7ah5b626v5l2fv9"))))
50 (build-system gnu-build-system)
51 (native-inputs `(("perl" ,perl)
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")
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
65 (define-public p11-kit
72 (uri (string-append "http://p11-glue.freedesktop.org/releases/p11-kit-"
76 "0p4sadq2c70jdm7b5a5xw8mk2mqy36krpxr3ihnf783arygk6fpg"))
77 (modules '((guix build utils))) ; for substitute*
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)
87 `(("pkg-config" ,pkg-config)))
90 ("libtasn1" ,libtasn1)))
92 `(#:configure-flags '("--without-trust-paths")))
93 (home-page "http://p11-glue.freedesktop.org/p11-kit.html")
94 (synopsis "PKCS#11 library")
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.")
103 (define-public gnutls
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"))
117 "16r96bzsfqx1rlqrkggmhhx6zbxj1fmc3mwpp0ik73ylqn93xav7"))))
118 (build-system gnu-build-system)
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")))
135 `(("pkg-config" ,pkg-config)
138 `(("guile" ,guile-2.0)
141 ;; These are all in the 'Requires.private' field of gnutls.pc.
142 `(("libtasn1" ,libtasn1)
145 (home-page "http://www.gnu.org/software/gnutls/")
146 (synopsis "Transport layer security library")
148 "GnuTLS is a secure communications library implementing the SSL, TLS
149 and DTLS protocols. It is provided in the form of a C library to support the
150 protocols, as well as to parse and write X.5009, PKCS 12, OpenPGP and other
151 required structures.")