2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2021-01-04 09:59:04 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, llvmPackages
|
|
|
|
, enableAVX ? stdenv.hostPlatform.avxSupport
|
|
|
|
}:
|
|
|
|
|
2020-02-11 00:32:42 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "NGT";
|
2020-12-08 03:23:19 +00:00
|
|
|
version = "v1.12.3-alpha";
|
|
|
|
|
2020-02-11 00:32:42 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yahoojapan";
|
|
|
|
repo = "NGT";
|
2020-12-08 03:23:19 +00:00
|
|
|
rev = "29c88ff6cd5824d3196986d1f50b834565b6c9dd";
|
|
|
|
sha256 = "sha256-nu0MJNpaenOB4+evoSVLKmPIuZXVj1Rm9x53+TfhezY=";
|
2020-02-11 00:32:42 +00:00
|
|
|
};
|
|
|
|
|
2021-01-04 09:59:04 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-12-08 03:23:19 +00:00
|
|
|
buildInputs = [ llvmPackages.openmp ];
|
|
|
|
|
2021-01-04 09:59:04 +00:00
|
|
|
NIX_ENFORCE_NO_NATIVE = ! enableAVX;
|
|
|
|
__AVX2__ = if enableAVX then 1 else 0;
|
2020-02-11 00:32:42 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/yahoojapan/NGT";
|
2020-02-11 00:32:42 +00:00
|
|
|
description = "Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data";
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ tomberek ];
|
|
|
|
};
|
|
|
|
}
|