aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src/command-ref
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual/src/command-ref')
-rw-r--r--doc/manual/src/command-ref/env-common.md41
-rw-r--r--doc/manual/src/command-ref/nix-build.md16
-rw-r--r--doc/manual/src/command-ref/nix-copy-closure.md4
-rw-r--r--doc/manual/src/command-ref/nix-daemon.md4
-rw-r--r--doc/manual/src/command-ref/nix-env.md8
-rw-r--r--doc/manual/src/command-ref/nix-instantiate.md10
-rw-r--r--doc/manual/src/command-ref/nix-store.md23
7 files changed, 41 insertions, 65 deletions
diff --git a/doc/manual/src/command-ref/env-common.md b/doc/manual/src/command-ref/env-common.md
index 3f3eb6915..5845bdc43 100644
--- a/doc/manual/src/command-ref/env-common.md
+++ b/doc/manual/src/command-ref/env-common.md
@@ -7,42 +7,11 @@ Most Nix commands interpret the following environment variables:
`nix-shell`. It can have the values `pure` or `impure`.
- [`NIX_PATH`]{#env-NIX_PATH}\
- A colon-separated list of directories used to look up Nix
- expressions enclosed in angle brackets (i.e., `<path>`). For
- instance, the value
-
- /home/eelco/Dev:/etc/nixos
-
- will cause Nix to look for paths relative to `/home/eelco/Dev` and
- `/etc/nixos`, in this order. It is also possible to match paths
- against a prefix. For example, the value
-
- nixpkgs=/home/eelco/Dev/nixpkgs-branch:/etc/nixos
-
- will cause Nix to search for `<nixpkgs/path>` in
- `/home/eelco/Dev/nixpkgs-branch/path` and `/etc/nixos/nixpkgs/path`.
-
- If a path in the Nix search path starts with `http://` or
- `https://`, it is interpreted as the URL of a tarball that will be
- downloaded and unpacked to a temporary location. The tarball must
- consist of a single top-level directory. For example, setting
- `NIX_PATH` to
-
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz
-
- tells Nix to download and use the current contents of the
- `master` branch in the `nixpkgs` repository.
-
- The URLs of the tarballs from the official nixos.org channels (see
- [the manual for `nix-channel`](nix-channel.md)) can be abbreviated
- as `channel:<channel-name>`. For instance, the following two
- values of `NIX_PATH` are equivalent:
-
- nixpkgs=channel:nixos-21.05
- nixpkgs=https://nixos.org/channels/nixos-21.05/nixexprs.tar.xz
-
- The Nix search path can also be extended using the `-I` option to
- many Nix commands, which takes precedence over `NIX_PATH`.
+ A colon-separated list of directories used to look up the location of Nix
+ expressions using [paths](../language/values.md#type-path)
+ enclosed in angle brackets (i.e., `<path>`),
+ e.g. `/home/eelco/Dev:/etc/nixos`. It can be extended using the
+ [`-I` option](./opt-common#opt-I).
- [`NIX_IGNORE_SYMLINK_STORE`]{#env-NIX_IGNORE_SYMLINK_STORE}\
Normally, the Nix store directory (typically `/nix/store`) is not
diff --git a/doc/manual/src/command-ref/nix-build.md b/doc/manual/src/command-ref/nix-build.md
index 49c6f3f55..937b046b8 100644
--- a/doc/manual/src/command-ref/nix-build.md
+++ b/doc/manual/src/command-ref/nix-build.md
@@ -37,10 +37,12 @@ directory containing at least a file named `default.nix`.
`nix-build` is essentially a wrapper around
[`nix-instantiate`](nix-instantiate.md) (to translate a high-level Nix
-expression to a low-level store derivation) and [`nix-store
+expression to a low-level [store derivation]) and [`nix-store
--realise`](nix-store.md#operation---realise) (to build the store
derivation).
+[store derivation]: ../glossary.md#gloss-store-derivation
+
> **Warning**
>
> The result of the build is automatically registered as a root of the
@@ -53,16 +55,18 @@ All options not listed here are passed to `nix-store
--realise`, except for `--arg` and `--attr` / `-A` which are passed to
`nix-instantiate`.
- - [`--no-out-link`]{#opt-no-out-link}\
+ - <span id="opt-no-out-link">[`--no-out-link`](#opt-no-out-link)<span>
+
Do not create a symlink to the output path. Note that as a result
the output does not become a root of the garbage collector, and so
- might be deleted by `nix-store
- --gc`.
+ might be deleted by `nix-store --gc`.
+
+ - <span id="opt-dry-run">[`--dry-run`](#opt-dry-run)</span>
- - [`--dry-run`]{#opt-dry-run}\
Show what store paths would be built or downloaded.
- - [`--out-link`]{#opt-out-link} / `-o` *outlink*\
+ - <span id="opt-out-link">[`--out-link`](#opt-out-link)</span> / `-o` *outlink*
+
Change the name of the symlink to the output path created from
`result` to *outlink*.
diff --git a/doc/manual/src/command-ref/nix-copy-closure.md b/doc/manual/src/command-ref/nix-copy-closure.md
index 9a29030bd..83e8a2936 100644
--- a/doc/manual/src/command-ref/nix-copy-closure.md
+++ b/doc/manual/src/command-ref/nix-copy-closure.md
@@ -47,7 +47,9 @@ authentication, you can avoid typing the passphrase with `ssh-agent`.
Enable compression of the SSH connection.
- `--include-outputs`\
- Also copy the outputs of store derivations included in the closure.
+ Also copy the outputs of [store derivation]s included in the closure.
+
+ [store derivation]: ../../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-daemon.md b/doc/manual/src/command-ref/nix-daemon.md
index e91cb01dd..04b483be3 100644
--- a/doc/manual/src/command-ref/nix-daemon.md
+++ b/doc/manual/src/command-ref/nix-daemon.md
@@ -8,6 +8,6 @@
# Description
-The Nix daemon is necessary in multi-user Nix installations. It performs
-build actions and other operations on the Nix store on behalf of
+The Nix daemon is necessary in multi-user Nix installations. It runs
+build tasks and other operations on the Nix store on behalf of
unprivileged users.
diff --git a/doc/manual/src/command-ref/nix-env.md b/doc/manual/src/command-ref/nix-env.md
index a5df35d77..f4fa5b50c 100644
--- a/doc/manual/src/command-ref/nix-env.md
+++ b/doc/manual/src/command-ref/nix-env.md
@@ -205,10 +205,12 @@ a number of possible ways:
unambiguous way, which is necessary if there are multiple
derivations with the same name.
- - If *args* are store derivations, then these are
+ - If *args* are [store derivation]s, then these are
[realised](nix-store.md#operation---realise), and the resulting output paths
are installed.
+ [store derivation]: ../glossary.md#gloss-store-derivation
+
- If *args* are store paths that are not store derivations, then these
are [realised](nix-store.md#operation---realise) and installed.
@@ -280,7 +282,7 @@ To copy the store path with symbolic name `gcc` from another profile:
$ nix-env -i --from-profile /nix/var/nix/profiles/foo gcc
```
-To install a specific store derivation (typically created by
+To install a specific [store derivation] (typically created by
`nix-instantiate`):
```console
@@ -665,7 +667,7 @@ derivation is shown unless `--no-name` is specified.
Print the `system` attribute of the derivation.
- `--drv-path`\
- Print the path of the store derivation.
+ Print the path of the [store derivation].
- `--out-path`\
Print the output path of the derivation.
diff --git a/doc/manual/src/command-ref/nix-instantiate.md b/doc/manual/src/command-ref/nix-instantiate.md
index 8f143729e..432fb2608 100644
--- a/doc/manual/src/command-ref/nix-instantiate.md
+++ b/doc/manual/src/command-ref/nix-instantiate.md
@@ -17,13 +17,14 @@
# Description
-The command `nix-instantiate` generates [store
-derivations](../glossary.md) from (high-level) Nix expressions. It
-evaluates the Nix expressions in each of *files* (which defaults to
+The command `nix-instantiate` produces [store derivation]s from (high-level) Nix expressions.
+It evaluates the Nix expressions in each of *files* (which defaults to
*./default.nix*). Each top-level expression should evaluate to a
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
+
If *files* is the character `-`, then a Nix expression will be read from
standard input.
@@ -79,8 +80,7 @@ standard input.
# Examples
-Instantiating store derivations from a Nix expression, and building them
-using `nix-store`:
+Instantiate [store derivation]s from a Nix expression, and build them using `nix-store`:
```console
$ nix-instantiate test.nix (instantiate)
diff --git a/doc/manual/src/command-ref/nix-store.md b/doc/manual/src/command-ref/nix-store.md
index ecd838e8d..acf29e4aa 100644
--- a/doc/manual/src/command-ref/nix-store.md
+++ b/doc/manual/src/command-ref/nix-store.md
@@ -22,7 +22,8 @@ This section lists the options that are common to all operations. These
options are allowed for every subcommand, though they may not always
have an effect.
- - [`--add-root`]{#opt-add-root} *path*\
+ - <span id="opt-add-root">[`--add-root`](#opt-add-root)</span> *path*
+
Causes the result of a realisation (`--realise` and
`--force-realise`) to be registered as a root of the garbage
collector. *path* will be created as a symlink to the resulting
@@ -71,7 +72,7 @@ paths. Realisation is a somewhat overloaded term:
outputs are already valid, in which case we are done
immediately. Otherwise, there may be [substitutes](../glossary.md)
that produce the outputs (e.g., by downloading them). Finally, the
- outputs can be produced by performing the build action described
+ outputs can be produced by running the build task described
by the derivation.
- If the store path is not a derivation, realisation ensures that the
@@ -104,10 +105,6 @@ The following flags are available:
previous build, the new output path is left in
`/nix/store/name.check.`
- See also the `build-repeat` configuration option, which repeats a
- derivation a number of times and prevents its outputs from being
- registered as “valid” in the Nix store unless they are identical.
-
Special exit codes:
- `100`\
@@ -140,8 +137,10 @@ or.
## Examples
-This operation is typically used to build store derivations produced by
-[`nix-instantiate`](nix-instantiate.md):
+This operation is typically used to build [store derivation]s produced by
+[`nix-instantiate`](./nix-instantiate.md):
+
+[store derivation]: ../glossary.md#gloss-store-derivation
```console
$ nix-store -r $(nix-instantiate ./test.nix)
@@ -301,7 +300,7 @@ symlink.
## Common query options
- `--use-output`; `-u`\
- For each argument to the query that is a store derivation, apply the
+ For each argument to the query that is a [store derivation], apply the
query to the output path of the derivation instead.
- `--force-realise`; `-f`\
@@ -321,7 +320,7 @@ symlink.
This query has one option:
- `--include-outputs`
- Also include the existing output paths of store derivations,
+ Also include the existing output paths of [store derivation]s,
and their closures.
This query can be used to implement various kinds of deployment. A
@@ -375,12 +374,12 @@ symlink.
Prints the references graph of the store paths *paths* in the
[GraphML](http://graphml.graphdrawing.org/) file format. This can be
used to visualise dependency graphs. To obtain a build-time
- dependency graph, apply this to a store derivation. To obtain a
+ dependency graph, apply this to a [store derivation]. To obtain a
runtime dependency graph, apply it to an output path.
- `--binding` *name*; `-b` *name*\
Prints the value of the attribute *name* (i.e., environment
- variable) of the store derivations *paths*. It is an error for a
+ variable) of the [store derivation]s *paths*. It is an error for a
derivation to not have the specified attribute.
- `--hash`\