at 22.05-pre 854 B view raw
1{ mkDerivation, fetchurl, lib, php, makeWrapper }: 2let 3 pname = "phpcbf"; 4 version = "3.6.0"; 5in 6mkDerivation { 7 inherit pname version; 8 9 src = fetchurl { 10 url = "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${version}/phpcbf.phar"; 11 sha256 = "04wb1imm4934mpy2hxcmqh4cn7md1vwmfii39p6mby809325b5z1"; 12 }; 13 14 dontUnpack = true; 15 16 nativeBuildInputs = [ makeWrapper ]; 17 18 installPhase = '' 19 mkdir -p $out/bin 20 install -D $src $out/libexec/phpcbf/phpcbf.phar 21 makeWrapper ${php}/bin/php $out/bin/phpcbf \ 22 --add-flags "$out/libexec/phpcbf/phpcbf.phar" 23 ''; 24 25 meta = with lib; { 26 description = "PHP coding standard beautifier and fixer"; 27 license = licenses.bsd3; 28 homepage = "https://squizlabs.github.io/PHP_CodeSniffer/"; 29 maintainers = with maintainers; [ cmcdragonkai ] ++ teams.php.members; 30 }; 31}