From 91da60610175beebd78132591d39b49897aa380d Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Wed, 9 Sep 2015 13:05:00 -0700 Subject: [PATCH] gnutls: Fix parallel build issue introduced in 3.4.x --- pkgs/development/libraries/gnutls/3.4.nix | 9 ++++++++- pkgs/development/libraries/gnutls/generic.nix | 10 ++++++---- pkgs/top-level/all-packages.nix | 6 ++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/gnutls/3.4.nix b/pkgs/development/libraries/gnutls/3.4.nix index d5f74802fa50..debdfadcf348 100644 --- a/pkgs/development/libraries/gnutls/3.4.nix +++ b/pkgs/development/libraries/gnutls/3.4.nix @@ -1,4 +1,4 @@ -{ callPackage, fetchurl, ... } @ args: +{ callPackage, fetchurl, autoreconfHook, ... } @ args: callPackage ./generic.nix (args // rec { version = "3.4.4"; @@ -7,4 +7,11 @@ callPackage ./generic.nix (args // rec { url = "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/gnutls-${version}.tar.lz"; sha256 = "17xazr0fdhlkr13bwiy52xq6z6mssml7q1ydyj8s1hwh68703c75"; }; + + # This fixes some broken parallel dependencies + postPatch = '' + sed -i 's,^BUILT_SOURCES =,\0 systemkey-args.h,g' src/Makefile.am + ''; + + nativeBuildInputs = [ autoreconfHook ]; }) diff --git a/pkgs/development/libraries/gnutls/generic.nix b/pkgs/development/libraries/gnutls/generic.nix index 21fb721a079f..0c2e34291590 100644 --- a/pkgs/development/libraries/gnutls/generic.nix +++ b/pkgs/development/libraries/gnutls/generic.nix @@ -3,15 +3,15 @@ , tpmSupport ? false, trousers # Version dependent args -, version, src, patches ? [] +, version, src, patches ? [], postPatch ? "", nativeBuildInputs ? [] , ...}: assert guileBindings -> guile != null; -stdenv.mkDerivation rec { +stdenv.mkDerivation { name = "gnutls-${version}"; - inherit src patches; + inherit src patches postPatch; outputs = [ "out" "man" ]; @@ -34,7 +34,9 @@ stdenv.mkDerivation rec { ++ [ unbound ] ++ lib.optional guileBindings guile; - nativeBuildInputs = [ perl pkgconfig ]; + # AutoreconfHook is temporary until the patch lands upstream to fix + # header file generation with parallel building + nativeBuildInputs = [ perl pkgconfig ] ++ nativeBuildInputs; # XXX: Gnulib's `test-select' fails on FreeBSD: # http://hydra.nixos.org/build/2962084/nixlog/1/raw . diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a7b6ca665090..586f28723aab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6504,13 +6504,11 @@ let gnutls = gnutls34; - gnutls33 = import ../development/libraries/gnutls/3.3.nix { - inherit callPackage fetchurl; + gnutls33 = callPackage ../development/libraries/gnutls/3.3.nix { guileBindings = config.gnutls.guile or false; }; - gnutls34 = import ../development/libraries/gnutls/3.4.nix { - inherit callPackage fetchurl; + gnutls34 = callPackage ../development/libraries/gnutls/3.4.nix { guileBindings = config.gnutls.guile or false; };