matrix-media-expanded/flake.nix

40 lines
1.2 KiB
Nix
Raw Normal View History

2021-05-31 23:19:51 +00:00
{
description = "srid/haskell-template: Nix template for Haskell projects";
2021-05-31 23:19:51 +00:00
inputs = {
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";
haskell-flake.url = "github:srid/haskell-flake";
treefmt-flake.url = "github:srid/treefmt-flake";
2021-05-31 23:19:51 +00:00
};
2022-04-27 22:55:51 +00:00
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
2022-05-26 11:25:38 +00:00
flake-parts.lib.mkFlake { inherit self; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [
inputs.haskell-flake.flakeModule
inputs.treefmt-flake.flakeModule
];
perSystem = { self', config, pkgs, ... }: {
haskellProjects.default = {
2022-10-24 21:36:16 +00:00
name = "haskell-template";
2022-05-30 23:07:38 +00:00
root = ./.;
buildTools = hp: {
inherit (pkgs)
treefmt;
} // config.treefmt.formatters;
2022-09-14 20:46:58 +00:00
# overrides = self: super: {}
hlsCheck.enable = true;
hlintCheck.enable = true;
};
treefmt.formatters = {
inherit (pkgs)
nixpkgs-fmt;
inherit (pkgs.haskellPackages)
cabal-fmt
fourmolu;
2022-05-26 11:25:38 +00:00
};
};
2022-05-26 11:25:38 +00:00
};
2021-05-31 23:19:51 +00:00
}