diff --git a/pkgs/development/compilers/go/1.13.nix b/pkgs/development/compilers/go/1.13.nix index 48e4d9bdc6c..a158e1d4d3b 100644 --- a/pkgs/development/compilers/go/1.13.nix +++ b/pkgs/development/compilers/go/1.13.nix @@ -186,8 +186,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 ''; diff --git a/pkgs/development/compilers/go/1.14.nix b/pkgs/development/compilers/go/1.14.nix index 95a602025d9..6ddd61253a4 100644 --- a/pkgs/development/compilers/go/1.14.nix +++ b/pkgs/development/compilers/go/1.14.nix @@ -193,8 +193,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 '';