mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
docs: add inherit to language overview (#10194)
* docs: add inherit to language overview Adds a short summary about `inherit` to the language overview.
This commit is contained in:
parent
ef5cb44608
commit
1ffcbddf62
1 changed files with 26 additions and 0 deletions
|
@ -432,6 +432,32 @@ This is an incomplete overview of language features, by example.
|
|||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`inherit pkgs src;`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Adds the variables to the current scope (attribute set or `let` binding).
|
||||
Desugars to `pkgs = pkgs; src = src;`
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`inherit (pkgs) lib stdenv;`
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
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;`
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
|
|
Loading…
Reference in a new issue