Skip to content

Commit

Permalink
phpPackages.phpunit: init at 10.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
onny committed Feb 19, 2023
1 parent 48d298f commit c927d6d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pkgs/development/php-packages/phpunit/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{ mkDerivation, fetchurl, makeWrapper, lib, php }:

let
pname = "phpunit";
version = "10.0.9";
in
mkDerivation {
inherit pname version;

src = fetchurl {
url = "https://phar.phpunit.de/phpunit-${version}.phar";
hash = "sha256-Z5oS9BiYwroJEKtV4nMAHLAKJkQiiLPwEuN6p9AIhr0=";
};

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
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-10.0.md";
maintainers = with maintainers; [ onny ] ++ teams.php.members;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/php-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ lib.makeScope pkgs.newScope (self: with self; {

phpstan = callPackage ../development/php-packages/phpstan { };

phpunit = callPackage ../development/php-packages/phpunit { };

psalm = callPackage ../development/php-packages/psalm { };

psysh = callPackage ../development/php-packages/psysh { };
Expand Down

0 comments on commit c927d6d

Please sign in to comment.