lix-releng-staging/tests/lang/eval-okay-attrnames.nix
2014-10-04 16:41:24 +02:00

11 lines
261 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