summary refs log tree commit diff
path: root/pkgs/development/python-modules/captcha/default.nix
blob: d040c2e7bf7607514aa85073759120c7ed59e095 (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
{ lib
, fetchFromGitHub
, buildPythonPackage
, nose
, pillow
, wheezy-captcha
}:

buildPythonPackage rec {
  pname = "captcha";
  version = "0.4";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "lepture";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-uxUjoACN65Cx5LMKpT+bZhKpf2JRSaEyysnYUgZntp8=";
  };

  propagatedBuildInputs = [ pillow ];

  pythonImportsCheck = [ "captcha" ];

  nativeCheckInputs = [ nose wheezy-captcha ];

  checkPhase = ''
    nosetests -s
  '';

  meta = with lib; {
    description = "A captcha library that generates audio and image CAPTCHAs";
    homepage = "https://github.com/lepture/captcha";
    license = licenses.bsd3;
    maintainers = with maintainers; [ Flakebi ];
  };
}