diff options
author | Elis Hirwing <elis@hirwing.se> | 2020-10-11 16:45:34 +0200 |
---|---|---|
committer | Elis Hirwing <elis@hirwing.se> | 2020-10-11 17:04:25 +0200 |
commit | 2defaa83c0c39f88cbeaf40194f9192748e43f11 (patch) | |
tree | 34e29a7e5794c0591d2ce916163c5c2c34d64d8f /pkgs/development/php-packages/phpstan | |
parent | b3f36d7cd7765cc70aac7f28b05957f2c9ad9e92 (diff) |
phpPackages.phpstan: Move to separate directory
Diffstat (limited to 'pkgs/development/php-packages/phpstan')
-rw-r--r-- | pkgs/development/php-packages/phpstan/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/php-packages/phpstan/default.nix b/pkgs/development/php-packages/phpstan/default.nix new file mode 100644 index 0000000000000..2e4b55a58f95e --- /dev/null +++ b/pkgs/development/php-packages/phpstan/default.nix @@ -0,0 +1,37 @@ +{ mkDerivation, fetchurl, pkgs, lib, php }: +let + pname = "phpstan"; + version = "0.12.48"; +in +mkDerivation { + inherit pname version; + + src = pkgs.fetchurl { + url = "https://github.com/phpstan/phpstan/releases/download/${version}/phpstan.phar"; + sha256 = "170yzz23lyipyckv8y2x9masv5qdmbskwwlbfc8750xb3g2q7pzl"; + }; + + phases = [ "installPhase" ]; + nativeBuildInputs = [ pkgs.makeWrapper ]; + + installPhase = '' + mkdir -p $out/bin + install -D $src $out/libexec/phpstan/phpstan.phar + makeWrapper ${php}/bin/php $out/bin/phpstan \ + --add-flags "$out/libexec/phpstan/phpstan.phar" + ''; + + meta = with pkgs.lib; { + description = "PHP Static Analysis Tool"; + longDescription = '' + PHPStan focuses on finding errors in your code without actually + running it. It catches whole classes of bugs even before you write + tests for the code. It moves PHP closer to compiled languages in the + sense that the correctness of each line of the code can be checked + before you run the actual line. + ''; + license = licenses.mit; + homepage = "https://github.com/phpstan/phpstan"; + maintainers = teams.php.members; + }; +} |