1{ lib
2, fetchFromGitHub
3, buildPythonPackage
4, nose
5, pillow
6, wheezy-captcha
7}:
8
9buildPythonPackage rec {
10 pname = "captcha";
11 version = "0.4";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "lepture";
16 repo = pname;
17 rev = "v${version}";
18 hash = "sha256-uxUjoACN65Cx5LMKpT+bZhKpf2JRSaEyysnYUgZntp8=";
19 };
20
21 propagatedBuildInputs = [ pillow ];
22
23 pythonImportsCheck = [ "captcha" ];
24
25 nativeCheckInputs = [ nose wheezy-captcha ];
26
27 checkPhase = ''
28 nosetests -s
29 '';
30
31 meta = with lib; {
32 description = "A captcha library that generates audio and image CAPTCHAs";
33 homepage = "https://github.com/lepture/captcha";
34 license = licenses.bsd3;
35 maintainers = with maintainers; [ Flakebi ];
36 };
37}