Skip to content

Commit ed3e2a7

Browse files
authored
Merge pull request #12994 from fricklerhandwerk/reword-derivation
glossary: re-introduce "derivation"
2 parents 170f602 + 82d5982 commit ed3e2a7

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

doc/manual/source/glossary.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,22 @@
3131

3232
The industry term for storage and retrieval systems using [content addressing](#gloss-content-address). A Nix store also has [input addressing](#gloss-input-addressed-store-object), and metadata.
3333

34+
- [derivation]{#gloss-derivation}
35+
36+
A derivation can be thought of as a [pure function](https://en.wikipedia.org/wiki/Pure_function) that produces new [store objects][store object] from existing store objects.
37+
38+
Derivations are implemented as [operating system processes that run in a sandbox](@docroot@/store/building.md#builder-execution).
39+
This sandbox by default only allows reading from store objects specified as inputs, and only allows writing to designated [outputs][output] to be [captured as store objects](@docroot@/store/building.md#processing-outputs).
40+
41+
A derivation is typically specified as a [derivation expression] in the [Nix language], and [instantiated][instantiate] to a [store derivation].
42+
There are multiple ways of obtaining store objects from store derivatons, collectively called [realisation][realise].
43+
44+
[derivation]: #gloss-derivation
45+
3446
- [store derivation]{#gloss-store-derivation}
3547

36-
A single build task.
48+
A [derivation] represented as a [store object].
49+
3750
See [Store Derivation](@docroot@/store/derivation/index.md#store-derivation) for details.
3851

3952
[store derivation]: #gloss-store-derivation
@@ -57,10 +70,7 @@
5770

5871
- [derivation expression]{#gloss-derivation-expression}
5972

60-
A description of a [store derivation] in the Nix language.
61-
The output(s) of a derivation are store objects.
62-
Derivations are typically specified in Nix expressions using the [`derivation` primitive](./language/derivations.md).
63-
These are translated into store layer *derivations* (implicitly by `nix-env` and `nix-build`, or explicitly by `nix-instantiate`).
73+
A description of a [store derivation] using the [`derivation` primitive](./language/derivations.md) in the [Nix language].
6474

6575
[derivation expression]: #gloss-derivation-expression
6676

doc/manual/source/language/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Nix Language
22

3-
The Nix language is designed for conveniently creating and composing *derivations* – precise descriptions of how contents of existing files are used to derive new files.
3+
The Nix language is designed for conveniently creating and composing [derivations](@docroot@/glossary.md#gloss-derivation) – precise descriptions of how contents of existing files are used to derive new files.
44

55
> **Tip**
66
>

0 commit comments

Comments
 (0)