forked from DGNum/infrastructure
feat(git-hooks): Update
- Patch git-hooks.nix source to rename `nixfmt` to `nixfmt-classic` and avoid annoying warnings when reloading the shell
This commit is contained in:
parent
60267b4ff6
commit
2cb6c24535
3 changed files with 75 additions and 31 deletions
36
patches/00-git-hooks-nixfmt.patch
Normal file
36
patches/00-git-hooks-nixfmt.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue