diff --git a/doc/manual/source/store/building.md b/doc/manual/source/store/building.md index c6218ec94..a5929bc83 100644 --- a/doc/manual/source/store/building.md +++ b/doc/manual/source/store/building.md @@ -1,13 +1,10 @@ # Building -TODO - ## Normalizing derivation inputs -TODO +- Each input must be [realised] prior to building the derivation in question. -Each input must be [realised] prior to building the derivation in question. -At that point, the derivation can be *normalized*, by replacing each input deriving path with its store path --- which we now know since we've realised it. +- Once this is done, the derivation is *normalized*, replacing each input deriving path with its store path, which we now know from realising the input. ## Builder Execution @@ -68,10 +65,7 @@ The [`builder`](./drv.md#builder) is executed as follows: - The temporary directory is removed (unless the `-K` option was specified). -- If the build was successful, Nix scans each output path for - references to input paths by looking for the hash parts of the input - paths. Since these are potential runtime dependencies, Nix registers - them as dependencies of the output paths. +## Processing outputs and Reference scanning - After the build, Nix sets the last-modified timestamp on all files in the build result to 1 (00:00:01 1/1/1970 UTC), sets the group to @@ -83,6 +77,10 @@ The [`builder`](./drv.md#builder) is executed as follows: deployment have no concept of ownership information, and because it makes the build result dependent on the user performing the build. -## Processing outputs and Reference scanning +- If the build was successful, Nix scans each output path for + references to input paths by looking for the hash parts of the input + paths. Since these are potential runtime dependencies, Nix registers + them as dependencies of the output paths. -TODO + Nix also scans for references to other outputs' paths in the same way, because outputs are allowed to refer to each other. + If the outputs' references to each other form a cycle, this is an error, because the references of store objects much be acyclic. diff --git a/doc/manual/source/store/drv.md b/doc/manual/source/store/drv.md index 31d00e419..06ea16219 100644 --- a/doc/manual/source/store/drv.md +++ b/doc/manual/source/store/drv.md @@ -295,7 +295,8 @@ Under this extended model, `DerivingPath`s are thus inductively built up from an ### Encoding {#deriving-path-encoding} -The encoding is adjusted in a very simplest way, merely displaying the same +The encoding is adjusted in the natural way, encoding the `drv` field recursively using the same deriving path encoding. +The result of this is that it is possible to have a chain of `^` at the end of the final string, as opposed to just a single one. > **Example** >