From 463935ed8f5ab8cdea507c696e986dcd6c703bd1 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 30 Jul 2023 00:36:43 +0900 Subject: [PATCH] python310Packages.hnswlib: init at 0.7.0 --- .../python-modules/hnswlib/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 +++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/hnswlib/default.nix diff --git a/pkgs/development/python-modules/hnswlib/default.nix b/pkgs/development/python-modules/hnswlib/default.nix new file mode 100644 index 00000000000..c3dab17f533 --- /dev/null +++ b/pkgs/development/python-modules/hnswlib/default.nix @@ -0,0 +1,32 @@ +{ buildPythonPackage +, hnswlib +, numpy +, pybind11 +, setuptools +, unittestCheckHook +}: + +buildPythonPackage { + pname = "hnswlib"; + inherit (hnswlib) version src meta; + format = "pyproject"; + + nativeBuildInputs = [ + numpy + setuptools + pybind11 + ]; + + nativeCheckInputs = [ + unittestCheckHook + ]; + + unittestFlagsArray = [ + "tests/python" + "--pattern 'bindings_test*.py'" + ]; + + pythonImportsCheck = [ + "hnswlib" + ]; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 983b0569aa9..b2c18d3da19 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4764,6 +4764,10 @@ self: super: with self; { hlk-sw16 = callPackage ../development/python-modules/hlk-sw16 { }; + hnswlib = callPackage ../development/python-modules/hnswlib { + inherit (pkgs) hnswlib; + }; + hmmlearn = callPackage ../development/python-modules/hmmlearn { }; hocr-tools = callPackage ../development/python-modules/hocr-tools { };