mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 15:32:43 +01:00
Call it "store derivation", again, but keep "derivation expression"
A compromise that also should cut down on the diff.
This commit is contained in:
parent
f003b8ca92
commit
54d684e1de
35 changed files with 98 additions and 94 deletions
|
|
@ -375,7 +375,6 @@ const redirects = {
|
||||||
"glossary.html": {
|
"glossary.html": {
|
||||||
"gloss-local-store": "store/types/local-store.html",
|
"gloss-local-store": "store/types/local-store.html",
|
||||||
"gloss-chroot-store": "store/types/local-store.html",
|
"gloss-chroot-store": "store/types/local-store.html",
|
||||||
"gloss-store-derivation": "#gloss-derivation",
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
- [Store Object](store/store-object.md)
|
- [Store Object](store/store-object.md)
|
||||||
- [Content-Addressing Store Objects](store/store-object/content-address.md)
|
- [Content-Addressing Store Objects](store/store-object/content-address.md)
|
||||||
- [Store Path](store/store-path.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)
|
- [Building](store/building.md)
|
||||||
- [Store Types](store/types/index.md)
|
- [Store Types](store/types/index.md)
|
||||||
{{#include ./store/types/SUMMARY.md}}
|
{{#include ./store/types/SUMMARY.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.
|
A build plan itself is a series of *build tasks*, together with their build inputs.
|
||||||
|
|
||||||
> **Important**
|
> **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.
|
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.
|
The result of a build task can be input to another build task.
|
||||||
|
|
|
||||||
|
|
@ -37,11 +37,11 @@ directory containing at least a file named `default.nix`.
|
||||||
|
|
||||||
`nix-build` is essentially a wrapper around
|
`nix-build` is essentially a wrapper around
|
||||||
[`nix-instantiate`](nix-instantiate.md) (to translate a high-level Nix
|
[`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
|
--realise`](@docroot@/command-ref/nix-store/realise.md) (to build the store
|
||||||
derivation).
|
derivation).
|
||||||
|
|
||||||
[derivation]: @docroot@/glossary.md#gloss-derivation
|
[store derivation]: @docroot@/glossary.md#gloss-store-derivation
|
||||||
|
|
||||||
> **Warning**
|
> **Warning**
|
||||||
>
|
>
|
||||||
|
|
@ -80,7 +80,7 @@ except for `--arg` and `--attr` / `-A` which are passed to [`nix-instantiate`](n
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ nix-build '<nixpkgs>' --attr firefox
|
$ nix-build '<nixpkgs>' --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
|
/nix/store/d18hyl92g30l...-firefox-1.5.0.7
|
||||||
|
|
||||||
$ ls -l result
|
$ ls -l result
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,9 @@ When using public key authentication, you can avoid typing the passphrase with `
|
||||||
|
|
||||||
- `--include-outputs`
|
- `--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`
|
- `--use-substitutes` / `-s`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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:
|
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.
|
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.
|
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 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.
|
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.
|
This can be overridden by adding a `meta.outputsToInstall` attribute on the derivation listing a subset of the output names.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
@ -122,6 +122,8 @@ The arguments *args* map to store paths in a number of possible ways:
|
||||||
manifest.nix
|
manifest.nix
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[store derivation]: @docroot@/glossary.md#gloss-store-derivation
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
|
|
||||||
- `--prebuilt-only` / `-b`
|
- `--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
|
$ 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`):
|
`nix-instantiate`):
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,10 @@ derivation is shown unless `--no-name` is specified.
|
||||||
|
|
||||||
- `--drv-path`
|
- `--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
|
[store path]: @docroot@/glossary.md#gloss-store-path
|
||||||
[derivation]: @docroot@/glossary.md#gloss-derivation
|
[store derivation]: @docroot@/glossary.md#gloss-derivation
|
||||||
|
|
||||||
- `--out-path`
|
- `--out-path`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Name
|
# Name
|
||||||
|
|
||||||
`nix-instantiate` - instantiate derivations from Nix expressions
|
`nix-instantiate` - instantiate store derivations from Nix expressions
|
||||||
|
|
||||||
# Synopsis
|
# Synopsis
|
||||||
|
|
||||||
|
|
@ -17,13 +17,13 @@
|
||||||
|
|
||||||
# Description
|
# 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
|
It evaluates the Nix expressions in each of *files* (which defaults to
|
||||||
*./default.nix*). Each top-level expression should evaluate to a
|
*./default.nix*). Each top-level expression should evaluate to a
|
||||||
derivation, a list of derivations, or a set of derivations. The paths
|
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
|
If *files* is the character `-`, then a Nix expression will be read from
|
||||||
standard input.
|
standard input.
|
||||||
|
|
@ -43,7 +43,7 @@ standard input.
|
||||||
|
|
||||||
Just parse and evaluate the input files, and print the resulting
|
Just parse and evaluate the input files, and print the resulting
|
||||||
values on standard output.
|
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**
|
> **Warning**
|
||||||
>
|
>
|
||||||
|
|
@ -133,7 +133,7 @@ standard input.
|
||||||
|
|
||||||
# Examples
|
# 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
|
```console
|
||||||
$ nix-instantiate test.nix (instantiate)
|
$ nix-instantiate test.nix (instantiate)
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,14 @@ symlink.
|
||||||
|
|
||||||
- `--use-output` / `-u`
|
- `--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.
|
query to the output path of the derivation instead.
|
||||||
|
|
||||||
- `--force-realise` / `-f`
|
- `--force-realise` / `-f`
|
||||||
|
|
||||||
Realise each argument to the query first (see [`nix-store --realise`](./realise.md)).
|
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
|
# Queries
|
||||||
|
|
||||||
|
|
@ -54,12 +54,12 @@ symlink.
|
||||||
This query has one option:
|
This query has one option:
|
||||||
|
|
||||||
- `--include-outputs`
|
- `--include-outputs`
|
||||||
Also include the existing output paths of [derivation]s,
|
Also include the existing output paths of [store derivation]s,
|
||||||
and their closures.
|
and their closures.
|
||||||
|
|
||||||
This query can be used to implement various kinds of deployment. A
|
This query can be used to implement various kinds of deployment. A
|
||||||
*source deployment* is obtained by distributing the closure of 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
|
the closure of an output path. A *cache deployment* (combined
|
||||||
source/binary deployment, including binaries of build-time-only
|
source/binary deployment, including binaries of build-time-only
|
||||||
dependencies) is obtained by distributing the closure of a store
|
dependencies) is obtained by distributing the closure of a store
|
||||||
|
|
@ -112,7 +112,7 @@ symlink.
|
||||||
of the `dot` tool of AT\&T's [Graphviz
|
of the `dot` tool of AT\&T's [Graphviz
|
||||||
package](http://www.graphviz.org/). This can be used to visualise
|
package](http://www.graphviz.org/). This can be used to visualise
|
||||||
dependency graphs. To obtain a build-time dependency graph, apply
|
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.
|
apply it to an output path.
|
||||||
|
|
||||||
- `--tree`
|
- `--tree`
|
||||||
|
|
@ -128,13 +128,13 @@ symlink.
|
||||||
Prints the references graph of the store paths *paths* in the
|
Prints the references graph of the store paths *paths* in the
|
||||||
[GraphML](http://graphml.graphdrawing.org/) file format. This can be
|
[GraphML](http://graphml.graphdrawing.org/) file format. This can be
|
||||||
used to visualise dependency graphs. To obtain a build-time
|
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.
|
runtime dependency graph, apply it to an output path.
|
||||||
|
|
||||||
- `--binding` *name* / `-b` *name*
|
- `--binding` *name* / `-b` *name*
|
||||||
|
|
||||||
Prints the value of the attribute *name* (i.e., environment
|
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.
|
derivation to not have the specified attribute.
|
||||||
|
|
||||||
- `--hash`
|
- `--hash`
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,10 @@
|
||||||
|
|
||||||
Each of *paths* is processed as follows:
|
Each of *paths* is processed as follows:
|
||||||
|
|
||||||
- If the path leads to a [derivation]:
|
- If the path leads to a [store derivation]:
|
||||||
1. If it is not [valid], substitute the derivation file itself.
|
1. If it is not [valid], substitute the store derivation file itself.
|
||||||
2. Realise its [output paths]:
|
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):
|
- With [content-addressed derivations] (experimental):
|
||||||
Determine the output paths to realise by querying content-addressed realisation entries in the [Nix database].
|
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:
|
- For any store paths that cannot be substituted, produce the required store objects:
|
||||||
|
|
@ -23,11 +23,11 @@ Each of *paths* is processed as follows:
|
||||||
<!-- TODO: Link to build process page #8888 -->
|
<!-- TODO: Link to build process page #8888 -->
|
||||||
- Otherwise, and if the path is not already valid: Try to fetch the associated [store objects] in the path's [closure] from [substituters].
|
- 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
|
[store paths]: @docroot@/store/store-path.md
|
||||||
[valid]: @docroot@/glossary.md#gloss-validity
|
[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
|
[output paths]: @docroot@/glossary.md#gloss-output-path
|
||||||
[store objects]: @docroot@/store/store-object.md
|
[store objects]: @docroot@/store/store-object.md
|
||||||
[closure]: @docroot@/glossary.md#gloss-closure
|
[closure]: @docroot@/glossary.md#gloss-closure
|
||||||
|
|
@ -71,7 +71,7 @@ For non-derivation arguments, the argument itself is printed.
|
||||||
|
|
||||||
# Examples
|
# 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):
|
[`nix-instantiate`](@docroot@/command-ref/nix-instantiate.md):
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
|
|
||||||
|
|
@ -19,18 +19,18 @@
|
||||||
|
|
||||||
Besides content addressing, the Nix store also uses [input addressing](#gloss-input-addressed-store-object).
|
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.
|
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}
|
- [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].
|
Not to be confused with [deriving path].
|
||||||
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
- [derivation expression]{#gloss-derivation-expression}
|
- [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.
|
The output(s) of a derivation are store objects.
|
||||||
Derivations are typically specified in Nix expressions using the [`derivation` primitive](./language/derivations.md).
|
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`).
|
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
|
- [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
|
[instantiate]: #gloss-instantiate
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
|
|
||||||
This can be achieved by:
|
This can be achieved by:
|
||||||
- Fetching a pre-built [store object] from a [substituter]
|
- 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
|
- Delegating to a [remote machine](@docroot@/command-ref/conf-file.md#conf-builders) and retrieving the outputs
|
||||||
<!-- TODO: link [running] to build process page, #8888 -->
|
<!-- TODO: link [running] to build process page, #8888 -->
|
||||||
|
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
|
|
||||||
- [fixed-output derivation]{#gloss-fixed-output-derivation} (FOD)
|
- [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}
|
- [store]{#gloss-store}
|
||||||
|
|
||||||
|
|
@ -192,7 +192,7 @@
|
||||||
>
|
>
|
||||||
> The contents of a `.nix` file form a Nix expression.
|
> 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].
|
These derivations can then be [realised][realise] to produce [outputs][output].
|
||||||
|
|
||||||
> **Example**
|
> **Example**
|
||||||
|
|
@ -234,14 +234,14 @@
|
||||||
|
|
||||||
- [output]{#gloss-output}
|
- [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.
|
See [the `outputs` argument to the `derivation` function](@docroot@/language/derivations.md#attr-outputs) for details.
|
||||||
|
|
||||||
[output]: #gloss-output
|
[output]: #gloss-output
|
||||||
|
|
||||||
- [output path]{#gloss-output-path}
|
- [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
|
[output path]: #gloss-output-path
|
||||||
|
|
||||||
|
|
@ -258,7 +258,7 @@
|
||||||
|
|
||||||
- [deriver]{#gloss-deriver}
|
- [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
|
The deriver for an output path can be queried with the `--deriver` option to
|
||||||
[`nix-store --query`](@docroot@/command-ref/nix-store/query.md).
|
[`nix-store --query`](@docroot@/command-ref/nix-store/query.md).
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
# Derivations
|
# Derivations
|
||||||
|
|
||||||
The most important built-in function is `derivation`, which is used to describe a single store-layer [derivation].
|
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 derivation is;
|
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 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.
|
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
|
## 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/<hash>-example.drv`.
|
> The store derivation path will be `/nix/store/<hash>-example.drv`.
|
||||||
> The output paths will be
|
> The output paths will be
|
||||||
> - `/nix/store/<hash>-example-lib`
|
> - `/nix/store/<hash>-example-lib`
|
||||||
> - `/nix/store/<hash>-example-dev`
|
> - `/nix/store/<hash>-example-dev`
|
||||||
|
|
|
||||||
|
|
@ -72,9 +72,9 @@ Boxes are data structures, arrow labels are transformations.
|
||||||
| | | | |
|
| | | | |
|
||||||
| V | | |
|
| V | | |
|
||||||
| .------------. | | |
|
| .------------. | | |
|
||||||
| | derivation | | | .------------. |
|
| | derivation | | | .------------------. |
|
||||||
| | expression |----|-instantiate-|---->| derivation | |
|
| | expression |----|-instantiate-|->| store derivation | |
|
||||||
| '------------' | | '------------' |
|
| '------------' | | '------------------' |
|
||||||
| | | | |
|
| | | | |
|
||||||
| | | realise |
|
| | | realise |
|
||||||
| | | | |
|
| | | | |
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Derivation "ATerm" file format
|
# 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
|
## 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),
|
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.
|
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
|
[store object]: @docroot@/glossary.md#gloss-store-object
|
||||||
["Text" method]: @docroot@/store/store-object/content-address.md#method-text
|
["Text" method]: @docroot@/store/store-object/content-address.md#method-text
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
> and subject to change.
|
> and subject to change.
|
||||||
|
|
||||||
The JSON serialization of a
|
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:
|
is a JSON object with the following fields:
|
||||||
|
|
||||||
* `name`:
|
* `name`:
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,10 @@ In other words, the same store object residing in different store could have dif
|
||||||
|
|
||||||
* `deriver`:
|
* `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`.
|
Otherwise `null`.
|
||||||
|
|
||||||
[derivation]: @docroot@/glossary.md#gloss-derivation
|
[store derivation]: @docroot@/glossary.md#gloss-store-derivation
|
||||||
|
|
||||||
* `registrationTime` (optional):
|
* `registrationTime` (optional):
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ Nix 0.8 has the following improvements:
|
||||||
|
|
||||||
$ nix-env -i --from-profile .../other-profile firefox
|
$ 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):
|
expression language entirely):
|
||||||
|
|
||||||
$ nix-env -i /nix/store/z58v41v21xd3...-aterm-2.3.1.drv
|
$ nix-env -i /nix/store/z58v41v21xd3...-aterm-2.3.1.drv
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@ This release has the following new features:
|
||||||
NAR format. This replaces `nix-store --dump`.
|
NAR format. This replaces `nix-store --dump`.
|
||||||
|
|
||||||
- `nix
|
- `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`.
|
This is an alternative to `pp-aterm`.
|
||||||
|
|
||||||
- `nix
|
- `nix
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
accurate error locations. A short excerpt of the trace is now shown by
|
accurate error locations. A short excerpt of the trace is now shown by
|
||||||
default when an error occurs.
|
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,
|
For example,
|
||||||
```shell-session
|
```shell-session
|
||||||
# nix build /nix/store/gzaflydcr6sb3567hap9q6srzx8ggdgg-glibc-2.33-78.drv^dev
|
# nix build /nix/store/gzaflydcr6sb3567hap9q6srzx8ggdgg-glibc-2.33-78.drv^dev
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
As the choice of hash formats is no longer binary, the `--base16` flag is also added
|
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.
|
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.
|
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.
|
Using this is better and more clear than relying on the now-removed `.drv` special handling.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Derivation and Deriving Path
|
# Store Derivation and Deriving Path
|
||||||
|
|
||||||
So far, we have covered "inert" [store objects][store object].
|
So far, we have covered "inert" [store objects][store object].
|
||||||
But the point of the Nix store layer is to be a build system.
|
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.
|
*Derivations* represent individual build steps, and *deriving paths* are needed to refer to the *outputs* of those build steps before they are built.
|
||||||
<!-- The two concepts need to be introduced together because, as described below, each depends on the other. -->
|
<!-- The two concepts need to be introduced together because, as described below, each depends on the other. -->
|
||||||
|
|
||||||
## 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.
|
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.
|
- 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
|
[inputs]: #inputs
|
||||||
[input]: #inputs
|
[input]: #inputs
|
||||||
[outputs]: #outputs
|
[outputs]: #outputs
|
||||||
|
|
@ -63,7 +63,7 @@ There are two forms:
|
||||||
- [*constant*]{#deriving-path-constant}: just a [store path].
|
- [*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.
|
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:
|
In pseudo code:
|
||||||
|
|
||||||
|
|
@ -83,7 +83,7 @@ data DerivingPath
|
||||||
|
|
||||||
## Parts of a derivation
|
## 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.
|
it is now possible to define the parts of a derivation.
|
||||||
|
|
||||||
### Inputs {#inputs}
|
### Inputs {#inputs}
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,8 @@ MixOperateOnOptions::MixOperateOnOptions()
|
||||||
{
|
{
|
||||||
addFlag({
|
addFlag({
|
||||||
.longName = "derivation",
|
.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,
|
.category = installablesCategory,
|
||||||
.handler = {&operateOn, OperateOn::Derivation},
|
.handler = {&operateOn, OperateOn::Derivation},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ enum class Realise {
|
||||||
/**
|
/**
|
||||||
* Don't build the derivation.
|
* Don't build the derivation.
|
||||||
*
|
*
|
||||||
* Postcondition: the derivation exists.
|
* Postcondition: the store derivation exists.
|
||||||
*/
|
*/
|
||||||
Derivation,
|
Derivation,
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ Args::Flag contentAddressMethod(ContentAddressMethod * method)
|
||||||
|
|
||||||
- [`text`](@docroot@/store/store-object/content-address.md#method-text):
|
- [`text`](@docroot@/store/store-object/content-address.md#method-text):
|
||||||
Like `flat`, but used for
|
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).
|
[`builtins.toFile`](@docroot@/language/builtins.html#builtins-toFile).
|
||||||
For advanced use-cases only;
|
For advanced use-cases only;
|
||||||
for regular usage prefer `nar` and `flat`.
|
for regular usage prefer `nar` and `flat`.
|
||||||
|
|
|
||||||
|
|
@ -777,7 +777,7 @@ StorePath AttrCursor::forceDerivation()
|
||||||
been garbage-collected. So force it to be regenerated. */
|
been garbage-collected. So force it to be regenerated. */
|
||||||
aDrvPath->forceValue();
|
aDrvPath->forceValue();
|
||||||
if (!root->state.store->isValidPath(drvPath))
|
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));
|
root->state.store->printStorePath(drvPath));
|
||||||
}
|
}
|
||||||
return drvPath;
|
return drvPath;
|
||||||
|
|
|
||||||
|
|
@ -1510,7 +1510,7 @@ static void derivationStrictInternal(
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
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
|
the final one except that in the list of outputs, the
|
||||||
output paths are empty strings, and the corresponding
|
output paths are empty strings, and the corresponding
|
||||||
environment variables have an empty value. This ensures
|
environment variables have an empty value. This ensures
|
||||||
|
|
@ -1556,7 +1556,7 @@ static void derivationStrictInternal(
|
||||||
printMsg(lvlChatty, "instantiated '%1%' -> '%2%'", drvName, drvPathS);
|
printMsg(lvlChatty, "instantiated '%1%' -> '%2%'", drvName, drvPathS);
|
||||||
|
|
||||||
/* Optimisation, but required in read-only mode! because in that
|
/* 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. */
|
read them later. */
|
||||||
{
|
{
|
||||||
auto h = hashDerivationModulo(*state.store, drv, false);
|
auto h = hashDerivationModulo(*state.store, drv, false);
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ static RegisterPrimOp primop_getContext({
|
||||||
Return the string context of *s*.
|
Return the string context of *s*.
|
||||||
|
|
||||||
The string context tracks references to derivations within a string.
|
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.
|
Using [string interpolation](@docroot@/language/string-interpolation.md) on a derivation will add that derivation to the string context.
|
||||||
For example,
|
For example,
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,7 @@ public:
|
||||||
this, SYSTEM, "system",
|
this, SYSTEM, "system",
|
||||||
R"(
|
R"(
|
||||||
The system type of the current Nix installation.
|
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 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:
|
The following system types are widely used, as Nix is actively supported on these platforms:
|
||||||
|
|
@ -825,7 +825,7 @@ public:
|
||||||
R"(
|
R"(
|
||||||
System types of executables that can be run on this machine.
|
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:
|
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)
|
- `i686-linux` executables can be run on `x86_64-linux` machines (set by default)
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ struct CmdAddDerivation : MixDryRun, StoreCommand
|
||||||
{
|
{
|
||||||
std::string description() override
|
std::string description() override
|
||||||
{
|
{
|
||||||
return "Add a derivation";
|
return "Add a store derivation";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string doc() override
|
std::string doc() override
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,14 @@ R""(
|
||||||
# Description
|
# Description
|
||||||
|
|
||||||
This command reads from standard input a JSON representation of a
|
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
|
Store derivations are used internally by Nix. They are store paths with
|
||||||
extension `.drv` that represent the build-time dependency graph to which
|
extension `.drv` that represent the build-time dependency graph to which
|
||||||
a Nix expression evaluates.
|
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:
|
`nix derivation add` takes a single derivation in the following format:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// FIXME: integrate this with `nix path-info`?
|
// FIXME: integrate this with `nix path-info`?
|
||||||
|
// FIXME: rename to 'nix store derivation show'?
|
||||||
|
|
||||||
#include "command.hh"
|
#include "command.hh"
|
||||||
#include "common-args.hh"
|
#include "common-args.hh"
|
||||||
|
|
@ -26,7 +27,7 @@ struct CmdShowDerivation : InstallablesCommand
|
||||||
|
|
||||||
std::string description() override
|
std::string description() override
|
||||||
{
|
{
|
||||||
return "show the contents of a derivation";
|
return "show the contents of a store derivation";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string doc() override
|
std::string doc() override
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ R""(
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
* Show the [derivation] that results from evaluating the Hello
|
* Show the [store derivation] that results from evaluating the Hello
|
||||||
package:
|
package:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
|
@ -37,7 +37,7 @@ R""(
|
||||||
# Description
|
# Description
|
||||||
|
|
||||||
This command prints on standard output a JSON representation of the
|
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
|
Store derivations are used internally by Nix. They are store paths with
|
||||||
extension `.drv` that represent the build-time dependency graph to which
|
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
|
By default, this command only shows top-level derivations, but with
|
||||||
`--recursive`, it also shows their dependencies.
|
`--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:
|
`nix derivation show` outputs a JSON map of [store path]s to derivations in the following format:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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`
|
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`
|
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
|
a command like `nix shell nixpkgs#libxml2` will provide only those
|
||||||
two outputs by default.
|
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.
|
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.
|
* Otherwise, Nix will use all outputs of the derivation.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
```console
|
||||||
# nix path-info --derivation nixpkgs#hello
|
# nix path-info --derivation nixpkgs#hello
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ R""(
|
||||||
(The flag `--substituters ''` avoids querying
|
(The flag `--substituters ''` avoids querying
|
||||||
`https://cache.nixos.org` for the log.)
|
`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
|
```console
|
||||||
# nix store copy-log --to ssh-ng://machine /nix/store/ilgm50plpmcgjhcp33z6n4qbnpqfhxym-glibc-2.33-59.drv
|
# nix store copy-log --to ssh-ng://machine /nix/store/ilgm50plpmcgjhcp33z6n4qbnpqfhxym-glibc-2.33-59.drv
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue