buildGo{Module,Package}: warn if buildFlags is used
This commit is contained in:
parent
a6e2f2fc90
commit
cb7d80dcaf
2 changed files with 10 additions and 0 deletions
|
@ -46,6 +46,9 @@
|
|||
# Not needed with buildGoModule
|
||||
, goPackagePath ? ""
|
||||
|
||||
# needed for buildFlags warning
|
||||
, buildFlags ? ""
|
||||
|
||||
, ... }@args':
|
||||
|
||||
with builtins;
|
||||
|
@ -268,4 +271,6 @@ let
|
|||
};
|
||||
});
|
||||
in
|
||||
lib.warnIf (buildFlags != "")
|
||||
"Use the `ldflags` and/or `tags` attributes instead of `buildFlags`"
|
||||
package
|
||||
|
|
|
@ -43,6 +43,9 @@
|
|||
|
||||
, CGO_ENABLED ? go.CGO_ENABLED
|
||||
|
||||
# needed for buildFlags warning
|
||||
, buildFlags ? ""
|
||||
|
||||
, meta ? {}, ... } @ args:
|
||||
|
||||
|
||||
|
@ -257,4 +260,6 @@ let
|
|||
} // meta;
|
||||
});
|
||||
in
|
||||
lib.warnIf (buildFlags != "")
|
||||
"Use the `ldflags` and/or `tags` attributes instead of `buildFlags`"
|
||||
package
|
||||
|
|
Loading…
Reference in a new issue