about summary refs log tree commit diff
path: root/third_party/nix/src/tests/lang/eval-okay-attrnames.nix
blob: e5b26e9f2e39d7ef459c565a9e2272336fdf4fe2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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