From 7d94f57309a44d10e1009544734ce80a06a5a827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 9 Jul 2016 15:15:42 +0200 Subject: [PATCH] gnutls: fixup evaluation after 5148c6c5c09 Noticed on: https://github.com/NixOS/nixpkgs/commit/5148c6c5c0#commitcomment-18184261 --- pkgs/development/libraries/gnutls/generic.nix | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/gnutls/generic.nix b/pkgs/development/libraries/gnutls/generic.nix index 72337475ddf..7cd8267192b 100644 --- a/pkgs/development/libraries/gnutls/generic.nix +++ b/pkgs/development/libraries/gnutls/generic.nix @@ -4,11 +4,15 @@ # Version dependent args , version, src, patches ? [], postPatch ? "", nativeBuildInputs ? [] -, ...}@args: +, ...}: assert guileBindings -> guile != null; - -stdenv.mkDerivation rec { +let + # XXX: Gnulib's `test-select' fails on FreeBSD: + # http://hydra.nixos.org/build/2962084/nixlog/1/raw . + doCheck = (!stdenv.isFreeBSD && !stdenv.isDarwin); +in +stdenv.mkDerivation { name = "gnutls-${version}"; inherit src patches; @@ -19,7 +23,7 @@ stdenv.mkDerivation rec { postPatch = '' sed '2iecho "name constraints tests skipped due to datefudge problems"\nexit 0' \ -i tests/cert-tests/name-constraints - '' + args.postPatch; + '' + postPatch; preConfigure = "patchShebangs ."; configureFlags = @@ -35,18 +39,15 @@ stdenv.mkDerivation rec { # for the actual fix. enableParallelBuilding = !guileBindings; - buildInputs = [ lzo lzip nettle libtasn1 libidn p11_kit zlib gmp autogen ] - ++ lib.optional doCheck nettools + buildInputs = [ lzo lzip nettle libtasn1 libidn p11_kit zlib gmp autogen nettools ] ++ lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) libiconv ++ lib.optional (tpmSupport && stdenv.isLinux) trousers ++ [ unbound ] ++ lib.optional guileBindings guile; - nativeBuildInputs = [ perl pkgconfig ] ++ args.nativeBuildInputs; + nativeBuildInputs = [ perl pkgconfig ] ++ nativeBuildInputs; - # XXX: Gnulib's `test-select' fails on FreeBSD: - # http://hydra.nixos.org/build/2962084/nixlog/1/raw . - doCheck = (!stdenv.isFreeBSD && !stdenv.isDarwin); + inherit doCheck; # Fixup broken libtool and pkgconfig files preFixup = lib.optionalString (!stdenv.isDarwin) ''