2021-03-09 03:18:52 +00:00
|
|
|
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
2020-10-16 20:44:37 +00:00
|
|
|
let
|
|
|
|
pname = "psysh";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.11.1";
|
2020-10-16 20:44:37 +00:00
|
|
|
in
|
|
|
|
mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/bobthecow/psysh/releases/download/v${version}/psysh-v${version}.tar.gz";
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-OiEXI7AVcC5udISfJ41285OBL82mSd1Xb5qhVtG4p9I=";
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
dontUnpack = true;
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
tar -xzf $src -C $out/bin
|
|
|
|
chmod +x $out/bin/psysh
|
|
|
|
wrapProgram $out/bin/psysh --prefix PATH : "${lib.makeBinPath [ php ]}"
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
2020-10-16 20:44:37 +00:00
|
|
|
description = "PsySH is a runtime developer console, interactive debugger and REPL for PHP.";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://psysh.org/";
|
|
|
|
maintainers = with maintainers; [ caugner ] ++ teams.php.members;
|
|
|
|
};
|
|
|
|
}
|