phpPackages.phpstan: Move to separate directory

This commit is contained in:
Elis Hirwing 2020-10-11 16:45:34 +02:00
parent b3f36d7cd7
commit 2defaa83c0
No known key found for this signature in database
GPG Key ID: D57EFA625C9A925F
2 changed files with 38 additions and 33 deletions

View File

@ -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;
};
}

View File

@ -49,39 +49,7 @@ in
phpmd = callPackage ../development/php-packages/phpmd { };
phpstan = mkDerivation rec {
version = "0.12.48";
pname = "phpstan";
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;
};
};
phpstan = callPackage ../development/php-packages/phpstan { };
psalm = mkDerivation rec {
version = "3.11.2";