about summary refs log tree commit diff
path: root/tests/lang/eval-okay-attrnames.nix
blob: 978138f0c0d9f32665e533196dcd51c53f582a72 (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 concat values