psalm check

This commit is contained in:
Robin Appelman 2025-10-25 20:13:34 +02:00
commit 341f512bd5
4 changed files with 85 additions and 8 deletions

31
checks/psalm.nix Normal file
View file

@ -0,0 +1,31 @@
{
composerMeta,
src,
psalm,
vendor,
stdenvNoCC,
}: let
inherit (composerMeta) version name;
in
stdenvNoCC.mkDerivation {
inherit src version;
pname = "${name}-psalm";
nativeBuildInputs = [psalm];
postPatch = ''
ln -s ${vendor}/vendor vendor
'';
buildPhase = ''
runHook preBuild
psalm --no-cache
runHook postBuild
'';
installPhase = ''
touch $out
'';
}