nixpkgs/pkgs/development/php-packages/psysh/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
856 B
Nix
Raw Normal View History

{ mkDerivation, fetchurl, makeWrapper, lib, php }:
let
pname = "psysh";
2022-08-01 05:50:06 +00:00
version = "0.11.8";
in
mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/bobthecow/psysh/releases/download/v${version}/psysh-v${version}.tar.gz";
2022-08-01 05:50:06 +00:00
sha256 = "sha256-VK1e3qQGaN6Kc/5dUaGwrHAqk9yiJCwbW29x6i6nHQ4=";
};
2021-08-01 21:50:58 +00:00
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
2022-03-13 15:37:51 +00:00
runHook preInstall
mkdir -p $out/bin
tar -xzf $src -C $out/bin
chmod +x $out/bin/psysh
wrapProgram $out/bin/psysh --prefix PATH : "${lib.makeBinPath [ php ]}"
2022-03-13 15:37:51 +00:00
runHook postInstall
'';
meta = with lib; {
description = "PsySH is a runtime developer console, interactive debugger and REPL for PHP.";
license = licenses.mit;
homepage = "https://psysh.org/";
maintainers = teams.php.members;
};
}