diff options
Diffstat (limited to 'doc/manual/command-ref')
-rw-r--r-- | doc/manual/command-ref/nix-collect-garbage.xml | 1 | ||||
-rw-r--r-- | doc/manual/command-ref/nix-shell.xml | 20 | ||||
-rw-r--r-- | doc/manual/command-ref/nix-store.xml | 27 |
3 files changed, 46 insertions, 2 deletions
diff --git a/doc/manual/command-ref/nix-collect-garbage.xml b/doc/manual/command-ref/nix-collect-garbage.xml index c88851299152..35a78c5b2015 100644 --- a/doc/manual/command-ref/nix-collect-garbage.xml +++ b/doc/manual/command-ref/nix-collect-garbage.xml @@ -28,6 +28,7 @@ <arg choice='plain'><option>--print-dead</option></arg> <arg choice='plain'><option>--delete</option></arg> </group> + <arg><option>--max-freed</option> <replaceable>bytes</replaceable></arg> <arg><option>--dry-run</option></arg> </cmdsynopsis> </refsynopsisdiv> diff --git a/doc/manual/command-ref/nix-shell.xml b/doc/manual/command-ref/nix-shell.xml index 9e3e6d1882ba..6f00e28cacaa 100644 --- a/doc/manual/command-ref/nix-shell.xml +++ b/doc/manual/command-ref/nix-shell.xml @@ -176,6 +176,22 @@ also <xref linkend="sec-common-options" />.</phrase></para> </refsection> +<refsection><title>Environment variables</title> + +<variablelist> + + <varlistentry><term><envar>NIX_BUILD_SHELL</envar></term> + + <listitem><para>Shell used to start the interactive environment. + Defaults to the <command>bash</command> found in <envar>PATH</envar>.</para></listitem> + + </varlistentry> + +</variablelist> + +</refsection> + + <refsection><title>Examples</title> <para>To build the dependencies of the package Pan, and start an @@ -252,8 +268,8 @@ dependencies in Nixpkgs.</para> <para>The lines starting with <literal>#! nix-shell</literal> specify <command>nix-shell</command> options (see above). Note that you cannot write <literal>#1 /usr/bin/env nix-shell -i ...</literal> because -<command>/usr/bin/env</command> does not support passing options to -the interpreter.</para> +many operating systems only allow one argument in +<literal>#!</literal> lines.</para> <para>For example, here is a Python script that depends on Python and the <literal>prettytable</literal> package: diff --git a/doc/manual/command-ref/nix-store.xml b/doc/manual/command-ref/nix-store.xml index e21d53d8b9f0..bf03c802b87d 100644 --- a/doc/manual/command-ref/nix-store.xml +++ b/doc/manual/command-ref/nix-store.xml @@ -194,6 +194,25 @@ printed.)</para> </varlistentry> + <varlistentry><term><option>--check</option></term> + + <listitem><para>This option allows you to check whether a + derivation is deterministic. It rebuilds the specified derivation + and checks whether the result is bitwise-identical with the + existing outputs, printing an error if that’s not the case. The + outputs of the specified derivation must already exist. When used + with <option>-K</option>, if an output path is not identical to + the corresponding output from the previous build, the new output + path is left in + <filename>/nix/store/<replaceable>name</replaceable>-check.</filename></para> + + <para>See also the <option>build-repeat</option> 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.</para></listitem> + + </varlistentry> + </variablelist> </refsection> @@ -212,6 +231,14 @@ $ nix-store -r $(nix-instantiate ./test.nix) This is essentially what <link linkend="sec-nix-build"><command>nix-build</command></link> does.</para> +<para>To test whether a previously-built derivation is deterministic: + +<screen> +$ nix-build -r '<nixpkgs>' -A hello --check -K +</screen> + +</para> + </refsection> |