aboutsummaryrefslogtreecommitdiff
path: root/doc/manual
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual')
-rw-r--r--doc/manual/src/contributing/hacking.md6
-rw-r--r--doc/manual/src/glossary.md7
-rw-r--r--doc/manual/src/installation/env-variables.md4
-rw-r--r--doc/manual/src/installation/installing-binary.md8
-rw-r--r--doc/manual/src/language/advanced-attributes.md25
-rw-r--r--doc/manual/src/language/operators.md6
-rw-r--r--doc/manual/src/quick-start.md2
7 files changed, 38 insertions, 20 deletions
diff --git a/doc/manual/src/contributing/hacking.md b/doc/manual/src/contributing/hacking.md
index 9dbafcc0a..53f49602b 100644
--- a/doc/manual/src/contributing/hacking.md
+++ b/doc/manual/src/contributing/hacking.md
@@ -45,13 +45,13 @@ To get a shell with a different compilation environment (e.g. stdenv,
gccStdenv, clangStdenv, clang11Stdenv, ccacheStdenv):
```console
-$ nix-shell -A devShells.x86_64-linux.clang11StdenvPackages
+$ nix-shell -A devShells.x86_64-linux.clang11Stdenv
```
or if you have a flake-enabled nix:
```console
-$ nix develop .#clang11StdenvPackages
+$ nix develop .#clang11Stdenv
```
Note: you can use `ccacheStdenv` to drastically improve rebuild
@@ -219,7 +219,7 @@ After the CI run completes, you can check the output to extract the installer UR
5. To generate an install command, plug this `install_url` and your GitHub username into this template:
```console
- sh <(curl -L <install_url>) --tarball-url-prefix https://<github-username>-nix-install-tests.cachix.org/serve
+ curl -L <install_url> | sh -s -- --tarball-url-prefix https://<github-username>-nix-install-tests.cachix.org/serve
```
<!-- #### Manually generating test installers
diff --git a/doc/manual/src/glossary.md b/doc/manual/src/glossary.md
index 6004df833..d0aff34e2 100644
--- a/doc/manual/src/glossary.md
+++ b/doc/manual/src/glossary.md
@@ -19,6 +19,13 @@
[store derivation]: #gloss-store-derivation
+ - [instantiate]{#gloss-instantiate}, instantiation\
+ Translate a [derivation] into a [store derivation].
+
+ See [`nix-instantiate`](./command-ref/nix-instantiate.md).
+
+ [instantiate]: #gloss-instantiate
+
- [realise]{#gloss-realise}, realisation\
Ensure a [store path] is [valid][validity].
diff --git a/doc/manual/src/installation/env-variables.md b/doc/manual/src/installation/env-variables.md
index bb35c0e9f..fb8155a80 100644
--- a/doc/manual/src/installation/env-variables.md
+++ b/doc/manual/src/installation/env-variables.md
@@ -27,7 +27,7 @@ Set the environment variable and install Nix
```console
$ export NIX_SSL_CERT_FILE=/etc/ssl/my-certificate-bundle.crt
-$ sh <(curl -L https://nixos.org/nix/install)
+$ curl -L https://nixos.org/nix/install | sh
```
In the shell profile and rc files (for example, `/etc/bashrc`,
@@ -38,7 +38,7 @@ export NIX_SSL_CERT_FILE=/etc/ssl/my-certificate-bundle.crt
```
> **Note**
->
+>
> You must not add the export and then do the install, as the Nix
> installer will detect the presence of Nix configuration, and abort.
diff --git a/doc/manual/src/installation/installing-binary.md b/doc/manual/src/installation/installing-binary.md
index 53fdbe31a..e3fd962bd 100644
--- a/doc/manual/src/installation/installing-binary.md
+++ b/doc/manual/src/installation/installing-binary.md
@@ -3,7 +3,7 @@
The easiest way to install Nix is to run the following command:
```console
-$ sh <(curl -L https://nixos.org/nix/install)
+$ curl -L https://nixos.org/nix/install | sh
```
This will run the installer interactively (causing it to explain what
@@ -27,7 +27,7 @@ you can authenticate with `sudo`.
To explicitly select a single-user installation on your system:
```console
-$ sh <(curl -L https://nixos.org/nix/install) --no-daemon
+$ curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
```
This will perform a single-user installation of Nix, meaning that `/nix`
@@ -66,7 +66,7 @@ You can instruct the installer to perform a multi-user installation on
your system:
```console
-$ sh <(curl -L https://nixos.org/nix/install) --daemon
+$ curl -L https://nixos.org/nix/install | sh -s -- --daemon
```
The multi-user installation of Nix will create build users between the
@@ -287,7 +287,7 @@ These install scripts can be used the same as the main NixOS.org
installation script:
```console
-$ sh <(curl -L https://nixos.org/nix/install)
+$ curl -L https://nixos.org/nix/install | sh
```
In the same directory of the install script are sha256 sums, and gpg
diff --git a/doc/manual/src/language/advanced-attributes.md b/doc/manual/src/language/advanced-attributes.md
index a164b3997..5a63236e5 100644
--- a/doc/manual/src/language/advanced-attributes.md
+++ b/doc/manual/src/language/advanced-attributes.md
@@ -260,7 +260,7 @@ Derivations can declare some infrequently used optional attributes.
If the special attribute `__structuredAttrs` is set to `true`, the other derivation
attributes are serialised in JSON format and made available to the
builder via the file `.attrs.json` in the builder’s temporary
- directory. This obviates the need for `passAsFile` since JSON files
+ directory. This obviates the need for [`passAsFile`](#adv-attr-passAsFile) since JSON files
have no size restrictions, unlike process environments.
It also makes it possible to tweak derivation settings in a structured way; see
@@ -282,11 +282,13 @@ 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 output path.
+ - `maxSize` defines the maximum size of the resulting [store object](../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.
+ Example:
+
```nix
__structuredAttrs = true;
@@ -305,9 +307,20 @@ Derivations can declare some infrequently used optional attributes.
```
- [`unsafeDiscardReferences`]{#adv-attr-unsafeDiscardReferences}\
- When using [structured attributes](#adv-attr-structuredAttrs), the **experimental**
- attribute `unsafeDiscardReferences` is a per-output boolean which, if set to `true`,
- disables scanning the build output for runtime dependencies altogether.
+ > **Warning**
+ > This is an experimental feature.
+ >
+ > To enable it, add the following to [nix.conf](../command-ref/conf-file.md):
+ >
+ > ```
+ > extra-experimental-features = discard-references
+ > ```
+
+ When using [structured attributes](#adv-attr-structuredAttrs), the
+ attribute `unsafeDiscardReferences` is an attribute set with a boolean value for each output name.
+ If set to `true`, it disables scanning the output for runtime dependencies.
+
+ Example:
```nix
__structuredAttrs = true;
@@ -317,5 +330,3 @@ Derivations can declare some infrequently used optional attributes.
This is useful, for example, when generating self-contained filesystem images with
their own embedded Nix store: hashes found inside such an image refer
to the embedded store and not to the host's Nix store.
-
- This is only allowed if the `discard-references` experimental feature is enabled.
diff --git a/doc/manual/src/language/operators.md b/doc/manual/src/language/operators.md
index 1f918bd4d..90b325597 100644
--- a/doc/manual/src/language/operators.md
+++ b/doc/manual/src/language/operators.md
@@ -24,7 +24,7 @@
| [Equality] | *expr* `==` *expr* | none | 11 |
| Inequality | *expr* `!=` *expr* | none | 11 |
| Logical conjunction (`AND`) | *bool* `&&` *bool* | left | 12 |
-| Logical disjunction (`OR`) | *bool* `\|\|` *bool* | left | 13 |
+| Logical disjunction (`OR`) | *bool* <code>\|\|</code> *bool* | left | 13 |
| [Logical implication] | *bool* `->` *bool* | none | 14 |
[string]: ./values.md#type-string
@@ -116,7 +116,7 @@ The result is a string.
[store path]: ../glossary.md#gloss-store-path
[store]: ../glossary.md#gloss-store
-[Path and string concatenation]: #path-and-string-concatenation
+[String and path concatenation]: #string-and-path-concatenation
## Update
@@ -133,7 +133,7 @@ If an attribute name is present in both, the attribute value from the latter is
Comparison is
-- [arithmetic] for [number]s
+- [arithmetic] for [number]s
- lexicographic for [string]s and [path]s
- item-wise lexicographic for [list]s:
elements at the same index in both lists are compared according to their type and skipped if they are equal.
diff --git a/doc/manual/src/quick-start.md b/doc/manual/src/quick-start.md
index e11549984..651134c25 100644
--- a/doc/manual/src/quick-start.md
+++ b/doc/manual/src/quick-start.md
@@ -7,7 +7,7 @@ to subsequent chapters.
1. Install Nix by running the following:
```console
- $ bash <(curl -L https://nixos.org/nix/install) --daemon
+ $ curl -L https://nixos.org/nix/install | sh
```
The install script will use `sudo`, so make sure you have sufficient rights.