aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-01-25 11:08:38 +0100
committerregnat <rg@regnat.ovh>2021-02-23 08:04:03 +0100
commit27b5747ca7b5599768083dde5fa4d36bfbb0f66f (patch)
treec741f1753a777598a40bb3a567c7189489454e11 /src
parenta2b69660a9b326b95d48bd222993c5225bbd5b5f (diff)
RemoteStore: Send back the new realisations
To allow it to build ca derivations remotely
Diffstat (limited to 'src')
-rw-r--r--src/libstore/daemon.cc3
-rw-r--r--src/libstore/remote-store.cc4
-rw-r--r--src/libstore/worker-protocol.hh2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc
index ba5788b64..ba7959263 100644
--- a/src/libstore/daemon.cc
+++ b/src/libstore/daemon.cc
@@ -575,6 +575,9 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
auto res = store->buildDerivation(drvPath, drv, buildMode);
logger->stopWork();
to << res.status << res.errorMsg;
+ if (GET_PROTOCOL_MINOR(clientVersion) >= 0xc) {
+ worker_proto::write(*store, to, res.builtOutputs);
+ }
break;
}
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 52d633372..0d884389a 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -680,6 +680,10 @@ BuildResult RemoteStore::buildDerivation(const StorePath & drvPath, const BasicD
unsigned int status;
conn->from >> status >> res.errorMsg;
res.status = (BuildResult::Status) status;
+ if (GET_PROTOCOL_MINOR(conn->daemonVersion) >= 0xc) {
+ auto builtOutputs = worker_proto::read(*this, conn->from, Phantom<DrvOutputs> {});
+ res.builtOutputs = builtOutputs;
+ }
return res;
}
diff --git a/src/libstore/worker-protocol.hh b/src/libstore/worker-protocol.hh
index 5e094c378..95f08bc9a 100644
--- a/src/libstore/worker-protocol.hh
+++ b/src/libstore/worker-protocol.hh
@@ -9,7 +9,7 @@ namespace nix {
#define WORKER_MAGIC_1 0x6e697863
#define WORKER_MAGIC_2 0x6478696f
-#define PROTOCOL_VERSION 0x11b
+#define PROTOCOL_VERSION 0x11c
#define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)