2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2020-02-23 12:17:50 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
2020-08-26 17:52:51 +02:00
|
|
|
, markupsafe
|
2020-10-26 15:19:52 +01:00
|
|
|
, setuptools
|
2020-08-26 17:52:51 +02:00
|
|
|
}:
|
2017-09-05 11:16:41 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Jinja2";
|
2021-02-20 10:09:10 +01:00
|
|
|
version = "2.11.3";
|
2017-09-05 11:16:41 +02:00
|
|
|
|
2018-02-03 01:46:08 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-20 10:09:10 +01:00
|
|
|
sha256 = "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6";
|
2017-09-05 11:16:41 +02:00
|
|
|
};
|
|
|
|
|
2017-12-26 19:55:59 +01:00
|
|
|
checkInputs = [ pytest ];
|
2020-08-26 17:52:51 +02:00
|
|
|
propagatedBuildInputs = [ markupsafe setuptools ];
|
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
|
|
|
|
doCheck = !stdenv.is32bit || isPy3k;
|
|
|
|
|
2017-12-26 19:55:59 +01:00
|
|
|
checkPhase = ''
|
2018-08-13 14:41:32 +02:00
|
|
|
pytest -v tests
|
2017-12-26 19:55:59 +01:00
|
|
|
'';
|
2017-09-05 11:16:41 +02:00
|
|
|
|
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 = ''
|
|
|
|
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 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
|
|
|
};
|
|
|
|
}
|