diff --git a/doc/manual/src/language/index.md b/doc/manual/src/language/index.md index a26e43a05..5388c6dc4 100644 --- a/doc/manual/src/language/index.md +++ b/doc/manual/src/language/index.md @@ -432,6 +432,32 @@ This is an incomplete overview of language features, by example. + + + + `inherit pkgs src;` + + + + + Adds the variables to the current scope (attribute set or `let` binding). + Desugars to `pkgs = pkgs; src = src;` + + + + + + + `inherit (pkgs) lib stdenv;` + + + + + Adds the attributes, from the attribute set in parentheses, to the current scope (attribute set or `let` binding). + Desugars to `lib = pkgs.lib; stdenv = pkgs.stdenv;` + + +