1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 15:51:15 +02:00

importPaths(): Fix accessor support for Hydra

This commit is contained in:
Eelco Dolstra 2016-10-07 18:13:40 +02:00
parent b0f7f9c98f
commit 629ab80022
4 changed files with 27 additions and 7 deletions

View file

@ -318,4 +318,12 @@ ref<FSAccessor> BinaryCacheStore::getFSAccessor()
std::dynamic_pointer_cast<BinaryCacheStore>(shared_from_this())));
}
void BinaryCacheStore::addPathToAccessor(ref<FSAccessor> accessor,
const Path & storePath, const ref<std::string> & data)
{
auto accessor_ = accessor.dynamic_pointer_cast<BinaryCacheStoreAccessor>();
if (accessor_)
accessor_->nars.emplace(storePath, makeNarAccessor(data));
}
}