about summary refs log tree commit diff
path: root/src/build-remote/build-remote.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-01T13·00+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-01T15·30+0200
commitca9f589a93309ca548d772f1634169007568d6a0 (patch)
treea6f38ee0777f6de398c2677bd8f1ca9f08b53131 /src/build-remote/build-remote.cc
parentb986c7f8b14c1270e012f22183737ebbaa33173d (diff)
build-remote: Don't copy the .drv closure
Since build-remote uses buildDerivation() now, we don't need to copy
the .drv file anymore. This greatly reduces the set of input paths
copied to the remote side (e.g. from 392 to 51 store paths for GNU
hello on x86_64-darwin).
Diffstat (limited to 'src/build-remote/build-remote.cc')
-rw-r--r--src/build-remote/build-remote.cc7
1 files changed, 5 insertions, 2 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)