depot/third_party/nixpkgs/pkgs/development/php-packages/grumphp/default.nix
Default email 8e65f7f0cc Project import generated by Copybara.
GitOrigin-RevId: 062a0c5437b68f950b081bbfc8a699d57a4ee026
2022-03-05 17:20:37 +01:00

31 lines
849 B
Nix

{ mkDerivation, fetchurl, makeWrapper, lib, php }:
mkDerivation rec {
pname = "grumphp";
version = "1.8.1";
src = fetchurl {
url = "https://github.com/phpro/${pname}/releases/download/v${version}/${pname}.phar";
sha256 = "sha256-3XPMyH2F3ZfRr8DmvlBY3Z6uolhaRraQxwKIskIwPq8=";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -D $src $out/libexec/${pname}/grumphp.phar
makeWrapper ${php}/bin/php $out/bin/grumphp \
--add-flags "$out/libexec/${pname}/grumphp.phar"
runHook postInstall
'';
meta = with lib; {
broken = versionOlder php.version "8.0";
description = "A PHP code-quality tool";
homepage = "https://github.com/phpro/grumphp";
license = licenses.mit;
maintainers = teams.php.members;
};
}