1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-10 04:26:01 +01:00
nix/tests/functional/lang/eval-okay-attrnames.nix
2025-08-18 20:29:45 +03:00

21 lines
291 B
Nix

with import ./lib.nix;
let
attrs = {
y = "y";
x = "x";
foo = "foo";
}
// rec {
x = "newx";
bar = x;
};
names = builtins.attrNames attrs;
values = map (name: builtins.getAttr name attrs) names;
in
assert values == builtins.attrValues attrs;
concat values