2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
python,
|
|
|
|
testfixtures,
|
|
|
|
django,
|
|
|
|
django-ranged-response,
|
|
|
|
pillow,
|
|
|
|
withTTS ? true,
|
|
|
|
flite,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-simple-captcha";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.6.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-0YhRbTJvrdLVrQduuJZJ1VwCyrr+P9zCFUrBjp9tS5c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ testfixtures ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
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;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
mrmebelman
|
|
|
|
schmittlauch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|