From 019131c8260d72baa2bafa3d2b97fe14dd63dc5c Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 6 Dec 2017 16:11:28 +0100 Subject: [PATCH] phpPackages.php-cs-fixer: init at 2.8.3 --- pkgs/top-level/php-packages.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 17434f221a65..d2e921d8c5cd 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -347,6 +347,33 @@ let }; }; + php-cs-fixer = pkgs.stdenv.mkDerivation rec { + name = "php-cs-fixer-${version}"; + version = "2.8.3"; + + src = pkgs.fetchurl { + url = "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v${version}/php-cs-fixer.phar"; + sha256 = "1bzf9h9zcgqg5b0hjm4dv4g0ndndalbkrsiwqy8s1w8mrrkxi2im"; + }; + + phases = [ "installPhase" ]; + buildInputs = [ pkgs.makeWrapper ]; + + installPhase = '' + mkdir -p $out/bin + install -D $src $out/libexec/php-cs-fixer/php-cs-fixer.phar + makeWrapper ${php}/bin/php $out/bin/php-cs-fixer \ + --add-flags "$out/libexec/php-cs-fixer/php-cs-fixer.phar" + ''; + + meta = with pkgs.lib; { + description = "A tool to automatically fix PHP coding standards issues"; + license = licenses.mit; + homepage = http://cs.sensiolabs.org/; + maintainers = with maintainers; [ jtojnar ]; + }; + }; + phpcs = pkgs.stdenv.mkDerivation rec { name = "phpcs-${version}"; version = "2.6.0";