depot/third_party/nixpkgs/pkgs/development/python-modules/face-recognition/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

49 lines
983 B
Nix

{
buildPythonPackage,
fetchPypi,
lib,
# propagates
click,
dlib,
face-recognition-models,
numpy,
pillow,
# tests
pytestCheckHook,
config,
cudaSupport ? config.cudaSupport,
}:
buildPythonPackage rec {
pname = "face-recognition";
version = "1.3.0";
format = "setuptools";
src = fetchPypi {
pname = "face_recognition";
inherit version;
hash = "sha256-Xl790WhqpWavDTzBMTsTHksZdleo/9A2aebT+tknBew=";
};
propagatedBuildInputs = [
click
dlib
face-recognition-models
numpy
pillow
];
nativeCheckInputs = [ pytestCheckHook ];
# Disables tests when running with cuda due to https://github.com/NixOS/nixpkgs/issues/225912
doCheck = !config.cudaSupport;
meta = with lib; {
license = licenses.mit;
homepage = "https://github.com/ageitgey/face_recognition";
maintainers = with maintainers; [ ];
description = "The world's simplest facial recognition api for Python and the command line";
};
}