2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
numpy,
|
|
|
|
pybind11,
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
|
|
|
pythonOlder,
|
|
|
|
pytestCheckHook,
|
2024-02-29 20:09:43 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "chroma-hnswlib";
|
|
|
|
version = "0.7.3";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chroma-core";
|
|
|
|
repo = "hnswlib";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-c4FvymqZy8AZKbh6Y8xZRjKAqYcUyZABRGc1u7vwlsk=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
numpy
|
|
|
|
pybind11
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "hnswlib" ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Header-only C++/python library for fast approximate nearest neighbors";
|
|
|
|
homepage = "https://github.com/chroma-core/hnswlib";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|