mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-28 02:37:09 +00:00
nix: add support for nix 1.12
This commit is contained in:
parent
a31b3699b4
commit
dc6b81a4b3
1 changed files with 5 additions and 2 deletions
|
@ -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";
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue