lib: add importTOML
Complements the `lib.importJSON`. `builtins.readTOML` has been introduced in Nix 2.1.
This commit is contained in:
@@ -281,6 +281,12 @@ rec {
|
||||
importJSON = path:
|
||||
builtins.fromJSON (builtins.readFile path);
|
||||
|
||||
/* Reads a TOML file.
|
||||
|
||||
Type :: path -> any
|
||||
*/
|
||||
importTOML = path:
|
||||
builtins.fromTOML (builtins.readFile path);
|
||||
|
||||
## Warnings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user