mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
11 lines
231 B
Nix
11 lines
231 B
Nix
|
let {
|
||
|
as = { x = 123; y = 456; } // { z = 789; } // { z = 987; };
|
||
|
|
||
|
A = "a";
|
||
|
Z = "z";
|
||
|
|
||
|
body = if builtins.hasAttr A as
|
||
|
then builtins.getAttr A as
|
||
|
else assert builtins.hasAttr Z as; builtins.getAttr Z as;
|
||
|
}
|