buildGoModule: fix GOFLAGS for structuredAttrs
This commit is contained in:
@@ -223,18 +223,19 @@ lib.extendMkDerivation {
|
||||
GOTOOLCHAIN = "local";
|
||||
|
||||
CGO_ENABLED = args.env.CGO_ENABLED or go.CGO_ENABLED;
|
||||
};
|
||||
|
||||
GOFLAGS =
|
||||
GOFLAGS
|
||||
++
|
||||
lib.warnIf (lib.any (lib.hasPrefix "-mod=") GOFLAGS)
|
||||
"use `proxyVendor` to control Go module/vendor behavior instead of setting `-mod=` in GOFLAGS"
|
||||
(lib.optional (!finalAttrs.proxyVendor) "-mod=vendor")
|
||||
++
|
||||
lib.warnIf (builtins.elem "-trimpath" GOFLAGS)
|
||||
"`-trimpath` is added by default to GOFLAGS by buildGoModule when allowGoReference isn't set to true"
|
||||
(lib.optional (!finalAttrs.allowGoReference) "-trimpath");
|
||||
GOFLAGS = toString (
|
||||
GOFLAGS
|
||||
++
|
||||
lib.warnIf (lib.any (lib.hasPrefix "-mod=") GOFLAGS)
|
||||
"use `proxyVendor` to control Go module/vendor behavior instead of setting `-mod=` in GOFLAGS"
|
||||
(lib.optional (!finalAttrs.proxyVendor) "-mod=vendor")
|
||||
++
|
||||
lib.warnIf (builtins.elem "-trimpath" GOFLAGS)
|
||||
"`-trimpath` is added by default to GOFLAGS by buildGoModule when allowGoReference isn't set to true"
|
||||
(lib.optional (!finalAttrs.allowGoReference) "-trimpath")
|
||||
);
|
||||
};
|
||||
|
||||
inherit enableParallelBuilding;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user