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









                                                                         
                                                            
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