summary refs log tree commit diff
path: root/pkgs/development/python-modules/image-match/default.nix
blob: 6bb45f83790fa44c1784f072f80d90b4e6a6fec9 (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
31
32
33
34
{ stdenv, buildPythonPackage, fetchFromGitHub, pytestrunner, scikitimage }:

buildPythonPackage {
  pname = "image-match";
  version = "1.1.2";

  src = fetchFromGitHub {
    owner = "ascribe";
    repo = "image-match";
    rev = "1c5f3170555540bdf43ff8b8189c4e8c13a8b950";
    sha256 = "0vlmpidmhkpgdzw2k03x5layhijcrjpmyfd93yv2ls77ihz00ix5";
  };

  buildInputs = [ pytestrunner ];

  propagatedBuildInputs = [
    scikitimage
  ];

  # remove elasticsearch requirement due to version incompatibility
  postPatch = ''
    substituteInPlace setup.py --replace "'elasticsearch>=5.0.0,<6.0.0'," ""
  '';

  # tests cannot work without elasticsearch
  doCheck = false;

  meta = with stdenv.lib; {
    homepage = "https://github.com/ascribe/image-match";
    description = "Quickly search over billions of images";
    license = licenses.asl20;
    maintainers = with maintainers; [ cmcdragonkai ];
  };
}