diff --git a/doc/manual/glossary.xml b/doc/manual/glossary.xml index 2c4f55c7e..cf0da3824 100644 --- a/doc/manual/glossary.xml +++ b/doc/manual/glossary.xml @@ -3,10 +3,16 @@ -derivation +derivation A description of a build action. The result of a - derivation is a store object. + derivation is a store object. Derivations are typically specified + in Nix expressions using the derivation + primitive. These are translated into low-level + store derivations (implicitly by + nix-env and nix-build, or + explicitly by nix-instantiate). @@ -73,7 +79,22 @@ +closure + + The closure of a store path is the set of store + paths that are directly or indirectly “reachable” from that store + path. For instance, if the store object at path + P contains a reference to path + Q, then Q is in the closure of + P. For correct deployment it is necessary to + deploy whole closures, since otherwise at runtime files could be + missing. The command nix-store -qR prints out + closures of store paths. + + + + - \ No newline at end of file + diff --git a/doc/manual/nix-instantiate.xml b/doc/manual/nix-instantiate.xml index d854941a0..d6cbe77c9 100644 --- a/doc/manual/nix-instantiate.xml +++ b/doc/manual/nix-instantiate.xml @@ -1,89 +1,97 @@ - - nix-instantiate - instantiate store expressions from Nix expressions - + + + nix-instantiate + instantiate store derivations from Nix expressions + - - - nix-instantiate - - - - - - files - - + + + nix-instantiate + + path + + + + + + files + + - - Description - - The command nix-instantiate generates - (low-level) store expressions from (high-level) Nix expressions. - It loads and evaluates the Nix expressions in each of - files. Each top-level expression - should evaluate to a derivation, a list of derivations, or a set - of derivations. The paths of the resulting store expressions - are printed on standard output. - +Description - - This command is generally used for testing Nix expression before - they are used with nix-env. See also . - +The command nix-instantiate generates store derivations from (high-level) +Nix expressions. It loads and evaluates the Nix expressions in each +of files. Each top-level expression should +evaluate to a derivation, a list of derivations, or a set of +derivations. The paths of the resulting store derivations are printed +on standard output. - +Most users and developers don’t need to use this command +(nix-env and nix-build perform +store derivation instantiation from Nix expressions automatically). +It is most commonly used for implementing new deployment +policies. - - Options +See also for a list of +common options. - + - - - - - Just parse the input files, and print their abstract - syntax trees on standard output in ATerm format. - - - + +Options + + + + + path + + + See the corresponding + options in nix-store. + + + + + + + Just parse the input files, and print their + abstract syntax trees on standard output in ATerm + format. + + - - - - - Just parse and evaluate the input files, and print the - resulting values on standard output. No instantiation of - store expressions takes place. - - - + + + Just parse and evaluate the input files, and print + the resulting values on standard output. No instantiation of + store derivations takes place. + + - + - + - - Examples - -$ nix-instantiate gcc.nix (instantiate) -/nix/store/468abdcb93aa22bb721142615b97698b-d-gcc-3.3.2.store +Examples -$ nix-store -r $(nix-instantiate gcc.nix) (build) + +$ nix-instantiate test.nix (instantiate) +/nix/store/cigxbmvy6dzix98dxxh9b6shg7ar5bvs-perl-BerkeleyDB-0.26.drv -$ nix-store -r $(nix-instantiate gcc.nix) (print output path) -/nix/store/9afa718cddfdfe94b5b9303d0430ceb1-gcc-3.3.2 +$ nix-store -r $(nix-instantiate test.nix) (build) +... +/nix/store/qhqk4n8ci095g3sdp93x7rgwyh9rdvgk-perl-BerkeleyDB-0.26 (output path) -$ ls -l /nix/store/9afa718cddfdfe94b5b9303d0430ceb1-gcc-3.3.2 -dr-xr-xr-x 2 eelco users 360 2003-12-01 16:12 bin -dr-xr-xr-x 3 eelco users 72 2003-12-01 16:12 include +$ ls -l /nix/store/qhqk4n8ci095g3sdp93x7rgwyh9rdvgk-perl-BerkeleyDB-0.26 +dr-xr-xr-x 2 eelco users 4096 1970-01-01 01:00 lib ... - - + + + diff --git a/doc/manual/nix-store.xml b/doc/manual/nix-store.xml index da96630a5..0ad0f32a5 100644 --- a/doc/manual/nix-store.xml +++ b/doc/manual/nix-store.xml @@ -39,11 +39,11 @@ be performed. These are documented below. This section lists the options that are common to all operations. These options are allowed for every subcommand, though they may not always have an effect. See also . +linkend="sec-common-options" /> for a list of common options. - path + path Causes the result of a build action ( and ) diff --git a/doc/manual/troubleshooting.xml b/doc/manual/troubleshooting.xml index cc3cd361f..cd0bafe3d 100644 --- a/doc/manual/troubleshooting.xml +++ b/doc/manual/troubleshooting.xml @@ -1,8 +1,31 @@ Troubleshooting - - (Nothing.) + This section provides solutions for some common problems. + + Berkeley DB: <quote>Cannot allocate memory</quote> + + Symptom: Nix operations (in particular the + nix-store operations , + , and + — the latter being called by nix-channel + --update) failing: + + +$ nix-store --verify +error: Db::del: Cannot allocate memory + + Possible solution: make sure that no Nix processes are running, + then do: + + +$ cd /nix/var/nix/db +$ rm __db.00* + + + + + diff --git a/doc/manual/writing-nix-expressions.xml b/doc/manual/writing-nix-expressions.xml index a465177f3..50cbc4249 100644 --- a/doc/manual/writing-nix-expressions.xml +++ b/doc/manual/writing-nix-expressions.xml @@ -1103,7 +1103,7 @@ weakest binding). -Derivations +Derivations The most important built-in function is derivation, which is used to describe a