summaryrefslogtreecommitdiff
path: root/nix/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'nix/libstore')
-rw-r--r--nix/libstore/remote-store.cc11
-rw-r--r--nix/libstore/worker-protocol.hh2
2 files changed, 10 insertions, 3 deletions
diff --git a/nix/libstore/remote-store.cc b/nix/libstore/remote-store.cc
index 0539bbe127..324ef5eb30 100644
--- a/nix/libstore/remote-store.cc
+++ b/nix/libstore/remote-store.cc
@@ -462,11 +462,18 @@ Paths RemoteStore::importPaths(bool requireSignature, Source & source)
void RemoteStore::buildPaths(const PathSet & drvPaths, BuildMode buildMode)
{
- if (buildMode != bmNormal) throw Error("repairing or checking is not supported when building through the Nix daemon");
openConnection();
writeInt(wopBuildPaths, to);
- if (GET_PROTOCOL_MINOR(daemonVersion) >= 13)
+ if (GET_PROTOCOL_MINOR(daemonVersion) >= 13) {
writeStrings(drvPaths, to);
+ if (GET_PROTOCOL_MINOR(daemonVersion) >= 15) {
+ writeInt(buildMode, to);
+ }
+ /* Old daemons did not take a 'buildMode' parameter, so we need to
+ validate it here on the client side. */
+ else if (buildMode != bmNormal) throw Error("repairing or checking \
+is not supported when building through the Nix daemon");
+ }
else {
/* For backwards compatibility with old daemons, strip output
identifiers. */
diff --git a/nix/libstore/worker-protocol.hh b/nix/libstore/worker-protocol.hh
index d037d7402e..7b7be4a8a0 100644
--- a/nix/libstore/worker-protocol.hh
+++ b/nix/libstore/worker-protocol.hh
@@ -6,7 +6,7 @@ namespace nix {
#define WORKER_MAGIC_1 0x6e697863
#define WORKER_MAGIC_2 0x6478696f
-#define PROTOCOL_VERSION 0x10e
+#define PROTOCOL_VERSION 0x10f
#define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)