From 6c1a7d4d0a2a5ff8f3a9061b4c3fae8d76a1eab9 Mon Sep 17 00:00:00 2001 From: Sinclair Mosley Date: Fri, 9 Jan 2026 15:58:11 +1100 Subject: [PATCH] gemini-cli: fix ripgrep path Previously, this package relied on `ensureRgPath()` to locate a bundled `ripgrep` binary. This caused runtime failures in the `SearchText` tool on NixOS (specifically observed on aarch64-linux), as the bundled binary is dynamically linked and lacks required libraries. This change substitutes `gemini-cli`'s internal binary resolution (`ensureRgPath()`) with the absolute path to `ripgrep`'s binary in the Nix store . --- pkgs/by-name/ge/gemini-cli/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/ge/gemini-cli/package.nix b/pkgs/by-name/ge/gemini-cli/package.nix index f59751df35a5..514822ec203d 100644 --- a/pkgs/by-name/ge/gemini-cli/package.nix +++ b/pkgs/by-name/ge/gemini-cli/package.nix @@ -50,6 +50,10 @@ buildNpmPackage (finalAttrs: { # Remove node-pty dependency from packages/core/package.json ${jq}/bin/jq 'del(.optionalDependencies."node-pty")' packages/core/package.json > packages/core/package.json.tmp && mv packages/core/package.json.tmp packages/core/package.json + # Fix ripgrep path for SearchText; ensureRgPath() on its own may return the path to a dynamically-linked ripgrep binary without required libraries + substituteInPlace packages/core/src/tools/ripGrep.ts \ + --replace-fail "await ensureRgPath();" "'${lib.getExe ripgrep}';" + # Ideal method to disable auto-update sed -i '/disableAutoUpdate: {/,/}/ s/default: false/default: true/' packages/cli/src/config/settingsSchema.ts