LnL7 / nix-darwin

nix modules for darwin
MIT License
3.19k stars 457 forks source link

`cachix-agent` service dies at launch #924

Closed dhess closed 6 months ago

dhess commented 7 months ago

This started happening sometime in the last month or two with nixpkgs-unstable:

cachix: security: createProcess: posix_spawnp: does not exist (No such file or directory)

It has something to do with the PATH set by the launchd service. I looked at the Cachix agent source and didn't see anything obvious, and have run out of time to debug it properly, but FYI adding /usr/bin to the launchd service's PATH fixes the problem.

(I suspected coreutils and added coreutils-full to the path, but that did not fix the issue on my system.)

domenkozar commented 6 months ago

I've only seen it now, looks similar to https://github.com/NixOS/nixpkgs/issues/297775

sandydoo commented 6 months ago

So one of the Haskell TLS libraries is calling security, which isn't in the PATH.

We can either add /usr/bin to the launchctl paths, or do something like this https://github.com/tweag/rules_haskell/commit/31171a520f49f263895112678ac93c7ed958ead1

sandydoo commented 6 months ago

config.environment.systemPath would probably also work?