-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Migrate nix environment to flakes #604
Conversation
openssl | ||
postgresql | ||
zlib | ||
] ++ macos; |
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.
Don't need ncurses etc for the CLI?
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 guess VERY WIP
— okay fair!
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.
builds without for me ™️ ... but yeah, WIP because (amongst other things) I've only built it on my new m1 macbook pro so far.
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.
@walkah interesting! Does it build with --pure
enabled?
flake.nix
Outdated
wrapProgram $out/bin/stack \ | ||
--add-flags "\ | ||
--nix \ | ||
--no-nix-pure \ |
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.
@expede explicitly without pure so far (because that's not working on aarch64-darwin for me yet)
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.
@walkah Ah, gotcha. Do you possibly have ncurses etc installed system wide?
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.
Also, I can just leave you to your hacking on the problem until you're further along 😅 Just say the word!
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.
Amazing! This new setup is working great on my M1 mac. I tested:
- ✅ Enter a nix shell with
nix-shell
(norosetta
flag) - ✅ Build with the
build
command, no flags or tweaking nix integrations - ✅ Tests run with
quality
- ✅ Haskell Language Server starts up when opening the project in VSCode, without entering the nix shell to and opening VSCode from there. (Note: The language server did not work immediately, only after the initial
nix-shell
and closing and re-opening VSCode.)
Huge improvement! Thanks for making this way better! 🙏 🙏 🙏
I can
I have a file |
One change is that we now run stack in a "pure" nix shell ... which seems to be working in our CI environments. My best guess is that you have a cached build that was built against your system libgmp (which will be unavailable in the pure shell). Can you try a clean build? (I know that's a long build) |
I'm feeling dumb. How would I clean my cache? I've tried removing all I also tried I saw that behind the Okay, I removed my |
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.
Awesome! Glad to hear it! @expede you okay if I merge this? (I know you were testing it out too) |
Closes #584
Adding
flake.nix
for faster nix-shell startup and better version pinning. In the process, generally cleaning up some issues (mostly aroundaarch64-darwin
):rosetta
arg for building natively on M1--nix
vs--no-nix
dance for stack (if you're using nix, automatically build with --nix but otherwise let folks use stack as normal).