Under the hood

Under the hood

See this tutorial to understand what it takes to package a Haskell application without haskell-flake.

When nixifying a Haskell project without flake-parts (thus without haskell-flake) you would generally use the raw Haskell infrastructure from nixpkgs. haskell-flake uses these functions, while exposing a simpler modular API on top: your flake.nix becomes more declarative and less imperative.

In addition, compared to using plain nixpkgs, haskell-flake supports:

  • Auto-detection of local packages based on cabal.project file (via haskell-parsers)
  • Parse executables from .cabal file, to create Flake apps.
  • Modular interface to pkgs.haskell.lib.compose.* (via packages and settings submodules)
  • Composition of dependency overrides, and other project settings, via Project modules

See Getting Started for getting started with haskell-flake.