about summary refs log tree commit diff
path: root/pkgs/development/python-modules/django-dynamic-preferences/default.nix
blob: 28f9368de776bcfcaea5440423372fe5239213f6 (plain) (blame)
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
53
54
55
56
57
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonOlder,

  # dependencies
  django,
  persisting-theory,
  six,

  # tests
  djangorestframework,
  pytest-django,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "django-dynamic-preferences";
  version = "1.15.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "agateblue";
    repo = "django-dynamic-preferences";
    rev = "refs/tags/${version}";
    hash = "sha256-S0PAlSrMOQ68mX548pZzARfau/lytXWC4S5uVO1rUmo=";
  };

  buildInputs = [ django ];

  propagatedBuildInputs = [
    six
    persisting-theory
  ];

  nativeCheckInputs = [
    djangorestframework
    pytestCheckHook
    pytest-django
  ];

  pythonImportsCheck = [ "dynamic_preferences" ];

  # Remove once https://github.com/agateblue/django-dynamic-preferences/issues/309 is fixed
  doCheck = pythonOlder "3.12";

  env.DJANGO_SETTINGS = "tests.settings";

  meta = with lib; {
    changelog = "https://github.com/agateblue/django-dynamic-preferences/blob/${version}/HISTORY.rst";
    homepage = "https://github.com/EliotBerriot/django-dynamic-preferences";
    description = "Dynamic global and instance settings for your django project";
    license = licenses.bsd3;
    maintainers = with maintainers; [ mmai ];
  };
}