Resolves https://github.com/fn2006/PollyMC/issues/85 Prism Launcher has refactored a lot of their Nix recently. This includes the changes from https://github.com/PrismLauncher/PrismLauncher/pull/1574, but I'm not 100% sure that's what fixed the issue here, it could have been some other change along the way. Signed-off-by: Evan Goode <mail@evangoo.de>
37 lines
706 B
Nix
37 lines
706 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.pollymc-unwrapped];
|
|
buildInputs = with pkgs; [ccache ninja];
|
|
};
|
|
|
|
formatter = pkgs.alejandra;
|
|
};
|
|
}
|