summary refs log tree commit diff
path: root/pkgs/development/compilers/go/2-dev.nix
diff options
context:
space:
mode:
authorRyan Burns <rtburns@protonmail.com>2021-02-17 17:52:52 -0800
committerzowoq <59103226+zowoq@users.noreply.github.com>2021-02-20 08:09:42 +1000
commit9511f29f4023362951d5d009f6cc6fde943c2cb8 (patch)
treeb98d37e49211960c31c692abadbab0e45dcf5ebe /pkgs/development/compilers/go/2-dev.nix
parentd8da3220c0ebbf8d88833b411aae2f8880da480c (diff)
downloadnixpkgs-9511f29f4023362951d5d009f6cc6fde943c2cb8.tar
nixpkgs-9511f29f4023362951d5d009f6cc6fde943c2cb8.tar.gz
nixpkgs-9511f29f4023362951d5d009f6cc6fde943c2cb8.tar.bz2
nixpkgs-9511f29f4023362951d5d009f6cc6fde943c2cb8.tar.lz
nixpkgs-9511f29f4023362951d5d009f6cc6fde943c2cb8.tar.xz
nixpkgs-9511f29f4023362951d5d009f6cc6fde943c2cb8.tar.zst
nixpkgs-9511f29f4023362951d5d009f6cc6fde943c2cb8.zip
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`.
Diffstat (limited to 'pkgs/development/compilers/go/2-dev.nix')
-rw-r--r--pkgs/development/compilers/go/2-dev.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/compilers/go/2-dev.nix b/pkgs/development/compilers/go/2-dev.nix
index 4deefd750a5..2bdf6a4950c 100644
--- a/pkgs/development/compilers/go/2-dev.nix
+++ b/pkgs/development/compilers/go/2-dev.nix
@@ -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