diff --git a/pkgs/development/compilers/go/1.18.nix b/pkgs/development/compilers/go/1.18.nix index c3ec8ceac009d..cbbe6addf6d07 100644 --- a/pkgs/development/compilers/go/1.18.nix +++ b/pkgs/development/compilers/go/1.18.nix @@ -138,9 +138,6 @@ stdenv.mkDerivation rec { preInstall = '' rm -r pkg/obj - # Contains the wrong perl shebang when cross compiling, - # since it is not used for anything we can deleted as well. - rm src/regexp/syntax/make_perl_groups.pl '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then '' mv bin/*_*/* bin rmdir bin/*_* diff --git a/pkgs/development/compilers/go/1.19.nix b/pkgs/development/compilers/go/1.19.nix index 34d4c0d9d2c25..4319a91487e53 100644 --- a/pkgs/development/compilers/go/1.19.nix +++ b/pkgs/development/compilers/go/1.19.nix @@ -138,9 +138,6 @@ stdenv.mkDerivation rec { preInstall = '' rm -r pkg/obj - # Contains the wrong perl shebang when cross compiling, - # since it is not used for anything we can deleted as well. - rm src/regexp/syntax/make_perl_groups.pl '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then '' mv bin/*_*/* bin rmdir bin/*_*