lol

gemini-cli-bin: add installCheckPhase

The original check on `gemini mcp list` output was simplified
as suggested by the co-author to check the `gemini -v` exit code instead.

Co-authored-by: ljxfstorm <ljxf.storm@live.cn>

+15
+15
pkgs/by-name/ge/gemini-cli-bin/package.nix
··· 3 3 stdenvNoCC, 4 4 fetchurl, 5 5 nodejs, 6 + writableTmpDirAsHomeHook, 6 7 nix-update-script, 7 8 }: 8 9 stdenvNoCC.mkDerivation (finalAttrs: { ··· 17 18 phases = [ 18 19 "installPhase" 19 20 "fixupPhase" 21 + "installCheckPhase" 20 22 ]; 21 23 22 24 strictDeps = true; ··· 29 31 install -D "$src" "$out/bin/gemini" 30 32 31 33 runHook postInstall 34 + ''; 35 + 36 + doInstallCheck = true; 37 + nativeInstallCheckInputs = [ 38 + writableTmpDirAsHomeHook 39 + ]; 40 + # versionCheckHook cannot be used because the reported version might be incorrect (e.g., 0.6.1 returns 0.6.0). 41 + installCheckPhase = '' 42 + runHook preInstallCheck 43 + 44 + "$out/bin/gemini" -v 45 + 46 + runHook postInstallCheck 32 47 ''; 33 48 34 49 passthru.updateScript = nix-update-script {