summary refs log tree commit diff
path: root/pkgs/development/libraries/flann/default.nix
blob: a25f3ea04e27fb1c16e5fdadd95261e00972def0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchFromGitHub, fetchpatch, unzip, cmake, python }:

stdenv.mkDerivation {
  name = "flann-1.9.1";

  src = fetchFromGitHub {
    owner = "mariusmuja";
    repo = "flann";
    rev = "1.9.1";
    sha256 = "13lg9nazj5s9a41j61vbijy04v6839i67lqd925xmxsbybf36gjc";
  };

  patches = [
    # Upstream issue: https://github.com/mariusmuja/flann/issues/369
    (fetchpatch {
      url = "https://raw.githubusercontent.com/buildroot/buildroot/45a39b3e2ba42b72d19bfcef30db1b8da9ead51a/package/flann/0001-src-cpp-fix-cmake-3.11-build.patch";
      sha256 = "1gmj06cmnqvwxx649mxaivd35727wj6w7710zbcmmgmsnyfh2js4";
    })
  ];

  buildInputs = [ unzip cmake python ];

  meta = {
    homepage = http://people.cs.ubc.ca/~mariusm/flann/;
    license = stdenv.lib.licenses.bsd3;
    description = "Fast approximate nearest neighbor searches in high dimensional spaces";
    maintainers = with stdenv.lib.maintainers; [viric];
    platforms = with stdenv.lib.platforms; linux ++ darwin;
  };
}