about summary refs log tree commit diff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-09-02T18·33-0400
committerShea Levy <shea@shealevy.com>2016-09-02T18·33-0400
commit584f8a62de117ade154ec8208d939dc194782936 (patch)
treee024b836a9ce4b9fb08e0f29ded2c7a8128de290 /src/libstore/remote-store.cc
parentecba88de9367f733610121fc0153310f92e05b65 (diff)
Implement nar-based addToStore for remote-store
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 232f62e7ab6d..f03f33fc175c 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -345,7 +345,12 @@ Path RemoteStore::queryPathFromHashPart(const string & hashPart)
 void RemoteStore::addToStore(const ValidPathInfo & info, const std::string & nar,
     bool repair, bool dontCheckSigs)
 {
-    throw Error("RemoteStore::addToStore() not implemented");
+    auto conn(connections->get());
+    conn->to << wopAddToStoreNar
+             << info.path << info.deriver << printHash(info.narHash)
+             << info.references << info.registrationTime << info.narSize
+             << info.ultimate << info.sigs << nar << repair << dontCheckSigs;
+    conn->processStderr();
 }