summary refs log tree commit diff
path: root/pkgs/development/go-modules
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2022-06-14 11:04:55 +0800
committerzowoq <59103226+zowoq@users.noreply.github.com>2022-06-20 15:58:05 +1000
commite4515da3c236d9e17f564cdae130e15efb8eb2e2 (patch)
tree4f288bcfdf07d6964cf33f04d71a8b4473e17ed5 /pkgs/development/go-modules
parentdb487935dd6436cc4b9f9ea6d3650201ddf7055c (diff)
downloadnixpkgs-e4515da3c236d9e17f564cdae130e15efb8eb2e2.tar
nixpkgs-e4515da3c236d9e17f564cdae130e15efb8eb2e2.tar.gz
nixpkgs-e4515da3c236d9e17f564cdae130e15efb8eb2e2.tar.bz2
nixpkgs-e4515da3c236d9e17f564cdae130e15efb8eb2e2.tar.lz
nixpkgs-e4515da3c236d9e17f564cdae130e15efb8eb2e2.tar.xz
nixpkgs-e4515da3c236d9e17f564cdae130e15efb8eb2e2.tar.zst
nixpkgs-e4515da3c236d9e17f564cdae130e15efb8eb2e2.zip
buildGoModule: passing CGO_ENABLED explicitly
Diffstat (limited to 'pkgs/development/go-modules')
-rw-r--r--pkgs/development/go-modules/generic/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix
index 7cab5d38c7b..b0c587ea471 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