1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, django
5, django-taggit
6, pytz
7, pythonOlder
8, python
9}:
10
11buildPythonPackage rec {
12 pname = "django-modelcluster";
13 version = "6.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.5";
17
18 src = fetchFromGitHub {
19 owner = "wagtail";
20 repo = pname;
21 rev = "v${version}";
22 hash = "sha256-p6hvOkPWRVJYLHvwyn9nS05wblikRFmlSYZuLiCcuqc=";
23 };
24
25 propagatedBuildInputs = [
26 django
27 pytz
28 ];
29
30 passthru.optional-dependencies.taggit = [
31 django-taggit
32 ];
33
34 nativeCheckInputs = passthru.optional-dependencies.taggit;
35
36 checkPhase = ''
37 runHook preCheck
38 ${python.interpreter} ./runtests.py --noinput
39 runHook postCheck
40 '';
41
42 meta = with lib; {
43 description = "Django extension to allow working with 'clusters' of models as a single unit, independently of the database";
44 homepage = "https://github.com/torchbox/django-modelcluster/";
45 license = licenses.bsd2;
46 maintainers = with maintainers; [ desiderius ];
47 };
48
49}