2012-01-18 20:53:01 +00:00
|
|
|
{ fetchurl, stdenv, zlib, lzo, libtasn1, nettle
|
2012-08-30 20:54:18 +00:00
|
|
|
, guileBindings, guile, perl, gmp }:
|
2008-04-09 07:30:05 +00:00
|
|
|
|
|
|
|
assert guileBindings -> guile != null;
|
|
|
|
|
2012-08-10 21:28:23 +00:00
|
|
|
stdenv.mkDerivation (rec {
|
2008-04-09 07:30:05 +00:00
|
|
|
|
2012-08-10 15:17:32 +00:00
|
|
|
name = "gnutls-3.0.22";
|
2008-04-09 07:30:05 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2011-08-22 17:38:04 +00:00
|
|
|
url = "mirror://gnu/gnutls/${name}.tar.xz";
|
2012-08-10 15:17:32 +00:00
|
|
|
sha256 = "1pp90fm27qi5cd0pq18xcmnl79xcbfwxc54bg1xi1wv0vryqdpcr";
|
2008-04-09 07:30:05 +00:00
|
|
|
};
|
|
|
|
|
2012-08-30 16:07:11 +00:00
|
|
|
# FIXME: Turn into a Nix list.
|
2008-04-09 07:30:05 +00:00
|
|
|
configurePhase = ''
|
2011-12-02 06:21:27 +00:00
|
|
|
./configure --prefix="$out" \
|
2009-08-16 22:59:15 +00:00
|
|
|
--disable-dependency-tracking --enable-fast-install \
|
2011-08-22 17:38:04 +00:00
|
|
|
--without-p11-kit \
|
2009-11-06 22:44:23 +00:00
|
|
|
--with-lzo --with-libtasn1-prefix="${libtasn1}" \
|
2009-04-30 18:43:48 +00:00
|
|
|
${if guileBindings
|
|
|
|
then "--enable-guile --with-guile-site-dir=\"$out/share/guile/site\""
|
2012-08-30 20:54:18 +00:00
|
|
|
else ""}${if stdenv.isSunOS
|
|
|
|
# TODO: Use `--with-libnettle-prefix' on all platforms
|
|
|
|
# Note: GMP is a dependency of Nettle, whose public headers include
|
|
|
|
# GMP headers, hence the hack.
|
|
|
|
then " --with-libnettle-prefix=${nettle} CPPFLAGS=-I${gmp}/include"
|
2009-04-30 18:43:48 +00:00
|
|
|
else ""}
|
2008-04-09 07:30:05 +00:00
|
|
|
'';
|
|
|
|
|
2011-10-25 17:53:44 +00:00
|
|
|
buildInputs = [ zlib lzo ]
|
2008-06-13 11:59:22 +00:00
|
|
|
++ stdenv.lib.optional guileBindings guile;
|
2008-04-09 07:30:05 +00:00
|
|
|
|
2012-01-18 20:53:01 +00:00
|
|
|
buildNativeInputs = [ perl ];
|
2011-10-25 17:53:44 +00:00
|
|
|
|
2011-08-22 17:38:29 +00:00
|
|
|
propagatedBuildInputs = [ nettle libtasn1 ];
|
2008-09-06 18:22:35 +00:00
|
|
|
|
2012-08-22 15:24:38 +00:00
|
|
|
# XXX: Gnulib's `test-select' fails on FreeBSD:
|
|
|
|
# http://hydra.nixos.org/build/2962084/nixlog/1/raw .
|
|
|
|
doCheck = (!stdenv.isFreeBSD);
|
2012-04-09 20:51:36 +00:00
|
|
|
|
2007-11-08 17:48:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "The GNU Transport Layer Security Library";
|
2008-06-27 18:18:38 +00: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."
|
|
|
|
'';
|
|
|
|
|
2007-11-08 17:48:52 +00:00
|
|
|
homepage = http://www.gnu.org/software/gnutls/;
|
2008-04-09 07:30:05 +00:00
|
|
|
license = "LGPLv2.1+";
|
2009-08-16 22:59:15 +00:00
|
|
|
|
|
|
|
maintainers = [ stdenv.lib.maintainers.ludo ];
|
2007-11-08 17:48:52 +00:00
|
|
|
};
|
|
|
|
}
|
2012-08-10 21:28:23 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
(stdenv.lib.optionalAttrs stdenv.isFreeBSD {
|
|
|
|
# FreeBSD doesn't have <alloca.h>, and Gnulib's `alloca' module isn't used.
|
|
|
|
patches = [ ./guile-gnulib-includes.patch ];
|
|
|
|
}))
|