1
0
mirror of https://github.com/kmein/niveum synced 2026-03-18 11:01:07 +01:00

chore: move toml helpers into overlay

This commit is contained in:
Kierán Meinhardt
2020-09-10 08:39:50 +02:00
parent c8bbbb6055
commit f97e7bd85e
5 changed files with 9 additions and 12 deletions

7
overlays/toml.nix Normal file
View File

@@ -0,0 +1,7 @@
(self: super: {
writeTOML = object: super.runCommand "writeTOML" {} ''
echo '${builtins.toJSON object}' | ${super.remarshal}/bin/json2toml > $out
'';
toTOML = object: builtins.readFile (self.writeTOML object);
writeJSON = path: object: super.writeText path (builtins.toJSON object);
})