1{ lib
2, buildPythonPackage
3, fetchpatch
4, fetchPypi
5, arrow
6, freezegun
7, jinja2
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "jinja2-time";
13 version = "0.2.0";
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni";
18 };
19
20 patches = [
21 # fix usage of arrow in tests
22 (fetchpatch {
23 url = "https://github.com/hackebrot/jinja2-time/pull/19/commits/3b2476c266ba53262352153104ca3501722823a4.patch";
24 hash = "sha256-zh4PpAj2GtpgaEap/Yvu6DNY84AwH/YTJlUPRRHPyTs=";
25 })
26 ];
27
28 propagatedBuildInputs = [ arrow jinja2 ];
29
30 nativeCheckInputs = [ freezegun pytestCheckHook ];
31
32 pythonImportsCheck = [ "jinja2_time" ];
33
34 meta = with lib; {
35 homepage = "https://github.com/hackebrot/jinja2-time";
36 description = "Jinja2 Extension for Dates and Times";
37 license = licenses.mit;
38 maintainers = with maintainers; [ ];
39 };
40}