-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
42 lines (42 loc) · 1.08 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
40
41
42
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/master";
flake-utils.url = "github:numtide/flake-utils";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
};
outputs = {
self,
nixpkgs,
flake-utils,
pre-commit-hooks,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
in
with pkgs; {
checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
fantomas = {
enable = true;
name = "fantomas";
description = "Format your F# code with fantomas.";
entry = "dotnet fantomas";
files = "(\\.fs$)|(\\.fsx$)";
};
};
};
};
devShells.default = mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
packages = [
sqlite
dotnet-sdk_8
nodejs_22
];
DOTNET_ROOT = "${dotnet-sdk_8}";
};
});
}