-
-
Notifications
You must be signed in to change notification settings - Fork 391
Upgrade the Nix build system #639
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
Conversation
pepeiborra
commented
Nov 30, 2020
- Switch to the haskell-updates branch, so that we get Stackage nightly packages
- Remove the hard-coded list of packages, let cabal2nix find out
- A Github Action to exercise the Nix script and warm up a Cachix cache
I think this one would close #122, as we would have an "official" way to install using nix. |
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.
Thank you, this looks cleaner (though I'm no Nix expert)!
I have tested (with a 25 min Nix build :'( ) and this seems to work with Stack
@@ -0,0 +1,39 @@ | |||
{ sources ? import ./sources.nix }: |
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 do you guys think about adding nixfmt
to shell.nix
packages and use it on all Nix files? This solves all formatting concerns.
This may also help, as e.g. here the let .. in ..
was not aligned and I had slight trouble understanding 😅
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.
You are welcome to do this, please send a PR!
```shell | ||
$ cachix use haskell-language-server | ||
$ nix-shell | ||
$ cabal update |
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.
The Cabal part is unrelated to Nix, as one can use Nix with Stack. How about removing the 2 Cabal commands?
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 Nix script is specifically targeted at using with cabal build
The haskell-updates branch is already on Stackage nightly, which allows for a much better cache hit rate (assuming haskell-updates is backed by a Hydra cache, which I'm not quite sure of).
Adds support for auth tokens
Did you try to setup the Cachix binary cache? It should have downloaded all the artefacts for you (and stack will happily ignore them, but at least you don't have to wait for Nix) |
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>