2023-07-15 17:15:38 +00:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, unzip, lib, php81 }:
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "n98-magerun";
|
|
|
|
version = "2.3.0";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "netz98";
|
|
|
|
repo = "n98-magerun1-dist";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-T7wQmEEYMG0J6+9nRt+tiMuihjnjjQ7UWy1C0vKoQY4=";
|
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -D $src/n98-magerun $out/libexec/n98-magerun/n98-magerun-${version}.phar
|
2023-07-15 17:15:38 +00:00
|
|
|
makeWrapper ${php81}/bin/php $out/bin/n98-magerun \
|
2023-02-02 18:25:31 +00:00
|
|
|
--add-flags "$out/libexec/n98-magerun/n98-magerun-${version}.phar" \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ unzip ]}
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The swiss army knife for Magento1/OpenMage developers";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://magerun.net/";
|
|
|
|
changelog = "https://magerun.net/category/magerun/";
|
|
|
|
maintainers = teams.php.members;
|
2023-07-15 17:15:38 +00:00
|
|
|
broken = true; # Not compatible with PHP 8.1, see https://github.com/netz98/n98-magerun/issues/1275
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
}
|