diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2017-07-18 22:31:31 +0200 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2017-07-18 22:32:39 +0200 |
| commit | dc6b81a4b3bec3caebe6157b48fa6943b9cd53e9 (patch) | |
| tree | 4e35289a62215f2c4464fe87bf18079d85a505af /modules | |
| parent | a31b3699b4a2e4b01db0a0e7da0ce38af816e9c4 (diff) | |
nix: add support for nix 1.12
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/nix/default.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 111d620..5904df4 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -7,6 +7,9 @@ let cfg = config.nix; daemon = config.services.nix-daemon; + buildHook = if versionAtLeast (cfg.package.version or "<unknown>") "1.12pre" + then "build-remote" else "build-remote.pl"; + nixConf = let # If we're using sandbox for builds, then provide /bin/sh in @@ -314,7 +317,7 @@ in environment.etc."nix/nix.conf".source = nixConf; # List of machines for distributed Nix builds in the format - # expected by build-remote.pl. + # expected by build-remote. environment.etc."nix/machines" = { enable = cfg.buildMachines != []; text = @@ -342,7 +345,7 @@ in } // optionalAttrs cfg.distributedBuilds { - NIX_BUILD_HOOK = "${cfg.package}/libexec/nix/build-remote.pl"; + NIX_BUILD_HOOK = "${cfg.package}/libexec/nix/${buildHook}"; NIX_REMOTE_SYSTEMS = "/etc/nix/machines"; NIX_CURRENT_LOAD = "/run/nix/current-load"; }; |
