2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
django,
|
|
|
|
pytz,
|
|
|
|
|
|
|
|
# optionals
|
|
|
|
django-taggit,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
pytest-django,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-modelcluster";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "6.3";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wagtail";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "django-modelcluster";
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-AUVl2aidjW7Uu//3HlAod7pxzj6Gs1Xd0uTt3NrrqAU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies.taggit = [ django-taggit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
env.DJANGO_SETTINGS_MODULE = "tests.settings";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-django
|
|
|
|
pytestCheckHook
|
2024-10-04 16:56:33 +00:00
|
|
|
] ++ optional-dependencies.taggit;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
# https://github.com/wagtail/django-modelcluster/issues/173
|
|
|
|
disabledTests = lib.optionals (lib.versionAtLeast django.version "4.2") [
|
|
|
|
"test_formfield_callback"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|