Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Binding

Constructors

ConstructorFieldsDescription
Inheritscope: Maybe Expr, names: [VarName]Inherit variables from scope
NamedVarattrPath: AttrPath, value: ExprNamed variable binding

Description

Bindings are used in Let expressions and Set (attribute set) expressions. They associate names with values.

Pages

Nix Library Access

syntax.mkInherit null ["x" "y"]
syntax.mkInherit (syntax.mkSym "pkgs") ["vim" "git"]
syntax.mkNamedVar [syntax.mkStaticKey "x"] (syntax.mkInt 1)