python3Packages.nmslib: init at 2.1.1

master
Simon Bruder 2023-10-01 00:37:13 +02:00
parent 3b8f90ed3a
commit 9c024a88f2
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
2 changed files with 43 additions and 0 deletions

View File

@ -12,6 +12,8 @@ rec {
netbox-topology-views = callPythonPackage ./python-modules/netbox-topology-views { };
nmslib = callPythonPackage ./python-modules/nmslib { };
prefixed = callPythonPackage ./python-modules/prefixed { };
}));

View File

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, numpy
, psutil
, pybind11
}:
buildPythonPackage rec {
pname = "nmslib";
version = "2.1.1";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-lxKUp3ZvkcaX1jyIyK3aR5epRDRsxTWiFzk/QWehnCA=";
};
patchFlags = [ "-p2" ];
patches = [
# Fix import on newer versions of pybind11 (https://github.com/nmslib/nmslib/pull/488)
(fetchpatch {
url = "https://github.com/nmslib/nmslib/commit/574ecd54c157d13aecc03033311be261c91a45ec.patch";
sha256 = "sha256-R/y6BbnZRe7VM5XCbes6Z5A5N66r+8SCA2Hy6K301IM=";
})
];
propagatedBuildInputs = [
numpy
psutil
pybind11
];
meta = with lib; {
description = "An efficient similarity search library and a toolkit for evaluation of their methods";
homepage = "https://github.com/nmslib/nmslib";
license = licenses.asl20;
maintainers = with maintainers; [ sbruder ];
platforms = platforms.all;
};
}