1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 poetry-core,
7 django,
8 djangorestframework,
9 pytestCheckHook,
10 pytest-django,
11 pytest-lazy-fixture,
12}:
13
14buildPythonPackage rec {
15 pname = "django-timezone-field";
16 version = "7.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "mfogel";
23 repo = pname;
24 rev = version;
25 hash = "sha256-q06TuYkBA4z6tJdT3an6Z8o1i/o85XbYa1JYZBHC8lI=";
26 };
27
28 build-system = [ poetry-core ];
29
30 dependencies = [ django ];
31
32 pythonImportsCheck = [
33 # Requested setting USE_DEPRECATED_PYTZ, but settings are not configured.
34 #"timezone_field"
35 ];
36
37 preCheck = ''
38 export DJANGO_SETTINGS_MODULE=tests.settings
39 '';
40
41 nativeCheckInputs = [
42 djangorestframework
43 pytestCheckHook
44 pytest-django
45 pytest-lazy-fixture
46 ];
47
48 meta = with lib; {
49 description = "Django app providing database, form and serializer fields for pytz timezone objects";
50 homepage = "https://github.com/mfogel/django-timezone-field";
51 license = licenses.bsd2;
52 maintainers = with maintainers; [ hexa ];
53 };
54}