Fix incorrect $NIX_BUILD_HOOK on Nix 1.12

This commit is contained in:
Eelco Dolstra 2017-03-03 15:42:53 +01:00
parent 136f77b7b9
commit 3070c88798
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE

View File

@ -389,7 +389,11 @@ in
}
// optionalAttrs cfg.distributedBuilds {
NIX_BUILD_HOOK = "${nix}/libexec/nix/build-remote.pl";
NIX_BUILD_HOOK =
if versionAtLeast (getVersion nix) "1.12pre4997" then
"${nix}/libexec/nix/build-remote"
else
"${nix}/libexec/nix/build-remote.pl";
NIX_REMOTE_SYSTEMS = "/etc/nix/machines";
NIX_CURRENT_LOAD = "/run/nix/current-load";
};