Make Github's Nix highlighter happy
The highlighter expects that all code blocks are valid expressions (to some degree) and highlights mismatches in dark red, which is not particularly pleasant for the reader. This introduces a "fake" attribute set in the `inherit` section to please the highlighter.
This commit is contained in:
parent
bb02b01dd0
commit
8b325cd791
1 changed files with 7 additions and 3 deletions
|
@ -29,6 +29,9 @@ important is missing.
|
||||||
- [`pkgs` itself](#pkgs-itself)
|
- [`pkgs` itself](#pkgs-itself)
|
||||||
- [Derivations](#derivations)
|
- [Derivations](#derivations)
|
||||||
- [Nix Idioms](#nix-idioms)
|
- [Nix Idioms](#nix-idioms)
|
||||||
|
- [File lambdas](#file-lambdas)
|
||||||
|
- [`callPackage`](#callpackage)
|
||||||
|
- [Overrides / Overlays](#overrides--overlays)
|
||||||
|
|
||||||
<!-- markdown-toc end -->
|
<!-- markdown-toc end -->
|
||||||
|
|
||||||
|
@ -253,9 +256,10 @@ This is often convenient, especially because inherit supports multiple variables
|
||||||
at the same time as well as "inheritance" from other attribute sets:
|
at the same time as well as "inheritance" from other attribute sets:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
inherit name age; # equivalent to `name = name; age = age;`
|
{
|
||||||
|
inherit name age; # equivalent to `name = name; age = age;`
|
||||||
inherit (otherAttrs) email; # equivalent to `email = otherAttrs.email`;
|
inherit (otherAttrs) email; # equivalent to `email = otherAttrs.email`;
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## `with` statements
|
## `with` statements
|
||||||
|
|
Loading…
Reference in a new issue