summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/django-registration/default.nix
blob: 4aa4f65c940a998843884f3168abdcf2b92c7c5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pdm-backend,
  confusable-homoglyphs,
  coverage,
  django,
}:

buildPythonPackage rec {
  pname = "django-registration";
  version = "5.2.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ubernostrum";
    repo = "django-registration";
    tag = version;
    hash = "sha256-k7r4g+iCdAwAUNQdbtxzS5kqgAavEBAJERSWgXvbXqg=";
  };

  build-system = [ pdm-backend ];

  dependencies = [
    confusable-homoglyphs
  ];

  nativeCheckInputs = [
    coverage
    django
  ];

  installCheckPhase = ''
    runHook preInstallCheck

    DJANGO_SETTINGS_MODULE=tests.settings python -m coverage run --source django_registration runtests.py

    runHook postInstallCheck
  '';

  pythonImportsCheck = [ "django_registration" ];

  meta = {
    changelog = "https://github.com/ubernostrum/django-registration/blob/${version}/docs/changelog.rst";
    description = "User registration app for Django";
    homepage = "https://django-registration.readthedocs.io/en/${version}/";
    downloadPage = "https://github.com/ubernostrum/django-registration";
    license = lib.licenses.bsd3;
    maintainers = [ lib.maintainers.l0b0 ];
  };
}