dev: Fix pre-commit check

Flake lock file updates:

• Updated input 'pre-commit-hooks-nix':
    'github:cachix/pre-commit-hooks.nix/0db2e67ee49910adfa13010e7f012149660af7f0' (2024-02-07)
  → 'github:hercules-ci/pre-commit-hooks.nix/d43e4853f578739ac2264eadcd18faa5aeb41889' (2024-03-19)

(cherry picked from commit 32a59f0f81b70a95ec7fda598b5823e96d3f8270)
This commit is contained in:
Robert Hensing 2024-03-19 16:30:24 +01:00
parent 4f12dc0127
commit 08781aeef7
2 changed files with 11 additions and 9 deletions

11
flake.lock generated
View file

@ -293,15 +293,16 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1707297608,
"narHash": "sha256-ADjo/5VySGlvtCW3qR+vdFF4xM9kJFlRDqcC9ZGI8EA=",
"owner": "cachix",
"lastModified": 1710862133,
"narHash": "sha256-+e62qOvW6svSU59SOVniBodNe0WkIYgfwXPazUyEBNE=",
"owner": "hercules-ci",
"repo": "pre-commit-hooks.nix",
"rev": "0db2e67ee49910adfa13010e7f012149660af7f0",
"rev": "d43e4853f578739ac2264eadcd18faa5aeb41889",
"type": "github"
},
"original": {
"owner": "cachix",
"owner": "hercules-ci",
"ref": "rustfmt-all",
"repo": "pre-commit-hooks.nix",
"type": "github"
}

View file

@ -9,7 +9,8 @@
nix-cargo-integration.url = "github:yusdacra/nix-cargo-integration";
nix-cargo-integration.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix";
# https://github.com/cachix/pre-commit-hooks.nix/pull/410
pre-commit-hooks-nix.url = "github:hercules-ci/pre-commit-hooks.nix/rustfmt-all";
pre-commit-hooks-nix.inputs.nixpkgs.follows = "nixpkgs";
};
@ -26,14 +27,14 @@
perSystem = { config, self', inputs', pkgs, ... }: {
packages.nix = inputs'.nix.packages.nix;
pre-commit.settings.hooks.nixpkgs-fmt.enable = true;
# Temporarily disable rustfmt due to configuration issues
# pre-commit.settings.hooks.rustfmt.enable = true;
# Override to pass `--all`
# pre-commit.settings.hooks.rustfmt.entry = lib.mkForce "${pkgs.rustfmt}/bin/cargo-fmt fmt --all --manifest-path ./rust/Cargo.toml -- --color always";
# New configuration for rustfmt
pre-commit.settings.settings.rust.cargoManifestPath = "./rust/Cargo.toml";
devShells.default = pkgs.mkShell {
name = "nix-bindings-devshell";