2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2023-02-09 11:40:11 +00:00
|
|
|
, fetchFromGitHub
|
2023-03-15 16:39:30 +00:00
|
|
|
, fetchpatch
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, poetry-core
|
|
|
|
|
|
|
|
# docs
|
|
|
|
, furo
|
|
|
|
, sphinxHook
|
|
|
|
|
|
|
|
# runtime
|
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
|
2023-02-09 11:40:11 +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";
|
|
|
|
version = "3.0.1";
|
|
|
|
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}";
|
|
|
|
hash = "sha256-bHsB1f7dbZW4k8JteyZOwVCgWRDZMu21XdMcjM5NYjk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# https://github.com/python-babel/flask-babel/pull/222
|
|
|
|
url = "https://github.com/python-babel/flask-babel/commit/756cace7d96e9eacef66813c8df653d2bb349da0.patch";
|
|
|
|
hash = "sha256-hp/QPS/ZyRMUnyqU+fvMJKPISBECc9kqdCu8U6Hnd5g=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"flask_babel"
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|