buildGoPackage: warn if buildFlagsArray is used

This commit is contained in:
zowoq 2021-08-23 14:55:51 +10:00
parent e6494966dd
commit 3c2d7dbfdf

View file

@ -43,8 +43,9 @@
, CGO_ENABLED ? go.CGO_ENABLED , CGO_ENABLED ? go.CGO_ENABLED
# needed for buildFlags warning # needed for buildFlags{,Array} warning
, buildFlags ? "" , buildFlags ? ""
, buildFlagsArray ? ""
, meta ? {}, ... } @ args: , meta ? {}, ... } @ args:
@ -260,6 +261,6 @@ let
} // meta; } // meta;
}); });
in in
lib.warnIf (buildFlags != "") lib.warnIf (buildFlags != "" || buildFlagsArray != "")
"Use the `ldflags` and/or `tags` attributes instead of `buildFlags`" "Use the `ldflags` and/or `tags` attributes instead of `buildFlags`/`buildFlagsArray`"
package package