{ lib , buildNpmPackage , fetchFromGitHub , nix-update-script , }: let pname = "gemini-cli"; version = "0.1.4"; in buildNpmPackage { inherit pname version; src = fetchFromGitHub { owner = "google-gemini"; repo = "gemini-cli"; # Currently there's no release tag, use the `package-lock.json` to see # what's the latest version rev = "a8763abfb7eeb91bc48445a5e0a24ab0532a714d"; hash = "sha256-yRzTYr4LHmT9t93I0P4Ewx5kO1E7aeIPVxXvB3A1Ofc="; }; npmDepsHash = "sha256-RwEQtlwNPSu6WiWPW5N1s7tUNuVjZogN5RTAmNXqjLU="; fixupPhase = '' runHook preFixup # Remove broken symlinks find $out -type l -exec test ! -e {} \; -delete 2>/dev/null || true mkdir -p "$out/bin" ln -sf "$out/lib/node_modules/@google/gemini-cli/bundle/gemini.js" "$out/bin/gemini" patchShebangs "$out/bin" "$out/lib/node_modules/@google/gemini-cli/bundle/" runHook postFixup ''; passthru.updateScript = ./update.sh; meta = { description = "AI agent that brings the power of Gemini directly into your terminal"; homepage = "https://github.com/google-gemini/gemini-cli"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ donteatoreo ]; platforms = lib.platforms.all; mainProgram = "gemini"; }; }