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