parent
09928163e0
commit
134332ccf5
3 changed files with 32 additions and 9 deletions
18
flake.lock
generated
18
flake.lock
generated
|
@ -55,7 +55,23 @@
|
|||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"haskell-flake": "haskell-flake",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"treefmt-flake": "treefmt-flake"
|
||||
}
|
||||
},
|
||||
"treefmt-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1660759207,
|
||||
"narHash": "sha256-qr2OrIS6jDpUkc91rmaMoZ+m4RWSDQ/odve9/DLtSsY=",
|
||||
"owner": "srid",
|
||||
"repo": "treefmt-flake",
|
||||
"rev": "7b2e2975513a5a4a87f9b87926de3f00722ec67c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "srid",
|
||||
"repo": "treefmt-flake",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
15
flake.nix
15
flake.nix
|
@ -5,26 +5,31 @@
|
|||
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";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-parts, haskell-flake, ... }:
|
||||
outputs = { self, nixpkgs, flake-parts, haskell-flake, treefmt-flake, ... }:
|
||||
flake-parts.lib.mkFlake { inherit self; } {
|
||||
systems = nixpkgs.lib.systems.flakeExposed;
|
||||
imports = [
|
||||
haskell-flake.flakeModule
|
||||
treefmt-flake.flakeModule
|
||||
];
|
||||
perSystem = { self', pkgs, ... }: {
|
||||
perSystem = { self', config, pkgs, ... }: {
|
||||
haskellProjects.default = {
|
||||
root = ./.;
|
||||
buildTools = hp: {
|
||||
inherit (pkgs)
|
||||
treefmt
|
||||
treefmt;
|
||||
} // config.treefmt.formatters;
|
||||
};
|
||||
treefmt.formatters = {
|
||||
inherit (pkgs)
|
||||
nixpkgs-fmt;
|
||||
inherit (hp)
|
||||
inherit (pkgs.haskellPackages)
|
||||
cabal-fmt
|
||||
fourmolu;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ builds:
|
|||
include:
|
||||
- "packages.x86_64-linux.*"
|
||||
- "packages.aarch64-darwin.*"
|
||||
- "checks.x86_64-linux.*"
|
||||
- "checks.aarch64-darwin.*"
|
||||
- "devShells.x86_64-linux.default"
|
||||
- "devShells.aarch64-darwin.default"
|
||||
exclude: []
|
||||
|
|
Loading…
Reference in a new issue