1{
2 lib,
3 fetchFromGitHub,
4 nix-update-script,
5 php,
6 phpunit,
7 testers,
8 versionCheckHook,
9}:
10
11php.buildComposerProject2 (finalAttrs: {
12 pname = "phpunit";
13 version = "12.2.7";
14
15 src = fetchFromGitHub {
16 owner = "sebastianbergmann";
17 repo = "phpunit";
18 tag = finalAttrs.version;
19 hash = "sha256-pSmxvDGsD2NFKwP0tA8LTBxfZEXDJFwLACdmK//6Ks8=";
20 };
21
22 vendorHash = "sha256-py1mJRNb8Wcsw9sq0sGZc7lHzi52Ui4HmTUeAvTaXwY=";
23
24 passthru = {
25 updateScript = nix-update-script { };
26 tests.version = testers.testVersion { package = phpunit; };
27 };
28
29 doInstallCheck = true;
30 nativeInstallCheckInputs = [ versionCheckHook ];
31 versionCheckProgramArg = "--version";
32
33 meta = {
34 changelog = "https://github.com/sebastianbergmann/phpunit/blob/${finalAttrs.version}/ChangeLog-${lib.versions.majorMinor finalAttrs.version}.md";
35 description = "PHP Unit Testing framework";
36 homepage = "https://phpunit.de";
37 license = lib.licenses.bsd3;
38 mainProgram = "phpunit";
39 maintainers = with lib.maintainers; [ onny ];
40 teams = [ lib.teams.php ];
41 };
42})