Skip to content
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

Make a Nix derivation for hs-abci #3

Open
martyall opened this issue Jul 9, 2019 · 4 comments
Open

Make a Nix derivation for hs-abci #3

martyall opened this issue Jul 9, 2019 · 4 comments
Labels

Comments

@martyall
Copy link
Collaborator

martyall commented Jul 9, 2019

We want to make a Nix derivation for hs-abci since it's the goal to have everything in this project built on Nix. We still want to make use of stack / cabal for incremental builds during development though.

There might be some research here since everyone is kind of new to Nix. Everything I know about it I'm learning from this example.

Please comment here on the strategy.

@martyall
Copy link
Collaborator Author

martyall commented Jul 16, 2019

@safareli safareli removed their assignment Aug 6, 2019
@JonathanLorimer
Copy link

JonathanLorimer commented Aug 14, 2020

I have a little bit of experience with nix, but not a lot. I think a good solution would be this stack:

  • hpack to go from package.yaml -> .cabal file
  • Cabal2Nix to generate a default.nix file for each package
    That would allow the entire project to be "built on Nix"

To generate a derivation it might be useful to follow this skeleton/tutorial for a nix based monorepo. The crux of the monorepo approach is this nix function that traverse directories and picks up .cabal files, then adds those dependencies to the haskell packages in release.nix so that the packages can depend on each other. Then it generates a derivation.

Alternatively, you could just have a release.nix per package, but that might be kind of cumbersome.

@alexfmpe
Copy link
Contributor

@JonathanLorimer There's #53 which I've been using downstream for a while.
I have some WIP commits locally bumping it to keep up with latest stack bump in master but it still needs some cleanup and getting the example apps to build again.

@JonathanLorimer
Copy link

@alexfmpe oh nice, that looks great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants