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": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"haskell-flake": "haskell-flake",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
21
flake.nix
21
flake.nix
|
@ -5,25 +5,30 @@
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
|
flake-parts.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
haskell-flake.url = "github:srid/haskell-flake";
|
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; } {
|
flake-parts.lib.mkFlake { inherit self; } {
|
||||||
systems = nixpkgs.lib.systems.flakeExposed;
|
systems = nixpkgs.lib.systems.flakeExposed;
|
||||||
imports = [
|
imports = [
|
||||||
haskell-flake.flakeModule
|
haskell-flake.flakeModule
|
||||||
|
treefmt-flake.flakeModule
|
||||||
];
|
];
|
||||||
perSystem = { self', pkgs, ... }: {
|
perSystem = { self', config, pkgs, ... }: {
|
||||||
haskellProjects.default = {
|
haskellProjects.default = {
|
||||||
root = ./.;
|
root = ./.;
|
||||||
buildTools = hp: {
|
buildTools = hp: {
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
treefmt
|
treefmt;
|
||||||
nixpkgs-fmt;
|
} // config.treefmt.formatters;
|
||||||
inherit (hp)
|
};
|
||||||
cabal-fmt
|
treefmt.formatters = {
|
||||||
fourmolu;
|
inherit (pkgs)
|
||||||
};
|
nixpkgs-fmt;
|
||||||
|
inherit (pkgs.haskellPackages)
|
||||||
|
cabal-fmt
|
||||||
|
fourmolu;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,8 @@ builds:
|
||||||
include:
|
include:
|
||||||
- "packages.x86_64-linux.*"
|
- "packages.x86_64-linux.*"
|
||||||
- "packages.aarch64-darwin.*"
|
- "packages.aarch64-darwin.*"
|
||||||
|
- "checks.x86_64-linux.*"
|
||||||
|
- "checks.aarch64-darwin.*"
|
||||||
- "devShells.x86_64-linux.default"
|
- "devShells.x86_64-linux.default"
|
||||||
- "devShells.aarch64-darwin.default"
|
- "devShells.aarch64-darwin.default"
|
||||||
exclude: []
|
exclude: []
|
||||||
|
|
Loading…
Reference in a new issue