buildGo{Module,Package}: warn if buildFlags is used

launchpad/nixpkgs/master
zowoq 3 years ago
parent a6e2f2fc90
commit cb7d80dcaf
  1. 5
      pkgs/development/go-modules/generic/default.nix
  2. 5
      pkgs/development/go-packages/generic/default.nix

@ -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…
Cancel
Save