New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add builtins.toTOML #3929
Comments
I marked this as stale due to inactivity. → More info |
@chessai Where are all those |
|
I marked this as stale due to inactivity. → More info |
I wish we had this.
|
there are 2 solutions to toml
so there is no need to be build int. why fromJson and fromToml built in? because it allows for strict evaliation. so it can allow to interpret any local file of config (json, yaml, toml) to be just nix. so making it nixpkgs.lib.toml.toToml seems more right. so may be move issue to nixpkgs repo, not nix |
+1 to this; Nix already depends on with this dependency in place, it seems like a clear win to make this a |
Any work on this? |
Triaged in the Nix team meeting: This must be guarded by an experimental feature to be merged. We need more time to make sure the round-trip works, as we'll have to commit to the output format forever. We have to consider if we will keep it, because it's a liability for reproducibility. @roberth will take over review. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-06-02-nix-team-meeting-minutes-59/28666/1 |
We've decided not to hardcode a I'm sorry to disappoint y'all for now, but there's a way forward.
|
For anyone's information: There is already a toTOML function in https://github.com/chessai/nix-std (which is why I opened this issue) |
Request
We already have builtins.fromTOML, it would be useful to have builtins.toTOML as well.
Ideal solution
Implement builtins.toTOML.
Alternatives I've considered
This snippet by @nprindle, which I'm not sure is 100% correct but seems to work:
The text was updated successfully, but these errors were encountered: