mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
Allow welcomeText
when checking a flake template
Fix https://github.com/NixOS/nix/issues/6321
This commit is contained in:
parent
a4a1de69dc
commit
5abe3f4aa6
2 changed files with 4 additions and 1 deletions
|
@ -463,7 +463,7 @@ struct CmdFlakeCheck : FlakeCommand
|
||||||
|
|
||||||
for (auto & attr : *v.attrs) {
|
for (auto & attr : *v.attrs) {
|
||||||
std::string name(attr.name);
|
std::string name(attr.name);
|
||||||
if (name != "path" && name != "description")
|
if (name != "path" && name != "description" && name != "welcomeText")
|
||||||
throw Error("template '%s' has unsupported attribute '%s'", attrPath, name);
|
throw Error("template '%s' has unsupported attribute '%s'", attrPath, name);
|
||||||
}
|
}
|
||||||
} catch (Error & e) {
|
} catch (Error & e) {
|
||||||
|
|
|
@ -376,6 +376,9 @@ cat > $templatesDir/flake.nix <<EOF
|
||||||
trivial = {
|
trivial = {
|
||||||
path = ./trivial;
|
path = ./trivial;
|
||||||
description = "A trivial flake";
|
description = "A trivial flake";
|
||||||
|
welcomeText = ''
|
||||||
|
Welcome to my trivial flake
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
default = trivial;
|
default = trivial;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue