PrismLauncher/nix/dev.nix
Sefa Eyeoglu 2918d61b16
refactor(nix): use pre-commit flake module
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-09-04 08:53:10 +02:00

37 lines
712 B
Nix

{
perSystem = {
config,
lib,
pkgs,
...
}: {
pre-commit.settings = {
hooks = {
markdownlint.enable = true;
alejandra.enable = true;
deadnix.enable = true;
nil.enable = true;
clang-format = {
enable = true;
types_or = ["c" "c++" "java" "json" "objective-c"];
};
};
tools.clang-tools = lib.mkForce pkgs.clang-tools_16;
};
devShells.default = pkgs.mkShell {
shellHook = ''
${config.pre-commit.installationScript}
'';
inputsFrom = [config.packages.prismlauncher-unwrapped];
buildInputs = with pkgs; [ccache ninja];
};
formatter = pkgs.alejandra;
};
}