aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/remote-store.cc6
-rw-r--r--src/libstore/worker-protocol.hh1
-rw-r--r--src/nix-worker/nix-worker.cc6
3 files changed, 10 insertions, 3 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 07cb62dc8..b438c074f 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -296,7 +296,11 @@ Path RemoteStore::queryDeriver(const Path & path)
PathSet RemoteStore::queryDerivationOutputs(const Path & path)
{
- throw Error("not yet implemented");
+ openConnection();
+ writeInt(wopQueryDerivationOutputs, to);
+ writeString(path, to);
+ processStderr();
+ return readStorePaths(from);
}
diff --git a/src/libstore/worker-protocol.hh b/src/libstore/worker-protocol.hh
index e44c1e36b..9e36aab0f 100644
--- a/src/libstore/worker-protocol.hh
+++ b/src/libstore/worker-protocol.hh
@@ -34,6 +34,7 @@ typedef enum {
wopSetOptions = 19,
wopCollectGarbage = 20,
wopQuerySubstitutablePathInfo = 21,
+ wopQueryDerivationOutputs = 22,
} WorkerOp;
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index 362b9b928..59ab48776 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -313,14 +313,16 @@ static void performOp(unsigned int clientVersion,
}
case wopQueryReferences:
- case wopQueryReferrers: {
+ case wopQueryReferrers:
+ case wopQueryDerivationOutputs: {
Path path = readStorePath(from);
startWork();
PathSet paths;
if (op == wopQueryReferences)
store->queryReferences(path, paths);
- else
+ else if (op == wopQueryReferrers)
store->queryReferrers(path, paths);
+ else paths = store->queryDerivationOutputs(path);
stopWork();
writeStringSet(paths, to);
break;