diff --git a/pkgs/development/compilers/go/1.18.nix b/pkgs/development/compilers/go/1.18.nix index a6ecf62bbcb7..2e05fac64ffc 100644 --- a/pkgs/development/compilers/go/1.18.nix +++ b/pkgs/development/compilers/go/1.18.nix @@ -149,13 +149,13 @@ stdenv.mkDerivation rec { # 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 '' + '' + (if (stdenv.buildPlatform.system != stdenv.hostPlatform.system) then '' mv bin/*_*/* bin rmdir bin/*_* ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH} ''} - '' else lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) '' + '' else lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system) '' rm -rf bin/*_* ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH} diff --git a/pkgs/development/compilers/go/1.19.nix b/pkgs/development/compilers/go/1.19.nix index 0ed55a7afc92..ecaecd960fd5 100644 --- a/pkgs/development/compilers/go/1.19.nix +++ b/pkgs/development/compilers/go/1.19.nix @@ -149,13 +149,13 @@ stdenv.mkDerivation rec { # 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 '' + '' + (if (stdenv.buildPlatform.system != stdenv.hostPlatform.system) then '' mv bin/*_*/* bin rmdir bin/*_* ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH} ''} - '' else lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) '' + '' else lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system) '' rm -rf bin/*_* ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH} diff --git a/pkgs/development/compilers/go/1.20.nix b/pkgs/development/compilers/go/1.20.nix index 6d08c18b143e..4456301be918 100644 --- a/pkgs/development/compilers/go/1.20.nix +++ b/pkgs/development/compilers/go/1.20.nix @@ -141,13 +141,13 @@ stdenv.mkDerivation rec { # 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 '' + '' + (if (stdenv.buildPlatform.system != stdenv.hostPlatform.system) then '' mv bin/*_*/* bin rmdir bin/*_* ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH} ''} - '' else lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) '' + '' else lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system) '' rm -rf bin/*_* ${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) '' rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH}