For example, how would I `lx add <dependency@version>` if the `dependencies` table might be generated by a Lua function?
For example, how would I `lx add <dependency@version>` if the `dependencies` table might be generated by a Lua function?
A flake.nix is certainly not packaging metadata, but I do know those input section restrictions do cause occasional confusion with users who think "ah, Nix code" and only realise afterward that it's really json in Nix syntax."
All that to say, if a thing is not evaluate-able, it's probably best to represent it in a different enough form that no one could mistake it for a thing that can be evaluated.
Not too hard. Emacs does it with the .emacs file, mixing generated and manual content.
If it comes from an impure function, you don't know if you'll get the same result each time you evaluate it.
> Modify. Serialize to file.
And potentially lose information.