mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
bahaghari/lib: update importYAML
to be more correct
This commit is contained in:
parent
7159fc597f
commit
8f7e13734a
@ -14,14 +14,17 @@
|
|||||||
https://pkg.go.dev/gopkg.in/yaml.v3#readme-compatibility
|
https://pkg.go.dev/gopkg.in/yaml.v3#readme-compatibility
|
||||||
|
|
||||||
Type: importYAML :: Path -> any
|
Type: importYAML :: Path -> any
|
||||||
|
|
||||||
|
Example:
|
||||||
|
importYAML ./simple.yml
|
||||||
*/
|
*/
|
||||||
importYAML = path:
|
importYAML = path:
|
||||||
let
|
let
|
||||||
data = pkgs.runCommand "convert-yaml-to-json" { } ''
|
dataDrv = pkgs.runCommand "convert-yaml-to-json" { } ''
|
||||||
${pkgs.lib.getExe' pkgs.yaml2json "yaml2json"} < ${path} > $out
|
${pkgs.lib.getExe' pkgs.yaml2json "yaml2json"} < "${path}" > "$out"
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
pkgs.lib.importJSON data;
|
pkgs.lib.importJSON dataDrv.outPath;
|
||||||
|
|
||||||
/* Convert a given decimal number to a specified base digit with the set of
|
/* Convert a given decimal number to a specified base digit with the set of
|
||||||
glyphs for each digit as returned from lib.toBaseDigits.
|
glyphs for each digit as returned from lib.toBaseDigits.
|
||||||
|
Loading…
Reference in New Issue
Block a user