magento-cloud: use versionCheckHook (#419385)

This commit is contained in:
Pol Dellaiera 2025-06-24 07:08:41 +02:00 committed by GitHub
commit 4b1164c321
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,8 @@
fetchurl,
makeBinaryWrapper,
php,
testers,
writableTmpDirAsHomeHook,
versionCheckHook,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "magento-cloud";
@ -32,12 +33,17 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook postInstall
'';
nativeInstallCheckInputs = [
writableTmpDirAsHomeHook
versionCheckHook
];
doInstallCheck = true;
versionCheckProgramArg = "--version";
versionCheckKeepEnvironment = [ "HOME" ];
passthru = {
updateScript = ./update.sh;
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "HOME=$TMPDIR magento-cloud --version";
};
};
meta = {