From 95ae12b6079db7a30e2686138209e3a363eb85c9 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 12 Apr 2024 11:06:47 -0400 Subject: [PATCH] docs: Refer to the glossary with `@docroot@` instead of `..` These unweildy relative paths probably predate the `@docroot@` mechanism. --- doc/manual/src/architecture/architecture.md | 2 +- doc/manual/src/command-ref/nix-build.md | 2 +- doc/manual/src/command-ref/nix-copy-closure.md | 2 +- doc/manual/src/command-ref/nix-instantiate.md | 2 +- doc/manual/src/command-ref/nix-store/query.md | 8 ++++---- doc/manual/src/language/advanced-attributes.md | 2 +- doc/manual/src/language/operators.md | 4 ++-- doc/manual/src/language/string-interpolation.md | 6 +++--- doc/manual/src/language/values.md | 2 +- doc/manual/src/release-notes/rl-2.15.md | 2 +- src/libcmd/command.cc | 2 +- src/nix/nix.md | 2 +- src/nix/path-info.md | 2 +- src/nix/store-copy-log.md | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/manual/src/architecture/architecture.md b/doc/manual/src/architecture/architecture.md index 2fec4ed20..867a9c992 100644 --- a/doc/manual/src/architecture/architecture.md +++ b/doc/manual/src/architecture/architecture.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. > **Important** -> A build task in Nix is called [derivation](../glossary.md#gloss-derivation). +> A build task in Nix is called [derivation](@docroot@/glossary.md#gloss-derivation). 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. diff --git a/doc/manual/src/command-ref/nix-build.md b/doc/manual/src/command-ref/nix-build.md index b548edf82..e4223b542 100644 --- a/doc/manual/src/command-ref/nix-build.md +++ b/doc/manual/src/command-ref/nix-build.md @@ -41,7 +41,7 @@ expression to a low-level [store derivation]) and [`nix-store --realise`](@docroot@/command-ref/nix-store/realise.md) (to build the store derivation). -[store derivation]: ../glossary.md#gloss-store-derivation +[store derivation]: @docroot@/glossary.md#gloss-store-derivation > **Warning** > diff --git a/doc/manual/src/command-ref/nix-copy-closure.md b/doc/manual/src/command-ref/nix-copy-closure.md index fbf6828da..eb1693e1e 100644 --- a/doc/manual/src/command-ref/nix-copy-closure.md +++ b/doc/manual/src/command-ref/nix-copy-closure.md @@ -49,7 +49,7 @@ authentication, you can avoid typing the passphrase with `ssh-agent`. - `--include-outputs`\ Also copy the outputs of [store derivation]s included in the closure. - [store derivation]: ../glossary.md#gloss-store-derivation + [store derivation]: @docroot@/glossary.md#gloss-store-derivation - `--use-substitutes` / `-s`\ Attempt to download missing paths on the target machine using Nix’s diff --git a/doc/manual/src/command-ref/nix-instantiate.md b/doc/manual/src/command-ref/nix-instantiate.md index 479c9abcf..dffbb2d70 100644 --- a/doc/manual/src/command-ref/nix-instantiate.md +++ b/doc/manual/src/command-ref/nix-instantiate.md @@ -23,7 +23,7 @@ It evaluates the Nix expressions in each of *files* (which defaults to derivation, a list of derivations, or a set of derivations. The paths of the resulting store derivations are printed on standard output. -[store derivation]: ../glossary.md#gloss-store-derivation +[store derivation]: @docroot@/glossary.md#gloss-store-derivation If *files* is the character `-`, then a Nix expression will be read from standard input. diff --git a/doc/manual/src/command-ref/nix-store/query.md b/doc/manual/src/command-ref/nix-store/query.md index a158c76aa..0bcacfe0c 100644 --- a/doc/manual/src/command-ref/nix-store/query.md +++ b/doc/manual/src/command-ref/nix-store/query.md @@ -40,12 +40,12 @@ symlink. derivations *paths*. These are the paths that will be produced when the derivation is built. - [output paths]: ../../glossary.md#gloss-output-path + [output paths]: @docroot@/glossary.md#gloss-output-path - `--requisites`; `-R`\ Prints out the [closure] of the store path *paths*. - [closure]: ../../glossary.md#gloss-closure + [closure]: @docroot@/glossary.md#gloss-closure This query has one option: @@ -66,7 +66,7 @@ symlink. *paths*, that is, their immediate dependencies. (For *all* dependencies, use `--requisites`.) - [references]: ../../glossary.md#gloss-reference + [references]: @docroot@/glossary.md#gloss-reference - `--referrers`\ Prints the set of *referrers* of the store paths *paths*, that is, @@ -90,7 +90,7 @@ symlink. example when *paths* were substituted from a binary cache. Use `--valid-derivers` instead to obtain valid paths only. - [deriver]: ../../glossary.md#gloss-deriver + [deriver]: @docroot@/glossary.md#gloss-deriver - `--valid-derivers`\ Prints a set of derivation files (`.drv`) which are supposed produce diff --git a/doc/manual/src/language/advanced-attributes.md b/doc/manual/src/language/advanced-attributes.md index 16dcc6ba9..1fcc5a95b 100644 --- a/doc/manual/src/language/advanced-attributes.md +++ b/doc/manual/src/language/advanced-attributes.md @@ -303,7 +303,7 @@ Derivations can declare some infrequently used optional attributes. [`disallowedReferences`](#adv-attr-disallowedReferences) and [`disallowedRequisites`](#adv-attr-disallowedRequisites), the following attributes are available: - - `maxSize` defines the maximum size of the resulting [store object](../glossary.md#gloss-store-object). + - `maxSize` defines the maximum size of the resulting [store object](@docroot@/glossary.md#gloss-store-object). - `maxClosureSize` defines the maximum size of the output's closure. - `ignoreSelfRefs` controls whether self-references should be considered when checking for allowed references/requisites. diff --git a/doc/manual/src/language/operators.md b/doc/manual/src/language/operators.md index 6fd66864b..698fed47e 100644 --- a/doc/manual/src/language/operators.md +++ b/doc/manual/src/language/operators.md @@ -128,8 +128,8 @@ The result is a string. > The file or directory at *path* must exist and is copied to the [store]. > The path appears in the result as the corresponding [store path]. -[store path]: ../glossary.md#gloss-store-path -[store]: ../glossary.md#gloss-store +[store path]: @docroot@/glossary.md#gloss-store-path +[store]: @docroot@/glossary.md#gloss-store [String and path concatenation]: #string-and-path-concatenation diff --git a/doc/manual/src/language/string-interpolation.md b/doc/manual/src/language/string-interpolation.md index 7d81c2020..1f8fecca8 100644 --- a/doc/manual/src/language/string-interpolation.md +++ b/doc/manual/src/language/string-interpolation.md @@ -20,7 +20,7 @@ Rather than writing (where `freetype` is a [derivation]), you can instead write -[derivation]: ../glossary.md#gloss-derivation +[derivation]: @docroot@/glossary.md#gloss-derivation ```nix "--with-freetype2-library=${freetype}/lib" @@ -107,9 +107,9 @@ An expression that is interpolated must evaluate to one of the following: A string interpolates to itself. -A path in an interpolated expression is first copied into the Nix store, and the resulting string is the [store path] of the newly created [store object](../glossary.md#gloss-store-object). +A path in an interpolated expression is first copied into the Nix store, and the resulting string is the [store path] of the newly created [store object](@docroot@/glossary.md#gloss-store-object). -[store path]: ../glossary.md#gloss-store-path +[store path]: @docroot@/glossary.md#gloss-store-path > **Example** > diff --git a/doc/manual/src/language/values.md b/doc/manual/src/language/values.md index 74ffc7070..568542c0b 100644 --- a/doc/manual/src/language/values.md +++ b/doc/manual/src/language/values.md @@ -113,7 +113,7 @@ For example, assume you used a file path in an interpolated string during a `nix repl` session. Later in the same session, after having changed the file contents, evaluating the interpolated string with the file path again might not return a new [store path], since Nix might not re-read the file contents. - [store path]: ../glossary.md#gloss-store-path + [store path]: @docroot@/glossary.md#gloss-store-path Paths can include [string interpolation] and can themselves be [interpolated in other expressions]. diff --git a/doc/manual/src/release-notes/rl-2.15.md b/doc/manual/src/release-notes/rl-2.15.md index 133121999..e7e52631b 100644 --- a/doc/manual/src/release-notes/rl-2.15.md +++ b/doc/manual/src/release-notes/rl-2.15.md @@ -11,7 +11,7 @@ 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. -* 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](../glossary.md#gloss-store-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. Using this is better and more clear than relying on the now-removed `.drv` special handling. diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index 369fa6004..220a90cf6 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -148,7 +148,7 @@ MixOperateOnOptions::MixOperateOnOptions() { addFlag({ .longName = "derivation", - .description = "Operate on the [store derivation](../../glossary.md#gloss-store-derivation) rather than its outputs.", + .description = "Operate on the [store derivation](@docroot@/glossary.md#gloss-store-derivation) rather than its outputs.", .category = installablesCategory, .handler = {&operateOn, OperateOn::Derivation}, }); diff --git a/src/nix/nix.md b/src/nix/nix.md index 749456014..4464bef37 100644 --- a/src/nix/nix.md +++ b/src/nix/nix.md @@ -229,7 +229,7 @@ operate are determined as follows: 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. - [store derivation]: ../../glossary.md#gloss-store-derivation + [store derivation]: @docroot@/glossary.md#gloss-store-derivation * Otherwise, Nix will use all outputs of the derivation. diff --git a/src/nix/path-info.md b/src/nix/path-info.md index 4594854eb..789984559 100644 --- a/src/nix/path-info.md +++ b/src/nix/path-info.md @@ -70,7 +70,7 @@ R""( * Print the path of the [store derivation] produced by `nixpkgs#hello`: - [store derivation]: ../../glossary.md#gloss-store-derivation + [store derivation]: @docroot@/glossary.md#gloss-store-derivation ```console # nix path-info --derivation nixpkgs#hello diff --git a/src/nix/store-copy-log.md b/src/nix/store-copy-log.md index 0937250f2..61daa75c1 100644 --- a/src/nix/store-copy-log.md +++ b/src/nix/store-copy-log.md @@ -20,7 +20,7 @@ R""( * To copy the log for a specific [store derivation] via SSH: - [store derivation]: ../../glossary.md#gloss-store-derivation + [store derivation]: @docroot@/glossary.md#gloss-store-derivation ```console # nix store copy-log --to ssh-ng://machine /nix/store/ilgm50plpmcgjhcp33z6n4qbnpqfhxym-glibc-2.33-59.drv