2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2023-02-09 11:40:11 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
poetry-core,
|
2023-02-09 11:40:11 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# docs
|
|
|
|
furo,
|
|
|
|
sphinxHook,
|
2023-02-09 11:40:11 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# runtime
|
|
|
|
babel,
|
|
|
|
flask,
|
|
|
|
jinja2,
|
|
|
|
pytz,
|
2023-02-09 11:40:11 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-02-09 11:40:11 +00:00
|
|
|
pname = "flask-babel";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "4.0.0";
|
2023-02-09 11:40:11 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-babel";
|
|
|
|
repo = "flask-babel";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-BAT+oupy4MCSjeZ4hFtSKMkGU9xZtc7Phnz1mIsb2Kc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"doc"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
furo
|
|
|
|
poetry-core
|
|
|
|
sphinxHook
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
babel
|
2023-02-09 11:40:11 +00:00
|
|
|
flask
|
2020-04-24 23:36:52 +00:00
|
|
|
jinja2
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "flask_babel" ];
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-02-09 11:40:11 +00:00
|
|
|
changelog = "https://github.com/python-babel/flask-babel/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Adds i18n/l10n support to Flask applications";
|
|
|
|
longDescription = ''
|
|
|
|
Implements i18n and l10n support for Flask.
|
|
|
|
This is based on the Python babel module as well as pytz both of which are
|
|
|
|
installed automatically for you if you install this library.
|
|
|
|
'';
|
|
|
|
license = licenses.bsd2;
|
2023-02-09 11:40:11 +00:00
|
|
|
maintainers = teams.sage.members ++ (with maintainers; [ matejc ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/python-babel/flask-babel";
|
|
|
|
};
|
|
|
|
}
|