From e4515da3c236d9e17f564cdae130e15efb8eb2e2 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 14 Jun 2022 11:04:55 +0800 Subject: [PATCH] buildGoModule: passing CGO_ENABLED explicitly --- pkgs/development/go-modules/generic/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 7cab5d38c7b3..b0c587ea4712 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -39,6 +39,8 @@ # IE: programs coupled with the compiler , allowGoReference ? false +, CGO_ENABLED ? go.CGO_ENABLED + , meta ? {} # Not needed with buildGoModule @@ -141,6 +143,7 @@ let GO111MODULE = "on"; GOFLAGS = lib.optionals (!proxyVendor) [ "-mod=vendor" ] ++ lib.optionals (!allowGoReference) [ "-trimpath" ]; + inherit CGO_ENABLED; configurePhase = args.configurePhase or '' runHook preConfigure