Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 30 lines 863 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 phases = [ "installPhase" ]; 15 nativeBuildInputs = [ makeWrapper ]; 16 17 installPhase = '' 18 mkdir -p $out/bin 19 install -D $src $out/libexec/phpcbf/phpcbf.phar 20 makeWrapper ${php}/bin/php $out/bin/phpcbf \ 21 --add-flags "$out/libexec/phpcbf/phpcbf.phar" 22 ''; 23 24 meta = with lib; { 25 description = "PHP coding standard beautifier and fixer"; 26 license = licenses.bsd3; 27 homepage = "https://squizlabs.github.io/PHP_CodeSniffer/"; 28 maintainers = with maintainers; [ cmcdragonkai ] ++ teams.php.members; 29 }; 30}