2021-03-09 03:18:52 +00:00
|
|
|
{ mkDerivation, fetchurl, lib, php, makeWrapper }:
|
2020-10-16 20:44:37 +00:00
|
|
|
let
|
|
|
|
pname = "phpcbf";
|
2020-10-27 00:29:36 +00:00
|
|
|
version = "3.5.8";
|
2020-10-16 20:44:37 +00:00
|
|
|
in
|
|
|
|
mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${version}/phpcbf.phar";
|
2020-10-27 00:29:36 +00:00
|
|
|
sha256 = "15ci30yvw3p9zlmzsk9s4mxzb3wax3gl9p55slhf1bzwn1xxwyb0";
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = [ "installPhase" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -D $src $out/libexec/phpcbf/phpcbf.phar
|
|
|
|
makeWrapper ${php}/bin/php $out/bin/phpcbf \
|
|
|
|
--add-flags "$out/libexec/phpcbf/phpcbf.phar"
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
2020-10-16 20:44:37 +00:00
|
|
|
description = "PHP coding standard beautifier and fixer";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
homepage = "https://squizlabs.github.io/PHP_CodeSniffer/";
|
|
|
|
maintainers = with maintainers; [ cmcdragonkai ] ++ teams.php.members;
|
|
|
|
};
|
|
|
|
}
|