tabby-agent: init at 0.18.0 (#351321)
This commit is contained in:
commit
dde45174cc
69
pkgs/by-name/ta/tabby-agent/package.nix
Normal file
69
pkgs/by-name/ta/tabby-agent/package.nix
Normal 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 ];
|
||||
};
|
||||
})
|
Loading…
Reference in New Issue
Block a user