generated from srid/haskell-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
39 lines (38 loc) · 1.19 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
description = "srid/lispy: Nix template for Haskell projects";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
haskell-flake.url = "github:srid/haskell-flake";
treefmt-flake.url = "github:srid/treefmt-flake";
check-flake.url = "github:srid/check-flake";
};
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit self; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [
inputs.haskell-flake.flakeModule
inputs.treefmt-flake.flakeModule
inputs.check-flake.flakeModule
];
perSystem = { self', config, pkgs, ... }: {
haskellProjects.default = {
root = ./.;
buildTools = hp: {
inherit (pkgs)
treefmt;
} // config.treefmt.formatters;
# overrides = self: super: {}
enableHLSCheck = true;
};
treefmt.formatters = {
inherit (pkgs)
nixpkgs-fmt;
inherit (pkgs.haskellPackages)
cabal-fmt
fourmolu;
};
};
};
}