flakelight-php/checks/psalm.nix
2025-10-25 20:20:29 +02:00

31 lines
440 B
Nix

{
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
'';
}