From 3dd6028eb3d1869c186a15e24383e8d54afc6bbe Mon Sep 17 00:00:00 2001 From: ljxfstorm Date: Sat, 4 Apr 2026 09:49:13 +0800 Subject: [PATCH] gemini-cli-bin: drop some outdated workarounds Upstream now reports the correct version and properly distinguishes stable releases from pre-releases. --- pkgs/by-name/ge/gemini-cli-bin/package.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/ge/gemini-cli-bin/package.nix b/pkgs/by-name/ge/gemini-cli-bin/package.nix index b805e04eeac4..9d87c7ac0475 100644 --- a/pkgs/by-name/ge/gemini-cli-bin/package.nix +++ b/pkgs/by-name/ge/gemini-cli-bin/package.nix @@ -76,19 +76,18 @@ stdenvNoCC.mkDerivation (finalAttrs: { ++ lib.optionals (with stdenvNoCC.hostPlatform; isDarwin && isx86_64) [ sysctl ]; - # versionCheckHook cannot be used because the reported version might be incorrect (e.g., 0.6.1 returns 0.6.0). + + # versionCheckHook cannot be used because it assumes the executable is hermetic, + # but we need `nativeInstallCheckInputs` installCheckPhase = '' runHook preInstallCheck - "$out/bin/gemini" -v + "$out/bin/gemini" -v | grep "${finalAttrs.version}" runHook postInstallCheck ''; - passthru.updateScript = nix-update-script { - # Ignore `preview` and `nightly` tags - extraArgs = [ "--version-regex=^v([0-9.]+)$" ]; - }; + passthru.updateScript = nix-update-script { }; meta = { description = "AI agent that brings the power of Gemini directly into your terminal";