about summary refs log tree commit diff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index f874ffeadc3e..f2621a9954bf 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -993,9 +993,10 @@ static void opServe(Strings opFlags, Strings opArgs)
             }
 
             case cmdExportPaths: {
+                bool sign = readInt(in);
                 Paths sorted = topoSortPaths(*store, readStorePaths<PathSet>(in));
                 reverse(sorted.begin(), sorted.end());
-                exportPaths(*store, sorted, false, out);
+                exportPaths(*store, sorted, sign, out);
                 break;
             }
 
@@ -1025,6 +1026,16 @@ static void opServe(Strings opFlags, Strings opArgs)
                 break;
             }
 
+            case cmdQueryClosure: {
+                bool includeOutputs = readInt(in);
+                PathSet paths = readStorePaths<PathSet>(in);
+                PathSet closure;
+                for (auto & i : paths)
+                    computeFSClosure(*store, i, closure, false, includeOutputs);
+                writeStrings(closure, out);
+                break;
+            }
+
             default:
                 throw Error(format("unknown serve command %1%") % cmd);
         }