1{ lib, buildPythonPackage, fetchFromGitHub, pytest-runner, 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 = [ pytest-runner ]; 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 pythonImportsCheck = [ "image_match" ]; 28 29 meta = with lib; { 30 homepage = "https://github.com/ascribe/image-match"; 31 description = "Quickly search over billions of images"; 32 license = licenses.asl20; 33 maintainers = with maintainers; [ cmcdragonkai ]; 34 }; 35}