Skip to content

Commit 1402cb7

Browse files
authored
Merge pull request #1673 from angerman/fix/builder-module-tmp-avail-threshold
fix(darwin): align builder module CLI flag with binary
2 parents 168c672 + 4f3885b commit 1402cb7

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

darwin-modules/builder-module.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ in
3939
default = 4;
4040
};
4141

42-
tmpAvailThreshold = lib.mkOption {
43-
description = "Threshold in percent for /tmp before jobs are no longer scheduled on the machine";
42+
buildDirAvailThreshold = lib.mkOption {
43+
description = "Threshold in percent for nix build dir before jobs are no longer scheduled on the machine";
4444
type = lib.types.float;
4545
default = 10.0;
4646
};
@@ -160,8 +160,8 @@ in
160160
cfg.speedFactor
161161
"--max-jobs"
162162
cfg.maxJobs
163-
"--tmp-avail-threshold"
164-
cfg.tmpAvailThreshold
163+
"--build-dir-avail-threshold"
164+
cfg.buildDirAvailThreshold
165165
"--store-avail-threshold"
166166
cfg.storeAvailThreshold
167167
"--load1-threshold"
@@ -211,6 +211,10 @@ in
211211
environment = {
212212
RUST_BACKTRACE = "1";
213213
NIX_SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
214+
# The builder execs `nix build` to realise derivations. The linux
215+
# module sets `path = [ config.nix.package ]` on the systemd service;
216+
# launchd has no equivalent, so we set PATH explicitly.
217+
PATH = "${config.nix.package}/bin:/usr/bin:/bin:/usr/sbin:/sbin";
214218
};
215219

216220
serviceConfig = {

0 commit comments

Comments
 (0)