ShatteredPrism/nix/dev.nix
2024-10-26 16:12:01 -04:00

48 lines
890 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_18;
};
devShells.default = pkgs.mkShell {
shellHook = ''
${config.pre-commit.installationScript}
'';
inputsFrom = [ config.packages.fjordlauncher-unwrapped ];
buildInputs = with pkgs; [
ccache
ninja
];
};
formatter = pkgs.alejandra;
};
}