Merge pull request #208084 from apeschar/phan
phpPackages.phan: init at 5.4.1
This commit is contained in:
commit
41064f4288
2 changed files with 44 additions and 0 deletions
42
pkgs/development/php-packages/phan/default.nix
Normal file
42
pkgs/development/php-packages/phan/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ lib
|
||||
, php
|
||||
, mkDerivation
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
}:
|
||||
let
|
||||
php' = php.withExtensions ({ enabled, all }: enabled ++ [ all.ast ]);
|
||||
in
|
||||
mkDerivation rec {
|
||||
pname = "phan";
|
||||
version = "5.4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/phan/phan/releases/download/${version}/phan.phar";
|
||||
hash = "sha256-DJr1BWAfNI3hYvmBui5Dp+n7ec+f+gkOso21KEd6m8I=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
install -D $src $out/libexec/phan/phan.phar
|
||||
makeWrapper ${php'}/bin/php $out/bin/phan \
|
||||
--add-flags "$out/libexec/phan/phan.phar"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Static analyzer for PHP";
|
||||
longDescription = ''
|
||||
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives
|
||||
and attempts to prove incorrectness rather than correctness.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
homepage = "https://github.com/phan/phan";
|
||||
maintainers = [ maintainers.apeschar ];
|
||||
};
|
||||
}
|
|
@ -175,6 +175,8 @@ lib.makeScope pkgs.newScope (self: with self; {
|
|||
|
||||
grumphp = callPackage ../development/php-packages/grumphp { };
|
||||
|
||||
phan = callPackage ../development/php-packages/phan { };
|
||||
|
||||
phing = callPackage ../development/php-packages/phing { };
|
||||
|
||||
phive = callPackage ../development/php-packages/phive { };
|
||||
|
|
Loading…
Reference in a new issue