2021-06-02 20:10:37 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-02-23 12:17:50 +01:00
|
|
|
, buildPythonPackage
|
2021-06-02 20:10:37 +02:00
|
|
|
, pythonOlder
|
2020-02-23 12:17:50 +01:00
|
|
|
, fetchPypi
|
2021-06-02 20:10:37 +02:00
|
|
|
, Babel
|
2020-08-26 17:52:51 +02:00
|
|
|
, markupsafe
|
2021-06-02 20:10:37 +02:00
|
|
|
, pytestCheckHook
|
2020-08-26 17:52:51 +02:00
|
|
|
}:
|
2017-09-05 11:16:41 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Jinja2";
|
2021-10-09 00:23:08 +02:00
|
|
|
version = "3.0.2";
|
2021-06-02 20:10:37 +02:00
|
|
|
disabled = pythonOlder "3.6";
|
2017-09-05 11:16:41 +02:00
|
|
|
|
2018-02-03 01:46:08 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-09 00:23:08 +02:00
|
|
|
sha256 = "827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45";
|
2017-09-05 11:16:41 +02:00
|
|
|
};
|
|
|
|
|
2021-06-02 20:10:37 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
Babel
|
|
|
|
markupsafe
|
|
|
|
];
|
2017-09-05 11:16:41 +02:00
|
|
|
|
2020-02-23 12:17:50 +01:00
|
|
|
# Multiple tests run out of stack space on 32bit systems with python2.
|
|
|
|
# See https://github.com/pallets/jinja/issues/1158
|
2021-06-02 20:10:37 +02:00
|
|
|
doCheck = !stdenv.is32bit;
|
2020-02-23 12:17:50 +01:00
|
|
|
|
2021-06-02 20:10:37 +02:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2017-09-05 11:16:41 +02:00
|
|
|
|
2021-09-13 19:15:26 +02: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-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://jinja.pocoo.org/";
|
2017-09-05 11:16:41 +02:00
|
|
|
description = "Stand-alone template engine";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
longDescription = ''
|
2021-06-02 20:10:37 +02: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.
|
2017-09-05 11:16:41 +02:00
|
|
|
an optional sandboxed environment.
|
2017-12-26 19:55:59 +01:00
|
|
|
'';
|
2019-07-03 11:27:39 +02:00
|
|
|
maintainers = with maintainers; [ pierron sjourdois ];
|
2017-09-05 11:16:41 +02:00
|
|
|
};
|
|
|
|
}
|