2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
lib,
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
# propagates
|
2024-06-05 15:53:02 +00:00
|
|
|
click,
|
|
|
|
dlib,
|
|
|
|
face-recognition-models,
|
|
|
|
numpy,
|
|
|
|
pillow,
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
# tests
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
config,
|
|
|
|
cudaSupport ? config.cudaSupport,
|
2022-10-21 18:38:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "face-recognition";
|
|
|
|
version = "1.3.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
src = fetchPypi {
|
2022-10-21 18:38:19 +00:00
|
|
|
pname = "face_recognition";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-Xl790WhqpWavDTzBMTsTHksZdleo/9A2aebT+tknBew=";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
dlib
|
|
|
|
face-recognition-models
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
# Disables tests when running with cuda due to https://github.com/NixOS/nixpkgs/issues/225912
|
|
|
|
doCheck = !config.cudaSupport;
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
meta = with lib; {
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://github.com/ageitgey/face_recognition";
|
|
|
|
maintainers = with maintainers; [ ];
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "World's simplest facial recognition api for Python and the command line";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
}
|