depot/third_party/nixpkgs/pkgs/development/tools/misc/phpunit/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

36 lines
980 B
Nix

{ stdenv, fetchurl, makeWrapper, lib, php }:
let
pname = "phpunit";
version = "10.1.2";
in
stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://phar.phpunit.de/phpunit-${version}.phar";
hash = "sha256-X6upMANmKU2H8Qs0pOd/uRL2GdH/JPyOAQ/P8Z5yNl8=";
};
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;
platforms = platforms.all;
};
}