phpPackages.psysh: Move to separate directory and be version specific
This commit is contained in:
parent
8473816508
commit
13c197085f
30
pkgs/development/php-packages/psysh/default.nix
Normal file
30
pkgs/development/php-packages/psysh/default.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -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 { };
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue