2021-03-09 03:18:52 +00:00
|
|
|
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
2020-10-16 20:44:37 +00:00
|
|
|
let
|
|
|
|
pname = "php-cs-fixer";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "3.6.0";
|
2020-10-16 20:44:37 +00:00
|
|
|
in
|
|
|
|
mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v${version}/php-cs-fixer.phar";
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-sbz8uq6nJ6dEL6FHJ01VTrovaJa8bwQ9Ic+dLr7yPnA=";
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
dontUnpack = true;
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
2020-10-16 20:44:37 +00:00
|
|
|
description = "A tool to automatically fix PHP coding standards issues";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "http://cs.sensiolabs.org/";
|
|
|
|
maintainers = with maintainers; [ jtojnar ] ++ teams.php.members;
|
|
|
|
};
|
|
|
|
}
|