ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / django-timezone-field / default.nix
blobf8f85adf0d3d80f47680fc313c97e1be2f80dba8
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , poetry-core
6 , django
7 , djangorestframework
8 , pytz
9 , pytest
10 , pytest-lazy-fixture
11 , python
14 buildPythonPackage rec {
15   pname = "django-timezone-field";
16   version = "5.0";
17   disabled = pythonOlder "3.5";
18   format = "pyproject";
20   src = fetchFromGitHub {
21     owner = "mfogel";
22     repo = pname;
23     rev = version;
24     sha256 = "sha256-GXkvF/kAOU1JK0GDpUT1irCQlkxIWieYRqPd0fr2HXw=";
25   };
27   nativeBuildInputs = [
28     poetry-core
29   ];
31   propagatedBuildInputs = [
32     django
33     djangorestframework
34     pytz
35   ];
37   pythonImportsCheck = [
38     "timezone_field"
39   ];
41   # Uses pytest.lazy_fixture directly which is broken in pytest-lazy-fixture
42   # https://github.com/TvoroG/pytest-lazy-fixture/issues/22
43   doCheck = false;
45   DJANGO_SETTINGS_MODULE = "tests.settings";
47   checkInputs = [
48     pytest
49     pytest-lazy-fixture
50   ];
52   checkPhase = ''
53     ${python.interpreter} -m django test
54   '';
56   meta = with lib; {
57     description = "Django app providing database, form and serializer fields for pytz timezone objects";
58     homepage = "https://github.com/mfogel/django-timezone-field";
59     license = licenses.bsd2;
60     maintainers = with maintainers; [ hexa ];
61   };