diff --git a/pkgs/development/python-modules/django-timezone-field/default.nix b/pkgs/development/python-modules/django-timezone-field/default.nix index c111c4aff6d4a..e53b0da04c4a0 100644 --- a/pkgs/development/python-modules/django-timezone-field/default.nix +++ b/pkgs/development/python-modules/django-timezone-field/default.nix @@ -6,50 +6,45 @@ poetry-core, django, djangorestframework, - pytz, - pytest, + pytestCheckHook, + pytest-django, pytest-lazy-fixture, - python, }: buildPythonPackage rec { pname = "django-timezone-field"; - version = "5.1"; - disabled = pythonOlder "3.5"; - format = "pyproject"; + version = "7.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "mfogel"; repo = pname; rev = version; - hash = "sha256-FAYO8OEE/h4rsbC4Oc57ylWV7TqQ6DOd6/2M+mb/AsM="; + hash = "sha256-q06TuYkBA4z6tJdT3an6Z8o1i/o85XbYa1JYZBHC8lI="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ - django - djangorestframework - pytz - ]; + dependencies = [ django ]; - pythonImportsCheck = [ "timezone_field" ]; - - # Uses pytest.lazy_fixture directly which is broken in pytest-lazy-fixture - # https://github.com/TvoroG/pytest-lazy-fixture/issues/22 - doCheck = false; + pythonImportsCheck = [ + # Requested setting USE_DEPRECATED_PYTZ, but settings are not configured. + #"timezone_field" + ]; - DJANGO_SETTINGS_MODULE = "tests.settings"; + preCheck = '' + export DJANGO_SETTINGS_MODULE=tests.settings + ''; nativeCheckInputs = [ - pytest + djangorestframework + pytestCheckHook + pytest-django pytest-lazy-fixture ]; - checkPhase = '' - ${python.interpreter} -m django test - ''; - meta = with lib; { description = "Django app providing database, form and serializer fields for pytz timezone objects"; homepage = "https://github.com/mfogel/django-timezone-field";