depot/third_party/nixpkgs/pkgs/development/php-packages/psalm/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

33 lines
849 B
Nix

{ mkDerivation, fetchurl, makeWrapper, lib, php }:
let
pname = "psalm";
version = "4.25.0";
in
mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/vimeo/psalm/releases/download/v${version}/psalm.phar";
sha256 = "sha256-bEv9YzBycN+fs3DeAU/QpuOvsmUFLgrltGEe2KuUM0c=";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -D $src $out/libexec/psalm/psalm.phar
makeWrapper ${php}/bin/php $out/bin/psalm \
--add-flags "$out/libexec/psalm/psalm.phar"
runHook postInstall
'';
meta = with lib; {
description = "A static analysis tool for finding errors in PHP applications";
license = licenses.mit;
homepage = "https://github.com/vimeo/psalm";
maintainers = teams.php.members;
};
}