2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-12-02 08:20:57 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, arrow
|
2022-12-02 08:20:57 +00:00
|
|
|
, freezegun
|
2020-04-24 23:36:52 +00:00
|
|
|
, jinja2
|
2022-12-02 08:20:57 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jinja2-time";
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "0.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni";
|
|
|
|
};
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
patches = [
|
|
|
|
# fix usage of arrow in tests
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/hackebrot/jinja2-time/pull/19/commits/3b2476c266ba53262352153104ca3501722823a4.patch";
|
|
|
|
sha256 = "sha256-zh4PpAj2GtpgaEap/Yvu6DNY84AwH/YTJlUPRRHPyTs=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ arrow jinja2 ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ freezegun pytestCheckHook ];
|
2022-12-02 08:20:57 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "jinja2_time" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/hackebrot/jinja2-time";
|
|
|
|
description = "Jinja2 Extension for Dates and Times";
|
|
|
|
license = licenses.mit;
|
2022-12-02 08:20:57 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|