tlaternet-webserver/nix/checks/lint-nix.nix

28 lines
553 B
Nix
Raw Permalink Normal View History

2024-01-02 14:06:58 +00:00
{
self,
lib,
stdenv,
alejandra,
deadnix,
statix,
}: let
inherit (lib) sourceFilesBySuffices;
in
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
'';
}