Skip to content

Commit 27b5747

Browse files
committed
RemoteStore: Send back the new realisations
To allow it to build ca derivations remotely
1 parent a2b6966 commit 27b5747

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/libstore/daemon.cc

+3
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,9 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
575575
auto res = store->buildDerivation(drvPath, drv, buildMode);
576576
logger->stopWork();
577577
to << res.status << res.errorMsg;
578+
if (GET_PROTOCOL_MINOR(clientVersion) >= 0xc) {
579+
worker_proto::write(*store, to, res.builtOutputs);
580+
}
578581
break;
579582
}
580583

src/libstore/remote-store.cc

+4
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,10 @@ BuildResult RemoteStore::buildDerivation(const StorePath & drvPath, const BasicD
680680
unsigned int status;
681681
conn->from >> status >> res.errorMsg;
682682
res.status = (BuildResult::Status) status;
683+
if (GET_PROTOCOL_MINOR(conn->daemonVersion) >= 0xc) {
684+
auto builtOutputs = worker_proto::read(*this, conn->from, Phantom<DrvOutputs> {});
685+
res.builtOutputs = builtOutputs;
686+
}
683687
return res;
684688
}
685689

src/libstore/worker-protocol.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace nix {
99
#define WORKER_MAGIC_1 0x6e697863
1010
#define WORKER_MAGIC_2 0x6478696f
1111

12-
#define PROTOCOL_VERSION 0x11b
12+
#define PROTOCOL_VERSION 0x11c
1313
#define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
1414
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)
1515

0 commit comments

Comments
 (0)