2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-06-28 23:13:55 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2021-06-28 23:13:55 +00:00
|
|
|
, Babel
|
2020-09-25 04:45:31 +00:00
|
|
|
, markupsafe
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytestCheckHook
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Jinja2";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "3.1.1";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-ZAvtS7UBy9FxlLPKzh3CEm9bYZzwaKcmuYGSoP3nSuk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
Babel
|
|
|
|
markupsafe
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Multiple tests run out of stack space on 32bit systems with python2.
|
|
|
|
# See https://github.com/pallets/jinja/issues/1158
|
2021-06-28 23:13:55 +00:00
|
|
|
doCheck = !stdenv.is32bit;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# Avoid failure due to deprecation warning
|
|
|
|
# Fixed in https://github.com/python/cpython/pull/28153
|
|
|
|
# Remove after cpython 3.9.8
|
|
|
|
"-p no:warnings"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://jinja.palletsprojects.com/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Stand-alone template engine";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
longDescription = ''
|
2021-06-28 23:13:55 +00:00
|
|
|
Jinja is a fast, expressive, extensible templating engine. Special
|
|
|
|
placeholders in the template allow writing code similar to Python
|
|
|
|
syntax. Then the template is passed data to render the final document.
|
2020-04-24 23:36:52 +00:00
|
|
|
an optional sandboxed environment.
|
|
|
|
'';
|
|
|
|
maintainers = with maintainers; [ pierron sjourdois ];
|
|
|
|
};
|
|
|
|
}
|