Skip to content
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

Merged
merged 2 commits into from Sep 3, 2019
Merged

Conversation

@matthewbauer
Copy link
Member

matthewbauer commented Aug 27, 2019

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.

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.
@grahamc

This comment has been minimized.

Copy link
Member

grahamc commented Aug 27, 2019

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.

@grahamc grahamc added this to the Nix 2.3 milestone Aug 27, 2019
@grahamc

This comment has been minimized.

Copy link
Member

grahamc commented Aug 28, 2019

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 &amp;&amp; @bindir@/nix-daemon</string>
</array>

This comment has been minimized.

Copy link
@mroi

mroi Sep 2, 2019

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 &amp;&amp; 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.
@mroi
mroi approved these changes Sep 3, 2019
Copy link

mroi left a comment

This should work. In preparation of the Catalina installer, this change will be very useful.

@edolstra edolstra merged commit 918717f into NixOS:master Sep 3, 2019
@nixos-discourse

This comment has been minimized.

Copy link

nixos-discourse commented Oct 24, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.