[object Object]

← back to Exo

nix: add macmon to PATH in wrapper scripts on Darwin

b2579c78fed2311b56751fb103866ae26548ce99 · 2026-02-02 13:34:14 +0000 · Jake Hillion

`nix run .#exo` couldn't find `macmon` because the Nix wrapper scripts
didn't include it in PATH, causing `shutil.which("macmon")` to fail.

Added `--prefix PATH : ${pkgs.macmon}/bin` to the `makeWrapper` call,
conditional on Darwin via `lib.optionalString`, so macmon's binary is
available at runtime without modifying the user's system PATH.

Test plan:
- Verified `nix build .#exo` succeeds
- Checked wrapper script contains macmon store path in PATH prefix

Files touched

Diff

commit b2579c78fed2311b56751fb103866ae26548ce99
Author: Jake Hillion <jake@hillion.co.uk>
Date:   Mon Feb 2 13:34:14 2026 +0000

    nix: add macmon to PATH in wrapper scripts on Darwin
    
    `nix run .#exo` couldn't find `macmon` because the Nix wrapper scripts
    didn't include it in PATH, causing `shutil.which("macmon")` to fail.
    
    Added `--prefix PATH : ${pkgs.macmon}/bin` to the `makeWrapper` call,
    conditional on Darwin via `lib.optionalString`, so macmon's binary is
    available at runtime without modifying the user's system PATH.
    
    Test plan:
    - Verified `nix build .#exo` succeeds
    - Checked wrapper script contains macmon store path in PATH prefix
---
 python/parts.nix | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/parts.nix b/python/parts.nix
index b777be95..7423ed31 100644
--- a/python/parts.nix
+++ b/python/parts.nix
@@ -69,7 +69,8 @@
           # Create wrapper scripts
           for script in exo exo-master exo-worker; do
             makeWrapper ${exoVenv}/bin/$script $out/bin/$script \
-              --set DASHBOARD_DIR ${self'.packages.dashboard}
+              --set DASHBOARD_DIR ${self'.packages.dashboard} \
+              ${lib.optionalString pkgs.stdenv.isDarwin "--prefix PATH : ${pkgs.macmon}/bin"}
           done
         '';
     in

← cd946742 fix skipping logic in worker plan (#1342)  ·  back to Exo  ·  Update exo bench (#1357) 21d477f1 →