I’ve been developing Haskell projects using a combination of the following which I really enjoy using,
Nix (for reproducible dev environment)
Nix Flakes (improved workflow in Nix, especially for pinning)
VSCode + haskell-language-server (for IDE support)
ormolu for autoformatting
Relude as prelude
ghcid for quick reloading
So I decided to create a Git template for re-use in future Haskell projects, and thought it may be of interest to others.
The README is self-sufficient in that you should be able to get started on all three platforms (For Windows, WSL2 + the Remote - WSL VSCode extension is required).
A small template that demonstrates how to nixify a multi-package Cabal project using nothing but[^1] nixpkgs
Esssentially, pkgs.haskellPackages.extend and shellFor is all you need, in addition to whatever functions provided by pkgs.haskell.lib as appropriate (example).
[^1]: To be fair, the flake.nix uses flake-parts but only for convenience. It is not strictly needed.
Hello, I’m trying to apply haskell-flake to an existing project that uses a FFI and it fails to build. I used nix flake init -t github:srid/haskell-flake, I edited the flake.nix to set the default package name and I get an error saying that there’s an undefined symbol from the FFI when trying to build.
I’m sure I’m missing some configuration parameter to enable this but I haven’t found any information about what it could be. Any ideas?