2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, testfixtures
|
|
|
|
, django
|
|
|
|
, django-ranged-response
|
|
|
|
, pillow
|
|
|
|
, withTTS ? true
|
|
|
|
, flite
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-simple-captcha";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.5.20";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-ICcwCae+tEKX6fbHpr0hraPS+pPDFNL2v145TO62opc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
testfixtures
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
|
|
|
cd testproject
|
|
|
|
${python.interpreter} manage.py test captcha
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
django-ranged-response
|
|
|
|
pillow
|
|
|
|
] ++ lib.optional withTTS flite;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-05-24 13:37:59 +00:00
|
|
|
description = "Customizable Django application to add captcha images to any Django form";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/mbi/django-simple-captcha";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/mbi/django-simple-captcha/blob/v${version}/CHANGES";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ mrmebelman schmittlauch ];
|
|
|
|
};
|
|
|
|
}
|