chore: add gdformat check to flake
This commit is contained in:
24
flake.nix
24
flake.nix
@@ -46,6 +46,30 @@
|
||||
}
|
||||
);
|
||||
|
||||
checks = forAllSystems (
|
||||
{ pkgs }:
|
||||
{
|
||||
gdformat = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "gdformat-check";
|
||||
src = pkgs.lib.sources.sourceFilesBySuffices (pkgs.lib.cleanSource ./.) [ ".gd" ];
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
gdtoolkit_4
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
export HOME=$(mktemp -d)
|
||||
find . -name "*.gd" -print0 | xargs -0 gdformat --check
|
||||
echo "All .gd files are properly formatted"
|
||||
'';
|
||||
installPhase = "mkdir $out";
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
packages = forAllSystems (
|
||||
{ pkgs }:
|
||||
let
|
||||
|
Reference in New Issue
Block a user