diff --git a/pkgs/development/compilers/go/1.15.nix b/pkgs/development/compilers/go/1.15.nix index 69becebe770..cd6d5faaabb 100644 --- a/pkgs/development/compilers/go/1.15.nix +++ b/pkgs/development/compilers/go/1.15.nix @@ -196,8 +196,11 @@ stdenv.mkDerivation rec { export PATH=$(pwd)/bin:$PATH + ${optionalString (stdenv.buildPlatform != stdenv.targetPlatform) '' # Independent from host/target, CC should produce code for the building system. + # We only set it when cross-compiling. export CC=${buildPackages.stdenv.cc}/bin/cc + ''} ulimit -a '';