-
Notifications
You must be signed in to change notification settings - Fork 483
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
Add a Nix flake #3221
Add a Nix flake #3221
Conversation
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.
For the most part the flake just imports from niv sources and default.nix, but inputs.nixpkgs and inputs.haskell-nix have to be kept in sync with the niv revisions manually (for now?).
Good times...
e0651d7
to
cd920c3
Compare
After chatting with @michaelpj we came to the conclusion that it should be possible to make this much simpler. So i tried, and failed 😅 In 1f1d22f I tried to just have the
This failed in haskell.nix because it doesn't pass But ultimately this still fails:
And i honestly don't understand why. Could you perhaps take a look @angerman or @hamishmack ? :) The key point here is that we are only adding the flake because we have to in order to be able to use |
@michaelpj as much as I had hoped that we might be able to make the |
While the latest sate of this builds, flake builds yield different outputs and i don't understand why that might be:
@michaelpj @angerman do you have an ideas what this might be and what else i could perhaps try? |
Add a basic nix flake that simply exports several packages from the toplevel default.nix
Import sources.nix by passing system;
Move sources, haskellNix and haskellNixOverlays to the top level default.nix which allows for passing the haskellNixOverlays from flake.nix and thus simply importing 'default.nix' directly. The reason why this is important is that haskell.nix needs to use a different overlay for when using in flake evaluationor normal one. This is due to the fact that when evaluating flakes builtins.currentSystem is not available.
- Remove default redundant default arguments in nix/default.nix - Remove unused exports in flake
Refactor flake.nix to pass `haskellNix` and `isInFlake` to `default.nix` and drop haskellNix.config * Depending on the value of `isInFlake`, nix/default.nix picks either haskellNix.overlay or haskellNix.overlays. * Drop haskellNix.config which doesn't seem relevant for plutus (plutus doesn't target windows and doesn't use nixpkgs-20.03)
Recover `enableHaskellProfiling` shell.nix argument to get shell environments with haskell profiling enabled.
Add a comment to the flake file explaining intention and current limitations of this flake file.
Introduce some changes to the plutus-playground vm test to hopefully make it more stable on hydra - Use `journalctl -eu` to jump to go to end of logger output - Add a sleep(2) to wait for service restart
Summary
Add a basic nix flake that simply exports several packages from the toplevel default.nix
Notes
default.nix
, butinputs.nixpkgs
andinputs.haskell-nix
have to be kept in sync with theniv
revisions manually (for now?).Status Quo
The latest state of this PR provides a
flake.nix
that "works" but:Pre-submit checklist:
Pre-merge checklist: