1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 numpy,
6 pybind11,
7 setuptools,
8 wheel,
9 pythonOlder,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "chroma-hnswlib";
15 version = "0.7.6";
16 pyproject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "chroma-core";
22 repo = "hnswlib";
23 tag = version;
24 hash = "sha256-pjz5SGg2drO6fkml9ojFG7/Gq3/Y7vPaOHc+3LKnjUw=";
25 };
26
27 nativeBuildInputs = [
28 numpy
29 pybind11
30 setuptools
31 wheel
32 ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 pythonImportsCheck = [ "hnswlib" ];
37
38 meta = with lib; {
39 description = "Header-only C++/python library for fast approximate nearest neighbors";
40 homepage = "https://github.com/chroma-core/hnswlib";
41 license = licenses.asl20;
42 maintainers = with maintainers; [ fab ];
43 };
44}