2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-02-29 20:09:43 +00:00
|
|
|
, huggingface-hub
|
2023-10-09 19:29:22 +00:00
|
|
|
, pythonOlder
|
2024-02-29 20:09:43 +00:00
|
|
|
, pythonRelaxDepsHook
|
2023-10-09 19:29:22 +00:00
|
|
|
, poetry-core
|
2024-02-29 20:09:43 +00:00
|
|
|
, onnx
|
2023-10-09 19:29:22 +00:00
|
|
|
, onnxruntime
|
|
|
|
, requests
|
|
|
|
, tokenizers
|
|
|
|
, tqdm
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
buildPythonPackage rec {
|
2023-10-09 19:29:22 +00:00
|
|
|
pname = "fastembed";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.2.2";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "qdrant";
|
|
|
|
repo = "fastembed";
|
2023-10-19 13:55:26 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-ufgco5wPBG19GM99rZV7LKQqEzzCv24I8026SMz0CH4=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonRelaxDepsHook
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
huggingface-hub
|
|
|
|
onnx
|
2023-10-09 19:29:22 +00:00
|
|
|
onnxruntime
|
|
|
|
requests
|
|
|
|
tokenizers
|
|
|
|
tqdm
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"fastembed"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"huggingface-hub"
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# there is one test and it requires network
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|