@@ -347,6 +347,33 @@ let
347347 };
348348 };
349349
350+ php-cs-fixer = pkgs.stdenv.mkDerivation rec {
351+ name = "php-cs-fixer-${version}";
352+ version = "2.8.3";
353+
354+ src = pkgs.fetchurl {
355+ url = "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v${version}/php-cs-fixer.phar";
356+ sha256 = "1bzf9h9zcgqg5b0hjm4dv4g0ndndalbkrsiwqy8s1w8mrrkxi2im";
357+ };
358+
359+ phases = [ "installPhase" ];
360+ buildInputs = [ pkgs.makeWrapper ];
361+
362+ installPhase = ''
363+ mkdir -p $out/bin
364+ install -D $src $out/libexec/php-cs-fixer/php-cs-fixer.phar
365+ makeWrapper ${php}/bin/php $out/bin/php-cs-fixer \
366+ --add-flags "$out/libexec/php-cs-fixer/php-cs-fixer.phar"
367+ '';
368+
369+ meta = with pkgs.lib; {
370+ description = "A tool to automatically fix PHP coding standards issues";
371+ license = licenses.mit;
372+ homepage = http://cs.sensiolabs.org/;
373+ maintainers = with maintainers; [ jtojnar ];
374+ };
375+ };
376+
350377 phpcs = pkgs.stdenv.mkDerivation rec {
351378 name = "phpcs-${version}";
352379 version = "2.6.0";