1{ 2 buildPythonPackage, 3 fetchPypi, 4 lib, 5 6 # propagates 7 click, 8 dlib, 9 face-recognition-models, 10 numpy, 11 pillow, 12 13 # tests 14 pytestCheckHook, 15 config, 16 cudaSupport ? config.cudaSupport, 17}: 18 19buildPythonPackage rec { 20 pname = "face-recognition"; 21 version = "1.3.0"; 22 format = "setuptools"; 23 24 src = fetchPypi { 25 pname = "face_recognition"; 26 inherit version; 27 hash = "sha256-Xl790WhqpWavDTzBMTsTHksZdleo/9A2aebT+tknBew="; 28 }; 29 30 propagatedBuildInputs = [ 31 click 32 dlib 33 face-recognition-models 34 numpy 35 pillow 36 ]; 37 38 nativeCheckInputs = [ pytestCheckHook ]; 39 40 # Disables tests when running with cuda due to https://github.com/NixOS/nixpkgs/issues/225912 41 doCheck = !config.cudaSupport; 42 43 meta = with lib; { 44 license = licenses.mit; 45 homepage = "https://github.com/ageitgey/face_recognition"; 46 maintainers = [ ]; 47 description = "World's simplest facial recognition api for Python and the command line"; 48 }; 49}