Closed felixscheinost closed 1 year ago
instead of patching unmaintained software I'd recommend switching to yq:
let
importYAML = path: lib.importJSON (runCommand "yaml-to-json" {}
''
${yq}/bin/yq -c . ${builtins.path { inherit path; }} > $out
''
);
toYAMLFile = attrs: runCommand "to-yaml" {}
''
${yq}/bin/yq -y . ${writeText "to-json" (builtins.toJSON attrs)} > $out
''
;
A cool! I tried searching for alternatives, I even tried switching to yaml2json, which is equivally as unmaintained and which has bugs that I quickly stumbled across as well. But yeah, that definitely makes more sense.
Thanks both :100: closing in preference of #26.
This bug prevents import of Prometheus operator CRDs, as some list contains a
=
.remarshal
doesn't seem to be actively maintained anymore. I think it is sensible to patch it here, as it is merely an implementation detail ofimportYAML
.