···163163 inherit (go) GOOS GOARCH;
164164165165 GOFLAGS = GOFLAGS
166166- ++ lib.optional (!proxyVendor) "-mod=vendor"
167167- ++ lib.optional (!allowGoReference) "-trimpath";
166166+ ++ lib.warnIf (lib.any (lib.hasPrefix "-mod=") GOFLAGS) "use `proxyVendor` to control Go module/vendor behavior instead of setting `-mod=` in GOFLAGS"
167167+ (lib.optional (!proxyVendor) "-mod=vendor")
168168+ ++ lib.warnIf (builtins.elem "-trimpath" GOFLAGS) "`-trimpath` is added by default to GOFLAGS by buildGoModule when allowGoReference isn't set to true"
169169+ (lib.optional (!allowGoReference) "-trimpath");
168170 inherit CGO_ENABLED enableParallelBuilding GO111MODULE GOTOOLCHAIN;
169171170172 # If not set to an explicit value, set the buildid empty for reproducibility.
···318320 } // meta;
319321 });
320322in
321321-lib.warnIf (builtins.elem "-trimpath" GOFLAGS) "`-trimpath` is added by default to GOFLAGS by buildGoModule when allowGoReference isn't set to true"
322322-lib.warnIf (lib.any (lib.hasPrefix "-mod=") GOFLAGS) "use `proxyVendor` to control Go module/vendor behavior instead of setting `-mod=` in GOFLAGS"
323323- package
323323+package