diff --git a/doc/manual/redirects.js b/doc/manual/redirects.js index 71147fc2d..a1d30d9e8 100644 --- a/doc/manual/redirects.js +++ b/doc/manual/redirects.js @@ -375,7 +375,6 @@ const redirects = { "glossary.html": { "gloss-local-store": "store/types/local-store.html", "gloss-chroot-store": "store/types/local-store.html", - "gloss-store-derivation": "#gloss-derivation", }, }; diff --git a/doc/manual/source/SUMMARY.md.in b/doc/manual/source/SUMMARY.md.in index f34a02e81..0abe691cc 100644 --- a/doc/manual/source/SUMMARY.md.in +++ b/doc/manual/source/SUMMARY.md.in @@ -22,7 +22,7 @@ - [Store Object](store/store-object.md) - [Content-Addressing Store Objects](store/store-object/content-address.md) - [Store Path](store/store-path.md) - - [Derivation and Deriving Path](store/drv.md) + - [Store Derivation and Deriving Path](store/drv.md) - [Building](store/building.md) - [Store Types](store/types/index.md) {{#include ./store/types/SUMMARY.md}} diff --git a/doc/manual/source/architecture/architecture.md b/doc/manual/source/architecture/architecture.md index 867a9c992..cbc469355 100644 --- a/doc/manual/source/architecture/architecture.md +++ b/doc/manual/source/architecture/architecture.md @@ -69,7 +69,7 @@ It can also execute build plans to produce new data, which are made available to A build plan itself is a series of *build tasks*, together with their build inputs. > **Important** -> A build task in Nix is called [derivation](@docroot@/glossary.md#gloss-derivation). +> A build task in Nix is called [store derivation](@docroot@/glossary.md#gloss-store-derivation). Each build task has a special build input executed as *build instructions* in order to perform the build. The result of a build task can be input to another build task. diff --git a/doc/manual/source/command-ref/nix-build.md b/doc/manual/source/command-ref/nix-build.md index df8572ca4..3bb59cbed 100644 --- a/doc/manual/source/command-ref/nix-build.md +++ b/doc/manual/source/command-ref/nix-build.md @@ -37,11 +37,11 @@ directory containing at least a file named `default.nix`. `nix-build` is essentially a wrapper around [`nix-instantiate`](nix-instantiate.md) (to translate a high-level Nix -expression to a low-level [derivation]) and [`nix-store +expression to a low-level [store derivation]) and [`nix-store --realise`](@docroot@/command-ref/nix-store/realise.md) (to build the store derivation). -[derivation]: @docroot@/glossary.md#gloss-derivation +[store derivation]: @docroot@/glossary.md#gloss-store-derivation > **Warning** > @@ -80,7 +80,7 @@ except for `--arg` and `--attr` / `-A` which are passed to [`nix-instantiate`](n ```console $ nix-build '' --attr firefox -derivation is /nix/store/qybprl8sz2lc...-firefox-1.5.0.7.drv +store derivation is /nix/store/qybprl8sz2lc...-firefox-1.5.0.7.drv /nix/store/d18hyl92g30l...-firefox-1.5.0.7 $ ls -l result diff --git a/doc/manual/source/command-ref/nix-copy-closure.md b/doc/manual/source/command-ref/nix-copy-closure.md index 50d16866e..b7e31d93b 100644 --- a/doc/manual/source/command-ref/nix-copy-closure.md +++ b/doc/manual/source/command-ref/nix-copy-closure.md @@ -42,9 +42,9 @@ When using public key authentication, you can avoid typing the passphrase with ` - `--include-outputs` - Also copy the outputs of [derivation]s included in the closure. + Also copy the outputs of [store derivation]s included in the closure. - [derivation]: @docroot@/glossary.md#gloss-derivation + [store derivation]: @docroot@/glossary.md#gloss-store-derivation - `--use-substitutes` / `-s` diff --git a/doc/manual/source/command-ref/nix-env/install.md b/doc/manual/source/command-ref/nix-env/install.md index 01d7146be..527fd8f90 100644 --- a/doc/manual/source/command-ref/nix-env/install.md +++ b/doc/manual/source/command-ref/nix-env/install.md @@ -22,7 +22,7 @@ It is based on the current generation of the active [profile](@docroot@/command- The arguments *args* map to store paths in a number of possible ways: -- By default, *args* is a set of [derivation] names denoting derivations in the [default Nix expression]. +- By default, *args* is a set of names denoting derivations in the [default Nix expression]. These are [realised], and the resulting output paths are installed. Currently installed derivations with a name equal to the name of a derivation being added are removed unless the option `--preserve-installed` is specified. @@ -66,11 +66,11 @@ The arguments *args* map to store paths in a number of possible ways: This can be used to override the priority of the derivations being installed. This is useful if *args* are [store paths], which don't have any priority information. -- If *args* are [store paths] to [derivations](@docroot@/glossary.md#gloss-derivation), then those derivations are [realised], and the resulting output paths are installed. +- If *args* are [store paths] that point to [store derivations][store derivation], then those store derivations are [realised], and the resulting output paths are installed. -- If *args* are [store paths] not to derivations, then these are [realised] and installed. +- If *args* are [store paths] that do not point to store derivations, then these are [realised] and installed. -- By default all [outputs](@docroot@/language/derivations.md#attr-outputs) are installed for each [derivation]. +- By default all [outputs](@docroot@/language/derivations.md#attr-outputs) are installed for each [store derivation]. This can be overridden by adding a `meta.outputsToInstall` attribute on the derivation listing a subset of the output names. Example: @@ -122,6 +122,8 @@ The arguments *args* map to store paths in a number of possible ways: manifest.nix ``` +[store derivation]: @docroot@/glossary.md#gloss-store-derivation + # Options - `--prebuilt-only` / `-b` @@ -198,7 +200,7 @@ To copy the store path with symbolic name `gcc` from another profile: $ nix-env --install --from-profile /nix/var/nix/profiles/foo gcc ``` -To install a specific [derivation] (typically created by +To install a specific [store derivation] (typically created by `nix-instantiate`): ```console diff --git a/doc/manual/source/command-ref/nix-env/query.md b/doc/manual/source/command-ref/nix-env/query.md index bb27bae42..bde9b3820 100644 --- a/doc/manual/source/command-ref/nix-env/query.md +++ b/doc/manual/source/command-ref/nix-env/query.md @@ -125,10 +125,10 @@ derivation is shown unless `--no-name` is specified. - `--drv-path` - Print the [store path] to the [derivation]. + Print the [store path] to the [store derivation]. [store path]: @docroot@/glossary.md#gloss-store-path - [derivation]: @docroot@/glossary.md#gloss-derivation + [store derivation]: @docroot@/glossary.md#gloss-derivation - `--out-path` diff --git a/doc/manual/source/command-ref/nix-instantiate.md b/doc/manual/source/command-ref/nix-instantiate.md index 0002901f0..38454515d 100644 --- a/doc/manual/source/command-ref/nix-instantiate.md +++ b/doc/manual/source/command-ref/nix-instantiate.md @@ -1,6 +1,6 @@ # Name -`nix-instantiate` - instantiate derivations from Nix expressions +`nix-instantiate` - instantiate store derivations from Nix expressions # Synopsis @@ -17,13 +17,13 @@ # Description -The command `nix-instantiate` produces [derivation]s from (high-level) Nix expressions. +The command `nix-instantiate` produces [store derivation]s from (high-level) Nix expressions. It evaluates the Nix expressions in each of *files* (which defaults to *./default.nix*). Each top-level expression should evaluate to a derivation, a list of derivations, or a set of derivations. The paths -of the resulting derivations are printed on standard output. +of the resulting store derivations are printed on standard output. -[derivation]: @docroot@/glossary.md#gloss-derivation +[store derivation]: @docroot@/glossary.md#gloss-store-derivation If *files* is the character `-`, then a Nix expression will be read from standard input. @@ -43,7 +43,7 @@ standard input. Just parse and evaluate the input files, and print the resulting values on standard output. - Derivations are not serialized and written to the store, but instead just hashed and discarded. + Store derivations are not serialized and written to the store, but instead just hashed and discarded. > **Warning** > @@ -133,7 +133,7 @@ standard input. # Examples -Instantiate [derivation]s from a Nix expression, and build them using `nix-store`: +Instantiate [store derivation]s from a Nix expression, and build them using `nix-store`: ```console $ nix-instantiate test.nix (instantiate) diff --git a/doc/manual/source/command-ref/nix-store/query.md b/doc/manual/source/command-ref/nix-store/query.md index f02b8ca3d..601f46af6 100644 --- a/doc/manual/source/command-ref/nix-store/query.md +++ b/doc/manual/source/command-ref/nix-store/query.md @@ -26,14 +26,14 @@ symlink. - `--use-output` / `-u` - For each argument to the query that is a [derivation], apply the + For each argument to the query that is a [store derivation], apply the query to the output path of the derivation instead. - `--force-realise` / `-f` Realise each argument to the query first (see [`nix-store --realise`](./realise.md)). -[derivation]: @docroot@/glossary.md#gloss-derivation +[store derivation]: @docroot@/glossary.md#gloss-store-derivation # Queries @@ -54,12 +54,12 @@ symlink. This query has one option: - `--include-outputs` - Also include the existing output paths of [derivation]s, + Also include the existing output paths of [store derivation]s, and their closures. This query can be used to implement various kinds of deployment. A *source deployment* is obtained by distributing the closure of a - derivation. A *binary deployment* is obtained by distributing + store derivation. A *binary deployment* is obtained by distributing the closure of an output path. A *cache deployment* (combined source/binary deployment, including binaries of build-time-only dependencies) is obtained by distributing the closure of a store @@ -112,7 +112,7 @@ symlink. of the `dot` tool of AT\&T's [Graphviz package](http://www.graphviz.org/). This can be used to visualise dependency graphs. To obtain a build-time dependency graph, apply - this to a derivation. To obtain a runtime dependency graph, + this to a store derivation. To obtain a runtime dependency graph, apply it to an output path. - `--tree` @@ -128,13 +128,13 @@ symlink. Prints the references graph of the store paths *paths* in the [GraphML](http://graphml.graphdrawing.org/) file format. This can be used to visualise dependency graphs. To obtain a build-time - dependency graph, apply this to a [derivation]. To obtain a + dependency graph, apply this to a [store derivation]. To obtain a runtime dependency graph, apply it to an output path. - `--binding` *name* / `-b` *name* Prints the value of the attribute *name* (i.e., environment - variable) of the [derivation]s *paths*. It is an error for a + variable) of the [store derivation]s *paths*. It is an error for a derivation to not have the specified attribute. - `--hash` diff --git a/doc/manual/source/command-ref/nix-store/realise.md b/doc/manual/source/command-ref/nix-store/realise.md index 674a95486..a899758df 100644 --- a/doc/manual/source/command-ref/nix-store/realise.md +++ b/doc/manual/source/command-ref/nix-store/realise.md @@ -11,10 +11,10 @@ Each of *paths* is processed as follows: -- If the path leads to a [derivation]: - 1. If it is not [valid], substitute the derivation file itself. +- If the path leads to a [store derivation]: + 1. If it is not [valid], substitute the store derivation file itself. 2. Realise its [output paths]: - - Try to fetch from [substituters] the [store objects] associated with the output paths in the derivation's [closure]. + - Try to fetch from [substituters] the [store objects] associated with the output paths in the store derivation's [closure]. - With [content-addressed derivations] (experimental): Determine the output paths to realise by querying content-addressed realisation entries in the [Nix database]. - For any store paths that cannot be substituted, produce the required store objects: @@ -23,11 +23,11 @@ Each of *paths* is processed as follows: - Otherwise, and if the path is not already valid: Try to fetch the associated [store objects] in the path's [closure] from [substituters]. -If no substitutes are available and no derivation is given, realisation fails. +If no substitutes are available and no store derivation is given, realisation fails. [store paths]: @docroot@/store/store-path.md [valid]: @docroot@/glossary.md#gloss-validity -[derivation]: @docroot@/glossary.md#gloss-derivation +[store derivation]: @docroot@/glossary.md#gloss-store-derivation [output paths]: @docroot@/glossary.md#gloss-output-path [store objects]: @docroot@/store/store-object.md [closure]: @docroot@/glossary.md#gloss-closure @@ -71,7 +71,7 @@ For non-derivation arguments, the argument itself is printed. # Examples -This operation is typically used to build [derivation]s produced by +This operation is typically used to build [store derivation]s produced by [`nix-instantiate`](@docroot@/command-ref/nix-instantiate.md): ```console diff --git a/doc/manual/source/glossary.md b/doc/manual/source/glossary.md index 9c132ab90..772116e98 100644 --- a/doc/manual/source/glossary.md +++ b/doc/manual/source/glossary.md @@ -19,18 +19,18 @@ Besides content addressing, the Nix store also uses [input addressing](#gloss-input-addressed-store-object). -- [derivation]{#gloss-derivation} +- [store derivation]{#gloss-store-derivation} A single build task. - See [Derivation](@docroot@/store/drv.md#derivation) for details. + See [Store Derivation](@docroot@/store/drv.md#store-derivation) for details. - [derivation]: #gloss-derivation + [store derivation]: #gloss-store-derivation - [derivation path]{#gloss-derivation-path} - A [store path] which uniquely identifies a [derivation]. + A [store path] which uniquely identifies a [store derivation]. - See [Referencing Derivations](@docroot@/store/drv.md#derivation-path) for details. + See [Referencing Store Derivations](@docroot@/store/drv.md#derivation-path) for details. Not to be confused with [deriving path]. @@ -38,7 +38,7 @@ - [derivation expression]{#gloss-derivation-expression} - A description of a [derivation] in the Nix language. + A description of a [store derivation] in the Nix language. The output(s) of a derivation are store objects. Derivations are typically specified in Nix expressions using the [`derivation` primitive](./language/derivations.md). These are translated into store layer *derivations* (implicitly by `nix-env` and `nix-build`, or explicitly by `nix-instantiate`). @@ -47,9 +47,9 @@ - [instantiate]{#gloss-instantiate}, instantiation - Translate a [derivation expression] into a [derivation]. + Translate a [derivation expression] into a [store derivation]. - See [`nix-instantiate`](./command-ref/nix-instantiate.md), which produces a derivation from a Nix expression that evaluates to a derivation. + See [`nix-instantiate`](./command-ref/nix-instantiate.md), which produces a store derivation from a Nix expression that evaluates to a derivation. [instantiate]: #gloss-instantiate @@ -59,7 +59,7 @@ This can be achieved by: - Fetching a pre-built [store object] from a [substituter] - - Running the [`builder`](@docroot@/language/derivations.md#attr-builder) executable as specified in the corresponding [derivation] + - Running the [`builder`](@docroot@/language/derivations.md#attr-builder) executable as specified in the corresponding [store derivation] - Delegating to a [remote machine](@docroot@/command-ref/conf-file.md#conf-builders) and retrieving the outputs @@ -77,7 +77,7 @@ - [fixed-output derivation]{#gloss-fixed-output-derivation} (FOD) - A [derivation] where a cryptographic hash of the [output] is determined in advance using the [`outputHash`](./language/advanced-attributes.md#adv-attr-outputHash) attribute, and where the [`builder`](@docroot@/language/derivations.md#attr-builder) executable has access to the network. + A [store derivation] where a cryptographic hash of the [output] is determined in advance using the [`outputHash`](./language/advanced-attributes.md#adv-attr-outputHash) attribute, and where the [`builder`](@docroot@/language/derivations.md#attr-builder) executable has access to the network. - [store]{#gloss-store} @@ -192,7 +192,7 @@ > > The contents of a `.nix` file form a Nix expression. - Nix expressions specify [derivation expressions][derivation expression], which are [instantiated][instantiate] into the Nix store as [derivations][derivation]. + Nix expressions specify [derivation expressions][derivation expression], which are [instantiated][instantiate] into the Nix store as [store derivations][store derivation]. These derivations can then be [realised][realise] to produce [outputs][output]. > **Example** @@ -234,14 +234,14 @@ - [output]{#gloss-output} - A [store object] produced by a [derivation]. + A [store object] produced by a [store derivation]. See [the `outputs` argument to the `derivation` function](@docroot@/language/derivations.md#attr-outputs) for details. [output]: #gloss-output - [output path]{#gloss-output-path} - The [store path] to the [output] of a [derivation]. + The [store path] to the [output] of a [store derivation]. [output path]: #gloss-output-path @@ -258,7 +258,7 @@ - [deriver]{#gloss-deriver} - The [derivation] that produced an [output path]. + The [store derivation] that produced an [output path]. The deriver for an output path can be queried with the `--deriver` option to [`nix-store --query`](@docroot@/command-ref/nix-store/query.md). diff --git a/doc/manual/source/language/derivations.md b/doc/manual/source/language/derivations.md index d3391bfb9..0f9284e98 100644 --- a/doc/manual/source/language/derivations.md +++ b/doc/manual/source/language/derivations.md @@ -1,13 +1,13 @@ # Derivations -The most important built-in function is `derivation`, which is used to describe a single store-layer [derivation]. -Consult the [store chapter](@docroot@/store/drv.md) for what a derivation is; +The most important built-in function is `derivation`, which is used to describe a single store-layer [store derivation]. +Consult the [store chapter](@docroot@/store/drv.md) for what a store derivation is; this section just concerns how to create one from the Nix language. This builtin function takes as input an attribute set, the attributes of which specify the inputs to the process. -It outputs an attribute set, and produces a [derivation] as a side effect of evaluation. +It outputs an attribute set, and produces a [store derivation] as a side effect of evaluation. -[derivation]: @docroot@/glossary.md#gloss-derivation +[store derivation]: @docroot@/glossary.md#gloss-store-derivation ## Input attributes @@ -178,7 +178,7 @@ It outputs an attribute set, and produces a [derivation] as a side effect of eva > } > ``` > - > The derivation path will be `/nix/store/-example.drv`. + > The store derivation path will be `/nix/store/-example.drv`. > The output paths will be > - `/nix/store/-example-lib` > - `/nix/store/-example-dev` diff --git a/doc/manual/source/language/import-from-derivation.md b/doc/manual/source/language/import-from-derivation.md index bb2ee62de..f161c6fe3 100644 --- a/doc/manual/source/language/import-from-derivation.md +++ b/doc/manual/source/language/import-from-derivation.md @@ -72,9 +72,9 @@ Boxes are data structures, arrow labels are transformations. | | | | | | V | | | | .------------. | | | -| | derivation | | | .------------. | -| | expression |----|-instantiate-|---->| derivation | | -| '------------' | | '------------' | +| | derivation | | | .------------------. | +| | expression |----|-instantiate-|->| store derivation | | +| '------------' | | '------------------' | | | | | | | | | realise | | | | | | diff --git a/doc/manual/source/protocols/derivation-aterm.md b/doc/manual/source/protocols/derivation-aterm.md index 3b26c0fa8..99e3c2be6 100644 --- a/doc/manual/source/protocols/derivation-aterm.md +++ b/doc/manual/source/protocols/derivation-aterm.md @@ -1,6 +1,6 @@ # Derivation "ATerm" file format -For historical reasons, [derivations][derivation] are stored on-disk in [ATerm](https://homepages.cwi.nl/~daybuild/daily-books/technology/aterm-guide/aterm-guide.html) format. +For historical reasons, [store derivations][store derivation] are stored on-disk in [ATerm](https://homepages.cwi.nl/~daybuild/daily-books/technology/aterm-guide/aterm-guide.html) format. ## The ATerm format used @@ -33,6 +33,6 @@ When derivation is encoded to a [store object] we make the following choices: Currently we always encode derivations to store object using the ATerm format (and the previous two choices), but we reserve the option to encode new sorts of derivations differently in the future. -[derivation]: @docroot@/glossary.md#gloss-derivation +[store derivation]: @docroot@/glossary.md#gloss-store-derivation [store object]: @docroot@/glossary.md#gloss-store-object ["Text" method]: @docroot@/store/store-object/content-address.md#method-text diff --git a/doc/manual/source/protocols/json/derivation.md b/doc/manual/source/protocols/json/derivation.md index 7109c4efa..2f85340d6 100644 --- a/doc/manual/source/protocols/json/derivation.md +++ b/doc/manual/source/protocols/json/derivation.md @@ -7,7 +7,7 @@ > and subject to change. The JSON serialization of a -[derivations](@docroot@/glossary.md#gloss-derivation) +[derivations](@docroot@/glossary.md#gloss-store-derivation) is a JSON object with the following fields: * `name`: diff --git a/doc/manual/source/protocols/json/store-object-info.md b/doc/manual/source/protocols/json/store-object-info.md index ba21bf537..b7348538c 100644 --- a/doc/manual/source/protocols/json/store-object-info.md +++ b/doc/manual/source/protocols/json/store-object-info.md @@ -41,10 +41,10 @@ In other words, the same store object residing in different store could have dif * `deriver`: - If known, the path to the [derivation] from which this store object was produced. + If known, the path to the [store derivation] from which this store object was produced. Otherwise `null`. - [derivation]: @docroot@/glossary.md#gloss-derivation + [store derivation]: @docroot@/glossary.md#gloss-store-derivation * `registrationTime` (optional): diff --git a/doc/manual/source/release-notes/rl-0.8.md b/doc/manual/source/release-notes/rl-0.8.md index b2b585568..5ba6e0e72 100644 --- a/doc/manual/source/release-notes/rl-0.8.md +++ b/doc/manual/source/release-notes/rl-0.8.md @@ -97,7 +97,7 @@ Nix 0.8 has the following improvements: $ nix-env -i --from-profile .../other-profile firefox - - Install a derivation directly (bypassing the Nix + - Install a store derivation directly (bypassing the Nix expression language entirely): $ nix-env -i /nix/store/z58v41v21xd3...-aterm-2.3.1.drv diff --git a/doc/manual/source/release-notes/rl-2.0.md b/doc/manual/source/release-notes/rl-2.0.md index 40c1874c4..aad0de211 100644 --- a/doc/manual/source/release-notes/rl-2.0.md +++ b/doc/manual/source/release-notes/rl-2.0.md @@ -198,7 +198,7 @@ This release has the following new features: NAR format. This replaces `nix-store --dump`. - `nix - show-derivation` displays a derivation in JSON format. + show-derivation` displays a store derivation in JSON format. This is an alternative to `pp-aterm`. - `nix diff --git a/doc/manual/source/release-notes/rl-2.13.md b/doc/manual/source/release-notes/rl-2.13.md index 482280398..168708113 100644 --- a/doc/manual/source/release-notes/rl-2.13.md +++ b/doc/manual/source/release-notes/rl-2.13.md @@ -22,7 +22,7 @@ accurate error locations. A short excerpt of the trace is now shown by default when an error occurs. -* Allow explicitly selecting outputs in a derivation installable, just like we can do with other sorts of installables. +* Allow explicitly selecting outputs in a store derivation installable, just like we can do with other sorts of installables. For example, ```shell-session # nix build /nix/store/gzaflydcr6sb3567hap9q6srzx8ggdgg-glibc-2.33-78.drv^dev diff --git a/doc/manual/source/release-notes/rl-2.15.md b/doc/manual/source/release-notes/rl-2.15.md index 428b1823f..e7e52631b 100644 --- a/doc/manual/source/release-notes/rl-2.15.md +++ b/doc/manual/source/release-notes/rl-2.15.md @@ -11,7 +11,7 @@ As the choice of hash formats is no longer binary, the `--base16` flag is also added to explicitly specify the Base16 format, which is still the default. -* The special handling of an [installable](../command-ref/new-cli/nix.md#installables) with `.drv` suffix being interpreted as all of the given [derivation](@docroot@/glossary.md#gloss-derivation)'s output paths is removed, and instead taken as the literal store path that it represents. +* The special handling of an [installable](../command-ref/new-cli/nix.md#installables) with `.drv` suffix being interpreted as all of the given [store derivation](@docroot@/glossary.md#gloss-store-derivation)'s output paths is removed, and instead taken as the literal store path that it represents. The new `^` syntax for store paths introduced in Nix 2.13 allows explicitly referencing output paths of a derivation. Using this is better and more clear than relying on the now-removed `.drv` special handling. diff --git a/doc/manual/source/store/drv.md b/doc/manual/source/store/drv.md index 58549ac14..3257a1c94 100644 --- a/doc/manual/source/store/drv.md +++ b/doc/manual/source/store/drv.md @@ -1,4 +1,4 @@ -# Derivation and Deriving Path +# Store Derivation and Deriving Path So far, we have covered "inert" [store objects][store object]. But the point of the Nix store layer is to be a build system. @@ -8,7 +8,7 @@ This is where Nix distinguishes itself. *Derivations* represent individual build steps, and *deriving paths* are needed to refer to the *outputs* of those build steps before they are built. -## Derivation {#derivation} +## Store Derivation {#store-derivation} A derivation is a specification for running an executable on precisely defined input files to repeatably produce output files at uniquely determined file system paths. @@ -36,7 +36,7 @@ A derivation consists of: - A two-component ["system" type][system] (e.g. `x86_64-linux`) where the executable is to run. -[derivation]: #derivation +[store derivation]: #store-derivation [inputs]: #inputs [input]: #inputs [outputs]: #outputs @@ -63,7 +63,7 @@ There are two forms: - [*constant*]{#deriving-path-constant}: just a [store path]. It can be made [valid][validity] by copying it into the store: from the evaluator, command line interface or another st ore. -- [*output*]{#deriving-path-output}: a pair of a [store path] to a [derivation] and an [output] name. +- [*output*]{#deriving-path-output}: a pair of a [store path] to a [store derivation] and an [output] name. In pseudo code: @@ -83,7 +83,7 @@ data DerivingPath ## Parts of a derivation -With both [derivations][derivation] introduced and [deriving paths][deriving path] defined, +With both [store derivations][store derivation] introduced and [deriving paths][deriving path] defined, it is now possible to define the parts of a derivation. ### Inputs {#inputs} diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index f167aa757..86d13fab7 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -143,7 +143,8 @@ MixOperateOnOptions::MixOperateOnOptions() { addFlag({ .longName = "derivation", - .description = "Operate on the [derivation](@docroot@/glossary.md#gloss-derivation) rather than its outputs.", + .description = + "Operate on the [store derivation](@docroot@/glossary.md#gloss-store-derivation) rather than its outputs.", .category = installablesCategory, .handler = {&operateOn, OperateOn::Derivation}, }); diff --git a/src/libcmd/installables.hh b/src/libcmd/installables.hh index 7bc1c5944..c995c3019 100644 --- a/src/libcmd/installables.hh +++ b/src/libcmd/installables.hh @@ -24,7 +24,7 @@ enum class Realise { /** * Don't build the derivation. * - * Postcondition: the derivation exists. + * Postcondition: the store derivation exists. */ Derivation, /** diff --git a/src/libcmd/misc-store-flags.cc b/src/libcmd/misc-store-flags.cc index 7a84385a5..664ceb35f 100644 --- a/src/libcmd/misc-store-flags.cc +++ b/src/libcmd/misc-store-flags.cc @@ -120,7 +120,7 @@ Args::Flag contentAddressMethod(ContentAddressMethod * method) - [`text`](@docroot@/store/store-object/content-address.md#method-text): Like `flat`, but used for - [derivations](@docroot@/glossary.md#gloss-derivation) serialized in store object and + [derivations](@docroot@/glossary.md#gloss-store-derivation) serialized in store object and [`builtins.toFile`](@docroot@/language/builtins.html#builtins-toFile). For advanced use-cases only; for regular usage prefer `nar` and `flat`. diff --git a/src/libexpr/eval-cache.cc b/src/libexpr/eval-cache.cc index 20e8abba2..ea3319f99 100644 --- a/src/libexpr/eval-cache.cc +++ b/src/libexpr/eval-cache.cc @@ -777,7 +777,7 @@ StorePath AttrCursor::forceDerivation() been garbage-collected. So force it to be regenerated. */ aDrvPath->forceValue(); if (!root->state.store->isValidPath(drvPath)) - throw Error("don't know how to recreate derivation '%s'!", + throw Error("don't know how to recreate store derivation '%s'!", root->state.store->printStorePath(drvPath)); } return drvPath; diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index abb98d1ee..de2cb7494 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1510,7 +1510,7 @@ static void derivationStrictInternal( } else { - /* Compute a hash over the "masked" derivation, which is + /* Compute a hash over the "masked" store derivation, which is the final one except that in the list of outputs, the output paths are empty strings, and the corresponding environment variables have an empty value. This ensures @@ -1556,7 +1556,7 @@ static void derivationStrictInternal( printMsg(lvlChatty, "instantiated '%1%' -> '%2%'", drvName, drvPathS); /* Optimisation, but required in read-only mode! because in that - case we don't actually write derivations, so we can't + case we don't actually write store derivations, so we can't read them later. */ { auto h = hashDerivationModulo(*state.store, drv, false); diff --git a/src/libexpr/primops/context.cc b/src/libexpr/primops/context.cc index 135e57109..ede7d97ba 100644 --- a/src/libexpr/primops/context.cc +++ b/src/libexpr/primops/context.cc @@ -238,7 +238,7 @@ static RegisterPrimOp primop_getContext({ Return the string context of *s*. The string context tracks references to derivations within a string. - It is represented as an attribute set of [derivation](@docroot@/glossary.md#gloss-derivation) paths mapping to output names. + It is represented as an attribute set of [store derivation](@docroot@/glossary.md#gloss-store-derivation) paths mapping to output names. Using [string interpolation](@docroot@/language/string-interpolation.md) on a derivation will add that derivation to the string context. For example, diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index ff3df46ba..e9a180164 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -189,7 +189,7 @@ public: this, SYSTEM, "system", R"( The system type of the current Nix installation. - Nix will only build a given [derivation](@docroot@/language/derivations.md) locally when its `system` attribute equals any of the values specified here or in [`extra-platforms`](#conf-extra-platforms). + Nix will only build a given [store derivation](@docroot@/glossary.md#gloss-store-derivation) locally when its `system` attribute equals any of the values specified here or in [`extra-platforms`](#conf-extra-platforms). The default value is set when Nix itself is compiled for the system it will run on. The following system types are widely used, as Nix is actively supported on these platforms: @@ -825,7 +825,7 @@ public: R"( System types of executables that can be run on this machine. - Nix will only build a given [derivation](@docroot@/language/derivations.md) locally when its `system` attribute equals any of the values specified here or in the [`system` option](#conf-system). + Nix will only build a given [store derivation](@docroot@/glossary.md#gloss-store-derivation) locally when its `system` attribute equals any of the values specified here or in the [`system` option](#conf-system). Setting this can be useful to build derivations locally on compatible machines: - `i686-linux` executables can be run on `x86_64-linux` machines (set by default) diff --git a/src/nix/derivation-add.cc b/src/nix/derivation-add.cc index 720b54b84..4d91d4538 100644 --- a/src/nix/derivation-add.cc +++ b/src/nix/derivation-add.cc @@ -14,7 +14,7 @@ struct CmdAddDerivation : MixDryRun, StoreCommand { std::string description() override { - return "Add a derivation"; + return "Add a store derivation"; } std::string doc() override diff --git a/src/nix/derivation-add.md b/src/nix/derivation-add.md index c2aee6933..35507d9ad 100644 --- a/src/nix/derivation-add.md +++ b/src/nix/derivation-add.md @@ -3,13 +3,14 @@ R""( # Description This command reads from standard input a JSON representation of a -[derivation]. +[store derivation]. Store derivations are used internally by Nix. They are store paths with extension `.drv` that represent the build-time dependency graph to which a Nix expression evaluates. -[derivation]: @docroot@/glossary.md#gloss-derivation + +[store derivation]: @docroot@/glossary.md#gloss-store-derivation `nix derivation add` takes a single derivation in the following format: diff --git a/src/nix/derivation-show.cc b/src/nix/derivation-show.cc index 3e5ed4f13..5a07f58e6 100644 --- a/src/nix/derivation-show.cc +++ b/src/nix/derivation-show.cc @@ -1,4 +1,5 @@ // FIXME: integrate this with `nix path-info`? +// FIXME: rename to 'nix store derivation show'? #include "command.hh" #include "common-args.hh" @@ -26,7 +27,7 @@ struct CmdShowDerivation : InstallablesCommand std::string description() override { - return "show the contents of a derivation"; + return "show the contents of a store derivation"; } std::string doc() override diff --git a/src/nix/derivation-show.md b/src/nix/derivation-show.md index 830771e46..9fff58ef9 100644 --- a/src/nix/derivation-show.md +++ b/src/nix/derivation-show.md @@ -2,7 +2,7 @@ R""( # Examples -* Show the [derivation] that results from evaluating the Hello +* Show the [store derivation] that results from evaluating the Hello package: ```console @@ -37,7 +37,7 @@ R""( # Description This command prints on standard output a JSON representation of the -[derivation]s to which [*installables*](./nix.md#installables) evaluate. +[store derivation]s to which [*installables*](./nix.md#installables) evaluate. Store derivations are used internally by Nix. They are store paths with extension `.drv` that represent the build-time dependency graph to which @@ -46,7 +46,7 @@ a Nix expression evaluates. By default, this command only shows top-level derivations, but with `--recursive`, it also shows their dependencies. -[derivation]: ../../glossary.md#gloss-derivation +[store derivation]: @docroot@/glossary.md#gloss-store-derivation `nix derivation show` outputs a JSON map of [store path]s to derivations in the following format: diff --git a/src/nix/nix.md b/src/nix/nix.md index 5c26d8a6c..b88bd9a94 100644 --- a/src/nix/nix.md +++ b/src/nix/nix.md @@ -144,11 +144,11 @@ Example: `/nix/store/v5sv61sszx301i0x6xysaqzla09nksnd-hello-2.10` These are paths inside the Nix store, or symlinks that resolve to a path in the Nix store. -A [derivation] is also addressed by store path. +A [store derivation] is also addressed by store path. Example: `/nix/store/p7gp6lxdg32h4ka1q398wd9r2zkbbz2v-hello-2.10.drv` -If you want to refer to an output path of that derivation, add the output name preceded by a caret (`^`). +If you want to refer to an output path of that store derivation, add the output name preceded by a caret (`^`). Example: `/nix/store/p7gp6lxdg32h4ka1q398wd9r2zkbbz2v-hello-2.10.drv^out` @@ -244,10 +244,10 @@ operate are determined as follows: a command like `nix shell nixpkgs#libxml2` will provide only those two outputs by default. - Note that a [derivation] (given by its `.drv` file store path) doesn't have + Note that a [store derivation] (given by its `.drv` file store path) doesn't have any attributes like `meta`, and thus this case doesn't apply to it. - [derivation]: @docroot@/glossary.md#gloss-derivation + [store derivation]: @docroot@/glossary.md#gloss-store-derivation * Otherwise, Nix will use all outputs of the derivation. diff --git a/src/nix/path-info.md b/src/nix/path-info.md index b241626d3..2e39225b8 100644 --- a/src/nix/path-info.md +++ b/src/nix/path-info.md @@ -68,9 +68,9 @@ R""( ] ``` -* Print the path of the [derivation] produced by `nixpkgs#hello`: +* Print the path of the [store derivation] produced by `nixpkgs#hello`: - [derivation]: @docroot@/glossary.md#gloss-derivation + [store derivation]: @docroot@/glossary.md#gloss-store-derivation ```console # nix path-info --derivation nixpkgs#hello diff --git a/src/nix/store-copy-log.md b/src/nix/store-copy-log.md index e8527fe73..61daa75c1 100644 --- a/src/nix/store-copy-log.md +++ b/src/nix/store-copy-log.md @@ -18,9 +18,9 @@ R""( (The flag `--substituters ''` avoids querying `https://cache.nixos.org` for the log.) -* To copy the log for a specific [derivation] via SSH: +* To copy the log for a specific [store derivation] via SSH: - [derivation]: @docroot@/glossary.md#gloss--derivation + [store derivation]: @docroot@/glossary.md#gloss-store-derivation ```console # nix store copy-log --to ssh-ng://machine /nix/store/ilgm50plpmcgjhcp33z6n4qbnpqfhxym-glibc-2.33-59.drv