Quick-quick chop-chop starter kit for multi-component Haskell projects.
Work in progress. I'd like to get it done one day, but am parking it here for the time being. If you're reading this, don't keep your hopes high, I'm a crap programmer and don't have too much time in my hands. But luckily there are plenty of good alternatives:
- Nix Haskell Development (2020). Great discussion about best practices. Some of the guys there turned those ideas into a finger-licking template that should cover common scenarios. Check it out!
- Setting up a Haskell development environment with Nix. Excellent walk through. You could easily lift the code snippets there to whip together your own template.
- Haskell-nix — Cabal files philosophy. Some more ideas about setting up Haskell projects with Nix. Also worth reading: Questions and Answers about Nix for Haskellers.
- haskell.nix. One infrastructure to rule them all. Looks very promising but also still a bit rough around the edges and not beginner friendly. It could become the go-to Haskell starter kit at some point though or perhaps someone else will build such a thing on top of it.
We use Nix to escape dependency hell and reliably get reproducible build and dev environments as well as Docker images. (No Docker can't do that.) The only thing you'll need to install is Nix itself, all the rest is taken care for. Notice if you're on a recent macOS, the recommended installation one-liner is
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
Since we're using the haskell.nix infrastructure instead of Nix's own Haskell packages, we recommended setting up a binary cache as explained by the `haskell.nix** folks themselves, e.g.
$ mkdir -p ~/.config/nix/
$ cat > ~/.config/nix/nix.conf
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
substituters = https://hydra.iohk.io
TODO
Didn't I mention this is work in progress? :-)