buildGoPackage: warn if buildFlagsArray is used

launchpad/nixpkgs/master
zowoq 3 years ago
parent e6494966dd
commit 3c2d7dbfdf
  1. 7
      pkgs/development/go-packages/generic/default.nix

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

Loading…
Cancel
Save