about summary refs log tree commit diff
path: root/src/nix-store
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-12-06T16·19+0100
committerEelco Dolstra <edolstra@gmail.com>2016-12-06T16·19+0100
commit6069b946ad3db5aa613f2691617fea8bd779c3ce (patch)
tree56f3983d6cd3cf676b009a98a1297ca21dc37cd5 /src/nix-store
parent603f08506eb4bda7138ae102fd09498fc1f9b632 (diff)
nix-store --serve: Support setting build-repeat
This allows Hydra to test whether builds are reproducible.
Diffstat (limited to 'src/nix-store')
-rw-r--r--src/nix-store/nix-store.cc2
-rw-r--r--src/nix-store/serve-protocol.hh2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 63e20a8c77a7..2e530ae52a3a 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -840,6 +840,8 @@ static void opServe(Strings opFlags, Strings opArgs)
         settings.buildTimeout = readInt(in);
         if (GET_PROTOCOL_MINOR(clientVersion) >= 2)
             settings.maxLogSize = readInt(in);
+        if (GET_PROTOCOL_MINOR(clientVersion) >= 3)
+            settings.set("build-repeat", std::to_string(readInt(in)));
     };
 
     while (true) {
diff --git a/src/nix-store/serve-protocol.hh b/src/nix-store/serve-protocol.hh
index c4e2a370300b..f8cc9a4b6ebe 100644
--- a/src/nix-store/serve-protocol.hh
+++ b/src/nix-store/serve-protocol.hh
@@ -5,7 +5,7 @@ namespace nix {
 #define SERVE_MAGIC_1 0x390c9deb
 #define SERVE_MAGIC_2 0x5452eecb
 
-#define SERVE_PROTOCOL_VERSION 0x202
+#define SERVE_PROTOCOL_VERSION 0x203
 #define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
 #define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)