1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 07:52:43 +01:00

Implement nar-based addToStore for remote-store

This commit is contained in:
Shea Levy 2016-09-02 14:33:58 -04:00
parent ecba88de93
commit 584f8a62de
3 changed files with 31 additions and 2 deletions

View file

@ -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();
}