inductive-lambda/nix/modules/flake-parts/haskell.nix

62 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2024-11-27 16:13:05 +01:00
{ root, inputs, ... }:
{
imports = [
inputs.haskell-flake.flakeModule
];
perSystem = { self', lib, config, pkgs, ... }: {
# Our only Haskell project. You can have multiple projects, but this template
# has only one.
# See https://github.com/srid/haskell-flake/blob/master/example/flake.nix
haskellProjects.default = {
# To avoid unnecessary rebuilds, we filter projectRoot:
# https://community.flake.parts/haskell-flake/local#rebuild
projectRoot = builtins.toString (lib.fileset.toSource {
inherit root;
fileset = lib.fileset.unions [
(root + /src)
(root + /inductive-lambda.cabal)
(root + /LICENSE)
(root + /README.md)
];
});
# The base package set (this value is the default)
# basePackages = pkgs.haskellPackages;
# Packages to add on top of `basePackages`
packages = {
# Add source or Hackage overrides here
# (Local packages are added automatically)
/*
aeson.source = "1.5.0.0" # Hackage version
shower.source = inputs.shower; # Flake input
*/
};
# Add your package overrides here
settings = {
/*
inductive-lambda = {
haddock = false;
};
aeson = {
check = false;
};
*/
};
# Development shell configuration
devShell = {
hlsCheck.enable = false;
};
# What should haskell-flake add to flake outputs?
autoWire = [ "packages" "apps" "checks" ]; # Wire all but the devShell
};
# Default package & app.
packages.default = self'.packages.inductive-lambda;
apps.default = self'.apps.inductive-lambda;
};
}