From 71e5b937fbcfed39947d7012b06a6ef257e0d1c7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 18 Jan 2016 15:54:14 +0100 Subject: [PATCH] Document --check --- doc/manual/command-ref/nix-store.xml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/manual/command-ref/nix-store.xml b/doc/manual/command-ref/nix-store.xml index e21d53d8b..bf03c802b 100644 --- a/doc/manual/command-ref/nix-store.xml +++ b/doc/manual/command-ref/nix-store.xml @@ -194,6 +194,25 @@ printed.) + + + 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 , if an output path is not identical to + the corresponding output from the previous build, the new output + path is left in + /nix/store/name-check. + + See also the 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. + + + @@ -212,6 +231,14 @@ $ nix-store -r $(nix-instantiate ./test.nix) This is essentially what nix-build does. +To test whether a previously-built derivation is deterministic: + + +$ nix-build -r '<nixpkgs>' -A hello --check -K + + + +