diff options
Diffstat (limited to 'pkgs/development/libraries/gnutls')
-rw-r--r-- | pkgs/development/libraries/gnutls/3.4.nix | 12 | ||||
-rw-r--r-- | pkgs/development/libraries/gnutls/generic.nix | 44 | ||||
-rw-r--r-- | pkgs/development/libraries/gnutls/guile-gnulib-includes.patch | 17 | ||||
-rw-r--r-- | pkgs/development/libraries/gnutls/install-fix.patch | 27 |
4 files changed, 58 insertions, 42 deletions
diff --git a/pkgs/development/libraries/gnutls/3.4.nix b/pkgs/development/libraries/gnutls/3.4.nix new file mode 100644 index 00000000000..f768e03f184 --- /dev/null +++ b/pkgs/development/libraries/gnutls/3.4.nix @@ -0,0 +1,12 @@ +{ callPackage, fetchurl, ... } @ args: + +callPackage ./generic.nix (args // rec { + version = "3.4.0"; + + src = fetchurl { + url = "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/gnutls-${version}.tar.lz"; + sha256 = "0mhym25ns3fhjd82p6g0aafhzbfkanryqbxvjy9mi25n2xpr1b95"; + }; + + patches = [ ./install-fix.patch ]; +}) diff --git a/pkgs/development/libraries/gnutls/generic.nix b/pkgs/development/libraries/gnutls/generic.nix index 9c1c2e1b7d8..930713f5987 100644 --- a/pkgs/development/libraries/gnutls/generic.nix +++ b/pkgs/development/libraries/gnutls/generic.nix @@ -1,8 +1,8 @@ -{ fetchurl, stdenv, zlib, lzo, libtasn1, nettle, pkgconfig, lzip -, guileBindings, guile, perl, gmp +{ fetchurl, stdenv, autoreconfHook, zlib, lzo, libtasn1, nettle, pkgconfig, lzip +, guileBindings, guile, perl, gmp, libidn, p11_kit, unbound, trousers # Version dependent args -, version, src +, version, src, patches ? [] , ...}: assert guileBindings -> guile != null; @@ -10,42 +10,36 @@ assert guileBindings -> guile != null; stdenv.mkDerivation rec { name = "gnutls-${version}"; - inherit src; + inherit src patches; - patches = - # FreeBSD doesn't have <alloca.h>, and Gnulib's `alloca' module isn't used. - stdenv.lib.optional stdenv.isFreeBSD ./guile-gnulib-includes.patch - ; - - # Note: GMP is a dependency of Nettle, whose public headers include - # GMP headers, hence the hack. - configurePhase = '' - ./configure --prefix="$out" \ - --disable-dependency-tracking --enable-fast-install \ - --without-p11-kit \ - --with-lzo --with-libtasn1-prefix="${libtasn1}" \ - --with-libnettle-prefix="${nettle}" \ - CPPFLAGS="-I${gmp}/include" \ - ${stdenv.lib.optionalString guileBindings - "--enable-guile --with-guile-site-dir=\"$out/share/guile/site\""} - ''; + configureFlags = [ + "--disable-dependency-tracking" + "--enable-fast-install" + ] ++ stdenv.lib.optional guileBindings + [ "--enable-guile" "--with-guile-site-dir=\${out}/share/guile/site" ]; # 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. enableParallelBuilding = !guileBindings; - buildInputs = [ zlib lzo lzip ] + buildInputs = [ lzo lzip nettle libtasn1 libidn p11_kit zlib gmp trousers unbound ] ++ stdenv.lib.optional guileBindings guile; - nativeBuildInputs = [ perl pkgconfig ]; - - propagatedBuildInputs = [ nettle libtasn1 ]; + nativeBuildInputs = [ perl pkgconfig autoreconfHook ]; # XXX: Gnulib's `test-select' fails on FreeBSD: # http://hydra.nixos.org/build/2962084/nixlog/1/raw . doCheck = (!stdenv.isFreeBSD && !stdenv.isDarwin); + # Fixup broken libtool and pkgconfig files + preFixup = '' + sed -e 's,-ltspi,-L${trousers}/lib -ltspi,' \ + -e 's,-lz,-L${zlib}/lib -lz,' \ + -e 's,-lgmp,-L${gmp}/lib -lgmp,' \ + -i $out/lib/libgnutls.la $out/lib/pkgconfig/gnutls.pc + ''; + meta = with stdenv.lib; { description = "The GNU Transport Layer Security Library"; diff --git a/pkgs/development/libraries/gnutls/guile-gnulib-includes.patch b/pkgs/development/libraries/gnutls/guile-gnulib-includes.patch deleted file mode 100644 index 1624d1f7ab9..00000000000 --- a/pkgs/development/libraries/gnutls/guile-gnulib-includes.patch +++ /dev/null @@ -1,17 +0,0 @@ -commit 699ae6ef085c699dd5f3fb460b0f8a2408cc2860 -Author: Simon Josefsson <simon@josefsson.org> -Date: Thu Aug 9 15:24:11 2012 +0200 - - Add gnulib -I's to guile-snarf command. - ---- gnutls-3.0.22/guile/src/Makefile.in 2012-08-04 20:52:39.000000000 +0200 -+++ gnutls-3.0.22/guile/src/Makefile.in 2012-08-11 21:55:20.000000000 +0200 -@@ -1564,7 +1564,7 @@ AM_CPPFLAGS = \ - # `$(GUILE_CFLAGS)' may contain a series of `-I' switches so it must be - # included here, even though we'd really want `$(GUILE_CPPFLAGS)'. - snarfcppopts = $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ -- $(CFLAGS) $(AM_CFLAGS) $(GUILE_CFLAGS) -+ $(CFLAGS) $(guile_gnutls_v_2_la_CFLAGS) - - all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/pkgs/development/libraries/gnutls/install-fix.patch b/pkgs/development/libraries/gnutls/install-fix.patch new file mode 100644 index 00000000000..48ed2da24c0 --- /dev/null +++ b/pkgs/development/libraries/gnutls/install-fix.patch @@ -0,0 +1,27 @@ +diff --git a/doc/manpages/Makefile.am b/doc/manpages/Makefile.am +index 8e793d3..68de757 100644 +--- a/doc/manpages/Makefile.am ++++ b/doc/manpages/Makefile.am +@@ -134,11 +134,8 @@ APIMANS += gnutls_certificate_get_peers.3 + APIMANS += gnutls_certificate_get_peers_subkey_id.3 + APIMANS += gnutls_certificate_get_trust_list.3 + APIMANS += gnutls_certificate_get_verify_flags.3 +-APIMANS += gnutls_certificate_get_verify_flags.3 +-APIMANS += gnutls_certificate_get_x509_crt.3 + APIMANS += gnutls_certificate_get_x509_crt.3 + APIMANS += gnutls_certificate_get_x509_key.3 +-APIMANS += gnutls_certificate_get_x509_key.3 + APIMANS += gnutls_certificate_send_x509_rdn_sequence.3 + APIMANS += gnutls_certificate_server_set_request.3 + APIMANS += gnutls_certificate_set_dh_params.3 +@@ -1101,7 +1098,7 @@ compare-makefile: + @echo "******************************************************************************" + @echo "If the following step fails copy $(srcdir)/doc/manpages/tmp-compare-makefile to doc/manpages/Makefile.am" + @echo "******************************************************************************" +- FUNCS=`cat $(top_srcdir)/lib/includes/gnutls/*.h | $(top_srcdir)/doc/scripts/getfuncs.pl|sort -d`; \ ++ FUNCS=`cat $(top_srcdir)/lib/includes/gnutls/*.h | $(top_srcdir)/doc/scripts/getfuncs.pl|sort -d|uniq`; \ + MANS=""; \ + for i in $$FUNCS; do \ + MANS="$$MANS\nAPIMANS += $$i.3"; \ +-- +libgit2 0.21.4 |