style(treewide): Switch to nixfmt
This commit is contained in:
parent
4b0e6f0a8c
commit
82c1d22d3d
8 changed files with 154 additions and 126 deletions
|
|
@ -2,26 +2,31 @@
|
|||
self,
|
||||
lib,
|
||||
stdenv,
|
||||
alejandra,
|
||||
nixfmt-rfc-style,
|
||||
deadnix,
|
||||
statix,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib) sourceFilesBySuffices;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
dontPatch = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontInstall = true;
|
||||
doCheck = true;
|
||||
stdenv.mkDerivation {
|
||||
dontPatch = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontInstall = true;
|
||||
doCheck = true;
|
||||
|
||||
name = "lint-nix";
|
||||
src = sourceFilesBySuffices self [".nix"];
|
||||
checkInputs = [alejandra deadnix statix];
|
||||
checkPhase = ''
|
||||
mkdir -p $out
|
||||
alejandra --check . | tee $out/alejandra.log
|
||||
deadnix --fail | tee $out/deadnix.log
|
||||
statix check | tee $out/statix.log
|
||||
'';
|
||||
}
|
||||
name = "lint-nix";
|
||||
src = sourceFilesBySuffices self [ ".nix" ];
|
||||
checkInputs = [
|
||||
nixfmt-rfc-style
|
||||
deadnix
|
||||
statix
|
||||
];
|
||||
checkPhase = ''
|
||||
mkdir -p $out
|
||||
nixfmt --strict --check . | tee $out/nixfmt.log
|
||||
deadnix --fail | tee $out/deadnix.log
|
||||
statix check | tee $out/statix.log
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue