2021-02-27 10:29:20 +00:00
|
|
|
{ mkDerivation, fetchFromGitHub, makeWrapper, lib, php }:
|
2020-10-11 15:41:30 +01:00
|
|
|
let
|
|
|
|
pname = "php-parallel-lint";
|
|
|
|
version = "1.0.0";
|
|
|
|
in
|
|
|
|
mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JakubOnderka";
|
|
|
|
repo = "PHP-Parallel-Lint";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "16nv8yyk2z3l213dg067l6di4pigg5rd8yswr5xgd18jwbys2vnw";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-02-27 10:29:20 +00:00
|
|
|
makeWrapper
|
2020-10-11 15:41:30 +01:00
|
|
|
php.packages.composer
|
|
|
|
php.packages.box
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2022-03-13 15:37:51 +00:00
|
|
|
runHook preBuild
|
2020-10-11 15:41:30 +01:00
|
|
|
composer dump-autoload
|
|
|
|
box build
|
2022-03-13 15:37:51 +00:00
|
|
|
runHook postBuild
|
2020-10-11 15:41:30 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-13 15:37:51 +00:00
|
|
|
runHook preInstall
|
2020-10-11 15:41:30 +01: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-13 15:37:51 +00:00
|
|
|
runHook postInstall
|
2020-10-11 15:41:30 +01:00
|
|
|
'';
|
|
|
|
|
2021-02-27 10:29:20 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 15:41:30 +01:00
|
|
|
description = "Tool to check syntax of PHP files faster than serial check with fancier output";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
homepage = "https://github.com/JakubOnderka/PHP-Parallel-Lint";
|
|
|
|
maintainers = with maintainers; [ jtojnar ] ++ teams.php.members;
|
|
|
|
};
|
|
|
|
}
|