diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-07-31 15:43:25 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-07-31 15:43:25 +0200 |
commit | 1d0a7b54fa330b041a720932ee4e05dcad1d2d5c (patch) | |
tree | 48627a3530e4d6d58c612864b2e99afb11a0a902 /doc/manual/src/expressions/derivations.md | |
parent | 0c94c176446bd9e9cb8c7e16fb7c6d88bb4e9a20 (diff) |
Enable syntax highlighting
Diffstat (limited to 'doc/manual/src/expressions/derivations.md')
-rw-r--r-- | doc/manual/src/expressions/derivations.md | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/doc/manual/src/expressions/derivations.md b/doc/manual/src/expressions/derivations.md index 0e5656b5b..d26a33b7f 100644 --- a/doc/manual/src/expressions/derivations.md +++ b/doc/manual/src/expressions/derivations.md @@ -57,23 +57,34 @@ the attributes of which specify the inputs of the build. and it doesn’t need the documentation at build time. Thus, the library package could specify: - outputs = [ "lib" "headers" "doc" ]; + ```nix + outputs = [ "lib" "headers" "doc" ]; + ``` This will cause Nix to pass environment variables `lib`, `headers` and `doc` to the builder containing the intended store paths of each output. The builder would typically do something like - ./configure --libdir=$lib/lib --includedir=$headers/include --docdir=$doc/share/doc + ```bash + ./configure \ + --libdir=$lib/lib \ + --includedir=$headers/include \ + --docdir=$doc/share/doc + ``` for an Autoconf-style package. You can refer to each output of a derivation by selecting it as an attribute, e.g. - buildInputs = [ pkg.lib pkg.headers ]; + ```nix + buildInputs = [ pkg.lib pkg.headers ]; + ``` The first element of `outputs` determines the *default output*. Thus, you could also write - buildInputs = [ pkg pkg.headers ]; + ```nix + buildInputs = [ pkg pkg.headers ]; + ``` since `pkg` is equivalent to `pkg.lib`. |