mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02:00
example: headers -> dev
make the example more realistic, since `headers` is not an output name used in Nixpkgs Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
parent
75a231147f
commit
7de66f19f8
1 changed files with 5 additions and 5 deletions
|
@ -75,16 +75,16 @@ It outputs an attribute set, and produces a [store derivation](@docroot@/glossar
|
|||
Thus, the library package could specify:
|
||||
|
||||
```nix
|
||||
outputs = [ "lib" "headers" "doc" ];
|
||||
outputs = [ "lib" "dev" "doc" ];
|
||||
```
|
||||
|
||||
This will cause Nix to pass environment variables `lib`, `headers`, and `doc` to the builder containing the intended store paths of each output.
|
||||
This will cause Nix to pass environment variables `lib`, `dev`, and `doc` to the builder containing the intended store paths of each output.
|
||||
The builder would typically do something like
|
||||
|
||||
```bash
|
||||
./configure \
|
||||
--libdir=$lib/lib \
|
||||
--includedir=$headers/include \
|
||||
--includedir=$dev/include \
|
||||
--docdir=$doc/share/doc
|
||||
```
|
||||
|
||||
|
@ -94,7 +94,7 @@ It outputs an attribute set, and produces a [store derivation](@docroot@/glossar
|
|||
derivation by selecting it as an attribute, e.g.
|
||||
|
||||
```nix
|
||||
buildInputs = [ pkg.lib pkg.headers ];
|
||||
buildInputs = [ pkg.lib pkg.dev ];
|
||||
```
|
||||
<!-- FIXME: move this to the output attributes section when we have one -->
|
||||
|
||||
|
@ -102,7 +102,7 @@ It outputs an attribute set, and produces a [store derivation](@docroot@/glossar
|
|||
Thus, you could also write
|
||||
|
||||
```nix
|
||||
buildInputs = [ pkg pkg.headers ];
|
||||
buildInputs = [ pkg pkg.dev ];
|
||||
```
|
||||
|
||||
since `pkg` is equivalent to `pkg.lib`.
|
||||
|
|
Loading…
Reference in a new issue