Files
nixpkgs/pkgs/by-name/ps/psysh/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

64 lines
1.5 KiB
Nix

{
fetchFromGitHub,
fetchurl,
lib,
php,
versionCheckHook,
}:
let
pname = "psysh";
version = "0.12.7";
src = fetchFromGitHub {
owner = "bobthecow";
repo = "psysh";
tag = "v${version}";
hash = "sha256-dgMUz7lB1XoJ08UvF9XMZGVXYcFK9sNnSb+pcwfeoqQ=";
};
composerLock = fetchurl {
name = "composer.lock";
url = "https://github.com/bobthecow/psysh/releases/download/v${version}/composer-v${version}.lock";
hash = "sha256-JYJksHKyKKhU248hLPaNXFCh3X+5QiT8iNKzeGc1ZPw=";
};
in
php.buildComposerProject2 (finalAttrs: {
inherit
pname
version
src
;
composerVendor = php.mkComposerVendor {
inherit
src
version
pname
composerLock
;
preBuild = ''
composer config platform.php 7.4
composer require --no-update symfony/polyfill-iconv:1.31 symfony/polyfill-mbstring:1.31
composer require --no-update --dev roave/security-advisories:dev-latest
composer update --lock --no-install
'';
vendorHash = "sha256-8l5bQ+VnLOtPUspMN1f+iXo7LldPTuYqyrAeW2aVoH8=";
};
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
changelog = "https://github.com/bobthecow/psysh/releases/tag/v${finalAttrs.version}";
description = "PsySH is a runtime developer console, interactive debugger and REPL for PHP";
mainProgram = "psysh";
license = lib.licenses.mit;
homepage = "https://psysh.org/";
teams = [ lib.teams.php ];
};
})