-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Document Store Derivations and Deriving Paths #12290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
a654cc2
5eeae83
1926161
a8b1e3f
16bd5a4
97977b7
4b29ca8
4b9fb54
87c559e
96a46f9
6246901
80e6942
e77338d
fb7fc6a
0cd1e78
05a38b8
e409ea7
3d3a86d
f3fa9cf
f2d5be9
86f23c2
3a3f6ad
b027e22
f003b8c
54d684e
094d352
298d199
1e2dfce
ea21555
9847acc
cba35b1
c343e05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,31 +21,26 @@ | |
|
|
||
| - [derivation]{#gloss-derivation} | ||
|
|
||
| A description of a build task. The result of a derivation is a | ||
| store object. Derivations declared in Nix expressions are specified | ||
| using the [`derivation` primitive](./language/derivations.md). These are | ||
| translated into low-level *store derivations* (implicitly by | ||
| `nix-build`, or explicitly by `nix-instantiate`). | ||
| A single build task. | ||
| See [Derivation](@docroot@/store/drv.md#derivation) for details. | ||
|
|
||
| [derivation]: #gloss-derivation | ||
|
|
||
| - [store derivation]{#gloss-store-derivation} | ||
| - [derivation expression]{#gloss-derivation} | ||
|
||
|
|
||
| A [derivation] represented as a `.drv` file in the [store]. | ||
| It has a [store path], like any [store object]. | ||
| It is the [instantiated][instantiate] form of a derivation. | ||
| A description of a [derivation] in the Nix language. | ||
| The result of a derivation is a store object. | ||
Ericson2314 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Derivations are typically specified in Nix expressions using the [`derivation` primitive](./language/derivations.md). | ||
| These are translated into low-level *derivations* (implicitly by | ||
| `nix-env` and `nix-build`, or explicitly by `nix-instantiate`). | ||
Ericson2314 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Example: `/nix/store/g946hcz4c8mdvq2g8vxx42z51qb71rvp-git-2.38.1.drv` | ||
|
|
||
| See [`nix derivation show`](./command-ref/new-cli/nix3-derivation-show.md) (experimental) for displaying the contents of store derivations. | ||
|
|
||
| [store derivation]: #gloss-store-derivation | ||
| [derivation expression]: #gloss-derivation-expression | ||
|
|
||
| - [instantiate]{#gloss-instantiate}, instantiation | ||
|
|
||
| Save an evaluated [derivation] as a [store derivation] in the Nix [store]. | ||
| Translate a [derivation expression] into a [derivation]. | ||
|
|
||
| See [`nix-instantiate`](./command-ref/nix-instantiate.md), which produces a store derivation from a Nix expression that evaluates to a derivation. | ||
| See [`nix-instantiate`](./command-ref/nix-instantiate.md), which produces a derivation from a Nix expression that evaluates to a derivation. | ||
|
|
||
| [instantiate]: #gloss-instantiate | ||
|
|
||
|
|
@@ -188,7 +183,7 @@ | |
| > | ||
| > The contents of a `.nix` file form a Nix expression. | ||
| Nix expressions specify [derivations][derivation], which are [instantiated][instantiate] into the Nix store as [store derivations][store derivation]. | ||
| Nix expressions specify [derivation expressions][derivation expression], which are [instantiated][instantiate] into the Nix store as [derivations][derivation]. | ||
| These derivations can then be [realised][realise] to produce [outputs][output]. | ||
|
|
||
| > **Example** | ||
|
|
@@ -246,18 +241,13 @@ | |
|
|
||
| - [deriving path]{#gloss-deriving-path} | ||
|
|
||
| Deriving paths are a way to refer to [store objects][store object] that ar not yet [realised][realise]. | ||
| This is necessary because, in general and particularly for [content-addressed derivations][content-addressed derivation], the [output path] of an [output] is not known in advance. | ||
| There are two forms: | ||
|
|
||
| - *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 store. | ||
| Deriving paths are a way to refer to [store objects][store object] that might not be yet [realised][realise]. | ||
Ericson2314 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - *output*: a pair of a [store path] to a [derivation] and an [output] name. | ||
| See [Deriving Path](./store/drv.md#deriving-path) for details. | ||
|
|
||
| - [deriver]{#gloss-deriver} | ||
|
|
||
| The [store derivation] that produced an [output path]. | ||
| The [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). | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.