diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-15 07:58:52 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-15 07:58:52 +0000 |
commit | 9d1daa60832979d5d361dfdac136fb9e5a1af2c5 (patch) | |
tree | 5192dd85903cb092cf7dff0e3403387b3b683d84 /nixpkgs/pkgs/development/python-modules/tokentrim/default.nix | |
parent | 67cdfc7d42f721bf85814af5a0095fb9f9ea455d (diff) | |
parent | f2ea252d23ebc9a5336bf6a61e0644921f64e67c (diff) | |
download | nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.gz nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.bz2 nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.lz nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.xz nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.zst nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/tokentrim/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/tokentrim/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/tokentrim/default.nix b/nixpkgs/pkgs/development/python-modules/tokentrim/default.nix new file mode 100644 index 000000000000..c830d29b8a94 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/tokentrim/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, tiktoken +}: + +buildPythonPackage { + pname = "tokentrim"; + version = "unstable-2023-09-07"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "KillianLucas"; + repo = "tokentrim"; + rev = "e98ad3a2ca0e321a7347f76c30be584175495139"; + hash = "sha256-95xitHnbFFaj0xPuLMWvIvuJzoCO3VSd592X1RI9h3A="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + tiktoken + ]; + + pythonImportsCheck = [ "tokentrim" ]; + + # tests connect to openai + doCheck = false; + + meta = with lib; { + description = "Easily trim 'messages' arrays for use with GPTs"; + homepage = "https://github.com/KillianLucas/tokentrim"; + license = licenses.mit; + maintainers = with maintainers; [ happysalada ]; + }; +} |