lib: add importTOML

Complements the `lib.importJSON`. `builtins.readTOML` has been
introduced in Nix 2.1.
This commit is contained in:
zimbatm
2020-09-12 16:37:50 +02:00
parent 607509ac8f
commit 947a7d33f9
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -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