From 57d023a184bdc2f30cd7052c157e43ba1bca8288 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 7 Apr 2005 10:47:58 +0000 Subject: * More manual updates. --- doc/manual/nix-store.xml | 86 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 25 deletions(-) (limited to 'doc/manual/nix-store.xml') diff --git a/doc/manual/nix-store.xml b/doc/manual/nix-store.xml index d9ef17e26ec3..c67e20266ff5 100644 --- a/doc/manual/nix-store.xml +++ b/doc/manual/nix-store.xml @@ -45,7 +45,7 @@ linkend="sec-common-options" /> for a list of common options. path - Causes the result of a build action + Causes the result of a realisation ( and ) to be registered as a root of the garbage collector (see ). The root is stored in @@ -54,7 +54,12 @@ linkend="sec-common-options" /> for a list of common options. typically in a subdirectory of /nix/var/nix/gcroots/) unless the flag - is used. + is used. + + If there are multiple results, then multiple symlinks will + be created by sequentially numbering symlinks beyond the first one + (e.g., foo, foo-2, + foo-3, and so on). @@ -121,25 +126,56 @@ lrwxrwxrwx 1 ... 2005-03-13 21:10 /home/eelco/bla/result -> /nix/store/1r1134 Description -The operation realises in the file -system the store expressions stored in -paths. If these expressions are derivation -expressions, they are first normalised into a -closure expression. This may happen in two ways. First, the -corresponding closure expression (the successor) -may already known (either because the build has already been -performed, or because a successor was explicitly registered through -the operation). Otherwise, the build -action described by the derivation is performed, and a closure -expression is computed by scanning the result of the build for -references to other paths in the store. - -The paths of the closure expression corresponding to each -expression in paths is printed on standard -output. +The operation essentially “builds” +the specified store paths. Realisation is a somewhat overloaded term: + + + + If the store path is a + derivation, realisation ensures that the output + paths of the derivation are valid (i.e., the output path and its + closure exist in the file system). This can be done in several + ways. First, it is possible that the outputs are already valid, in + which case we are done immediately. Otherwise, there may be substitutes that produce the + outputs (e.g., by downloading them). Finally, the outputs can be + produced by performing the build action described by the + derivation. + + If the store path is not a derivation, realisation + ensures that the specified path is valid (i.e., it and its closure + exist in the file system). If the path is already valid, we are + done immediately. Otherwise, the path and any missing paths in its + closure may be produced through substitutes. If there are no + (succesful) subsitutes, realisation fails. + + + + + +The output path of each derivation is printed on standard +output. (For non-derivations argument, the argument itself is +printed.) + +Examples + +This operation is typically used to build store derivations +produced by nix-instantiate: + + +$ nix-store -r $(nix-instantiate ./foo.nix) + +This is essentially what nix-build does. + + + + @@ -168,7 +204,7 @@ output. Without additional flags, the operation performs a garbage collection on the Nix store. That is, all paths in the Nix store not reachable via file system references from a set of -roots, are deleted. +“roots”, are deleted. The following suboperations may be specified: @@ -184,9 +220,9 @@ the Nix store not reachable via file system references from a set of This operation prints on standard output the set - of live store paths, which are all the store paths - reachable from the roots. Live paths should never be deleted, - since that would break consistency — it would become possible that + of “live” store paths, which are all the store paths reachable + from the roots. Live paths should never be deleted, since that + would break consistency — it would become possible that applications are installed that reference things that are no longer present in the store. @@ -195,9 +231,9 @@ the Nix store not reachable via file system references from a set of This operation prints out on standard output the - set of dead store paths, which is just the opposite - of the set of live paths: any path in the store that is not live - (with respect to the roots) is dead. + set of “dead” store paths, which is just the opposite of the set + of live paths: any path in the store that is not live (with + respect to the roots) is dead. -- cgit 1.4.1