Merge pull request #114287 from adisbladis/cgo-enabled-buildgopackage
buildGoPackage: Respect passing CGO_ENABLED explicitly
This commit is contained in:
commit
2ce9c4a4ec
@ -35,6 +35,8 @@
|
|||||||
# IE: programs coupled with the compiler
|
# IE: programs coupled with the compiler
|
||||||
, allowGoReference ? false
|
, allowGoReference ? false
|
||||||
|
|
||||||
|
, CGO_ENABLED ? go.CGO_ENABLED
|
||||||
|
|
||||||
, meta ? {}, ... } @ args:
|
, meta ? {}, ... } @ args:
|
||||||
|
|
||||||
|
|
||||||
@ -75,11 +77,13 @@ let
|
|||||||
++ (lib.optional (!dontRenameImports) govers) ++ nativeBuildInputs;
|
++ (lib.optional (!dontRenameImports) govers) ++ nativeBuildInputs;
|
||||||
buildInputs = buildInputs;
|
buildInputs = buildInputs;
|
||||||
|
|
||||||
inherit (go) GOOS GOARCH GO386 CGO_ENABLED;
|
inherit (go) GOOS GOARCH GO386;
|
||||||
|
|
||||||
GOHOSTARCH = go.GOHOSTARCH or null;
|
GOHOSTARCH = go.GOHOSTARCH or null;
|
||||||
GOHOSTOS = go.GOHOSTOS or null;
|
GOHOSTOS = go.GOHOSTOS or null;
|
||||||
|
|
||||||
|
inherit CGO_ENABLED;
|
||||||
|
|
||||||
GO111MODULE = "off";
|
GO111MODULE = "off";
|
||||||
GOFLAGS = lib.optionals (!allowGoReference) [ "-trimpath" ];
|
GOFLAGS = lib.optionals (!allowGoReference) [ "-trimpath" ];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user