Files
nixpkgs/pkgs/development/python-modules/django-simple-captcha/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

66 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
django,
django-ranged-response,
pillow,
# tests
flite,
pytest-django,
pytestCheckHook,
testfixtures,
}:
buildPythonPackage rec {
pname = "django-simple-captcha";
version = "0.6.3";
pyproject = true;
src = fetchFromGitHub {
owner = "mbi";
repo = "django-simple-captcha";
tag = "v${version}";
hash = "sha256-Fee7YfIWGyKMsN7XQz10bjIhbjUYRuY7Oe4Q8n8ILz0=";
};
build-system = [ setuptools ];
dependencies = [
django
pillow
django-ranged-response
];
nativeCheckInputs = [
flite
pytest-django
pytestCheckHook
testfixtures
];
checkPhase = ''
runHook preCheck
pushd testproject
python manage.py test captcha
popd
runHook postCheck
'';
meta = {
description = "Customizable Django application to add captcha images to any Django form";
homepage = "https://github.com/mbi/django-simple-captcha";
changelog = "https://github.com/mbi/django-simple-captcha/blob/${src.tag}/CHANGES";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
mrmebelman
];
};
}