Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.11 31 lines 887 B view raw
1{ mkDerivation, fetchurl, makeWrapper, lib, php }: 2let 3 pname = "php-cs-fixer"; 4 version = "3.0.0"; 5in 6mkDerivation { 7 inherit pname version; 8 9 src = fetchurl { 10 url = "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v${version}/php-cs-fixer.phar"; 11 sha256 = "141rkcr0wbsqnc4s5vg4bk4dmxwigwxa3j0vi5c42b5k1lq3sgwr"; 12 }; 13 14 dontUnpack = true; 15 16 nativeBuildInputs = [ makeWrapper ]; 17 18 installPhase = '' 19 mkdir -p $out/bin 20 install -D $src $out/libexec/php-cs-fixer/php-cs-fixer.phar 21 makeWrapper ${php}/bin/php $out/bin/php-cs-fixer \ 22 --add-flags "$out/libexec/php-cs-fixer/php-cs-fixer.phar" 23 ''; 24 25 meta = with lib; { 26 description = "A tool to automatically fix PHP coding standards issues"; 27 license = licenses.mit; 28 homepage = "http://cs.sensiolabs.org/"; 29 maintainers = with maintainers; [ jtojnar ] ++ teams.php.members; 30 }; 31}