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:
Ryan Burns
2021-02-20 08:09:42 +10:00
committed by zowoq
parent d8da3220c0
commit 9511f29f40
5 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ let
version = "1.14.15";
go_bootstrap = callPackage ./bootstrap.nix { };
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
goBootstrap = runCommand "go-bootstrap" {} ''
mkdir $out
+1 -1
View File
@@ -13,7 +13,7 @@ let
version = "1.15.8";
go_bootstrap = callPackage ./bootstrap.nix { };
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
goBootstrap = runCommand "go-bootstrap" {} ''
mkdir $out
+1 -1
View File
@@ -13,7 +13,7 @@ let
version = "1.16";
go_bootstrap = callPackage ./bootstrap.nix { };
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
goBootstrap = runCommand "go-bootstrap" {} ''
mkdir $out
+1 -1
View File
@@ -11,7 +11,7 @@ let
inherit (lib) optionals optionalString;
go_bootstrap = callPackage ./bootstrap.nix { };
go_bootstrap = buildPackages.callPackage ./bootstrap.nix { };
goBootstrap = runCommand "go-bootstrap" {} ''
mkdir $out