2023-03-04 12:14:45 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, lib, php }:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "phpunit";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "10.1.2";
|
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-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-X6upMANmKU2H8Qs0pOd/uRL2GdH/JPyOAQ/P8Z5yNl8=";
|
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
|
|
|
};
|
|
|
|
}
|