mirror of
https://github.com/NixOS/nix.git
synced 2025-11-28 21:21:00 +01:00
Regression tests for the previous commit. Co-authored-by: Sergei Zimmerman <sergei@zimmerman.foo> Co-authored-by: piegames <git@piegames.de>
14 lines
262 B
Nix
14 lines
262 B
Nix
# dynamic attrs are not generally allowed in `let`, and inherit, but they are if they only contain a string
|
|
let
|
|
${"a"} = 1;
|
|
attrs = rec {
|
|
b = c;
|
|
${"c"} = d;
|
|
d = a;
|
|
};
|
|
in
|
|
{
|
|
inherit ${"a"};
|
|
inherit attrs;
|
|
inherit (attrs) ${"b"} ${"c"} d;
|
|
}
|