Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 35 lines 937 B view raw
1{ mkDerivation, fetchurl, makeWrapper, lib, php }: 2 3let 4 pname = "psysh"; 5 version = "0.11.17"; 6in 7mkDerivation { 8 inherit pname version; 9 10 src = fetchurl { 11 url = "https://github.com/bobthecow/psysh/releases/download/v${version}/psysh-v${version}.tar.gz"; 12 sha256 = "sha256-GQhX4vL059ztDb4eqcY1r3jdQS8gQkaQ7/+NMR4jH2M="; 13 }; 14 15 dontUnpack = true; 16 17 nativeBuildInputs = [ makeWrapper ]; 18 19 installPhase = '' 20 runHook preInstall 21 mkdir -p $out/bin 22 tar -xzf $src -C $out/bin 23 chmod +x $out/bin/psysh 24 wrapProgram $out/bin/psysh --prefix PATH : "${lib.makeBinPath [ php ]}" 25 runHook postInstall 26 ''; 27 28 meta = with lib; { 29 changelog = "https://github.com/bobthecow/psysh/releases/tag/v${version}"; 30 description = "PsySH is a runtime developer console, interactive debugger and REPL for PHP."; 31 license = licenses.mit; 32 homepage = "https://psysh.org/"; 33 maintainers = teams.php.members; 34 }; 35}