Merge pull request #103920 from lopsided98/formats-path

pkgs-lib: allow paths in TOML, YAML and JSON
This commit is contained in:
Silvan Mosberger 2021-06-28 20:31:43 +02:00 committed by GitHub
commit 9bd0578528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,7 @@ rec {
int
float
str
path
(attrsOf valueType)
(listOf valueType)
]) // {
@ -112,6 +113,7 @@ rec {
int
float
str
path
(attrsOf valueType)
(listOf valueType)
] // {

View File

@ -38,6 +38,7 @@ in runBuildTests {
str = "foo";
attrs.foo = null;
list = [ null null ];
path = ./formats.nix;
};
expected = ''
{
@ -52,6 +53,7 @@ in runBuildTests {
null
],
"null": null,
"path": "${./formats.nix}",
"str": "foo",
"true": true
}
@ -67,6 +69,7 @@ in runBuildTests {
str = "foo";
attrs.foo = null;
list = [ null null ];
path = ./formats.nix;
};
expected = ''
{
@ -80,6 +83,7 @@ in runBuildTests {
null
],
"null": null,
"path": "${./formats.nix}",
"str": "foo",
"true": true
}