nixpkgs/pkgs/development/tools/misc/n98-magerun2/default.nix
Pol Dellaiera 79ffe616fa
n98-magerun2: 6.1.1 -> 7.1.0
Also:
- update `src` and minor refactor
- Context: https://github.com/netz98/n98-magerun2/pull/1281
2023-09-02 10:59:04 +02:00

46 lines
1.0 KiB
Nix

{
stdenv
, fetchurl
, makeBinaryWrapper
, php
, lib
, unzip
}:
stdenv.mkDerivation (finalAttrs: {
pname = "n98-magerun2";
version = "7.1.0";
src = fetchurl {
url = "https://github.com/netz98/n98-magerun2/releases/download/${finalAttrs.version}/n98-magerun2.phar";
hash = "sha256-DE5q1zoWZ4gJSs5JM5cr157oh5ufD1gaNt9X9vtuW/c=";
};
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;
};
})