1{ lib, buildPythonPackage, fetchFromGitHub, pillow, pyres, nose
2, preggy, numpy, yanc, nose-focus, mock, opencv }:
3
4buildPythonPackage rec {
5 pname = "remotecv";
6 version = "2.2.2";
7
8 propagatedBuildInputs = [ pillow pyres ];
9
10 checkInputs = [ nose preggy numpy yanc nose-focus mock opencv ];
11
12 # PyPI tarball doesn't contain tests so let's use GitHub
13 src = fetchFromGitHub {
14 owner = "thumbor";
15 repo = pname;
16 rev = version;
17 sha256 = "0slalp1x626ajy2cbdfifhxf0ffzckqdz6siqsqr6s03hrl877hy";
18 };
19
20 # Remove unnecessary argparse dependency and some seemingly unnecessary
21 # version upper bounds because nixpkgs contains (or could contain) newer
22 # versions.
23 # See: https://github.com/thumbor/remotecv/issues/15
24 patches = [
25 ./install_requires.patch
26 ];
27
28 checkPhase = ''
29 nosetests --with-yanc -s tests/
30 '';
31
32 meta = with lib; {
33 description = "OpenCV worker for facial and feature recognition";
34 homepage = "https://github.com/thumbor/remotecv/wiki";
35 license = licenses.mit;
36 maintainers = with maintainers; [ jluttine ];
37 broken = true; # no longer compatible with latest pillow
38 };
39}