1{ stdenv, buildPythonPackage, fetchFromGitHub, pytestrunner, scikitimage }:
2
3buildPythonPackage {
4 pname = "image-match";
5 version = "1.1.2";
6
7 src = fetchFromGitHub {
8 owner = "ascribe";
9 repo = "image-match";
10 rev = "1c5f3170555540bdf43ff8b8189c4e8c13a8b950";
11 sha256 = "0vlmpidmhkpgdzw2k03x5layhijcrjpmyfd93yv2ls77ihz00ix5";
12 };
13
14 buildInputs = [ pytestrunner ];
15
16 propagatedBuildInputs = [
17 scikitimage
18 ];
19
20 # remove elasticsearch requirement due to version incompatibility
21 postPatch = ''
22 substituteInPlace setup.py --replace "'elasticsearch>=5.0.0,<6.0.0'," ""
23 '';
24
25 # tests cannot work without elasticsearch
26 doCheck = false;
27
28 meta = with stdenv.lib; {
29 homepage = https://github.com/ascribe/image-match;
30 description = "Quickly search over billions of images";
31 license = licenses.asl20;
32 maintainers = with maintainers; [ cmcdragonkai ];
33 };
34}