summary refs log tree commit diff
path: root/pkgs/development/python-modules/remotecv/default.nix
blob: a4d1dcc485ec5a59665787005b26a091fb74433c (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
35
36
37
38
{ stdenv, buildPythonPackage, fetchFromGitHub, pillow, pyres, nose
, preggy, numpy, yanc, nose-focus, mock, opencv }:

buildPythonPackage rec {
  pname = "remotecv";
  version = "2.2.2";

  propagatedBuildInputs = [ pillow pyres ];

  checkInputs = [ nose preggy numpy yanc nose-focus mock opencv ];

  # PyPI tarball doesn't contain tests so let's use GitHub
  src = fetchFromGitHub {
    owner = "thumbor";
    repo = pname;
    rev = version;
    sha256 = "0slalp1x626ajy2cbdfifhxf0ffzckqdz6siqsqr6s03hrl877hy";
  };

  # Remove unnecessary argparse dependency and some seemingly unnecessary
  # version upper bounds because nixpkgs contains (or could contain) newer
  # versions.
  # See: https://github.com/thumbor/remotecv/issues/15
  patches = [
    ./install_requires.patch
  ];

  checkPhase = ''
    nosetests --with-yanc -s tests/
  '';

  meta = with stdenv.lib; {
    description = "OpenCV worker for facial and feature recognition";
    homepage = https://github.com/thumbor/remotecv/wiki;
    license = licenses.mit;
    maintainers = with maintainers; [ jluttine ];
  };
}