builder: Use stdenv from arguments, not go.stdenv

It allows users to override the builder to use for example
`pkgsStatic.stdenv`.
This commit is contained in:
Doron Behar 2021-11-27 10:30:38 +02:00
parent 67f22dd738
commit 2428841585

View file

@ -79,7 +79,7 @@ let
removeReferences = [ ] ++ lib.optional (!allowGoReference) go; removeReferences = [ ] ++ lib.optional (!allowGoReference) go;
package = go.stdenv.mkDerivation (attrs // { package = stdenv.mkDerivation (attrs // {
nativeBuildInputs = [ removeReferencesTo go ] ++ nativeBuildInputs; nativeBuildInputs = [ removeReferencesTo go ] ++ nativeBuildInputs;
inherit (go) GOOS GOARCH; inherit (go) GOOS GOARCH;