2021-02-27 10:29:20 +00:00
|
|
|
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
2020-10-11 15:46:49 +01:00
|
|
|
let
|
|
|
|
pname = "psysh";
|
2020-10-24 09:38:16 +01:00
|
|
|
version = "0.10.4";
|
2020-10-11 15:46:49 +01:00
|
|
|
in
|
|
|
|
mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/bobthecow/psysh/releases/download/v${version}/psysh-v${version}.tar.gz";
|
2020-10-24 09:38:16 +01:00
|
|
|
sha256 = "005xh5rz12bsy9yvzzr69zpr0p7v4sh6cafhpinpfrvbwfq068f1";
|
2020-10-11 15:46:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = [ "installPhase" ];
|
2021-02-27 10:29:20 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-10-11 15:46:49 +01: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-02-27 10:29:20 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 15:46:49 +01: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;
|
|
|
|
};
|
|
|
|
}
|