See https://github.com/NixOS/nix/commit/1511aa9f488ba0762c2da0bf8ab61b5fde47305d and https://github.com/NixOS/nix/commit/eda2f36c2ac847e02e871c327e7633693d92cd8d.
NAYQT2GTCJPBFRSK7CBFX655F2NGTBPICJSCYG2CSCQ5NRDHZG6QC UFUAO7NDDGSCKOALXA62AVDYHTMX4RWUDSYJ6H4QHOAGZRMELGAAC N4IROACVZ4MU73J5SM6WXJMKQSFR3VN5SOKENNNZNEGMTGB2Q3HAC 5AIYUMTBY6TFQTBRP3MJ2PYWUMRF57I77NIVWYE74UMEVQMBWZVQC 6TY4LNHHAUSZNFDN34CHUWMZSQN5I3LNOOSV457M44FDGZB76X4AC OCZ4LSGGSCMSLGC3C32D5JUYYHS5CIPOKOAMADEFAFZOFXJ3YY3AC 5LBMP7GAY5IIOX75M62BRGKXS4BNIQRDBCYLM4PHI773KRABTL2QC HHOMBU7GGRAEXODSDY3WUHQGOSQ35OTGRNBWKKAS2D4YEIZTTNUAC 24BMQDZAWDQ7VNIA7TIROXSOYLOJBNZ2E4264WHWNJAEN6ZB3UOAC NJJ7H64SZOX5EGACDCQAUQ7R6UEWD5IIC35A2MWFOOJV55DJYPHAC RYTQLATYOZ6ODIKYVJ63TC4OIQBXHSCV3NA2YD4NFP7443GQVSRQC QJRDO2B4RGTXPSSK2SM6PQ6VEJNOLNMG2EFNMBGNRSEI74KKLVRAC HUUZFPPKGHTXFZMZCO2UGWYNGEED3E2CFHQRFQVVBJGPQVGVY4UAC HJOEIMLRDVQ2KZI5HGL2HKGBM3AHP7YIKGKDAGFUNKRUXVRB24NAC /* Gather the inputs. */PathSet inputs({step->drvPath});
/* Gather the inputs. If the remote side is Nix <= 1.9, we have tocopy the entire closure of ‘drvPath’, as well the requiredoutputs of the input derivations. On Nix > 1.9, we only need tocopy the immediate sources of the derivation and the requiredoutputs of the input derivations. */PathSet inputs;if (sendDerivation)inputs.insert(step->drvPath);elsefor (auto & p : step->drv.inputSrcs)inputs.insert(p);
writeInt(cmdBuildPaths, to);writeStrings(PathSet({step->drvPath}), to);writeInt(maxSilentTime, to);writeInt(buildTimeout, to);// FIXME: send maxLogSize.
if (sendDerivation)to << cmdBuildPaths << PathSet({step->drvPath}) << maxSilentTime << buildTimeout;elseto << cmdBuildDerivation << step->drvPath << step->drv << maxSilentTime << buildTimeout;// FIXME: send maxLogSize.
if (res) {result.errorMsg = (format("%1% on ‘%2%’") % readString(from) % machine->sshName).str();if (res == 100) result.status = RemoteResult::rrPermanentFailure;else if (res == 101) result.status = RemoteResult::rrTimedOut;else result.status = RemoteResult::rrMiscFailure;return;
if (sendDerivation) {if (res) {result.errorMsg = (format("%1% on ‘%2%’") % readString(from) % machine->sshName).str();if (res == 100) result.status = BuildResult::PermanentFailure;else if (res == 101) result.status = BuildResult::TimedOut;else result.status = BuildResult::MiscFailure;return;}result.status = BuildResult::Built;} else {result.status = (BuildResult::Status) res;result.errorMsg = readString(from);if (!result.success()) return;
if (result.status == RemoteResult::rrMiscFailure) {printMsg(lvlError, format("irregular failure building ‘%1%’ on ‘%2%’: %3%")
if (result.canRetry()) {printMsg(lvlError, format("possibly transient failure building ‘%1%’ on ‘%2%’: %3%")
if (buildStatus != bsAborted) result.errorMsg = "";
if (result.status == BuildResult::PermanentFailure ||result.status == BuildResult::TransientFailure ||result.status == BuildResult::CachedFailure ||result.status == BuildResult::TimedOut)result.errorMsg = "";