blob: 5ad43dfc9b1f83e33caa40713c002253ade8a378 (
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
58
59
60
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# dependencies
, django
, pytz
# optionals
, django-taggit
# tests
, pytest-django
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "django-modelcluster";
version = "6.0";
format = "setuptools";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "wagtail";
repo = "modelcluster";
rev = "refs/tags/v${version}";
hash = "sha256-p6hvOkPWRVJYLHvwyn9nS05wblikRFmlSYZuLiCcuqc=";
};
propagatedBuildInputs = [
django
pytz
];
passthru.optional-dependencies.taggit = [
django-taggit
];
env.DJANGO_SETTINGS_MODULE = "tests.settings";
nativeCheckInputs = [
pytest-django
pytestCheckHook
] ++ passthru.optional-dependencies.taggit;
# https://github.com/wagtail/django-modelcluster/issues/173
disabledTests = lib.optionals (lib.versionAtLeast django.version "4.2") [
"test_formfield_callback"
];
meta = with lib; {
description = "Django extension to allow working with 'clusters' of models as a single unit, independently of the database";
homepage = "https://github.com/torchbox/django-modelcluster/";
license = licenses.bsd2;
maintainers = with maintainers; [ desiderius ];
};
}
|