Created
April 20, 2023 19:59
-
-
Save drupol/33402fd50cd1a6119245110852651b57 to your computer and use it in GitHub Desktop.
PHPUnit with new PHP Hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, lib, fetchFromGitHub, php }: | |
stdenv.mkDerivation (finalAttrs: | |
let | |
src = fetchFromGitHub { | |
owner = "sebastianbergmann"; | |
repo = "phpunit"; | |
rev = finalAttrs.version; | |
hash = "sha256-VcQRSss2dssfkJ+iUb5qT+FJ10GHiFDzySigcmuVI+8="; | |
}; | |
in { | |
inherit src; | |
pname = "phpunit"; | |
version = "10.1.0"; | |
composerVendor = php.buildComposerDeps { | |
inherit src; | |
composerLock = ./composer.lock; | |
vendorHash = "sha256-86s/F+/5cBAwBqZ2yaGRM5rTGLmou5//aLRK5SA0WiQ="; | |
}; | |
nativeBuildInputs = [ | |
php.packages.composer | |
php.composerHooks.composerInstallHook | |
]; | |
buildInputs = [ | |
php | |
]; | |
noDevArg = " --no-dev"; | |
noScriptsArg = " --no-scripts"; | |
noPluginsArg = " --no-plugins"; | |
installPhase = '' | |
runHook preInstall | |
ls -la ${finalAttrs.composerVendor}/. | |
mkdir -p $out | |
cp -ar . $out/ | |
runHook postInstall | |
''; | |
meta = with lib; { | |
description = "PHP Unit Testing framework"; | |
license = licenses.bsd3; | |
homepage = "https://phpunit.de"; | |
changelog = "https://github.com/sebastianbergmann/phpunit/blob/${finalAttrs.version}/ChangeLog-${lib.versions.majorMinor finalAttrs.version}.md"; | |
maintainers = with maintainers; [ onny ] ++ teams.php.members; | |
}; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment