mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
70 lines
1.4 KiB
Nix
70 lines
1.4 KiB
Nix
{
|
|
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 ];
|
|
};
|
|
})
|