nixpkgs/pkgs/development/php-packages/psalm/default.nix
2020-11-04 04:04:05 +00:00

31 lines
813 B
Nix

{ mkDerivation, fetchurl, pkgs, lib, php }:
let
pname = "psalm";
version = "4.1.0";
in
mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/vimeo/psalm/releases/download/${version}/psalm.phar";
sha256 = "1mpbw9q0fgh6vdfwsm222fz1vi9jrw6l5k1mz4gyv5kxvbyzmn4c";
};
phases = [ "installPhase" ];
nativeBuildInputs = [ pkgs.makeWrapper ];
installPhase = ''
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"
'';
meta = with pkgs.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;
};
}