[Nix-dev] nix-instantiate --parse-only --xml
junger at stackframe.com
junger at stackframe.com
Wed Jun 4 21:21:08 CEST 2008
Hi Everyone,
I'm working on a research project that involves converting Nix attrs
into XML and vice versa. Using nix-instantiate with --xml works great
except that boolean types like:
ttyBackgrounds = {
enable = true;
};
get translated into XML as:
<attr name="ttyBackgrounds">
<unevaluated />
</attr>
regardless of the actual value. Is this the normal behavior or a bug?
Poking around a bit in expr-to-xml.cc it looks like:
else if (e == eTrue)
doc.writeEmptyElement("bool", singletonAttrs("value", "true"));
else if (e == eFalse)
doc.writeEmptyElement("bool", singletonAttrs("value", "false"));
should handle this case but it is falling through. Am I missing
something obvious here?
respectfully,
James Unger
More information about the nix-dev
mailing list