3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/php-packages/psysh/default.nix

31 lines
855 B
Nix
Raw Normal View History

{ mkDerivation, fetchurl, pkgs, lib, php }:
let
pname = "psysh";
2020-10-24 09:38:16 +01:00
version = "0.10.4";
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";
};
phases = [ "installPhase" ];
nativeBuildInputs = [ pkgs.makeWrapper ];
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 ]}"
'';
meta = with pkgs.lib; {
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;
};
}