buildGoApplication: warn if buildFlags is used
This is a port of cb7d80dcaf
This commit is contained in:
parent
f42a0cddb4
commit
8aa44afb7e
1 changed files with 7 additions and 1 deletions
|
@ -181,6 +181,10 @@ let
|
|||
, meta ? { }
|
||||
, passthru ? { }
|
||||
, tags ? [ ]
|
||||
|
||||
# needed for buildFlags warning
|
||||
, buildFlags ? ""
|
||||
|
||||
, ...
|
||||
}@attrs:
|
||||
let
|
||||
|
@ -217,7 +221,9 @@ let
|
|||
inherit go modulesStruct localReplaceCommands defaultPackage;
|
||||
};
|
||||
|
||||
package = stdenv.mkDerivation (lib.optionalAttrs (defaultPackage != "")
|
||||
package = lib.warnIf (buildFlags != "")
|
||||
"Use the `ldflags` and/or `tags` attributes instead of `buildFlags`"
|
||||
stdenv.mkDerivation (lib.optionalAttrs (defaultPackage != "")
|
||||
{
|
||||
pname = attrs.pname or baseNameOf defaultPackage;
|
||||
version = stripVersion (modulesStruct.mod.${defaultPackage}).version;
|
||||
|
|
Loading…
Reference in a new issue