This commit is contained in:
2026-03-22 21:09:54 +00:00
parent 04d7eda8c4
commit 4f507d6bd1
11 changed files with 290 additions and 100 deletions

View File

@@ -0,0 +1,44 @@
{inputs, ...}: final: prev: let
version = "0.22.1";
srcs = {
x86_64-linux =
prev.fetchurl {
url = "https://github.com/trycog/cog-cli/releases/download/v${version}/cog-linux-x86_64.tar.gz";
hash = "sha256-ET+sNXisUrHShR1gxqdumegXycXcxGzJcQOdTr5005w=";
};
aarch64-darwin =
prev.fetchurl {
url = "https://github.com/trycog/cog-cli/releases/download/v${version}/cog-darwin-arm64.tar.gz";
hash = "sha256-jcN+DtOqr3or5C71jp7AIAz0wh73FYybCC4FRBykKO4=";
};
};
in {
cog-cli =
prev.stdenvNoCC.mkDerivation {
pname = "cog-cli";
inherit version;
src =
srcs.${prev.stdenv.hostPlatform.system}
or (throw "Unsupported system for cog-cli: ${prev.stdenv.hostPlatform.system}");
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
tar -xzf "$src"
install -Dm755 cog "$out/bin/cog"
runHook postInstall
'';
meta = with prev.lib; {
description = "Memory, code intelligence, and debugging for AI agents";
homepage = "https://github.com/trycog/cog-cli";
license = licenses.mit;
mainProgram = "cog";
platforms = builtins.attrNames srcs;
sourceProvenance = [sourceTypes.binaryNativeCode];
};
};
}