about summary refs log tree commit diff
path: root/doc/manual/nix-store.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual/nix-store.xml')
-rw-r--r--doc/manual/nix-store.xml23
1 files changed, 22 insertions, 1 deletions
diff --git a/doc/manual/nix-store.xml b/doc/manual/nix-store.xml
index 562a5439a6eb..566c75bf3e9f 100644
--- a/doc/manual/nix-store.xml
+++ b/doc/manual/nix-store.xml
@@ -404,6 +404,7 @@ error: cannot delete path `/nix/store/zq0h41l75vlb4z45kzgjjmsjxvcv1qk7-mesa-6.4'
     <arg choice='plain'><option>--tree</option></arg>
     <arg choice='plain'><option>--binding</option> <replaceable>name</replaceable></arg>
     <arg choice='plain'><option>--hash</option></arg>
+    <arg choice='plain'><option>--roots</option></arg>
   </group>
   <arg><option>--use-output</option></arg>
   <arg><option>-u</option></arg>
@@ -586,12 +587,20 @@ query is applied to the target of the symlink.</para>
   <varlistentry><term><option>--hash</option></term>
   
     <listitem><para>Prints the SHA-256 hash of the contents of the
-    store path <replaceable>paths</replaceable>.  Since the hash is
+    store paths <replaceable>paths</replaceable>.  Since the hash is
     stored in the Nix database, this is a fast
     operation.</para></listitem>
 
   </varlistentry>
 
+  <varlistentry><term><option>--roots</option></term>
+  
+    <listitem><para>Prints the garbage collector roots that point,
+    directly or indirectly, at the store paths
+    <replaceable>paths</replaceable>.</para></listitem>
+
+  </varlistentry>
+
 </variablelist>
 
 </refsection>
@@ -669,6 +678,18 @@ $ gv graph.ps</screen>
 
 </para>
 
+<para>Show every garbage collector root that points to a store path
+that depends on <command>svn</command>:
+
+<screen>
+$ nix-store -q --roots $(which svn)
+/nix/var/nix/profiles/default-81-link
+/nix/var/nix/profiles/default-82-link
+/nix/var/nix/profiles/per-user/eelco/profile-97-link
+</screen>
+
+</para>
+
 </refsection>