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";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "3.0.1";
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "197ms1wimxql650245v63wkv04n8bicj549wfhp51bx68x5lhgvh";
|
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-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://jinja.pocoo.org/";
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|