ShatteredPrism/nix/dev.nix
seth 4c81d8c53d
style(nix): format with nixfmt
Signed-off-by: seth <getchoo@tuta.io>
2024-08-21 03:49:36 -04:00

48 lines
894 B
Nix

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