From 2e25e2192deb93a08a5f554aadb61a5806468325 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Feb 2024 16:31:30 +0100 Subject: [PATCH] python311Packages.chroma-hnswlib: init at 0.7.3 Header-only C++/python library for fast approximate nearest neighbors https://github.com/chroma-core/hnswlib --- .../python-modules/chroma-hnswlib/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 ++ 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/chroma-hnswlib/default.nix diff --git a/pkgs/development/python-modules/chroma-hnswlib/default.nix b/pkgs/development/python-modules/chroma-hnswlib/default.nix new file mode 100644 index 000000000000..31f884e53ba8 --- /dev/null +++ b/pkgs/development/python-modules/chroma-hnswlib/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, pybind11 +, setuptools +, wheel +, pythonOlder +, pytestCheckHook +}: + +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 + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "hnswlib" + ]; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5b57b18d8850..54664f0f2c97 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2059,6 +2059,8 @@ self: super: with self; { chispa = callPackage ../development/python-modules/chispa { }; + chroma-hnswlib = callPackage ../development/python-modules/chroma-hnswlib { }; + chromaprint = callPackage ../development/python-modules/chromaprint { }; ci-info = callPackage ../development/python-modules/ci-info { }; @@ -6686,6 +6688,8 @@ self: super: with self; { llama-index-readers-llama-parse = callPackage ../development/python-modules/llama-index-readers-llama-parse { }; + llama-index-vector-stores-chroma = callPackage ../development/python-modules/llama-index-vector-stores-chroma { }; + llama-parse = callPackage ../development/python-modules/llama-parse { }; llamaindex-py-client = callPackage ../development/python-modules/llamaindex-py-client { };