2013-06-07 12:39:02 +01:00
|
|
|
{ fetchurl, stdenv, zlib, lzo, libtasn1, nettle, pkgconfig, lzip
|
2012-08-30 21:54:18 +01:00
|
|
|
, guileBindings, guile, perl, gmp }:
|
2008-04-09 08:30:05 +01:00
|
|
|
|
|
|
|
assert guileBindings -> guile != null;
|
|
|
|
|
2014-03-04 21:31:02 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gnutls-3.1.22";
|
2008-04-09 08:30:05 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-06-07 12:39:02 +01:00
|
|
|
url = "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/${name}.tar.lz";
|
2014-03-04 21:31:02 +00:00
|
|
|
sha256 = "177kmq4jn67s7mmb249722nwxmbjwjpphmib7bhzfk43z02j3pvh";
|
2008-04-09 08:30:05 +01:00
|
|
|
};
|
|
|
|
|
2014-03-04 21:31:02 +00:00
|
|
|
# FreeBSD doesn't have <alloca.h>, and Gnulib's `alloca' module isn't used.
|
|
|
|
patches = stdenv.lib.optional stdenv.isFreeBSD ./guile-gnulib-includes.patch;
|
|
|
|
|
2012-10-19 13:00:30 +01:00
|
|
|
# Note: GMP is a dependency of Nettle, whose public headers include
|
|
|
|
# GMP headers, hence the hack.
|
2008-04-09 08:30:05 +01:00
|
|
|
configurePhase = ''
|
2011-12-02 06:21:27 +00:00
|
|
|
./configure --prefix="$out" \
|
2009-08-16 23:59:15 +01:00
|
|
|
--disable-dependency-tracking --enable-fast-install \
|
2011-08-22 18:38:04 +01:00
|
|
|
--without-p11-kit \
|
2012-10-19 13:00:30 +01:00
|
|
|
--with-lzo --with-libtasn1-prefix="${libtasn1}" \
|
|
|
|
--with-libnettle-prefix="${nettle}" \
|
|
|
|
CPPFLAGS="-I${gmp}/include" \
|
2014-03-04 21:31:02 +00:00
|
|
|
${stdenv.lib.optionalString guileBindings
|
|
|
|
"--enable-guile --with-guile-site-dir=\"$out/share/guile/site\""}
|
2008-04-09 08:30:05 +01:00
|
|
|
'';
|
|
|
|
|
2012-12-01 14:18:12 +00:00
|
|
|
# Build of the Guile bindings is not parallel-safe. See
|
|
|
|
# <http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=330995a920037b6030ec0282b51dde3f8b493cad>
|
|
|
|
# for the actual fix.
|
2014-03-04 21:31:02 +00:00
|
|
|
enableParallelBuilding = !guileBindings;
|
2012-10-19 13:00:30 +01:00
|
|
|
|
2013-06-07 12:39:02 +01:00
|
|
|
buildInputs = [ zlib lzo lzip ]
|
2008-06-13 12:59:22 +01:00
|
|
|
++ stdenv.lib.optional guileBindings guile;
|
2008-04-09 08:30:05 +01:00
|
|
|
|
2013-06-03 09:34:03 +01:00
|
|
|
nativeBuildInputs = [ perl pkgconfig ];
|
2011-10-25 18:53:44 +01:00
|
|
|
|
2011-08-22 18:38:29 +01:00
|
|
|
propagatedBuildInputs = [ nettle libtasn1 ];
|
2008-09-06 19:22:35 +01:00
|
|
|
|
2012-08-22 16:24:38 +01:00
|
|
|
# XXX: Gnulib's `test-select' fails on FreeBSD:
|
|
|
|
# http://hydra.nixos.org/build/2962084/nixlog/1/raw .
|
2013-01-21 03:29:26 +00:00
|
|
|
doCheck = (!stdenv.isFreeBSD && !stdenv.isDarwin);
|
2012-04-09 21:51:36 +01:00
|
|
|
|
2014-03-04 21:31:02 +00:00
|
|
|
meta = {
|
2007-11-08 17:48:52 +00:00
|
|
|
description = "The GNU Transport Layer Security Library";
|
2008-06-27 19:18:38 +01:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
GnuTLS is a project that aims to develop a library which
|
|
|
|
provides a secure layer, over a reliable transport
|
|
|
|
layer. Currently the GnuTLS library implements the proposed
|
|
|
|
standards by the IETF's TLS working group.
|
|
|
|
|
|
|
|
Quoting from the TLS protocol specification:
|
|
|
|
|
|
|
|
"The TLS protocol provides communications privacy over the
|
|
|
|
Internet. The protocol allows client/server applications to
|
|
|
|
communicate in a way that is designed to prevent eavesdropping,
|
|
|
|
tampering, or message forgery."
|
|
|
|
'';
|
|
|
|
|
2013-05-17 22:40:37 +01:00
|
|
|
homepage = http://www.gnu.org/software/gnutls/;
|
2008-04-09 08:30:05 +01:00
|
|
|
license = "LGPLv2.1+";
|
2014-03-04 21:31:02 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
2007-11-08 17:48:52 +00:00
|
|
|
};
|
2014-03-04 21:31:02 +00:00
|
|
|
}
|