You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document Store Derivations and Deriving Paths (#12290)
This is a big step documenting the store layer on its own, separately from the evaluator (and `builtins.derivation`).
Co-authored-by: Robert Hensing <[email protected]>
Copy file name to clipboardExpand all lines: doc/manual/source/command-ref/nix-env/install.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,11 @@ It is based on the current generation of the active [profile](@docroot@/command-
22
22
23
23
The arguments *args* map to store paths in a number of possible ways:
24
24
25
-
- By default, *args* is a set of [derivation]names denoting derivations in the [default Nix expression].
25
+
- By default, *args* is a set of names denoting derivations in the [default Nix expression].
26
26
These are [realised], and the resulting output paths are installed.
27
27
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:
66
66
This can be used to override the priority of the derivations being installed.
67
67
This is useful if *args* are [store paths], which don't have any priority information.
68
68
69
-
- If *args* are [store derivations](@docroot@/glossary.md#gloss-store-derivation), then these are [realised], and the resulting output paths are installed.
69
+
- If *args* are [store paths] that point to [store derivations][storederivation], then those store derivations are [realised], and the resulting output paths are installed.
70
70
71
-
- If *args* are [store paths] that are not store derivations, then these are [realised] and installed.
71
+
- If *args* are [store paths] that do not point to store derivations, then these are [realised] and installed.
72
72
73
-
- By default all [outputs](@docroot@/language/derivations.md#attr-outputs) are installed for each [derivation].
73
+
- By default all [outputs](@docroot@/language/derivations.md#attr-outputs) are installed for each [store derivation].
74
74
This can be overridden by adding a `meta.outputsToInstall` attribute on the derivation listing a subset of the output names.
75
75
76
76
Example:
@@ -122,6 +122,8 @@ The arguments *args* map to store paths in a number of possible ways:
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.
80
+
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.
77
81
78
82
-[store]{#gloss-store}
79
83
@@ -188,7 +192,7 @@
188
192
>
189
193
> The contents of a `.nix` file form a Nix expression.
190
194
191
-
Nix expressions specify [derivations][derivation], which are [instantiated][instantiate] into the Nix store as [store derivations][store derivation].
195
+
Nix expressions specify [derivation expressions][derivation expression], which are [instantiated][instantiate] into the Nix store as [store derivations][store derivation].
192
196
These derivations can then be [realised][realise] to produce [outputs][output].
193
197
194
198
> **Example**
@@ -230,14 +234,14 @@
230
234
231
235
-[output]{#gloss-output}
232
236
233
-
A [store object] produced by a [derivation].
237
+
A [store object] produced by a [store derivation].
234
238
See [the `outputs` argument to the `derivation` function](@docroot@/language/derivations.md#attr-outputs) for details.
235
239
236
240
[output]: #gloss-output
237
241
238
242
-[output path]{#gloss-output-path}
239
243
240
-
The [store path] to the [output] of a [derivation].
244
+
The [store path] to the [output] of a [store derivation].
241
245
242
246
[output path]: #gloss-output-path
243
247
@@ -246,14 +250,11 @@
246
250
247
251
-[deriving path]{#gloss-deriving-path}
248
252
249
-
Deriving paths are a way to refer to [store objects][store object] that ar not yet [realised][realise].
250
-
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.
251
-
There are two forms:
253
+
Deriving paths are a way to refer to [store objects][store object] that might not yet be [realised][realise].
252
254
253
-
-*constant*: just a [store path]
254
-
It can be made [valid][validity] by copying it into the store: from the evaluator, command line interface or another store.
255
+
See [Deriving Path](./store/drv.md#deriving-path) for details.
255
256
256
-
-*output*: a pair of a [store path] to a [derivation] and an [output] name.
Copy file name to clipboardExpand all lines: doc/manual/source/language/derivations.md
+9-87Lines changed: 9 additions & 87 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
# Derivations
2
2
3
-
The most important built-in function is `derivation`, which is used to describe a single derivation:
4
-
a specification for running an executable on precisely defined input files to repeatably produce output files at uniquely determined file system paths.
3
+
The most important built-in function is `derivation`, which is used to describe a single store-layer [store derivation].
4
+
Consult the [store chapter](@docroot@/store/drv.md) for what a store derivation is;
5
+
this section just concerns how to create one from the Nix language.
5
6
6
-
It takes as input an attribute set, the attributes of which specify the inputs to the process.
7
+
This builtin function takes as input an attribute set, the attributes of which specify the inputs to the process.
7
8
It outputs an attribute set, and produces a [store derivation] as a side effect of evaluation.
0 commit comments