3e2acf8aff
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
30 lines
838 B
Nix
30 lines
838 B
Nix
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
|
let
|
|
pname = "phpcs";
|
|
version = "3.6.0";
|
|
in
|
|
mkDerivation {
|
|
inherit pname version;
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${version}/phpcs.phar";
|
|
sha256 = "0sdi78hrwd3r5p1b38qmp89m41kfszh2qn4n5zhq2dmhsjdhjziz";
|
|
};
|
|
|
|
phases = [ "installPhase" ];
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
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"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "PHP coding standard tool";
|
|
license = licenses.bsd3;
|
|
homepage = "https://squizlabs.github.io/PHP_CodeSniffer/";
|
|
maintainers = with maintainers; [ javaguirre ] ++ teams.php.members;
|
|
};
|
|
}
|