depot/third_party/nixpkgs/pkgs/development/tools/misc/n98-magerun2/default.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

45 lines
1 KiB
Nix

{
stdenv
, fetchurl
, makeBinaryWrapper
, php
, lib
, unzip
}:
stdenv.mkDerivation (finalAttrs: {
pname = "n98-magerun2";
version = "7.3.1";
src = fetchurl {
url = "https://github.com/netz98/n98-magerun2/releases/download/${finalAttrs.version}/n98-magerun2.phar";
hash = "sha256-5G3sfyw8C3BwRqnK2o3upJTI/pENyaFCiMC4XGOkJT4=";
};
dontUnpack = true;
nativeBuildInputs = [
makeBinaryWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/libexec/n98-magerun2
install -D $src $out/libexec/n98-magerun2/n98-magerun2.phar
makeWrapper ${php}/bin/php $out/bin/n98-magerun2 \
--add-flags "$out/libexec/n98-magerun2/n98-magerun2.phar" \
--prefix PATH : ${lib.makeBinPath [ unzip ]}
runHook postInstall
'';
meta = {
changelog = "https://magerun.net/category/magerun/";
description = "The swiss army knife for Magento2 developers";
homepage = "https://magerun.net/";
license = lib.licenses.mit;
maintainers = lib.teams.php.members;
};
})