2021-05-31 23:19:51 +00:00
|
|
|
{
|
2022-05-30 13:16:38 +00:00
|
|
|
description = "srid/haskell-template: Nix template for Haskell projects";
|
2021-05-31 23:19:51 +00:00
|
|
|
inputs = {
|
2022-05-07 00:27:11 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
2022-05-26 11:25:38 +00:00
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
|
2022-05-30 13:16:38 +00:00
|
|
|
haskell-flake.url = "github:srid/haskell-flake";
|
2021-05-31 23:19:51 +00:00
|
|
|
};
|
2022-04-27 22:55:51 +00:00
|
|
|
|
2022-05-30 13:16:38 +00:00
|
|
|
outputs = { self, nixpkgs, flake-parts, haskell-flake, ... }:
|
2022-05-26 11:25:38 +00:00
|
|
|
flake-parts.lib.mkFlake { inherit self; } {
|
2022-05-27 20:31:08 +00:00
|
|
|
systems = nixpkgs.lib.systems.flakeExposed;
|
2022-05-30 13:16:38 +00:00
|
|
|
imports = [
|
|
|
|
haskell-flake.flakeModule
|
|
|
|
];
|
|
|
|
perSystem = { self', pkgs, ... }: {
|
2022-05-30 22:48:39 +00:00
|
|
|
haskellProjects.default = {
|
2022-05-30 13:16:38 +00:00
|
|
|
buildTools = hp: {
|
|
|
|
# TODO: Use https://github.com/numtide/treefmt/pull/169
|
|
|
|
inherit (pkgs)
|
|
|
|
treefmt
|
|
|
|
nixpkgs-fmt;
|
|
|
|
inherit (hp)
|
|
|
|
cabal-fmt
|
|
|
|
fourmolu;
|
2022-04-27 22:55:51 +00:00
|
|
|
};
|
2022-05-26 11:25:38 +00:00
|
|
|
};
|
2022-05-30 13:16:38 +00:00
|
|
|
};
|
2022-05-26 11:25:38 +00:00
|
|
|
};
|
2021-05-31 23:19:51 +00:00
|
|
|
}
|