1{
2 lib,
3 fetchFromGitHub,
4 pythonOlder,
5 buildPythonPackage,
6 pillow,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "captcha";
12 version = "0.5.0";
13
14 disabled = pythonOlder "3.8";
15
16 format = "setuptools";
17
18 src = fetchFromGitHub {
19 owner = "lepture";
20 repo = pname;
21 rev = "v${version}";
22 hash = "sha256-TPPuf0BRZPSHPSF0HuGxhjhoSyZQ7r86kSjkrztgZ5w=";
23 };
24
25 propagatedBuildInputs = [ pillow ];
26
27 pythonImportsCheck = [ "captcha" ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 meta = with lib; {
32 description = "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}