Merge pull request #6360 from thufschmitt/flake-check-accept-welcomeText

Allow `welcomeText` when checking a flake template
This commit is contained in:
Eelco Dolstra 2022-04-05 11:50:45 +02:00 committed by GitHub
commit ec90fc4d1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -463,7 +463,7 @@ struct CmdFlakeCheck : FlakeCommand
for (auto & attr : *v.attrs) {
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);
}
} catch (Error & e) {

View file

@ -376,6 +376,9 @@ cat > $templatesDir/flake.nix <<EOF
trivial = {
path = ./trivial;
description = "A trivial flake";
welcomeText = ''
Welcome to my trivial flake
'';
};
default = trivial;
};