nix-store --serve: Support setting build-repeat

This allows Hydra to test whether builds are reproducible.
This commit is contained in:
Eelco Dolstra 2016-12-06 17:19:00 +01:00
parent 603f08506e
commit 6069b946ad
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 3 additions and 1 deletions

View file

@ -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) {

View file

@ -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)