Default options

haskell-flake provides sensible defaults for various options. See defaults.nix.

Overriding defaults

Overriding default local packages

This example shows how to specify Local packages manually.

{
  haskellProjects.default = {
    # Specify local packages manually
    defaults.packages = {
      foo.source = ./foo;
    };
  };
}
Links to this page
  • Local packages

    If you have multiple Haskell packages in sub-directories, you can refer to them in a cabal.project file to have haskell-flake automatically use them as local packages by default:

    If your repository has a single top-level .cabal file, haskell-flake will use it by default. There is no need to specify packages.*.source yourself.

    Local Haskell packages are defined in the packages.*.source option under haskellProjects.<name> module. They are automatically detected if you have a single top-level Cabal package, or multiple Cabal packages defined in a cabal.project file, via default settings.

  • IDE configuration (HLS)

    [!tip] Default options Alternatively, disabling the default options (i.e., haskellProjects.<proj-name>.defaults.enable = false;) automatically removes HLS.

  • Guide