diff options
Diffstat (limited to 'pkgs/development/python-modules/fastembed/default.nix')
-rw-r--r-- | pkgs/development/python-modules/fastembed/default.nix | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/pkgs/development/python-modules/fastembed/default.nix b/pkgs/development/python-modules/fastembed/default.nix index ec65b42d79e02..f55f8a78ac246 100644 --- a/pkgs/development/python-modules/fastembed/default.nix +++ b/pkgs/development/python-modules/fastembed/default.nix @@ -1,22 +1,31 @@ { lib, buildPythonPackage, - fetchFromGitHub, - huggingface-hub, pythonOlder, + fetchFromGitHub, pythonRelaxDepsHook, + + # build-system poetry-core, + + # dependencies + huggingface-hub, + loguru, + mmh3, + numpy, onnx, onnxruntime, + pillow, + pystemmer, requests, + snowballstemmer, tokenizers, tqdm, - pytestCheckHook, }: buildPythonPackage rec { pname = "fastembed"; - version = "0.2.2"; + version = "0.3.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -25,36 +34,42 @@ buildPythonPackage rec { owner = "qdrant"; repo = "fastembed"; rev = "refs/tags/v${version}"; - hash = "sha256-ufgco5wPBG19GM99rZV7LKQqEzzCv24I8026SMz0CH4="; + hash = "sha256-bFIikLogTxrwLNR+NOnnRjKGneZ63N7CBuu81z85xZo="; }; - nativeBuildInputs = [ - poetry-core - pythonRelaxDepsHook - ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + nativeBuildInputs = [ pythonRelaxDepsHook ]; + + dependencies = [ huggingface-hub + loguru + mmh3 + numpy onnx onnxruntime + pillow + pystemmer requests + snowballstemmer tokenizers tqdm ]; pythonImportsCheck = [ "fastembed" ]; - pythonRelaxDeps = [ "huggingface-hub" ]; - - nativeCheckInputs = [ pytestCheckHook ]; + pythonRelaxDeps = [ "onnxruntime" ]; # there is one test and it requires network doCheck = false; - meta = with lib; { + meta = { description = "Fast, Accurate, Lightweight Python library to make State of the Art Embedding"; homepage = "https://github.com/qdrant/fastembed"; - license = licenses.asl20; - maintainers = with maintainers; [ happysalada ]; + changelog = "https://github.com/qdrant/fastembed/releases/tag/v${version}"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ happysalada ]; + # terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException' + badPlatforms = [ "aarch64-linux" ]; }; } |