Files
nixpkgs/pkgs/by-name/an/antigravity-cli/package.nix
2026-10-03 10:47:04 +00:00

76 lines
2.1 KiB
Nix

{
lib,
stdenvNoCC,
fetchurl,
autoPatchelfHook,
versionCheckHook,
}:
let
version = "1.2.16";
buildId = "5594158052802560";
wholeVersion = "${version}-${buildId}";
throwSystem = throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}";
sourceData = {
x86_64-linux = fetchurl {
url = "https://storage.googleapis.com/antigravity-public/antigravity-cli/${wholeVersion}/linux-x64/cli_linux_x64.tar.gz";
hash = "sha256-1CR0MOBM69vhypPZzLSDzS89rrTNsKzlpxzRMOC9q4Q=";
};
aarch64-linux = fetchurl {
url = "https://storage.googleapis.com/antigravity-public/antigravity-cli/${wholeVersion}/linux-arm/cli_linux_arm64.tar.gz";
hash = "sha256-ptJp0nZOVjarK82nO3jFh/6dAOrXZ6o5dFdCKVhe4NM=";
};
aarch64-darwin = fetchurl {
url = "https://storage.googleapis.com/antigravity-public/antigravity-cli/${wholeVersion}/darwin-arm/cli_mac_arm64.tar.gz";
hash = "sha256-l7A+o+kJFuDIpJ7ephVAb47GkEfd4XIopHjBhURF0yo=";
};
};
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "antigravity-cli";
inherit version;
strictDeps = true;
__structuredAttrs = true;
src = sourceData.${stdenvNoCC.hostPlatform.system} or throwSystem;
sourceRoot = ".";
nativeBuildInputs = lib.optionals stdenvNoCC.hostPlatform.isElf [ autoPatchelfHook ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dm755 antigravity $out/bin/agy
runHook postInstall
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru = {
inherit wholeVersion; # for the updateScript
updateScript = ./update.sh;
};
meta = {
description = "Google's Go-based terminal user interface (TUI) agent client";
homepage = "https://antigravity.google";
changelog = "https://antigravity.google/changelog";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [
adrielvelazquez
u3kkasha
];
platforms = lib.attrNames sourceData;
mainProgram = "agy";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})