aboutsummaryrefslogtreecommitdiff
path: root/src/nix-daemon
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-09-02 14:26:02 -0400
committerShea Levy <shea@shealevy.com>2016-09-02 14:26:02 -0400
commitb4b5e9ce2f58aecea2fe3ca1fe9388e4fc7df556 (patch)
tree36bbae6a3d6c9902577991c78878a3ac6a458ba9 /src/nix-daemon
parenta705e8ce0a8aaf3afe885892834468e95c197a16 (diff)
Add narFromPath op to nix daemon
Diffstat (limited to 'src/nix-daemon')
-rw-r--r--src/nix-daemon/nix-daemon.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index fba522540..0ef2a6872 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -576,6 +576,14 @@ static void performOp(ref<LocalStore> store, bool trusted, unsigned int clientVe
break;
}
+ case wopNarFromPath: {
+ auto path = readStorePath(*store, from);
+ startWork();
+ dumpPath(path, to);
+ stopWork();
+ break;
+ }
+
default:
throw Error(format("invalid operation %1%") % op);
}