2021-02-27 11:29:20 +01:00
|
|
|
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
2020-10-11 16:43:44 +02:00
|
|
|
let
|
|
|
|
pname = "phpcs";
|
2021-05-08 22:17:09 +02:00
|
|
|
version = "3.6.0";
|
2020-10-11 16:43:44 +02:00
|
|
|
in
|
|
|
|
mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${version}/phpcs.phar";
|
2021-05-08 22:17:09 +02:00
|
|
|
sha256 = "0sdi78hrwd3r5p1b38qmp89m41kfszh2qn4n5zhq2dmhsjdhjziz";
|
2020-10-11 16:43:44 +02:00
|
|
|
};
|
|
|
|
|
2021-08-01 23:58:17 +02:00
|
|
|
dontUnpack = true;
|
|
|
|
|
2021-02-27 11:29:20 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-10-11 16:43:44 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -D $src $out/libexec/phpcs/phpcs.phar
|
|
|
|
makeWrapper ${php}/bin/php $out/bin/phpcs \
|
|
|
|
--add-flags "$out/libexec/phpcs/phpcs.phar"
|
|
|
|
'';
|
|
|
|
|
2021-02-27 11:29:20 +01:00
|
|
|
meta = with lib; {
|
2020-10-11 16:43:44 +02:00
|
|
|
description = "PHP coding standard tool";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
homepage = "https://squizlabs.github.io/PHP_CodeSniffer/";
|
|
|
|
maintainers = with maintainers; [ javaguirre ] ++ teams.php.members;
|
|
|
|
};
|
|
|
|
}
|