Nix on MacOS Catalina

Upgrading to Catalina last night seems to have destroyed my Nix installation :frowning:

Be aware of this when upgrading! I think there will be a solution, but people are just sorting it out, so it might be a hassle!

So far I’ve found:
https://github.com/NixOS/nix/pull/3054
and
https://github.com/NixOS/nix/issues/2925

3 Likes

Ok, so it didn’t take too long. For a ‘single user installation’ I followed these instructions.

The ‘spaces / tab’ thing did get me, so really do watch out.

1 Like

Thanks for the heads up @Connoropolous. Do you think it’s worth waiting?

Yeah, I’d be wary @freesig … I had additional problems with libsodium (low level crypto libs) compiling too. Got myself into this additional mess afterwards:

But between the two resources you should be able to pull it off if you set aside a whole morning/days worth of time to make updates.

2 Likes

Update!

I hope you didn’t follow my lead because I’ve been running into issues (as some people warned I might in the thread). I’ve had to backtrack, and instead take THIS approach to it.

1 Like

Additionally!

My instructions/approach to libsodium linking before did NOT work!

My new solution is…

(after following THESE instruction https://libsodium.gitbook.io/doc/installation#compilation-on-unix-like-systems)

add this to my .profile bash profile

export RUST_SODIUM_USE_PKG_CONFIG=1
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH

and don’t use these: RUST_SODIUM_LIB_DIR=~/Downloads/libsodium-1.0.17 RUST_SODIUM_SHARED=1

1 Like

Just livestreaming my debugging process now… :frowning:

I thought it worked, but actually …

holochain -c ./conductor-config.toml
Using config path: ./conductor-config.toml
Reading DNA from /Users/connor/code/hbe/acorn/dna-src/dist/dna-src.dna.json
Unlocking agent keys:
Unlocking key for agent 'hc-run-agent':
Reading keystore from ./key.key
Segmentation fault: 11

so the failing test in the test suite of libsdium DID mean something.

1 Like

I got it work using this version of libsodium:

libsodium-1.0.18-stable.tar.gz
https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable.tar.gz

1 Like

@Connoropolous thanks sooo much for getting stuck into this!!!

i have yet to bite the bullet on my mac, i’m hoping things settle down a bit soon

Wow this is a mess mac. Thanks for gathering this info @Connoropolous I think I will definitely wait.

Thanks @Connoropolous for the solution. I fumbled through copying your earlier attempts before finding the working solution towards the bottom of the thread. If you are able to mark your own reply as a solution, that may help future readers…

This was still the state of the art when I tried in late December. If that is still the case, I want to point out that it’s a very broken experience for a developer new to holochain… Who may be thinking, I have the latest macOS, I don’t know what this nix thing is, but it clearly doesn’t work on Mac. Even if I go to the nix site directly, the Mac instructions don’t work at all.

I personally am deeply invested in the holichain project and ecosystem, but for someone brand new, this could easily turn them away and not come back.

To this end, if not done already, I would suggest updating the install docs to at minimum link to the solution in this thread, or directly on github. cc @freesig

Thanks everyone for the great work on Holochain, deeply appreciated.

:pray::yellow_heart::sparkles:

3 Likes

To be clear, this worked perfectly for me on Catalina:

I did not have any issues with libsodium.

2 Likes

github issue for docs https://github.com/holochain/holonix/issues/132

thanks for adding your experience Harlan… I’ve just marked your succint post about what worked as the ‘solution’ for newcomers

1 Like

Hi I’ve tried the solution here and it worked perfectly find for me as well until I restarted my mac. First, when I run nix-shell https://holochain.love, the terminal tells me this;

error: cannot connect to daemon at ‘/nix/var/nix/daemon-socket/socket’: Connection refused

So I ran the same command again with sudo and it worked and installed the latest version of holochain but now it is showing me this error message.

Does anyone have any idea how to work around this problem? Thank you!

@tats_sato i left a comment over here Nix-shell https://holochain.love is throwing an error

it looks like nix can’t find the packages it needs so it is falling back to the system bash (which i don’t think we should even try to debug) rather than using the bash from nixpkgs

have a look at my other comment for things to try to get the NIX_PATH working :slight_smile:

1 Like

Thank you!

Replied there!

As a new comer and regretting upgrading to macos catalina, I found this solution and applied it and it work!!!

I also restarted my computer as was still able to run nix-shell without any errors, or having to do the suggested re mounting patch in this solution.

So thank you for paving the way. :slight_smile:

New update…

Nix has handled support for Catalina now, in a smoother manner…

Just use
sh <(curl https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume

5 Likes

woo!

1 Like