2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2018-10-16 13:47:51 -04:00
|
|
|
, buildPythonPackage
|
2022-04-02 03:14:28 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, django
|
|
|
|
, django-taggit
|
2018-10-16 13:47:51 -04:00
|
|
|
, pytz
|
2019-08-25 06:43:24 -05:00
|
|
|
, pythonOlder
|
2022-04-02 03:14:28 +02:00
|
|
|
, python
|
2018-10-16 13:47:51 -04:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-modelcluster";
|
2022-03-31 01:05:06 +02:00
|
|
|
version = "6.0";
|
2022-04-02 03:14:28 +02:00
|
|
|
format = "setuptools";
|
2018-10-16 13:47:51 -04:00
|
|
|
|
2022-04-02 03:14:28 +02:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wagtail";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-p6hvOkPWRVJYLHvwyn9nS05wblikRFmlSYZuLiCcuqc=";
|
2018-10-16 13:47:51 -04:00
|
|
|
};
|
|
|
|
|
2022-04-02 03:14:28 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
2022-05-22 16:26:11 +02:00
|
|
|
passthru.optional-dependencies.taggit = [
|
2022-04-02 03:14:28 +02:00
|
|
|
django-taggit
|
|
|
|
];
|
2019-08-25 06:43:24 -05:00
|
|
|
|
2022-05-22 16:26:11 +02:00
|
|
|
checkInputs = passthru.optional-dependencies.taggit;
|
2018-10-16 13:47:51 -04:00
|
|
|
|
2022-04-02 03:14:28 +02:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} ./runtests.py --noinput
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2018-10-16 13:47:51 -04:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-10-16 13:47:51 -04:00
|
|
|
description = "Django extension to allow working with 'clusters' of models as a single unit, independently of the database";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/torchbox/django-modelcluster/";
|
2018-10-16 13:47:51 -04:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ desiderius ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|