about summary refs log tree commit diff
path: root/pkgs/development/python-modules/face-recognition/default.nix
blob: ef1d57e3eb67ab5ae3c46ab14357b53579d81a98 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ 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";
  };
}