diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2021-10-12 00:36:02 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2021-11-02 18:31:41 +0100 |
commit | e2c8c6ceebb5ec6b27b5b9167a76ca9196a9ddb0 (patch) | |
tree | d2ab229269a13bf20367e419a418c5dcfb207284 /pkgs/development/python-modules/django-timezone-field | |
parent | 0a41e93ce4e5458c900701e3e8fdbbfca526cc17 (diff) |
python3Packages.django-timezone-field: init at 4.2.1
Diffstat (limited to 'pkgs/development/python-modules/django-timezone-field')
-rw-r--r-- | pkgs/development/python-modules/django-timezone-field/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/django-timezone-field/default.nix b/pkgs/development/python-modules/django-timezone-field/default.nix new file mode 100644 index 0000000000000..0bbdac356cd03 --- /dev/null +++ b/pkgs/development/python-modules/django-timezone-field/default.nix @@ -0,0 +1,62 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, poetry-core +, django +, djangorestframework +, pytz +, pytest +, pytest-lazy-fixture +, python +}: + +buildPythonPackage rec { + pname = "django-timezone-field"; + version = "4.2.1"; + format = "setuptools"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "mfogel"; + repo = pname; + rev = version; + sha256 = "0swld4168pfhppr9q3i9r062l832cmmx792kkvlcvxfbdhk6qz9h"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + django + djangorestframework + pytz + ]; + + 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; + + DJANGO_SETTINGS_MODULE = "tests.settings"; + + checkInputs = [ + pytest + 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"; + license = licenses.bsd2; + maintainers = with maintainers; [ hexa ]; + }; +} |