Skip to content

Commit

Permalink
Add git-hooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurnevsky committed Dec 31, 2024
1 parent b9b82c9 commit c4b9fac
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 5 deletions.
83 changes: 80 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 18 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@
repo = "llama.cpp";
inputs.nixpkgs.follows = "nixpkgs";
};

git-hooks = {
type = "github";
owner = "cachix";
repo = "git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs =
Expand Down Expand Up @@ -222,7 +229,7 @@
(llamaOverride pkgs config (
inputs.llama-cpp.packages.${pkgs.system}.rocm.override {
# TODO: rocm is broken in nixpkgs
rocmPackages = pkgs.rocmPackages;
inherit (pkgs) rocmPackages;
rocmGpuTargets = gpuTargets;
}
))
Expand Down Expand Up @@ -312,5 +319,15 @@
# nix build -L '/etc/nixos#phone-vm' && ./result -enable-kvm -smp 2
phone-vm = inputs.self.nixosConfigurations.pinephone-vm.config.mobile.outputs.uefi.vm;
});
checks = forAllSystems (system: {
pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt-rfc-style.enable = true;
deadnix.enable = true;
statix.enable = true;
};
};
});
};
}
2 changes: 1 addition & 1 deletion modules/wine-ge.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ in
embedInstallers = true;
};
}).overrideAttrs
(old: {
(_old: {
NIX_CFLAGS_COMPILE = [
"-Wno-error=incompatible-pointer-types"
];
Expand Down

0 comments on commit c4b9fac

Please sign in to comment.