go: fix cross-compilation
Because: * `go-bootstrap` is a native build input of go, so it needs to have an offset of -1. Otherwise, e.g. when building a go cross-compiler, it will try to make go-bootstrap a cross-compiler too. * have to specify `buildPackages` for the `stdenv` override, otherwise `buildPackages.stdenv` will be the same as `pkgs.gcc8Stdenv`.
This commit is contained in:
parent
d8da3220c0
commit
9511f29f40
@ -13,7 +13,7 @@ let
|
|||||||
|
|
||||||
version = "1.14.15";
|
version = "1.14.15";
|
||||||
|
|
||||||
go_bootstrap = callPackage ./bootstrap.nix { };
|
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
|
||||||
|
|
||||||
goBootstrap = runCommand "go-bootstrap" {} ''
|
goBootstrap = runCommand "go-bootstrap" {} ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
@ -13,7 +13,7 @@ let
|
|||||||
|
|
||||||
version = "1.15.8";
|
version = "1.15.8";
|
||||||
|
|
||||||
go_bootstrap = callPackage ./bootstrap.nix { };
|
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
|
||||||
|
|
||||||
goBootstrap = runCommand "go-bootstrap" {} ''
|
goBootstrap = runCommand "go-bootstrap" {} ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
@ -13,7 +13,7 @@ let
|
|||||||
|
|
||||||
version = "1.16";
|
version = "1.16";
|
||||||
|
|
||||||
go_bootstrap = callPackage ./bootstrap.nix { };
|
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
|
||||||
|
|
||||||
goBootstrap = runCommand "go-bootstrap" {} ''
|
goBootstrap = runCommand "go-bootstrap" {} ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
@ -11,7 +11,7 @@ let
|
|||||||
|
|
||||||
inherit (lib) optionals optionalString;
|
inherit (lib) optionals optionalString;
|
||||||
|
|
||||||
go_bootstrap = callPackage ./bootstrap.nix { };
|
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
|
||||||
|
|
||||||
goBootstrap = runCommand "go-bootstrap" {} ''
|
goBootstrap = runCommand "go-bootstrap" {} ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
|
@ -284,7 +284,7 @@ in
|
|||||||
grsync = callPackage ../applications/misc/grsync { };
|
grsync = callPackage ../applications/misc/grsync { };
|
||||||
|
|
||||||
dockerTools = callPackage ../build-support/docker {
|
dockerTools = callPackage ../build-support/docker {
|
||||||
go = go_1_15;
|
go = buildPackages.go_1_15;
|
||||||
writePython3 = buildPackages.writers.writePython3;
|
writePython3 = buildPackages.writers.writePython3;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -10208,28 +10208,28 @@ in
|
|||||||
inherit (darwin.apple_sdk.frameworks) Security Foundation;
|
inherit (darwin.apple_sdk.frameworks) Security Foundation;
|
||||||
} // lib.optionalAttrs (stdenv.cc.isGNU && stdenv.isAarch64) {
|
} // lib.optionalAttrs (stdenv.cc.isGNU && stdenv.isAarch64) {
|
||||||
stdenv = gcc8Stdenv;
|
stdenv = gcc8Stdenv;
|
||||||
buildPackages = buildPackages // { stdenv = gcc8Stdenv; };
|
buildPackages = buildPackages // { stdenv = buildPackages.gcc8Stdenv; };
|
||||||
});
|
});
|
||||||
|
|
||||||
go_1_15 = callPackage ../development/compilers/go/1.15.nix ({
|
go_1_15 = callPackage ../development/compilers/go/1.15.nix ({
|
||||||
inherit (darwin.apple_sdk.frameworks) Security Foundation;
|
inherit (darwin.apple_sdk.frameworks) Security Foundation;
|
||||||
} // lib.optionalAttrs (stdenv.cc.isGNU && stdenv.isAarch64) {
|
} // lib.optionalAttrs (stdenv.cc.isGNU && stdenv.isAarch64) {
|
||||||
stdenv = gcc8Stdenv;
|
stdenv = gcc8Stdenv;
|
||||||
buildPackages = buildPackages // { stdenv = gcc8Stdenv; };
|
buildPackages = buildPackages // { stdenv = buildPackages.gcc8Stdenv; };
|
||||||
});
|
});
|
||||||
|
|
||||||
go_1_16 = callPackage ../development/compilers/go/1.16.nix ({
|
go_1_16 = callPackage ../development/compilers/go/1.16.nix ({
|
||||||
inherit (darwin.apple_sdk.frameworks) Security Foundation;
|
inherit (darwin.apple_sdk.frameworks) Security Foundation;
|
||||||
} // lib.optionalAttrs (stdenv.cc.isGNU && stdenv.isAarch64) {
|
} // lib.optionalAttrs (stdenv.cc.isGNU && stdenv.isAarch64) {
|
||||||
stdenv = gcc8Stdenv;
|
stdenv = gcc8Stdenv;
|
||||||
buildPackages = buildPackages // { stdenv = gcc8Stdenv; };
|
buildPackages = buildPackages // { stdenv = buildPackages.gcc8Stdenv; };
|
||||||
});
|
});
|
||||||
|
|
||||||
go_2-dev = callPackage ../development/compilers/go/2-dev.nix ({
|
go_2-dev = callPackage ../development/compilers/go/2-dev.nix ({
|
||||||
inherit (darwin.apple_sdk.frameworks) Security Foundation;
|
inherit (darwin.apple_sdk.frameworks) Security Foundation;
|
||||||
} // lib.optionalAttrs (stdenv.cc.isGNU && stdenv.isAarch64) {
|
} // lib.optionalAttrs (stdenv.cc.isGNU && stdenv.isAarch64) {
|
||||||
stdenv = gcc8Stdenv;
|
stdenv = gcc8Stdenv;
|
||||||
buildPackages = buildPackages // { stdenv = gcc8Stdenv; };
|
buildPackages = buildPackages // { stdenv = buildPackages.gcc8Stdenv; };
|
||||||
});
|
});
|
||||||
|
|
||||||
go = go_1_16;
|
go = go_1_16;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user