forked from lix-project/lix
nix flake check: Warn about deprecated flake outputs
This commit is contained in:
parent
162fbe31ff
commit
d4428d00ae
|
@ -501,6 +501,17 @@ struct CmdFlakeCheck : FlakeCommand
|
||||||
|
|
||||||
state->forceValue(vOutput, pos);
|
state->forceValue(vOutput, pos);
|
||||||
|
|
||||||
|
std::string_view replacement =
|
||||||
|
name == "defaultPackage" ? "packages.<system>.default" :
|
||||||
|
name == "defaultApps" ? "apps.<system>.default" :
|
||||||
|
name == "defaultTemplate" ? "templates.default" :
|
||||||
|
name == "defaultBundler" ? "bundlers.<system>.default" :
|
||||||
|
name == "overlay" ? "overlays.default" :
|
||||||
|
name == "devShell" ? "devShells.<system>.default" :
|
||||||
|
"";
|
||||||
|
if (replacement != "")
|
||||||
|
warn("flake output attribute '%s' is deprecated; use '%s' instead", name, replacement);
|
||||||
|
|
||||||
if (name == "checks") {
|
if (name == "checks") {
|
||||||
state->forceAttrs(vOutput, pos);
|
state->forceAttrs(vOutput, pos);
|
||||||
for (auto & attr : *vOutput.attrs) {
|
for (auto & attr : *vOutput.attrs) {
|
||||||
|
|
Loading…
Reference in a new issue