Merge pull request #295627 from natsukium/tiktoken_core/init

luaPackages.tiktoken_core: init at 0.2.1-1
This commit is contained in:
Matthieu Coudron 2024-03-14 01:49:55 +01:00 committed by GitHub
commit db00179759
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 42 additions and 0 deletions

View File

@ -116,6 +116,7 @@ stdlib,,,,41.2.2,,vyp
teal-language-server,,,http://luarocks.org/dev,,,
telescope.nvim,,,,,5.1,
telescope-manix,,,,,,
tiktoken_core,,,,,,natsukium
tl,,,,,,mephistophiles
toml,,,,,,mrcjkb
toml-edit,,,,,5.1,mrcjkb

1 name src ref server version luaversion maintainers
116 teal-language-server http://luarocks.org/dev
117 telescope.nvim 5.1
118 telescope-manix
119 tiktoken_core natsukium
120 tl mephistophiles
121 toml mrcjkb
122 toml-edit 5.1 mrcjkb

View File

@ -3297,6 +3297,39 @@ buildLuarocksPackage {
};
}) {};
tiktoken_core = callPackage({ buildLuarocksPackage, fetchgit, fetchurl, lua, luaOlder, luarocks-build-rust-mlua }:
buildLuarocksPackage {
pname = "tiktoken_core";
version = "0.2.1-1";
knownRockspec = (fetchurl {
url = "mirror://luarocks/tiktoken_core-0.2.1-1.rockspec";
sha256 = "0mdmrpg82vmk0cqiqdayyk4vvl299z0xqrg58q18dfs5nc27wkla";
}).outPath;
src = fetchgit ( removeAttrs (builtins.fromJSON ''{
"url": "https://github.com/gptlang/lua-tiktoken",
"rev": "61d831a81a01ba095f8c94e148b721b3aa7b1e45",
"date": "2024-03-03T23:24:06+00:00",
"path": "/nix/store/5ik17k726wl8hpz295n7dqq3438k8ddj-lua-tiktoken",
"sha256": "11lpzxmmb4zglkp9czlzggd8i46r7whpq021b5d3fx7bc5a81d3n",
"hash": "sha256-drSAVGHrdDdaWUEAfCE/2ZCI2nuffpbupO+TVWv/l4Y=",
"fetchLFS": false,
"fetchSubmodules": true,
"deepClone": false,
"leaveDotGit": false
}
'') ["date" "path" "sha256"]) ;
disabled = (luaOlder "5.1");
propagatedBuildInputs = [ lua luarocks-build-rust-mlua ];
meta = {
homepage = "https://github.com/gptlang/lua-tiktoken";
description = "An experimental port of OpenAI's Tokenizer to lua";
maintainers = with lib.maintainers; [ natsukium ];
license.fullName = "MIT";
};
}) {};
tl = callPackage({ argparse, buildLuarocksPackage, compat53, fetchgit, fetchurl, luafilesystem }:
buildLuarocksPackage {
pname = "tl";

View File

@ -642,6 +642,14 @@ with prev;
'';
});
tiktoken_core = prev.tiktoken_core.overrideAttrs (oa: {
cargoDeps = rustPlatform.fetchCargoTarball {
src = oa.src;
hash = "sha256-YApsOGfAw34zp069lyGR6FGjxty1bE23+Tic07f8zI4=";
};
nativeBuildInputs = oa.nativeBuildInputs ++ [ cargo rustPlatform.cargoSetupHook ];
});
toml = prev.toml.overrideAttrs (oa: {
patches = [ ./toml.patch ];