VinylRecords / Vinyl

Extensible Records for Haskell. Pull requests welcome! Come visit us on #vinyl on freenode.
http://hackage.haskell.org/package/vinyl
MIT License
260 stars 49 forks source link

How to build? #140

Closed malte-v closed 4 years ago

malte-v commented 4 years ago

This may be a terribly stupid question, but how exactly am I supposed to build this library? stack build fails because the shell.nix file referenced by stack.yaml doesn't exist. nix-build also doesn't work since default.nix takes all dependencies as arguments... I don't know much about nix so please bear with me. Any ideas? Thanks!

acowley commented 4 years ago

I suppose the easiest way to build would be using cabal-install. The stack.yaml needs updating; we could either remove the nix parts and make it a more standard stack build, or, if you want to use stack with nix, we can fix that path in case it's broken. If you want to use nix on its own, then what you would typically do is have a shell.nix that applies something like haskellPackages.callPackage to the default.nix.

But if you don't want to use nix, don't feel obligated to! Let me know which build tool you'd like to use, and we'll make sure it's all squared away.

malte-v commented 4 years ago

Since we aren't really doing anything fancy with nix, I think stack should be sufficient. The following stack.yaml works for me:

resolver: lts-16.3

packages:
- .

So I guess we could also add Vinyl to Stackage LTS 16.3 while we're at it. I don't think relying solely on cabal-install is a good idea since its behavior depends on your local GHC installation.

acowley commented 4 years ago

Okay, let's make that the stack.yaml. Would you like to open a PR to do that?

malte-v commented 4 years ago

Done. #141