2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-02-23 11:17:50 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
2020-08-26 16:52:51 +01:00
|
|
|
, markupsafe
|
2020-10-26 14:19:52 +00:00
|
|
|
, setuptools
|
2020-08-26 16:52:51 +01:00
|
|
|
}:
|
2017-09-05 10:16:41 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Jinja2";
|
2021-02-20 09:09:10 +00:00
|
|
|
version = "2.11.3";
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2018-02-03 00:46:08 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-20 09:09:10 +00:00
|
|
|
sha256 = "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6";
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
|
2017-12-26 18:55:59 +00:00
|
|
|
checkInputs = [ pytest ];
|
2020-08-26 16:52:51 +01:00
|
|
|
propagatedBuildInputs = [ markupsafe setuptools ];
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2020-02-23 11:17:50 +00:00
|
|
|
# Multiple tests run out of stack space on 32bit systems with python2.
|
|
|
|
# See https://github.com/pallets/jinja/issues/1158
|
|
|
|
doCheck = !stdenv.is32bit || isPy3k;
|
|
|
|
|
2017-12-26 18:55:59 +00:00
|
|
|
checkPhase = ''
|
2018-08-13 13:41:32 +01:00
|
|
|
pytest -v tests
|
2017-12-26 18:55:59 +00:00
|
|
|
'';
|
2017-09-05 10:16:41 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://jinja.pocoo.org/";
|
2017-09-05 10:16:41 +01:00
|
|
|
description = "Stand-alone template engine";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
longDescription = ''
|
|
|
|
Jinja2 is a template engine written in pure Python. It provides a
|
|
|
|
Django inspired non-XML syntax but supports inline expressions and
|
|
|
|
an optional sandboxed environment.
|
2017-12-26 18:55:59 +00:00
|
|
|
'';
|
2019-07-03 10:27:39 +01:00
|
|
|
maintainers = with maintainers; [ pierron sjourdois ];
|
2017-09-05 10:16:41 +01:00
|
|
|
};
|
|
|
|
}
|