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..6f71623b50f 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,37 +10,23 @@ assert guileBindings -> guile != null; stdenv.mkDerivation rec { name = "gnutls-${version}"; - inherit src; + inherit src patches; - patches = - # FreeBSD doesn't have , 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 # # for the actual fix. enableParallelBuilding = !guileBindings; - buildInputs = [ zlib lzo lzip ] + buildInputs = [ gmp zlib lzo lzip nettle libtasn1 libidn p11_kit unbound trousers ] ++ 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 . 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 -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index eebe86edbf5..b1a3d772c35 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5950,10 +5950,16 @@ let nettle = nettle27; }; + gnutls34 = callPackage ../development/libraries/gnutls/3.4.nix { + guileBindings = config.gnutls.guile or false; + }; + gnutls32_with_guile = lowPrio (gnutls32.override { guileBindings = true; }); gnutls33_with_guile = lowPrio (gnutls33.override { guileBindings = true; }); + gnutls34_with_guile = lowPrio (gnutls34.override { guileBindings = true; }); + gpac = callPackage ../applications/video/gpac { }; gpgme = callPackage ../development/libraries/gpgme {