chore: update packages and dependencies

- Bumped `claude-code` to version 1.0.35 and updated associated hashes.
- Upgraded `gemini-cli` to version 0.1.7 and refactored its `package.nix`.
- Updated `flake.lock` inputs for `nixpkgs`, `home-manager`, and other dependencies.
This commit is contained in:
Harald Hoyer 2025-06-30 09:49:01 +02:00
parent 620ac9bd68
commit 95259ce47b
5 changed files with 94 additions and 72 deletions

View file

@ -1,43 +1,59 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
, nix-update-script
,
{
lib,
buildNpmPackage,
fetchFromGitHub,
fetchNpmDeps,
writeShellApplication,
cacert,
curl,
gnused,
jq,
nix-prefetch-github,
prefetch-npm-deps,
gitUpdater,
}:
let
buildNpmPackage (finalAttrs: {
pname = "gemini-cli";
version = "0.1.4";
in
buildNpmPackage {
inherit pname version;
version = "0.1.7";
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=";
tag = "v${finalAttrs.version}";
hash = "sha256-DAenod/w9BydYdYsOnuLj7kCQRcTnZ81tf4MhLUug6c=";
};
npmDepsHash = "sha256-RwEQtlwNPSu6WiWPW5N1s7tUNuVjZogN5RTAmNXqjLU=";
npmDeps = fetchNpmDeps {
inherit (finalAttrs) src;
hash = "sha256-otogkSsKJ5j1BY00y4SRhL9pm7CK9nmzVisvGCDIMlU=";
};
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
preConfigure = ''
mkdir -p packages/generated
echo "export const GIT_COMMIT_INFO = { commitHash: '${finalAttrs.src.rev}' };" > packages/generated/git-commit.ts
'';
passthru.updateScript = ./update.sh;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/gemini-cli}
cp -r node_modules $out/share/gemini-cli/
rm -f $out/share/gemini-cli/node_modules/@google/gemini-cli
rm -f $out/share/gemini-cli/node_modules/@google/gemini-cli-core
cp -r packages/cli $out/share/gemini-cli/node_modules/@google/gemini-cli
cp -r packages/core $out/share/gemini-cli/node_modules/@google/gemini-cli-core
ln -s $out/share/gemini-cli/node_modules/@google/gemini-cli/dist/index.js $out/bin/gemini
runHook postInstall
'';
postInstall = ''
chmod +x "$out/bin/gemini"
'';
passthru.updateScript = gitUpdater { };
meta = {
description = "AI agent that brings the power of Gemini directly into your terminal";
@ -47,4 +63,4 @@ buildNpmPackage {
platforms = lib.platforms.all;
mainProgram = "gemini";
};
}
})