nixpkgs/pkgs/by-name/an/antigravity-cli/package.nix
Ethan Carter Edwards f09d7b7c24
antigravity-cli: 1.0.6 -> 1.0.7
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
2026-06-07 23:31:00 -04:00

78 lines
2.3 KiB
Nix

{
lib,
stdenvNoCC,
fetchurl,
autoPatchelfHook,
versionCheckHook,
}:
let
wholeVersion = "1.0.7-5858071034068992"; # unfortunately this has dumb versioning
version = builtins.head (lib.splitString "-" wholeVersion);
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-8kaHmc0XPAPuATHb4rrkMhUzBqaLqi7n1UQPFcRB4Go=";
};
aarch64-linux = fetchurl {
url = "https://storage.googleapis.com/antigravity-public/antigravity-cli/${wholeVersion}/linux-arm/cli_linux_arm64.tar.gz";
hash = "sha256-3ylG6ZW/9AuKydzzyMLtqC1ec2NnixFG/CJih26S0K0=";
};
aarch64-darwin = fetchurl {
url = "https://storage.googleapis.com/antigravity-public/antigravity-cli/${wholeVersion}/darwin-arm/cli_mac_arm64.tar.gz";
hash = "sha256-e4VhL/9rUNgE2XyW8REz8QXEbzwsUFg41xNpUHfNLK0=";
};
x86_64-darwin = fetchurl {
url = "https://storage.googleapis.com/antigravity-public/antigravity-cli/${wholeVersion}/darwin-x64/cli_mac_x64.tar.gz";
hash = "sha256-SECE7bAd0VneVeAvBs14Ortkcqg8CJy9xcq3ZnuqfKY=";
};
};
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.isLinux [ 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 ];
};
})