From ca48818b3053270537ca074c90ddddb882a55568 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 17 Jun 2015 17:28:59 +0200 Subject: [PATCH] Fix remote building --- src/hydra-queue-runner/build-remote.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index 762a1058..f0adccf5 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -145,9 +145,19 @@ void buildRemote(std::shared_ptr store, throw Error(format("cannot connect to ‘%1%’: %2%") % sshName % chomp(readFile(logFile))); } + /* Gather the inputs. */ + PathSet inputs({drvPath}); + for (auto & input : drv.inputDrvs) { + Derivation drv2 = readDerivation(input.first); + for (auto & name : input.second) { + auto i = drv2.outputs.find(name); + if (i != drv2.outputs.end()) inputs.insert(i->second.path); + } + } + /* Copy the input closure. */ printMsg(lvlDebug, format("sending closure of ‘%1%’ to ‘%2%’") % drvPath % sshName); - copyClosureTo(store, from, to, PathSet({drvPath})); + copyClosureTo(store, from, to, inputs); /* Do the build. */ printMsg(lvlDebug, format("building ‘%1%’ on ‘%2%’") % drvPath % sshName);