diff options
-rw-r--r-- | src/build-remote/build-remote.cc | 7 | ||||
-rw-r--r-- | src/libstore/build.cc | 17 |
2 files changed, 8 insertions, 16 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index f3195f6317d9..1ee8a625b6bc 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -269,8 +269,11 @@ connected: copyPaths(store, ref<Store>(sshStore), inputs); uploadLock = -1; - printError("building ‘%s’ on ‘%s’", drvPath, hostName); - sshStore->buildDerivation(drvPath, readDerivation(drvPath)); + BasicDerivation drv(readDerivation(drvPath)); + drv.inputSrcs = inputs; + + printError("building ‘%s’ on ‘%s’", drvPath, storeUri); + sshStore->buildDerivation(drvPath, drv); PathSet missing; for (auto & path : outputs) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 8b869063d5e1..a0efd880400c 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1622,23 +1622,12 @@ HookReply DerivationGoal::tryBuildHook() hook = std::move(worker.hook); /* Tell the hook all the inputs that have to be copied to the - remote system. This unfortunately has to contain the entire - derivation closure to ensure that the validity invariant holds - on the remote system. (I.e., it's unfortunate that we have to - list it since the remote system *probably* already has it.) */ - PathSet allInputs; - allInputs.insert(inputPaths.begin(), inputPaths.end()); - worker.store.computeFSClosure(drvPath, allInputs); - - string s; - for (auto & i : allInputs) { s += i; s += ' '; } - writeLine(hook->toHook.writeSide.get(), s); + remote system. */ + writeLine(hook->toHook.writeSide.get(), concatStringsSep(" ", inputPaths)); /* Tell the hooks the missing outputs that have to be copied back from the remote system. */ - s = ""; - for (auto & i : missingPaths) { s += i; s += ' '; } - writeLine(hook->toHook.writeSide.get(), s); + writeLine(hook->toHook.writeSide.get(), concatStringsSep(" ", missingPaths)); hook->toHook.writeSide = -1; |