Merge pull request #291744 from ghthor/upstream-tabby
tabby: init at 0.7.0 take 2
This commit is contained in:
commit
6d71a96947
5 changed files with 102 additions and 0 deletions
|
@ -7047,6 +7047,15 @@
|
|||
github = "ghostbuster91";
|
||||
githubId = 5662622;
|
||||
};
|
||||
ghthor = {
|
||||
email = "ghthor@gmail.com";
|
||||
github = "ghthor";
|
||||
githubId = 160298;
|
||||
name = "Will Owens";
|
||||
keys = [{
|
||||
fingerprint = "8E98 BB01 BFF8 AEA4 E303 FC4C 8074 09C9 2CE2 3033";
|
||||
}];
|
||||
};
|
||||
ghuntley = {
|
||||
email = "ghuntley@ghuntley.com";
|
||||
github = "ghuntley";
|
||||
|
|
|
@ -16851,5 +16851,16 @@ final: prev:
|
|||
meta.homepage = "https://github.com/jhradilek/vim-snippets/";
|
||||
};
|
||||
|
||||
vim-tabby = buildVimPlugin {
|
||||
pname = "vim-tabby";
|
||||
version = "2024-02-01";
|
||||
src = fetchFromGitHub {
|
||||
owner = "TabbyML";
|
||||
repo = "vim-tabby";
|
||||
rev = "0b62bc2ed5c7d930c7435c3504d5c18ea6379b28";
|
||||
sha256 = "06crxhvwz04s6sfj0q22kkp3g5zvip13088m95qwznw9bv2gpx3s";
|
||||
};
|
||||
meta.homepage = "https://github.com/TabbyML/vim-tabby/";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1671,6 +1671,14 @@
|
|||
dependencies = with self; [ vim-repeat ];
|
||||
};
|
||||
|
||||
vim-tabby = super.vim-tabby.overrideAttrs {
|
||||
postPatch = ''
|
||||
substituteInPlace autoload/tabby/globals.vim --replace-fail \
|
||||
"let g:tabby_node_binary = get(g:, 'tabby_node_binary', 'node')" \
|
||||
"let g:tabby_node_binary = get(g:, 'tabby_node_binary', '${nodejs}/bin/node')"
|
||||
'';
|
||||
};
|
||||
|
||||
vim-textobj-entire = super.vim-textobj-entire.overrideAttrs {
|
||||
dependencies = with self; [ vim-textobj-user ];
|
||||
meta.maintainers = with lib.maintainers; [ farlion ];
|
||||
|
|
|
@ -1401,3 +1401,4 @@ https://github.com/ziglang/zig.vim/,,
|
|||
https://github.com/mickael-menu/zk-nvim/,HEAD,
|
||||
https://github.com/troydm/zoomwintab.vim/,,
|
||||
https://github.com/nanotee/zoxide.vim/,,
|
||||
https://github.com/TabbyML/vim-tabby/,HEAD,
|
||||
|
|
73
pkgs/by-name/ta/tabby/package.nix
Normal file
73
pkgs/by-name/ta/tabby/package.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, gcc12
|
||||
, cmake
|
||||
, git
|
||||
, openssl
|
||||
, pkg-config
|
||||
, protobuf
|
||||
, rustPlatform
|
||||
, addOpenGLRunpath
|
||||
, cudatoolkit
|
||||
, nvidia ? true
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
version = "0.7.0";
|
||||
pname = "tabby";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TabbyML";
|
||||
repo = "tabby";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-BTPJWvqO4IuQAiUEER9PYfu4aQsz5RI77WsA/gQu5Jc=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoHash = "sha256-Du0ya9J+0tz72mSid5If0VFX2lLC7YtwNQ/MALpFv2M=";
|
||||
|
||||
# https://github.com/TabbyML/tabby/blob/v0.7.0/.github/workflows/release.yml#L39
|
||||
cargoBuildFlags = [
|
||||
"--release"
|
||||
"--package" "tabby"
|
||||
] ++ lib.optional nvidia [
|
||||
"--features" "cuda"
|
||||
];
|
||||
|
||||
OPENSSL_NO_VENDOR = 1;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
protobuf
|
||||
git
|
||||
cmake
|
||||
gcc12
|
||||
|
||||
] ++ lib.optional nvidia [
|
||||
addOpenGLRunpath
|
||||
];
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optional nvidia cudatoolkit
|
||||
;
|
||||
|
||||
postInstall = ''
|
||||
${if nvidia then ''
|
||||
addOpenGLRunpath "$out/bin/tabby"
|
||||
'' else ''
|
||||
''}
|
||||
'';
|
||||
|
||||
# Fails with:
|
||||
# file cannot create directory: /var/empty/local/lib64/cmake/Llama
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/TabbyML/tabby";
|
||||
changelog = "https://github.com/TabbyML/tabby/releases/tag/v${version}";
|
||||
description = "Self-hosted AI coding assistant";
|
||||
mainProgram = "tabby";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.ghthor ];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue