2023-03-04 12:14:45 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, lib, php }:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "phpunit";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "10.2.6";
|
2023-03-04 12:14:45 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://phar.phpunit.de/phpunit-${version}.phar";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-F2YKbAZtWIgwuFIg+wf57LaWPcY5mzYGR7sNDLH9Bb0=";
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -D $src $out/libexec/phpunit/phpunit.phar
|
|
|
|
makeWrapper ${php}/bin/php $out/bin/phpunit \
|
|
|
|
--add-flags "$out/libexec/phpunit/phpunit.phar"
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "PHP Unit Testing framework";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
homepage = "https://phpunit.de";
|
|
|
|
changelog = "https://github.com/sebastianbergmann/phpunit/blob/${version}/ChangeLog-${lib.versions.majorMinor version}.md";
|
|
|
|
maintainers = with maintainers; [ onny ] ++ teams.php.members;
|
2023-04-29 16:46:19 +00:00
|
|
|
platforms = platforms.all;
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
}
|