1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 setuptools-scm,
6 django,
7 django-ipware,
8 pytestCheckHook,
9 pytest-cov-stub,
10 pytest-django,
11}:
12
13buildPythonPackage rec {
14 pname = "django-axes";
15 version = "7.0.1";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "jazzband";
20 repo = "django-axes";
21 rev = "refs/tags/${version}";
22 hash = "sha256-Ci1+xC0MQKPxev4P70QnU+TSEAxiqYwIIOlqN1Lyido=";
23 };
24
25 build-system = [ setuptools-scm ];
26
27 dependencies = [ django ];
28
29 nativeCheckInputs = [
30 django-ipware
31 pytestCheckHook
32 pytest-cov-stub
33 pytest-django
34 ];
35
36 env.DJANGO_SETTINGS_MODULE = "tests.settings";
37
38 pythonImportsCheck = [ "axes" ];
39
40 meta = {
41 description = "Keep track of failed login attempts in Django-powered sites";
42 homepage = "https://github.com/jazzband/django-axes";
43 maintainers = with lib.maintainers; [ sikmir ];
44 license = lib.licenses.mit;
45 };
46}