nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 llvmPackages,
7 enableAVX ? stdenv.hostPlatform.avxSupport,
8}:
9
10stdenv.mkDerivation {
11 pname = "NGT";
12 version = "1.12.3-alpha";
13
14 src = fetchFromGitHub {
15 owner = "yahoojapan";
16 repo = "NGT";
17 rev = "29c88ff6cd5824d3196986d1f50b834565b6c9dd";
18 sha256 = "sha256-nu0MJNpaenOB4+evoSVLKmPIuZXVj1Rm9x53+TfhezY=";
19 };
20
21 nativeBuildInputs = [ cmake ];
22 buildInputs = [ llvmPackages.openmp ];
23
24 NIX_ENFORCE_NO_NATIVE = !enableAVX;
25 __AVX2__ = if enableAVX then 1 else 0;
26
27 meta = with lib; {
28 homepage = "https://github.com/yahoojapan/NGT";
29 description = "Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data";
30 platforms = platforms.linux ++ platforms.darwin;
31 license = licenses.asl20;
32 maintainers = with maintainers; [ tomberek ];
33 };
34}