@@ -203,7 +203,7 @@ void handshake(Machine::Connection & conn, unsigned int repeats)
203203 throw Error (" machine ‘%1%’ does not support repeating a build; please upgrade it to Nix 1.12" , conn.machine ->sshName );
204204}
205205
206- StorePathSet sendInputs (
206+ BasicDerivation sendInputs (
207207 State & state,
208208 Step & step,
209209 Store & localStore,
@@ -214,19 +214,13 @@ StorePathSet sendInputs(
214214 counter & nrStepsCopyingTo
215215)
216216{
217- StorePathSet inputs;
218-
219217 BasicDerivation basicDrv (*step.drv );
220218
221- for (auto & p : step.drv ->inputSrcs )
222- inputs.insert (p);
223-
224219 for (auto & input : step.drv ->inputDrvs ) {
225220 auto drv2 = localStore.readDerivation (input.first );
226221 for (auto & name : input.second ) {
227222 if (auto i = get (drv2.outputs , name)) {
228223 auto outPath = i->path (localStore, drv2.name , name);
229- inputs.insert (*outPath);
230224 basicDrv.inputSrcs .insert (*outPath);
231225 }
232226 }
@@ -255,18 +249,18 @@ StorePathSet sendInputs(
255249 /* Copy the input closure. */
256250 if (conn.machine ->isLocalhost ()) {
257251 StorePathSet closure;
258- destStore.computeFSClosure (inputs , closure);
252+ destStore.computeFSClosure (basicDrv. inputSrcs , closure);
259253 copyPaths (destStore, localStore, closure, NoRepair, NoCheckSigs, NoSubstitute);
260254 } else {
261- copyClosureTo (conn.machine ->state ->sendLock , destStore, conn.from , conn.to , inputs , true );
255+ copyClosureTo (conn.machine ->state ->sendLock , destStore, conn.from , conn.to , basicDrv. inputSrcs , true );
262256 }
263257
264258 auto now2 = std::chrono::steady_clock::now ();
265259
266260 overhead += std::chrono::duration_cast<std::chrono::milliseconds>(now2 - now1).count ();
267261 }
268262
269- return inputs ;
263+ return basicDrv ;
270264}
271265
272266void RemoteResult::updateWithBuildResult (const nix::BuildResult & buildResult)
@@ -535,7 +529,7 @@ void State::buildRemote(ref<Store> destStore,
535529 copy the immediate sources of the derivation and the required
536530 outputs of the input derivations. */
537531 updateStep (ssSendingInputs);
538- StorePathSet inputs = sendInputs (*this , *step, *localStore, *destStore, conn, result.overhead , nrStepsWaiting, nrStepsCopyingTo);
532+ BasicDerivation resolvedDrv = sendInputs (*this , *step, *localStore, *destStore, conn, result.overhead , nrStepsWaiting, nrStepsCopyingTo);
539533
540534 logFileDel.cancel ();
541535
@@ -560,7 +554,7 @@ void State::buildRemote(ref<Store> destStore,
560554 conn,
561555 *localStore,
562556 step->drvPath ,
563- BasicDerivation (*step-> drv ) ,
557+ resolvedDrv ,
564558 buildOptions,
565559 nrStepsBuilding
566560 );
0 commit comments