1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 poetry-core, 7 django, 8 djangorestframework, 9 pytz, 10 pytest, 11 pytest-lazy-fixture, 12 python, 13}: 14 15buildPythonPackage rec { 16 pname = "django-timezone-field"; 17 version = "5.1"; 18 disabled = pythonOlder "3.5"; 19 format = "pyproject"; 20 21 src = fetchFromGitHub { 22 owner = "mfogel"; 23 repo = pname; 24 rev = version; 25 hash = "sha256-FAYO8OEE/h4rsbC4Oc57ylWV7TqQ6DOd6/2M+mb/AsM="; 26 }; 27 28 nativeBuildInputs = [ poetry-core ]; 29 30 propagatedBuildInputs = [ 31 django 32 djangorestframework 33 pytz 34 ]; 35 36 pythonImportsCheck = [ "timezone_field" ]; 37 38 # Uses pytest.lazy_fixture directly which is broken in pytest-lazy-fixture 39 # https://github.com/TvoroG/pytest-lazy-fixture/issues/22 40 doCheck = false; 41 42 DJANGO_SETTINGS_MODULE = "tests.settings"; 43 44 nativeCheckInputs = [ 45 pytest 46 pytest-lazy-fixture 47 ]; 48 49 checkPhase = '' 50 ${python.interpreter} -m django test 51 ''; 52 53 meta = with lib; { 54 description = "Django app providing database, form and serializer fields for pytz timezone objects"; 55 homepage = "https://github.com/mfogel/django-timezone-field"; 56 license = licenses.bsd2; 57 maintainers = with maintainers; [ hexa ]; 58 }; 59}