Enable Cgo by default

To be in line with the behaviour of buildGoModule since https://github.com/NixOS/nixpkgs/pull/177594.
This commit is contained in:
adisbladis 2022-08-24 11:56:19 +08:00
parent 055777bf88
commit 5149c67e6e

View file

@ -172,6 +172,8 @@ let
dontConfigure = true;
dontInstall = true;
CGO_ENABLED = attrs.CGO_ENABLED or go.CGO_ENABLED;
propagatedBuildInputs = [ go ];
GO_NO_VENDOR_CHECKS = "1";
@ -253,6 +255,7 @@ let
inherit (go) GOOS GOARCH;
GO_NO_VENDOR_CHECKS = "1";
CGO_ENABLED = attrs.CGO_ENABLED or go.CGO_ENABLED;
GO111MODULE = "on";
GOFLAGS = [ "-mod=vendor" ] ++ lib.optionals (!allowGoReference) [ "-trimpath" ];