forked from mirrors/gomod2nix
buildGoApplication: warn if buildFlagsArray is used
This is a port of 3360a376cb
This commit is contained in:
parent
8aa44afb7e
commit
359449a284
1 changed files with 5 additions and 3 deletions
|
@ -182,8 +182,9 @@ let
|
||||||
, passthru ? { }
|
, passthru ? { }
|
||||||
, tags ? [ ]
|
, tags ? [ ]
|
||||||
|
|
||||||
# needed for buildFlags warning
|
# needed for buildFlags{,Array} warning
|
||||||
, buildFlags ? ""
|
, buildFlags ? ""
|
||||||
|
, buildFlagsArray ? ""
|
||||||
|
|
||||||
, ...
|
, ...
|
||||||
}@attrs:
|
}@attrs:
|
||||||
|
@ -221,8 +222,9 @@ let
|
||||||
inherit go modulesStruct localReplaceCommands defaultPackage;
|
inherit go modulesStruct localReplaceCommands defaultPackage;
|
||||||
};
|
};
|
||||||
|
|
||||||
package = lib.warnIf (buildFlags != "")
|
package =
|
||||||
"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`"
|
||||||
stdenv.mkDerivation (lib.optionalAttrs (defaultPackage != "")
|
stdenv.mkDerivation (lib.optionalAttrs (defaultPackage != "")
|
||||||
{
|
{
|
||||||
pname = attrs.pname or baseNameOf defaultPackage;
|
pname = attrs.pname or baseNameOf defaultPackage;
|
||||||
|
|
Loading…
Reference in a new issue