mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
RemoteStore::buildPaths(): Handle evalStore
This commit is contained in:
parent
a7b7fcfb16
commit
9957315ce0
1 changed files with 9 additions and 2 deletions
|
@ -707,8 +707,15 @@ static void writeDerivedPaths(RemoteStore & store, ConnectionHandle & conn, cons
|
||||||
|
|
||||||
void RemoteStore::buildPaths(const std::vector<DerivedPath> & drvPaths, BuildMode buildMode, std::shared_ptr<Store> evalStore)
|
void RemoteStore::buildPaths(const std::vector<DerivedPath> & drvPaths, BuildMode buildMode, std::shared_ptr<Store> evalStore)
|
||||||
{
|
{
|
||||||
if (evalStore && evalStore.get() != this)
|
if (evalStore && evalStore.get() != this) {
|
||||||
throw Error("building on a remote store is incompatible with '--eval-store'");
|
/* The remote doesn't have a way to access evalStore, so copy
|
||||||
|
the .drvs. */
|
||||||
|
RealisedPath::Set drvPaths2;
|
||||||
|
for (auto & i : drvPaths)
|
||||||
|
if (auto p = std::get_if<DerivedPath::Built>(&i))
|
||||||
|
drvPaths2.insert(p->drvPath);
|
||||||
|
copyClosure(*evalStore, *this, drvPaths2);
|
||||||
|
}
|
||||||
|
|
||||||
auto conn(getConnection());
|
auto conn(getConnection());
|
||||||
conn->to << wopBuildPaths;
|
conn->to << wopBuildPaths;
|
||||||
|
|
Loading…
Reference in a new issue