Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
65 lines
1.5 KiB
Nix
65 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchurl,
|
|
nodejs,
|
|
writableTmpDirAsHomeHook,
|
|
nix-update-script,
|
|
}:
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "gemini-cli-bin";
|
|
version = "0.8.1";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/google-gemini/gemini-cli/releases/download/v${finalAttrs.version}/gemini.js";
|
|
hash = "sha256-SRtl8FPMI0VBz0hzmyvtGYPO3mdnm60gu2zlStb5r98=";
|
|
};
|
|
|
|
phases = [
|
|
"installPhase"
|
|
"fixupPhase"
|
|
"installCheckPhase"
|
|
];
|
|
|
|
strictDeps = true;
|
|
|
|
buildInputs = [ nodejs ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -D "$src" "$out/bin/gemini"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
nativeInstallCheckInputs = [
|
|
writableTmpDirAsHomeHook
|
|
];
|
|
# versionCheckHook cannot be used because the reported version might be incorrect (e.g., 0.6.1 returns 0.6.0).
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
|
|
"$out/bin/gemini" -v
|
|
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
# Ignore `preview` and `nightly` tags
|
|
extraArgs = [ "--version-regex=^v([0-9.]+)$" ];
|
|
};
|
|
|
|
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; [ ljxfstorm ];
|
|
mainProgram = "gemini";
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
|
|
priority = 10;
|
|
};
|
|
})
|