about summary refs log tree commit diff
path: root/pkgs/development/python-modules/jinja2-time/default.nix
blob: 3daf84fa69d7df75589d32a295cb9e611fd34009 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, buildPythonPackage
, fetchpatch
, fetchPypi
, arrow
, freezegun
, jinja2
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "jinja2-time";
  version = "0.2.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni";
  };

  patches = [
    # fix usage of arrow in tests
    (fetchpatch {
      url = "https://github.com/hackebrot/jinja2-time/pull/19/commits/3b2476c266ba53262352153104ca3501722823a4.patch";
      hash = "sha256-zh4PpAj2GtpgaEap/Yvu6DNY84AwH/YTJlUPRRHPyTs=";
    })
  ];

  propagatedBuildInputs = [ arrow jinja2 ];

  nativeCheckInputs = [ freezegun pytestCheckHook ];

  pythonImportsCheck = [ "jinja2_time" ];

  meta = with lib; {
    homepage = "https://github.com/hackebrot/jinja2-time";
    description = "Jinja2 Extension for Dates and Times";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}