aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-07-22 22:50:48 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-07-22 22:50:48 +0200
commit9957315ce0ec43e122829619174592fd1755177a (patch)
tree665fc6b263828b9b7d7e3d70a183cec24d4b7cdd /src/libstore/remote-store.cc
parenta7b7fcfb16bc05cb54bc90f11c84343782e41762 (diff)
RemoteStore::buildPaths(): Handle evalStore
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 77b34d000..1471520f3 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -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)
{
- if (evalStore && evalStore.get() != this)
- throw Error("building on a remote store is incompatible with '--eval-store'");
+ if (evalStore && evalStore.get() != this) {
+ /* 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());
conn->to << wopBuildPaths;