New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use wait4path on org.nixos.nix-daemon.plist #3066
Conversation
When using a volume, the nix-daemon path may not exist. To avoid this issue, we must use the wait4path tool. This should solve one of the issues in multi-user on macOS Catalina.
Thanks for the PR. My install matrix automation isn't yet able to handle macOS, I am going to fix that this evening to give this a once-through. |
My automation can handle macos now, but ran out of space :) pruning snapshots and will give it another go. |
<array> | ||
<string>-c</string> | ||
<string>/bin/wait4path @bindir@/nix-daemon && @bindir@/nix-daemon</string> | ||
</array> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way I understand the ProgramArguments
key in launchd plist files, the binary needs to be the first argument, because ProgramArguments
is directly passed as argv
to execv
.
So I think this should read:
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>/bin/wait4path @bindir@/nix-daemon && exec @bindir@/nix-daemon</string>
</array>
Edit: I forgot to add that this is what I am using in my Catalina installation and it works for me.
launchd has some weird syntx. Apparently the program needs to be in the ProgramArguments, as Program appears to be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work. In preparation of the Catalina installer, this change will be very useful.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/current-status-of-nix-on-macos-catalina/4286/15 |
When using a volume, the nix-daemon path may not exist. To avoid this
issue, we must use the wait4path tool. This should solve one of the
issues in multi-user on macOS Catalina. It also doesn't hurt on other systems.