mirror of
https://github.com/tweag/gomod2nix.git
synced 2024-11-09 12:09:08 +00:00
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