Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / ngt / default.nix
blobe42ee750cc09c2c892e2b2db43afd5c24c411d1c
1 { lib, stdenv
2 , fetchFromGitHub
3 , cmake
4 , llvmPackages
5 , enableAVX ? stdenv.hostPlatform.avxSupport
6 }:
8 stdenv.mkDerivation rec {
9   pname = "NGT";
10   version = "1.12.3-alpha";
12   src = fetchFromGitHub {
13     owner = "yahoojapan";
14     repo = "NGT";
15     rev = "29c88ff6cd5824d3196986d1f50b834565b6c9dd";
16     sha256 = "sha256-nu0MJNpaenOB4+evoSVLKmPIuZXVj1Rm9x53+TfhezY=";
17   };
19   nativeBuildInputs = [ cmake ];
20   buildInputs = [ llvmPackages.openmp ];
22   NIX_ENFORCE_NO_NATIVE = ! enableAVX;
23   __AVX2__ = if enableAVX then 1 else 0;
25   meta = with lib; {
26     homepage = "https://github.com/yahoojapan/NGT";
27     description = "Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data";
28     platforms = platforms.linux ++ platforms.darwin;
29     license = licenses.asl20;
30     maintainers = with maintainers; [ tomberek ];
31   };