Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 fetchFromGitHub, 3 fetchurl, 4 lib, 5 php, 6 versionCheckHook, 7}: 8 9let 10 pname = "psysh"; 11 version = "0.12.7"; 12 13 src = fetchFromGitHub { 14 owner = "bobthecow"; 15 repo = "psysh"; 16 tag = "v${version}"; 17 hash = "sha256-dgMUz7lB1XoJ08UvF9XMZGVXYcFK9sNnSb+pcwfeoqQ="; 18 }; 19 20 composerLock = fetchurl { 21 name = "composer.lock"; 22 url = "https://github.com/bobthecow/psysh/releases/download/v${version}/composer-v${version}.lock"; 23 hash = "sha256-JYJksHKyKKhU248hLPaNXFCh3X+5QiT8iNKzeGc1ZPw="; 24 }; 25in 26php.buildComposerProject2 (finalAttrs: { 27 inherit 28 pname 29 version 30 src 31 ; 32 33 composerVendor = php.mkComposerVendor { 34 inherit 35 src 36 version 37 pname 38 composerLock 39 ; 40 41 preBuild = '' 42 composer config platform.php 7.4 43 composer require --no-update symfony/polyfill-iconv:1.31 symfony/polyfill-mbstring:1.31 44 composer require --no-update --dev roave/security-advisories:dev-latest 45 composer update --lock --no-install 46 ''; 47 48 vendorHash = "sha256-8l5bQ+VnLOtPUspMN1f+iXo7LldPTuYqyrAeW2aVoH8="; 49 }; 50 51 doInstallCheck = true; 52 nativeInstallCheckInputs = [ versionCheckHook ]; 53 versionCheckProgramArg = "--version"; 54 55 meta = { 56 changelog = "https://github.com/bobthecow/psysh/releases/tag/v${finalAttrs.version}"; 57 description = "PsySH is a runtime developer console, interactive debugger and REPL for PHP"; 58 mainProgram = "psysh"; 59 license = lib.licenses.mit; 60 homepage = "https://psysh.org/"; 61 teams = [ lib.teams.php ]; 62 }; 63})