fix(shell): No need to patch git-hooks anymore
Some checks failed
Check meta / check_meta (pull_request) Successful in 28s
lint / check (push) Successful in 48s
Check meta / check_dns (pull_request) Successful in 1m15s
build configuration / build_compute01 (pull_request) Failing after 10m20s
build configuration / push_to_cache_compute01 (pull_request) Has been skipped
build configuration / build_rescue01 (pull_request) Successful in 23m31s
build configuration / build_geo01 (pull_request) Successful in 14m26s
build configuration / build_web02 (pull_request) Successful in 23m58s
build configuration / build_vault01 (pull_request) Successful in 24m51s
lint / check (pull_request) Successful in 31s
build configuration / build_geo02 (pull_request) Successful in 1m41s
build configuration / build_bridge01 (pull_request) Successful in 2m17s
build configuration / build_web01 (pull_request) Successful in 26m51s
build configuration / build_storage01 (pull_request) Successful in 34m34s
build configuration / push_to_cache_storage01 (pull_request) Successful in 4m3s
build configuration / push_to_cache_geo02 (pull_request) Successful in 1m52s
build configuration / push_to_cache_geo01 (pull_request) Successful in 1m55s
build configuration / push_to_cache_bridge01 (pull_request) Successful in 1m58s
build configuration / push_to_cache_rescue01 (pull_request) Failing after 2m11s
build configuration / push_to_cache_web02 (pull_request) Successful in 2m2s
build configuration / push_to_cache_web01 (pull_request) Failing after 2m53s

This commit is contained in:
Tom Hubrecht 2024-09-10 21:10:55 +02:00
parent 06285b9108
commit 3014fb79dc
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc
2 changed files with 11 additions and 61 deletions

View file

@ -41,33 +41,19 @@
}:
let
git-checks =
(import (
pkgs.applyPatches {
name = "git-hooks.nix";
src = builtins.storePath sources.git-hooks;
patches = [ ./patches/00-git-hooks-nixfmt.patch ];
}
)).run
{
src = ./.;
git-checks = (import (builtins.storePath sources.git-hooks)).run {
src = ./.;
hooks = {
# Nix Hooks
statix.enable = true;
deadnix.enable = true;
rfc101 = {
enable = true;
hooks = {
# Nix Hooks
statix.enable = true;
deadnix.enable = true;
nixfmt-rfc-style.enable = true;
name = "RFC-101 formatting";
entry = "${pkgs.lib.getExe pkgs.nixfmt-rfc-style}";
files = "\\.nix$";
};
# Misc Hooks
commitizen.enable = true;
};
};
# Misc Hooks
commitizen.enable = true;
};
};
in
{

View file

@ -1,36 +0,0 @@
diff --git a/modules/hooks.nix b/modules/hooks.nix
index bb194ee..8505794 100644
--- a/modules/hooks.nix
+++ b/modules/hooks.nix
@@ -2848,7 +2848,7 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
{
name = "nixfmt";
description = "Nix code prettifier.";
- package = tools.nixfmt;
+ package = tools.nixfmt-classic;
entry = "${hooks.nixfmt.package}/bin/nixfmt ${lib.optionalString (hooks.nixfmt.settings.width != null) "--width=${toString hooks.nixfmt.settings.width}"}";
files = "\\.nix$";
};
diff --git a/nix/tools.nix b/nix/tools.nix
index 9bcc89d..9fec5d5 100644
--- a/nix/tools.nix
+++ b/nix/tools.nix
@@ -44,7 +44,7 @@
, mdl
, mdsh
, nil
-, nixfmt
+, nixfmt-classic
, nixpkgs-fmt
, nodePackages
, ocamlPackages
@@ -131,7 +131,7 @@ in
mdl
mdsh
nil
- nixfmt
+ nixfmt-classic
nixpkgs-fmt
ormolu
pre-commit-hook-ensure-sops