phpPackages.psysh: Move to separate directory and be version specific

This commit is contained in:
Elis Hirwing 2020-10-11 16:46:49 +02:00
parent 8473816508
commit 13c197085f
No known key found for this signature in database
GPG key ID: D57EFA625C9A925F
2 changed files with 31 additions and 26 deletions

View file

@ -0,0 +1,30 @@
{ mkDerivation, fetchurl, pkgs, lib, php }:
let
pname = "psysh";
version = "0.10.3";
in
mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/bobthecow/psysh/releases/download/v${version}/psysh-v${version}.tar.gz";
sha256 = "0glply451fy0g7zbasyp350qvmk2aglrlcrcdd7w0igylgwfkg71";
};
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;
};
}

View file

@ -53,32 +53,7 @@ in
psalm = callPackage ../development/php-packages/psalm { };
psysh = mkDerivation rec {
version = "0.10.3";
pname = "psysh";
src = pkgs.fetchurl {
url = "https://github.com/bobthecow/psysh/releases/download/v${version}/psysh-v${version}.tar.gz";
sha256 = "0glply451fy0g7zbasyp350qvmk2aglrlcrcdd7w0igylgwfkg71";
};
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
'';
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;
};
};
psysh = callPackage ../development/php-packages/psysh { };
};