diff options
author | Robert Schütz <rschuetz17@gmail.com> | 2018-03-23 09:55:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-23 09:55:04 +0100 |
commit | 1aedde9e343391f4a58f94cc40ff8584d7ba025c (patch) | |
tree | 9719ab145120c52da177f59e0b05e0c0bd96816b /pkgs/development | |
parent | 421a4a2a7583772064a28901b90d02af9ff07c79 (diff) | |
parent | c26864122d7c6304fc2ce372075e7a91e0f10714 (diff) | |
download | nixlib-1aedde9e343391f4a58f94cc40ff8584d7ba025c.tar nixlib-1aedde9e343391f4a58f94cc40ff8584d7ba025c.tar.gz nixlib-1aedde9e343391f4a58f94cc40ff8584d7ba025c.tar.bz2 nixlib-1aedde9e343391f4a58f94cc40ff8584d7ba025c.tar.lz nixlib-1aedde9e343391f4a58f94cc40ff8584d7ba025c.tar.xz nixlib-1aedde9e343391f4a58f94cc40ff8584d7ba025c.tar.zst nixlib-1aedde9e343391f4a58f94cc40ff8584d7ba025c.zip |
Merge pull request #37566 from Ma27/init-face-recognition
pythonPackages.face_recognition: init at 1.2.1
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/python-modules/face_recognition/default.nix | 33 | ||||
-rw-r--r-- | pkgs/development/python-modules/face_recognition_models/default.nix | 21 |
2 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/face_recognition/default.nix b/pkgs/development/python-modules/face_recognition/default.nix new file mode 100644 index 000000000000..3b9a2c15b6e9 --- /dev/null +++ b/pkgs/development/python-modules/face_recognition/default.nix @@ -0,0 +1,33 @@ +{ buildPythonPackage, fetchFromGitHub, pillow, click, dlib, numpy +, face_recognition_models, scipy, stdenv, flake8, tox, pytest, glibcLocales +}: + +buildPythonPackage rec { + pname = "face_recognition"; + version = "1.2.1"; + + src = fetchFromGitHub { + repo = pname; + owner = "ageitgey"; + rev = "fe421d4acd76e8a19098e942b7bd9c3bbef6ebc4"; # no tags available in Git, pure revs are pushed to pypi + sha256 = "0wv5qxkg7xv1cr43zhhbixaqgj08xw2l7yvwl8g3fb2kdxyndw1c"; + }; + + postPatch = '' + substituteInPlace setup.py --replace "flake8==2.6.0" "flake8" + ''; + + propagatedBuildInputs = [ pillow click dlib numpy face_recognition_models scipy ]; + + 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"; + }; +} diff --git a/pkgs/development/python-modules/face_recognition_models/default.nix b/pkgs/development/python-modules/face_recognition_models/default.nix new file mode 100644 index 000000000000..960bffb903d6 --- /dev/null +++ b/pkgs/development/python-modules/face_recognition_models/default.nix @@ -0,0 +1,21 @@ +{ buildPythonPackage, stdenv, fetchPypi }: + +buildPythonPackage rec { + pname = "face_recognition_models"; + version = "0.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1kwnv3qpy5bhspk780bkyg8jd9n5f6p91ja6sjlwk1wcm00d56xp"; + }; + + # no module named `tests` as no tests are available + doCheck = false; + + meta = with stdenv.lib; { + homepage = https://github.com/ageitgey/face_recognition_models; + license = licenses.cc0; + maintainers = with maintainers; [ ma27 ]; + description = "Trained models for the face_recognition python library"; + }; +} |