mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 07:04:28 +00:00
31 lines
810 B
Nix
31 lines
810 B
Nix
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
|
let
|
|
pname = "psalm";
|
|
version = "4.7.3";
|
|
in
|
|
mkDerivation {
|
|
inherit pname version;
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/vimeo/psalm/releases/download/${version}/psalm.phar";
|
|
sha256 = "0d8gxkpm4rc00a8br5wzjpglkwx95kr15s4z3cvxyf6iik1j5r47";
|
|
};
|
|
|
|
phases = [ "installPhase" ];
|
|
nativeBuildInputs = [ 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 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;
|
|
};
|
|
}
|