2018-03-21 13:44:41 +00:00
|
|
|
{ buildPythonPackage, fetchFromGitHub, pillow, click, dlib, numpy
|
2018-04-02 17:42:09 +00:00
|
|
|
, face_recognition_models, stdenv, flake8, tox, pytest, glibcLocales
|
2018-03-21 13:44:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "face_recognition";
|
2018-04-02 17:42:09 +00:00
|
|
|
version = "1.2.2";
|
2018-03-21 13:44:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = pname;
|
|
|
|
owner = "ageitgey";
|
2018-04-02 17:42:09 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "17jnyr80j1p74gyvh1jabvwd3zsxvip2y7cjhh2g6gsjv2dpvrjv";
|
2018-03-21 13:44:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace "flake8==2.6.0" "flake8"
|
|
|
|
'';
|
|
|
|
|
2018-04-02 17:42:09 +00:00
|
|
|
propagatedBuildInputs = [ pillow click dlib numpy face_recognition_models ];
|
2018-03-21 13:44:41 +00:00
|
|
|
|
|
|
|
checkInputs = [ flake8 tox pytest glibcLocales ];
|
|
|
|
checkPhase = ''
|
|
|
|
LC_ALL="en_US.UTF-8" py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = https://github.com/ageitgey/face_recognition;
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
description = "The world's simplest facial recognition api for Python and the command line";
|
|
|
|
};
|
|
|
|
}
|