gemini-cli-bin: 0.22.5 -> 0.24.4 and use ripgrep from nixpkgs (#479314)

This commit is contained in:
kirillrdy
2026-01-19 09:36:10 +00:00
committed by GitHub
+13 -3
View File
@@ -6,21 +6,25 @@
sysctl,
writableTmpDirAsHomeHook,
nix-update-script,
ripgrep,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "gemini-cli-bin";
version = "0.22.5";
version = "0.24.4";
src = fetchurl {
url = "https://github.com/google-gemini/gemini-cli/releases/download/v${finalAttrs.version}/gemini.js";
hash = "sha256-g6b45+EWBiZ6Ij0nXp0L5jBW8wv1y0KK5CgiThk8Y7U=";
hash = "sha256-xteIV43P5qPOamxsGjCXeCkd1zQmNNbMhvzSWc26DQU=";
};
dontUnpack = true;
strictDeps = true;
buildInputs = [ nodejs ];
buildInputs = [
nodejs
ripgrep
];
installPhase = ''
runHook preInstall
@@ -37,6 +41,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
--replace-fail "settings.merged.general?.disableAutoUpdate ?? false" "settings.merged.general?.disableAutoUpdate ?? true" \
--replace-fail "settings.merged.general?.disableAutoUpdate" "(settings.merged.general?.disableAutoUpdate ?? true)"
# use `ripgrep` from `nixpkgs`, more dependencies but prevent downloading incompatible binary on NixOS
# this workaround can be removed once the following upstream issue is resolved:
# https://github.com/google-gemini/gemini-cli/issues/11438
substituteInPlace $out/bin/gemini \
--replace-fail 'const existingPath = await resolveExistingRgPath();' 'const existingPath = "${lib.getExe ripgrep}";'
runHook postInstall
'';