feat: add gemini-cli to x1 system and overlays

- Introduced `gemini-cli` as a CLI tool in the x1 configuration.
- Added a new overlay for `gemini-cli` package with npm dependencies.
- Removed `goose-cli` and `aider-chat` from the existing application list.
This commit is contained in:
Harald Hoyer 2025-06-26 13:50:06 +02:00
parent 925c991a11
commit 620ac9bd68
5 changed files with 5321 additions and 2 deletions

View file

@ -8,6 +8,7 @@ final: prev: {
# goose-cli = channels.unstable.callPackage ./goose.nix { };
claude-code = channels.unstable.callPackage ./claude-code/package.nix { };
gemini-cli = channels.unstable.callPackage ./gemini-cli/package.nix { };
# vscode-extensions = channels.unstable.vscode-extensions // {
# rooveterinaryinc = { roo-cline = channels.unstable.callPackage ./roo-code.nix { }; };
# };

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,50 @@
{ 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";
};
}

View file

@ -0,0 +1,16 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nodePackages.npm nix-update
set -euo pipefail
version=$(npm view @google/gemini-cli version)
# Generate updated lock file
cd "$(dirname "${BASH_SOURCE[0]}")"
npm i --package-lock-only @google/gemini-cli@"$version"
rm -f package.json
# Update version and hashes
cd -
nix-update gemini-cli --version "$version"

View file

@ -86,8 +86,7 @@ with lib.metacfg;
logseq
claude-code
claude-desktop-with-fhs
goose-cli
aider-chat
gemini-cli
vscode
uv
# (vscode-with-extensions.override {