Files
nixpkgs/pkgs/development/python-modules/django-timezone-field/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

57 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
poetry-core,
django,
djangorestframework,
pytestCheckHook,
pytest-django,
pytest-lazy-fixture,
pytz,
}:
buildPythonPackage rec {
pname = "django-timezone-field";
version = "7.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "mfogel";
repo = "django-timezone-field";
rev = version;
hash = "sha256-q06TuYkBA4z6tJdT3an6Z8o1i/o85XbYa1JYZBHC8lI=";
};
build-system = [ poetry-core ];
dependencies = [ django ];
pythonImportsCheck = [
# Requested setting USE_DEPRECATED_PYTZ, but settings are not configured.
#"timezone_field"
];
preCheck = ''
export DJANGO_SETTINGS_MODULE=tests.settings
'';
nativeCheckInputs = [
djangorestframework
pytestCheckHook
pytest-django
pytest-lazy-fixture
pytz
];
meta = {
description = "Django app providing database, form and serializer fields for pytz timezone objects";
homepage = "https://github.com/mfogel/django-timezone-field";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ hexa ];
};
}