@@ -0,0 +1,52 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, fetchpatch
5+, nose
6+, scikitlearn
7+, scipy
8+, numba
9+, llvmlite
10+, joblib
11+}:
12+
13+buildPythonPackage rec {
14+ pname = "pynndescent";
15+ version = "0.5.1";
16+
17+ src = fetchPypi {
18+ inherit pname version;
19+ sha256 = "74a05a54d13573a38878781d44812ac6df97d8762a56f9bb5dd87a99911820fe";
20+ };
21+
22+ patches = [
23+ # fixes tests, included in 0.5.2
24+ (fetchpatch {
25+ url = "https://github.com/lmcinnes/pynndescent/commit/ef5d8c3c3bfe976063b6621e3e0734c0c22d813b.patch";
26+ sha256 = "sha256-49n3kevs3wpzd4FfZVKmNpF2o1V8pJs4KOx8zCAhR3s=";
27+ })
28+ ];
29+
30+ checkInputs = [
31+ nose
32+ ];
33+
34+ propagatedBuildInputs = [
35+ scikitlearn
36+ scipy
37+ numba
38+ llvmlite
39+ joblib
40+ ];
41+
42+ checkPhase = ''
43+ nosetests
44+ '';
45+
46+ meta = with lib; {
47+ description = "Nearest Neighbor Descent";
48+ homepage = "https://github.com/lmcinnes/pynndescent";
49+ license = licenses.bsd2;
50+ maintainers = [ maintainers.mic92 ];
51+ };
52+}