% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:ā:-- --:ā:-- --:ā:-- 0
100 2619 100 2619 0 0 6466 0 --:ā:-- --:ā:-- --:ā:-- 6466
downloading Nix 2.3.15 binary tarball for aarch64-darwin from āhttps://releases.nixos.org/nix/nix-2.3.15/nix-2.3.15-aarch64-darwin.tar.xzā to ā/var/folders/d3/l71kyj4n2tx_2gvf6khfd6fr0000gn/T/nix-binary-tarball-unpack.XXXXXXXXXX.ApErJqdQāā¦
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 19.9M 100 19.9M 0 0 8934k 0 0:00:02 0:00:02 --:ā:-- 8934k
Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation
Creating volume and mountpoint /nix.
------------------------------------------------------------------
| This installer will create a volume for the nix store and |
| configure it to mount at /nix. Follow these steps to uninstall. |
------------------------------------------------------------------
Remove the entry from fstab using āsudo vifsā
Destroy the data volume using ādiskutil apfs deleteVolumeā
Remove the ānixā line from /etc/synthetic.conf or the file
Using existing āNix Storeā volume
performing a single-user installation of Nixā¦
copying Nix to /nix/storeā¦
replacing old ānix-2.3.15ā
installing ānix-2.3.15ā
unpacking channelsā¦
Installation finished! To ensure that the necessary environment
variables are set, either log in again, or type
. /Users/kamal/.nix-profile/etc/profile.d/nix.sh
in your shell.
replacing old ācachix-0.6.1ā
installing ācachix-0.6.1ā
Configured https://holochain-ci.cachix.org binary cache in /Users/kamal/.config/nix/nix.conf
MacBook-Pro ~ % cd developer-exercises
MacBook-Pro developer-exercises % nix-shell
error: Component resolution failed for rust-default-1.54.0
Apple M1s are uncharted territory for me. i donāt posses one and donāt plan on changing that anytime soon. however, i searched around the webs and found that you can enable x86_64 mode on it using this command arch -x86_64 zsh. if you run that before installing nix and running the nix-shell it hopefully works as well as on x86_86 macOS. iām curious if this does work so please let us know!
i know that @lucksus had access to such a machine so maybe he can share his experience as well.
Thanks @steveeJ
Your suggestion works, I can install x86 nix and run tests of elemental-chat in nix-shell (3 of 49 tests failed though).
But using this way, itās pretty slow and Iām having network issues from time to time. Not sure if itās my own case or a general issue.
Detail log:
Downloaded proc-macro-nested v0.1.7
Downloaded rcgen v0.8.13
Downloaded nanoid v0.3.0
error: failed to sync
Caused by:
failed to download packages
Caused by:
failed to download from `https://crates.io/api/v1/crates/ahash/0.7.4/download`
Caused by:
[55] Failed sending data to the peer (Connection died, tried 5 times before giving up)
Traceback (most recent call last):
File "/nix/store/z3784a4xn039iz1gbfb4pzkjx0l08872-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 42, in <module>
main()
File "/nix/store/z3784a4xn039iz1gbfb4pzkjx0l08872-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 17, in main
assert list(data.keys()) == ["source"]
AssertionError
error: builder for '/nix/store/4kak4d5bl2amzj50wiffx8zhpl5agdg3-holochain-vendor.tar.gz.drv' failed with exit code 1;
last 10 log lines:
> failed to download from `https://crates.io/api/v1/crates/ahash/0.7.4/download`
>
> Caused by:
> [55] Failed sending data to the peer (Connection died, tried 5 times before giving up)
> Traceback (most recent call last):
> File "/nix/store/z3784a4xn039iz1gbfb4pzkjx0l08872-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 42, in <module>
> main()
> File "/nix/store/z3784a4xn039iz1gbfb4pzkjx0l08872-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 17, in main
> assert list(data.keys()) == ["source"]
> AssertionError
For full logs, run 'nix log /nix/store/4kak4d5bl2amzj50wiffx8zhpl5agdg3-holochain-vendor.tar.gz.drv'.
error: 1 dependencies of derivation '/nix/store/wig4r551mzqy6dfi7cv3b4igw4l3irbn-holochain.drv' failed to build
error: build of '/nix/store/0v17nck5dkpmk89akz4w900msm40dnaz-holochain.drv', '/nix/store/lahk7ak3z9sb03b9f5vqp899ncxr4y8c-holochain.drv', '/nix/store/p3cfm6xyk5cfhnx0ihqzsjsvhg633jw3-holochain.drv', '/nix/store/wig4r551mzqy6dfi7cv3b4igw4l3irbn-holochain.drv' failed
I actually didnāt get my M1 macBook until today. I was waiting for the pro versions to come out and finally received mine now
The problem I was fighting almost all day today and finally got the solution from @kaichao (thanks!) was the error too many open files when entering any nix-shell.
This is what @kaichao suggested and made it work for me:
Tried only changing the file limits before. Stopping (=restarting, since nix-shell will start it again) the nix-daemon seems to be crucial since it is the process opening those files, not the shell in which you call nix-shell.
After solving that problem, I could even build Holochain for arm64 natively, that is without arch -x86_64 zsh as @steveeJ suggested. Instead I did export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 as nix-shell suggests, if you want to try building an unsupported package anyways.
I could install nix-shell and cachix following @lucksus advice:
You could set this variable permanently on your Shell configuration file. Iām using ZSH, then I added to config file ~/.zshrch this:
# Holochain.love
alias nshl="nix-shell https://holochain.love" # This is for running `nshl` command instead of `nix-shell https://holochain.love`
# Allow holochain.love that is unsupported for this system (aarch64-darwin)
export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1