Skip to content

Commit

Permalink
Silence warning when buildFlags are set
Browse files Browse the repository at this point in the history
The warning was to avoid misuse of buildFlags for specifying Go build
tags, but there are other legitimate uses such as `-buildmode`, `-cover`.

Fixes nix-community#104
  • Loading branch information
seedhammer committed Mar 30, 2023
1 parent 3cbf3a5 commit 7598e3f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions builder/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,6 @@ let
, tags ? [ ]
, ldflags ? [ ]

# needed for buildFlags{,Array} warning
, buildFlags ? ""
, buildFlagsArray ? ""

, ...
}@attrs:
let
Expand All @@ -254,8 +250,6 @@ let
pname = attrs.pname or baseNameOf defaultPackage;

in
warnIf (buildFlags != "" || buildFlagsArray != "")
"Use the `ldflags` and/or `tags` attributes instead of `buildFlags`/`buildFlagsArray`"
stdenv.mkDerivation
(optionalAttrs (defaultPackage != "")
{
Expand Down

0 comments on commit 7598e3f

Please sign in to comment.