From 5b761a86871583485ebc8673080d16b93ce87eae Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 18 Oct 2017 00:10:08 -0400 Subject: [PATCH] nettle: Enable cross-compilation --- pkgs/development/libraries/nettle/generic.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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";