diff --git a/doc/manual/conf-file.xml b/doc/manual/conf-file.xml index f220c8374..1e164b823 100644 --- a/doc/manual/conf-file.xml +++ b/doc/manual/conf-file.xml @@ -261,6 +261,21 @@ build-use-chroot = /dev /proc /bin + build-cache-failures + + If set to true, Nix will + “cache” build failures, meaning that it will remember (in its + database) that a derivation previously failed. If you then try to + build the derivation again, Nix will immediately fail rather than + perform the build again. Failures in fixed-output derivations + (such as fetchurl calls) are never cached. + The “failed” status of a derivation can be cleared using + nix-store --clear-failed-paths. By default, + failure caching is disabled. + + + + system This option specifies the canonical Nix system diff --git a/doc/manual/nix-build.xml b/doc/manual/nix-build.xml index e3508d92c..a11ed0a97 100644 --- a/doc/manual/nix-build.xml +++ b/doc/manual/nix-build.xml @@ -132,7 +132,7 @@ also . Examples -$ nix-build pkgs/top-level/all-packages.nix -A firefox +$ nix-build '<nixpkgs>' -A firefox store derivation is /nix/store/qybprl8sz2lc...-firefox-1.5.0.7.drv /nix/store/d18hyl92g30l...-firefox-1.5.0.7 diff --git a/doc/manual/nix-store.xml b/doc/manual/nix-store.xml index 6cc765bf2..13b6d1cfa 100644 --- a/doc/manual/nix-store.xml +++ b/doc/manual/nix-store.xml @@ -776,6 +776,44 @@ in Nix itself. + + +Operation <option>--verify-path</option> + + + Synopsis + + nix-store + + paths + + + +Description + +The operation compares the +contents of the given store paths to their cryptographic hashes stored +in Nix’s database. For every changed path, it prints a warning +message. The exit status is 0 if no path has changed, and 1 +otherwise. + + + +Example + +To verify the integrity of the svn command and all its dependencies: + + +$ nix-store --verify-path $(nix-store -qR $(which svn)) + + + + + + + + + Operation <option>--dump</option> @@ -1069,6 +1107,122 @@ loads it into the Nix database. + + +Operation <option>--print-env</option> + + + Synopsis + + nix-store + + drvpath + + + +Description + +The operation prints out the +environment of a derivation in a format that can be evaluated by a +shell. The command line arguments of the builder are placed in the +variable _args. + + + +Example + + +$ nix-store --print-env $(nix-instantiate '<nixpkgs>' -A firefox) + +export src; src='/nix/store/plpj7qrwcz94z2psh6fchsi7s8yihc7k-firefox-12.0.source.tar.bz2' +export stdenv; stdenv='/nix/store/7c8asx3yfrg5dg1gzhzyq2236zfgibnm-stdenv' +export system; system='x86_64-linux' +export _args; _args='-e /nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh' + + + + + + + + + +Operation <option>--query-failed-paths</option> + + + Synopsis + + nix-store + + + + +Description + +If build failure caching is enabled through the +build-cache-failures configuration option, the +operation will print out all +store paths that have failed to build. + + + +Example + + +$ nix-store --query-failed-paths +/nix/store/000zi5dcla86l92jn1g997jb06sidm7x-perl-PerlMagick-6.59 +/nix/store/0011iy7sfwbc1qj5a1f6ifjnbcdail8a-haskell-gitit-ghc7.0.4-0.8.1 +/nix/store/001c0yn1hkh86gprvrb46cxnz3pki7q3-gamin-0.1.10 + + + + + + + + + + +Operation <option>--clear-failed-paths</option> + + + Synopsis + + nix-store + + paths + + + +Description + +If build failure caching is enabled through the +build-cache-failures configuration option, the +operation clears the “failed” +state of the given store paths, allowing them to be built again. This +is useful if the failure was actually transient (e.g. because the disk +was full). + +If a path denotes a derivation, its output paths are cleared. +You can provide the argument * to clear all store +paths. + + + +Example + + +$ nix-store --clear-failed-path /nix/store/000zi5dcla86l92jn1g997jb06sidm7x-perl-PerlMagick-6.59 +$ nix-store --clear-failed-path * + + + + + + + + + Environment variables