tabby-agent: init at 0.18.0 (#351321)

This commit is contained in:
Aleksana 2024-10-29 12:42:07 +08:00 committed by GitHub
commit dde45174cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,69 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
nodejs,
pnpm,
wrapGAppsHook3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tabby-agent";
version = "0.18.0";
src = fetchFromGitHub {
owner = "TabbyML";
repo = "tabby";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-8clEBWAT+HI2eecOsmldgRcA58Ehq9bZT4ZwUMm494g=";
};
nativeBuildInputs = [
pnpm.configHook
wrapGAppsHook3
];
buildInputs = [
nodejs
];
buildPhase = ''
runHook preBuild
pnpm --filter=tabby-agent build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r ./clients/tabby-agent/dist $out/dist
ln -s $out/dist/node/index.js $out/bin/tabby-agent
chmod +x $out/bin/tabby-agent
runHook postInstall
'';
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-WBhkrgLTTR5f8ZVmUfzMbFw/6jIGoLcUspHCsNpOxx4=";
};
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"^v([0-9.]+)$"
];
};
meta = {
homepage = "https://github.com/TabbyML/tabby";
changelog = "https://github.com/TabbyML/tabby/releases/tag/v${finalAttrs.version}";
description = "Language server used to communicate with Tabby server";
mainProgram = "tabby-agent";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.khaneliman ];
};
})