зеркало из
https://github.com/iharh/notes.git
synced 2025-11-01 14:16:09 +02:00
28 строки
329 B
Plaintext
28 строки
329 B
Plaintext
https://nixos.org/manual/nix/stable/language/constructs.html#inheriting-attributes
|
|
|
|
let
|
|
x = 123;
|
|
in {
|
|
inherit x;
|
|
y = 456;
|
|
}
|
|
|
|
is equivalent to
|
|
|
|
let
|
|
x = 123;
|
|
in {
|
|
x = x;
|
|
y = 456;
|
|
}
|
|
|
|
|
|
...
|
|
inherit x y z;
|
|
inherit (src-set) a b c;
|
|
...
|
|
is equivalent to
|
|
...
|
|
x = x; y = y; z = z;
|
|
a = src-set.a; b = src-set.b; c = src-set.c;
|