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