1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 15:13:55 +02:00

Merge pull request #11100 from NixOS/pretty-print-idempotent

Pretty print idempotently
This commit is contained in:
Eelco Dolstra 2024-07-17 21:35:27 +02:00 committed by GitHub
commit b23da1ceca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 69 additions and 0 deletions

View file

@ -0,0 +1,29 @@
Nix <nix version>
Type :? for help.
Added <number omitted> variables.
{ homepage = "https://example.com"; }
{ homepage = "https://example.com"; }
{
layerOne = { ... };
}
{
layerOne = { ... };
}
[ "https://example.com" ]
[ "https://example.com" ]
[
[ ... ]
]
[
[ ... ]
]

View file

@ -0,0 +1,9 @@
:l pretty-print-idempotent.nix
oneDeep
oneDeep
twoDeep
twoDeep
oneDeepList
oneDeepList
twoDeepList
twoDeepList

View file

@ -0,0 +1,19 @@
{
oneDeep = {
homepage = "https://" + "example.com";
};
twoDeep = {
layerOne = {
homepage = "https://" + "example.com";
};
};
oneDeepList = [
("https://" + "example.com")
];
twoDeepList = [
[
("https://" + "example.com")
]
];
}