2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# bring your own
|
|
|
|
django,
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# propagates
|
|
|
|
python-stdnum,
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytest-django,
|
|
|
|
pytestCheckHook,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-localflavor";
|
|
|
|
version = "4.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "django";
|
|
|
|
repo = "django-localflavor";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-UWp3ei1VlEsEfjbJIE+MpffSzYF4X1HEQw+z+5kZoP0=";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ django ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ python-stdnum ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
# samples
|
|
|
|
"localflavor.ar"
|
|
|
|
"localflavor.de"
|
|
|
|
"localflavor.fr"
|
|
|
|
"localflavor.my"
|
|
|
|
"localflavor.nl"
|
|
|
|
"localflavor.us"
|
|
|
|
"localflavor.za"
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-django
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
DJANGO_SETTINGS_MODULE = "tests.settings";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Country-specific Django helpers";
|
|
|
|
homepage = "https://github.com/django/django-localflavor";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|