2022-03-05 16:20:37 +00:00
|
|
|
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
mkDerivation (finalAttrs: {
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "grumphp";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.15.0";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-02-16 17:41:37 +00:00
|
|
|
url = "https://github.com/phpro/grumphp/releases/download/v${finalAttrs.version}/grumphp.phar";
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-EqzJb7DYZb7PnebErLVI/EZLxj0m26cniZlsu1feif0=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
2023-02-16 17:41:37 +00:00
|
|
|
install -D $src $out/libexec/grumphp/grumphp.phar
|
2022-03-05 16:20:37 +00:00
|
|
|
makeWrapper ${php}/bin/php $out/bin/grumphp \
|
2023-02-16 17:41:37 +00:00
|
|
|
--add-flags "$out/libexec/grumphp/grumphp.phar"
|
2022-03-05 16:20:37 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/phpro/grumphp/releases/tag/v${finalAttrs.version}";
|
2022-03-05 16:20:37 +00:00
|
|
|
description = "A PHP code-quality tool";
|
|
|
|
homepage = "https://github.com/phpro/grumphp";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = teams.php.members;
|
|
|
|
};
|
2023-02-16 17:41:37 +00:00
|
|
|
})
|