diff options
author | Stanisław Pitucha <git@viraptor.info> | 2022-12-30 09:45:59 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-30 09:45:59 +1100 |
commit | 41064f42880571a2d05e437fc726734d3315d57d (patch) | |
tree | 77efa01556850d751b05a2128c4ad798bbc69274 /pkgs/development/php-packages | |
parent | 247086c9e931068e8feaeaca1f0e98f50d5c53d8 (diff) | |
parent | c8443f71d1fd8c9562355de7596345cae0925b1d (diff) |
Merge pull request #208084 from apeschar/phan
phpPackages.phan: init at 5.4.1
Diffstat (limited to 'pkgs/development/php-packages')
-rw-r--r-- | pkgs/development/php-packages/phan/default.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/php-packages/phan/default.nix b/pkgs/development/php-packages/phan/default.nix new file mode 100644 index 0000000000000..570d96ac2df7b --- /dev/null +++ b/pkgs/development/php-packages/phan/default.nix @@ -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 ]; + }; +} |