I wish to keep all the Nix code (
flake.nix) as small and simple as possible. This is why much of the Nix is delegated to
haskell-flake. Consequently, it also becomes easier for the user to do some Nix-based Haskell workflows (I’m yet to document these).
- Flake checks for Haskell
Adding library dependencies
Build it using
callCabal2nixand assign it to the
emaname in the Haskell package set by adding it to the
overridesargument of your
flake.nixthat is using
Step (3) above will try to fetch the package from the Haskell package set in nixpkgs (the one that is pinned in
flake.lock), and this package set (which is ultimately derived from Stackage sets) sometimes may not have the package you are looking for. A common reason is that it is marked as “broken” or it simply doesn’t exist. In such cases, you will have to override the package in the
haskell-flake(see the next section).