3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/php-packages/phpcbf/default.nix

31 lines
863 B
Nix
Raw Normal View History

{ mkDerivation, fetchurl, lib, php, makeWrapper }:
let
pname = "phpcbf";
2021-05-08 21:18:18 +01:00
version = "3.6.0";
in
mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${version}/phpcbf.phar";
2021-05-08 21:18:18 +01:00
sha256 = "04wb1imm4934mpy2hxcmqh4cn7md1vwmfii39p6mby809325b5z1";
};
phases = [ "installPhase" ];
nativeBuildInputs = [ makeWrapper ];
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"
'';
meta = with lib; {
description = "PHP coding standard beautifier and fixer";
license = licenses.bsd3;
homepage = "https://squizlabs.github.io/PHP_CodeSniffer/";
maintainers = with maintainers; [ cmcdragonkai ] ++ teams.php.members;
};
}