2021-03-09 03:18:52 +00:00
|
|
|
{ mkDerivation, fetchFromGitHub, makeWrapper, lib, php }:
|
2020-10-16 20:44:37 +00:00
|
|
|
let
|
|
|
|
pname = "php-parallel-lint";
|
2022-05-18 14:49:53 +00:00
|
|
|
version = "1.3.2";
|
2020-10-16 20:44:37 +00:00
|
|
|
in
|
|
|
|
mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-05-18 14:49:53 +00:00
|
|
|
owner = "php-parallel-lint";
|
2020-10-16 20:44:37 +00:00
|
|
|
repo = "PHP-Parallel-Lint";
|
|
|
|
rev = "v${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
sha256 = "sha256-pTHH19HwqyOj5pSmH7l0JlntNVtMdu4K9Cl+qyrrg9U=";
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-03-09 03:18:52 +00:00
|
|
|
makeWrapper
|
2020-10-16 20:44:37 +00:00
|
|
|
php.packages.composer
|
|
|
|
php.packages.box
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
runHook preBuild
|
2020-10-16 20:44:37 +00:00
|
|
|
composer dump-autoload
|
|
|
|
box build
|
2022-03-30 09:31:56 +00:00
|
|
|
runHook postBuild
|
2020-10-16 20:44:37 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
runHook preInstall
|
2020-10-16 20:44:37 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
install -D parallel-lint.phar $out/libexec/php-parallel-lint/php-parallel-lint.phar
|
|
|
|
makeWrapper ${php}/bin/php $out/bin/php-parallel-lint \
|
|
|
|
--add-flags "$out/libexec/php-parallel-lint/php-parallel-lint.phar"
|
2022-03-30 09:31:56 +00:00
|
|
|
runHook postInstall
|
2020-10-16 20:44:37 +00:00
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
2020-10-16 20:44:37 +00:00
|
|
|
description = "Tool to check syntax of PHP files faster than serial check with fancier output";
|
|
|
|
license = licenses.bsd2;
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/php-parallel-lint/PHP-Parallel-Lint";
|
2020-10-16 20:44:37 +00:00
|
|
|
maintainers = with maintainers; [ jtojnar ] ++ teams.php.members;
|
|
|
|
};
|
|
|
|
}
|