about summary refs log tree commit diff
path: root/pkgs/development/php-packages
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2022-02-12 22:39:48 +0100
committerPol Dellaiera <pol.dellaiera@protonmail.com>2022-03-01 08:07:12 +0100
commitff2d50e1ddb4e3dbc2bd3f836096434df34b18ca (patch)
tree5235548fc0c91cade8951adc7b956689f89dc5e1 /pkgs/development/php-packages
parent4c419ef1c68f5ba3424d4cff7c5ea3409e07da71 (diff)
downloadnixlib-ff2d50e1ddb4e3dbc2bd3f836096434df34b18ca.tar
nixlib-ff2d50e1ddb4e3dbc2bd3f836096434df34b18ca.tar.gz
nixlib-ff2d50e1ddb4e3dbc2bd3f836096434df34b18ca.tar.bz2
nixlib-ff2d50e1ddb4e3dbc2bd3f836096434df34b18ca.tar.lz
nixlib-ff2d50e1ddb4e3dbc2bd3f836096434df34b18ca.tar.xz
nixlib-ff2d50e1ddb4e3dbc2bd3f836096434df34b18ca.tar.zst
nixlib-ff2d50e1ddb4e3dbc2bd3f836096434df34b18ca.zip
php.packages.grumphp: init at 1.8.1
Diffstat (limited to 'pkgs/development/php-packages')
-rw-r--r--pkgs/development/php-packages/grumphp/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/php-packages/grumphp/default.nix b/pkgs/development/php-packages/grumphp/default.nix
new file mode 100644
index 000000000000..e9b88d8155e2
--- /dev/null
+++ b/pkgs/development/php-packages/grumphp/default.nix
@@ -0,0 +1,31 @@
+{ 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;
+  };
+}