I’d like to announce the 2nd release of haskell-flake (GitHub - srid/haskell-flake: A `flake-parts` Nix module for Haskell development), which provides a flake-parts module (wrapping what’s already in nixpkgs) for Haskell packaging and development.
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 Haskell development using haskell-flake – haskell-flake-
#67:
overrides
will 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.mkShellArgs
to pass custom arguments tomkShell
-
#111: Add
devShell.extraLibraries
to add custom Haskell libraries to the devshell.
-
#37: Devshell can now be disabled using
-
#63, #52: Add
config.haskellProjects.${name}.outputs
containing all flake outputs for that project; as well as (#102)finalPackages
andlocalPackages
. -
#49 & #91 & #110: The default value for the
packages
option is now determined from thecabal.project
file. If it doesn’t exist, it looks for top-level.cabal
file orpackage.yaml
. Better hpack support throughout. -
#100:
source-overrides
option 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
),hlsCheck
andhlintCheck
under the newdevShell
submodule option - #64: Remove hlintCheck (use treefmt-nix instead)
-
#52: Rename
haskellPackages
tobasePackages
. Overlays are applied on top ofbasePackage
– usingsource-overrides
,overrides
,packages
in that order – to producefinalPackages
. -
#69: The default flake template creates
flake.nix
only, while the#example
one creates the full Haskell project template.
-
#37: Group