mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
build: run diff-hook under --check and document diff-hook
This commit is contained in:
parent
7c6391ddc7
commit
c78686e411
4 changed files with 303 additions and 16 deletions
|
@ -1,7 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<refentry xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
xml:id="sec-conf-file">
|
||||
xml:id="sec-conf-file"
|
||||
version="5">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>nix.conf</refentrytitle>
|
||||
|
@ -240,6 +242,64 @@ false</literal>.</para>
|
|||
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="conf-diff-hook"><term><literal>diff-hook</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Absolute path to an executable capable of diffing build results.
|
||||
The hook executes if <xref linkend="conf-run-diff-hook" /> is
|
||||
true, and the output of a build is known to not be the same.
|
||||
This program is not executed to determine if two results are the
|
||||
same.
|
||||
</para>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
The root user executes the diff hook in a daemonised
|
||||
installation. See <xref linkend="chap-diff-hook" /> for
|
||||
information on using the diff hook safely.
|
||||
</para>
|
||||
</warning>
|
||||
|
||||
<para>The diff hook program receives three parameters:</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
A path to the previous build's results
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
A path to the current build's results
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
The path to the build's derivation
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>The diff hook should not print data to stderr or stdout, as
|
||||
output is not displayed to the user. However, if information is
|
||||
printed, it will be printed in the <command>nix-daemon</command>
|
||||
log.</para>
|
||||
|
||||
<para>When using the Nix daemon, <literal>diff-hook</literal> must
|
||||
be set in the <filename>nix.conf</filename> configuration file, and
|
||||
cannot be passed at the command line.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="conf-enforce-determinism">
|
||||
<term><literal>enforce-determinism</literal></term>
|
||||
|
||||
<listitem><para>See <xref linkend="conf-repeat" />.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="conf-extra-sandbox-paths">
|
||||
<term><literal>extra-sandbox-paths</literal></term>
|
||||
|
||||
|
@ -595,9 +655,9 @@ password <replaceable>my-password</replaceable>
|
|||
they are deterministic. The default value is 0. If the value is
|
||||
non-zero, every build is repeated the specified number of
|
||||
times. If the contents of any of the runs differs from the
|
||||
previous ones, the build is rejected and the resulting store paths
|
||||
are not registered as “valid” in Nix’s database.</para></listitem>
|
||||
|
||||
previous ones and <xref linkend="conf-enforce-determinism" /> is
|
||||
true, the build is rejected and the resulting store paths are not
|
||||
registered as “valid” in Nix’s database.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="conf-require-sigs"><term><literal>require-sigs</literal></term>
|
||||
|
@ -628,6 +688,19 @@ password <replaceable>my-password</replaceable>
|
|||
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="conf-run-diff-hook"><term><literal>run-diff-hook</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If true, enable the execution of <xref linkend="conf-diff-hook" />.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When using the Nix daemon, <literal>run-diff-hook</literal> must
|
||||
be set in the <filename>nix.conf</filename> configuration file,
|
||||
and cannot be passed at the command line.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry xml:id="conf-sandbox"><term><literal>sandbox</literal></term>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue