1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 django, 11 django-ranged-response, 12 pillow, 13 14 # tests 15 flite, 16 pytest-django, 17 pytestCheckHook, 18 testfixtures, 19}: 20 21buildPythonPackage rec { 22 pname = "django-simple-captcha"; 23 version = "0.6.2"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "mbi"; 28 repo = "django-simple-captcha"; 29 tag = "v${version}"; 30 hash = "sha256-hOvZQCAAlMYaNpAN+junhfgWej92shto7ejhKUPqbX0="; 31 }; 32 33 build-system = [ setuptools ]; 34 35 dependencies = [ 36 django 37 pillow 38 django-ranged-response 39 ]; 40 41 nativeCheckInputs = [ 42 flite 43 pytest-django 44 pytestCheckHook 45 testfixtures 46 ]; 47 48 checkPhase = '' 49 runHook preCheck 50 pushd testproject 51 python manage.py test captcha 52 popd 53 runHook postCheck 54 ''; 55 56 meta = with lib; { 57 description = "Customizable Django application to add captcha images to any Django form"; 58 homepage = "https://github.com/mbi/django-simple-captcha"; 59 changelog = "https://github.com/mbi/django-simple-captcha/blob/${src.tag}/CHANGES"; 60 license = licenses.mit; 61 maintainers = with maintainers; [ 62 mrmebelman 63 ]; 64 }; 65}