diff --git a/pkgs/development/libraries/nettle/generic.nix b/pkgs/development/libraries/nettle/generic.nix index 9633dacd68f2..8999b1c2a9a1 100644 --- a/pkgs/development/libraries/nettle/generic.nix +++ b/pkgs/development/libraries/nettle/generic.nix @@ -1,4 +1,4 @@ -{ stdenv, gmp, gnum4 +{ stdenv, buildPackages, gmp, gnum4 # Version specific args , version, src @@ -12,16 +12,18 @@ stdenv.mkDerivation (rec { outputs = [ "out" "dev" ]; outputBin = "dev"; - buildInputs = [ gnum4 ]; + nativeBuildInputs = [ gnum4 buildPackages.stdenv.cc ]; propagatedBuildInputs = [ gmp ]; - doCheck = (stdenv.system != "i686-cygwin" && !stdenv.isDarwin); + doCheck = (stdenv.system != "i686-cygwin" && !stdenv.isDarwin && stdenv.buildPlatform == stdenv.hostPlatform); enableParallelBuilding = true; patches = stdenv.lib.optional (stdenv.system == "i686-cygwin") ./cygwin.patch; + configureFlags = '' CC_FOR_BUILD=${buildPackages.stdenv.cc.targetPrefix}gcc ''; + meta = with stdenv.lib; { description = "Cryptographic library";