mirror of
https://github.com/nix-community/noogle.git
synced 2024-11-26 21:42:20 +03:00
d9f579cf44
* refactor to include all necessary dependencies directly here * move indexer into monorepo * add snapshot tests and seperate sub.project for builtin types * add more missing builtins such as fromTOML
373 B
373 B
Parse a TOML-configuration from String
builtins.fromTOML ''
# Toplevel
foo = "bar"
# Simple Attrset
[set]
info = "foobar"
# Nested Attrset
[set.nested]
meta = 42
''
->
{
foo = "bar";
set = {
info = "foobar";
nested = {
meta = 42;
};
};
}
Also works nicely with readFile
:
builtins.fromTOML (builtins.readFile ./config.toml)