refactor: reorganize, add package (opencode, osgrep, beads), add ai agent shell
This commit is contained in:
parent
7e0a207778
commit
a0f0f39399
58 changed files with 7867 additions and 42 deletions
59
packages/opencode.nix
Normal file
59
packages/opencode.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ lib, stdenv, fetchzip, autoPatchelfHook }:
|
||||
let
|
||||
version = "1.0.137";
|
||||
|
||||
platformInfo = {
|
||||
x86_64-darwin = {
|
||||
name = "darwin-x64";
|
||||
ext = "zip";
|
||||
hash = "sha256-ZgzvpW8SAN0HP3Qh+aT1S+WrEoXkTZiL8/8z1w9p9Y0=";
|
||||
};
|
||||
aarch64-darwin = {
|
||||
name = "darwin-arm64";
|
||||
ext = "zip";
|
||||
hash = "sha256-w5hs5arVroLtjr9pRAHYXQL+4L5gw1bJVL4DhgvrpLs=";
|
||||
};
|
||||
x86_64-linux = {
|
||||
name = "linux-x64";
|
||||
ext = "tar.gz";
|
||||
hash = "sha256-N8IR3xq/dGF5jPq9/UW8Mu/PnAUb7r+Ox6nge6wKw1M=";
|
||||
};
|
||||
aarch64-linux = {
|
||||
name = "linux-arm64";
|
||||
ext = "tar.gz";
|
||||
hash = "sha256-LwWbTAVnfEmCjUBNf58bgFFVVvDIQVJkLsGtYX+/EfU=";
|
||||
};
|
||||
};
|
||||
|
||||
platform = platformInfo.${stdenv.hostPlatform.system} or (throw
|
||||
"Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
in stdenv.mkDerivation {
|
||||
pname = "opencode";
|
||||
inherit version;
|
||||
|
||||
src = fetchzip {
|
||||
url =
|
||||
"https://github.com/sst/opencode/releases/download/v${version}/opencode-${platform.name}.${platform.ext}";
|
||||
hash = platform.hash;
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
cp opencode $out/bin/opencode
|
||||
chmod +x $out/bin/opencode
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "AI coding assistant CLI from SST";
|
||||
homepage = "https://opencode.ai";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "opencode";
|
||||
platforms =
|
||||
[ "x86_64-darwin" "aarch64-darwin" "x86_64-linux" "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue