n98-magerun: update src
and minor refactor
This commit is contained in:
parent
b235853371
commit
4a97379a91
|
@ -1,39 +1,46 @@
|
|||
{ stdenv, fetchFromGitHub, makeWrapper, unzip, lib, php81 }:
|
||||
{
|
||||
stdenv
|
||||
, fetchurl
|
||||
, makeBinaryWrapper
|
||||
, php
|
||||
, lib
|
||||
, unzip
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
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=";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/netz98/n98-magerun/releases/download/${finalAttrs.version}/n98-magerun-${finalAttrs.version}.phar";
|
||||
hash = "sha256-s+Cdr8zU3VBaBzxOh4nXjqPe+JPPxHWiFOEVS/86qOQ=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [
|
||||
makeBinaryWrapper
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
install -D $src/n98-magerun $out/libexec/n98-magerun/n98-magerun-${version}.phar
|
||||
makeWrapper ${php81}/bin/php $out/bin/n98-magerun \
|
||||
--add-flags "$out/libexec/n98-magerun/n98-magerun-${version}.phar" \
|
||||
|
||||
mkdir -p $out/bin $out/libexec/n98-magerun
|
||||
|
||||
install -D $src $out/libexec/n98-magerun/n98-magerun.phar
|
||||
makeWrapper ${php}/bin/php $out/bin/n98-magerun \
|
||||
--add-flags "$out/libexec/n98-magerun/n98-magerun.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;
|
||||
meta = {
|
||||
broken = true; # Not compatible with PHP 8.1, see https://github.com/netz98/n98-magerun/issues/1275
|
||||
changelog = "https://magerun.net/category/magerun/";
|
||||
description = "The swiss army knife for Magento1/OpenMage developers";
|
||||
homepage = "https://magerun.net/";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = lib.teams.php.members;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue