From 3070c887987e9c24a72a5b7b18db29ebe1ed6d4c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 3 Mar 2017 15:42:53 +0100 Subject: [PATCH] Fix incorrect $NIX_BUILD_HOOK on Nix 1.12 --- nixos/modules/services/misc/nix-daemon.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 7101cadfeed2..66ee20b5ac94 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -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"; };