Nix-shell https://holochain.love | error: error: cycle detected in build of '/nix/store/3xz7l4hc8gmlpz7062v2khacy78q1900-niv-0.2.19.drv' in the references of output 'bin' from output 'out'

Cheers. Trying to get Holochain up and running for the first time. I’ve run nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-21.11.tar.gz -p cachix --run "cachix use holochain-ci with success.

But then nix-shell https://holochain.love returns the following error (after a lot of derivations being built):

**error:** **error:** cycle detected in build of '**/nix/store/3xz7l4hc8gmlpz7062v2khacy78q1900-niv-0.2.19.drv**' in the references of output '**bin**' from output '**out**

I’ll include the entire list of built derivations, if helpful, but it’s a mighty list.

Did you ever figure this out? I’m running into the same problem.

Same here. My output is the same:

error: cycle detected in build of '/nix/store/m2g27f6hqz71lh9g0sbp2zn5mcdkrqyq-niv-0.2.19.drv' in the references of output 'bin' from output 'out'

Happening on an M1. I’m very vested in getting holochain working!!! But sadly the .nix file is extremely hard to debug & discover what’s actually going wrong.

First off, do a full uninstall:

https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos

I did a restart at this point, just to be sure everything’s cleaned out.

Now for the magic

Do not trust anyone who says you can just spin up a new shell using arch, e.g. arch -x86_64 $SHELL. It will not work. You will wonder why. You will be sad.

Instead, select your iTerm / Terminal in the Finder UI, select “Get Info” from the File menu, and select the “Run using Rosetta” checkbox.
(If you don’t have Rosetta go ahead and get it.)

Lastly, go through the installation steps in the holochain install docs:

https://developer.holochain.org/install/

Summarized here:

sh <(curl -L https://nixos.org/nix/install)

# QUIT SHELL HERE & RESTART

nix-shell --version
nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-21.11.tar.gz -p cachix --run "cachix use holochain-ci"
nix-shell https://holochain.love

# should say [nix-shell:~]$

holochain --version
# 🥳

Viel glück

i haven’t worked on this in a long time

cc: @steveeJ

@dukejones’s tutorial should work.

we recently added Apple Silicon specific instructions to the installation docs: Install Holochain - Holochain Docs

they do however instruct using arch -x86_64 $SHELL and it worked on the machine @jost.schulte tested this on. @dukejones under which circumstances will this fail?

@dukejones under which circumstances will this fail?

I would like to know that too. I just received an Apple M1 machine and didn’t need to run a terminal in Rosetta mode.

Very fortunate! I’ve had reports from friends who’ve gotten it to work without this also… I have had months of bad luck in this way, and always received a build error. It’s hard to know exactly why, and now, after installing the major libraries, I can run iTerm in ARM mode…

@dukejones Wait now, what is iTerm? Perhaps that’s the issue? I’ve used the inbuilt Terminal
image