-
Notifications
You must be signed in to change notification settings - Fork 247
Improve support for external Hackage repositories #1370
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
This change builds #535. `repository` blocks in `cabal.project` parsed and `cabal` is used to automatically downloaded them. Then `hackage-to-nix` is used to produce the nix required. To make it work with restricted eval (on hydra for instance) we need to include a sha256 like this: ``` repository ghcjs-overlay url: https://input-output-hk.github.io/hackage-overlay-ghcjs secure: True root-keys: key-threshold: 0 --sha256: sha256-EPlLYPmIGtxeahlOspRzwJv+60N5mqrNC2BY4jZKceE= ``` To find the correct `sha256` put in an invalid one and attempt a build.
bors try |
tryBuild failed: |
bors try |
born try- |
bors try- |
bors try |
Can we do the same thing with the |
tryBuild succeeded: |
bors try |
tryTimed out. |
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.
Sorry, lots of comments 😅
This all makes me want to rewrite cabal-project-parser
in something other than Nix :/ Maybe it would actually make sense to teach nix-tools
a command to process cabal projects that could do some of this stuff...
It would be nice if we could have a fixed output derivation that used cabal and nix-tools to get:
It is kind of annoying that |
bors try |
tryTimed out. |
Yeah, but even writing an ad-hoc parser in Haskell would be better than doing it in 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.
Changes look great!
This change builds on #535.
repository
blocks incabal.project
parsed andcabal
is used to automatically downloaded them. Thenhackage-to-nix
is used to produce the nix required.To make it work with restricted eval (on hydra for instance) we need to include a sha256 like this:
To find the correct
sha256
put in an invalid one and attempt a build.