I’d like to announce the 2nd release of haskell-flake (GitHub - srid/haskell-flake: A `flake-parts` Nix module for Haskell development), which aims to be the simplest way to nixify most Haskell projects.
Release notes are presented below. Another highlight of this release is that we now have project website that aims to document all things Nix & Haskell: https://haskell.flake.page/ (see ‘Basics’ section if you are new to Nix).
- New features
-
#68, #79, #106: Add support for project modules that can be imported in
imports. Export them inflake.haskellFlakeProjectModules. Default modules are exported by default, to reuse overrides and local packages from external flakes. For details, see Project modules – haskell-flake-
#67:
overrideswill be combined usingcomposeManyExtensions, however their order is arbitrary. This is an experimental feature, and a warning will be logged.
-
#67:
- Dev shell
-
#37: Devshell can now be disabled using
devShell.enable = false;(useful if you want haskell-flake to produce just the package outputs) -
#92: Add
devShell.mkShellArgsto pass custom arguments tomkShell -
#111: Add
devShell.extraLibrariesto add custom Haskell libraries to the devshell.
-
#37: Devshell can now be disabled using
-
#63, #52: Add
config.haskellProjects.${name}.outputscontaining all flake outputs for that project; as well as (#102)finalPackagesandlocalPackages. -
#49 & #91 & #110: The default value for the
packagesoption is now determined from thecabal.projectfile. If it doesn’t exist, it looks for top-level.cabalfile orpackage.yaml. Better hpack support throughout. -
#100:
source-overridesoption now supports specifying Hackage versions as string. - #114: Prevent unnecessary Nix rebuilds of packages in sub-directories when parent contents change.
-
#68, #79, #106: Add support for project modules that can be imported in
- API changes
-
#37: Group
buildTools(renamed totools),hlsCheckandhlintCheckunder the newdevShellsubmodule option - #64: Remove hlintCheck (use treefmt-nix instead)
-
#52: Rename
haskellPackagestobasePackages. Overlays are applied on top ofbasePackage– usingsource-overrides,overrides,packagesin that order – to producefinalPackages. -
#69: The default flake template creates
flake.nixonly, while the#exampleone creates the full Haskell project template.
-
#37: Group