mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
58 lines
1.7 KiB
Nix
58 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
php,
|
|
majorVersion,
|
|
phpunit,
|
|
testers,
|
|
versionCheckHook,
|
|
}: let
|
|
inherit (lib) concatStringsSep splitString take;
|
|
phpVersion = concatStringsSep "." (take 2 (splitString "." php.version));
|
|
versions = {
|
|
"9" = {
|
|
version = "9.6.25";
|
|
hash = "sha256-DKbInG8zsIa2DFNY5eqW8CKWUhGM0yc3/wppUiizYbg=";
|
|
vendorHash = "sha256-smd7flcNodo73jJxHLDgfjIr1SYrDB8GwkZXJZx5xFc=";
|
|
};
|
|
"10" = {
|
|
version = "10.5.46";
|
|
hash = "sha256-DtQ6CR4RAGKpZcJA9WZ5ud5ztIBTr8MeVTIhFwbGHYc=";
|
|
vendorHash = "sha256-sIb5ybop04xzxuHg7dJtEUcvMNyofMLtMi+IGZk2eU0=";
|
|
};
|
|
"11" = {
|
|
version = "11.5.22";
|
|
hash = "sha256-oXoh/2G0bqPPyvVoQUUdUz8XGyNtRJE3taUFGu2UIsc=";
|
|
vendorHash = "sha256-kW7mVrpyEleIlMx01ohxgqo0XXhuhIFLT2EMYJA1d60=";
|
|
};
|
|
"12" = {
|
|
version = "12.2.1";
|
|
hash = "sha256-D5WI1kv05L8X3Gfw/MCxGdIcqWyWJg68GL9I24z/zIY=";
|
|
vendorHash = "sha256-DBzpwDVCOaw+5rXGLiCHBhKg+kibvBD1XDNFMte3Heo=";
|
|
};
|
|
};
|
|
in
|
|
php.buildComposerProject2 (finalAttrs: {
|
|
pname = "phpunit";
|
|
inherit (versions.${majorVersion}) version vendorHash;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sebastianbergmann";
|
|
repo = "phpunit";
|
|
tag = finalAttrs.version;
|
|
inherit (versions.${majorVersion}) hash;
|
|
};
|
|
|
|
doInstallCheck = false;
|
|
|
|
meta = {
|
|
changelog = "https://github.com/sebastianbergmann/phpunit/blob/${finalAttrs.version}/ChangeLog-${lib.versions.majorMinor finalAttrs.version}.md";
|
|
description = "PHP Unit Testing framework";
|
|
homepage = "https://phpunit.de";
|
|
license = lib.licenses.bsd3;
|
|
mainProgram = "phpunit";
|
|
maintainers = with lib.maintainers; [onny];
|
|
teams = [lib.teams.php];
|
|
};
|
|
})
|