-
Notifications
You must be signed in to change notification settings - Fork 134
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
Readme for Nix #1929
Readme for Nix #1929
Conversation
- [Dune](https://github.com/ocaml/dune) (only needed when compiling o1js from source) | ||
- [Cargo](https://www.rust-lang.org/learn/get-started) (only needed when compiling o1js from source) | ||
- [Dune, ocamlc, opam](https://github.com/ocaml/dune) (only needed when compiling o1js from source) | ||
- [Cargo, rustup](https://www.rust-lang.org/learn/get-started) (only needed when compiling o1js from source) |
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.
I know this isn't your diff, but what does "compiling o1js from source" mean? Is that building bindings? The phrasing seems weird.
> ```bash | ||
> # avoid macOS updates to destroy nix | ||
> if [ -e '/nix/var/nix/profiles/default/etc/profile.d/>nix-daemon.sh' ]; then | ||
> source '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' |
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.
What kinds of updates break things, and why is this the fix?
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.
I am not sure why this is the fix, but I've seen online that OS updates will cause nix to break on macOS. I would like to try this installer in the future on a clean machine and see if it lets us avoid this step https://determinate.systems/posts/nix-survival-mode-on-macos/
|
||
```console | ||
./pin.sh | ||
nix develop o1js#default |
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.
If this command is single-threaded, it takes forever. Recommend enabling max-jobs in nix.conf
for parallel build
max-jobs = 20
README-nix.md
Outdated
|
||
#### Fix | ||
|
||
Create a new environment for Nix and start from scratch. |
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.
How?
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.
I think just rerunning ./pin.sh
and nix develop o1js
Co-authored-by: Coby <[email protected]>
Co-authored-by: Coby <[email protected]>
Co-authored-by: Coby <[email protected]>
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 is great, sorry I wasn't much help with the MacOS stuff
Co-authored-by: Danny Willems <[email protected]>
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.
I am good with merging this. We could add a disclaimer that not all of these "solutions" might work universally and might vary depending on your environment, but I would rather provide hints than not talk about it at all - thanks! :)
This is a readme file specifically for the Nix building method. It is not meant to be a final version whatsoever, but to provide some initial guidelines for those who are facing issues when using Nix. It contains some basic instructions, followed by common errors that I have encountered myself, with proposals of how to fix them (at least on my M1). If it is not sufficiently generic to be merged, I will happily leave it as a draft PR or an internal Notion page for the onboarding process.
Special thanks to @dannywillems , @Trivo25 , @hattyhattington17 , @georgeee , @Geometer1729, and @mrmr1993, for your inputs and support.