Update flake and conventions for 24.05+

This commit is contained in:
Bryan Bennett 2024-06-18 06:52:05 -04:00
parent 33d91a5af4
commit bc779a2764
No known key found for this signature in database
GPG key ID: EE149E4215408DE9
5 changed files with 48 additions and 84 deletions

View file

@ -6,14 +6,17 @@
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; };
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-filter = { url = "github:numtide/nix-filter"; };
};
outputs =
inputs @ { flake-parts
, nix-filter
, pre-commit-hooks
, git-hooks
, ...
}:
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
@ -24,7 +27,7 @@
"x86_64-darwin"
"aarch64-darwin"
];
imports = [ pre-commit-hooks.flakeModule ];
imports = [ git-hooks.flakeModule ];
perSystem =
{ config
, pkgs
@ -60,7 +63,16 @@
check.enable = true;
settings.hooks = {
nixpkgs-fmt.enable = true;
dune-fmt.enable = true;
dune-fmt = {
enable = true;
settings = {
extraRuntimeInputs = [
pkgs.ocamlPackages.reason
];
};
};
};
};
};