2018-12-21 17:25:29 +00:00
|
|
|
{ lib
|
2020-11-20 18:17:56 +00:00
|
|
|
, fetchFromGitHub
|
2018-12-21 17:25:29 +00:00
|
|
|
, buildPythonPackage
|
2021-02-09 19:39:10 +00:00
|
|
|
, poetry
|
2020-11-20 18:17:56 +00:00
|
|
|
, isPy27
|
2018-12-21 17:25:29 +00:00
|
|
|
, docopt
|
|
|
|
, easywatch
|
|
|
|
, jinja2
|
2020-11-20 18:17:56 +00:00
|
|
|
, pytestCheckHook
|
2021-01-25 14:17:20 +00:00
|
|
|
, pytest-check
|
2020-11-20 18:17:56 +00:00
|
|
|
, markdown
|
2018-12-21 17:25:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "staticjinja";
|
2021-02-09 19:39:10 +00:00
|
|
|
version = "1.0.4";
|
|
|
|
format = "pyproject";
|
2018-12-21 17:25:29 +00:00
|
|
|
|
2020-11-20 18:17:56 +00:00
|
|
|
disabled = isPy27; # 0.4.0 drops python2 support
|
|
|
|
|
2021-02-09 19:39:10 +00:00
|
|
|
# No tests in pypi
|
2020-11-20 18:17:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "staticjinja";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-02-09 19:39:10 +00:00
|
|
|
sha256 = "1saz6f71s693gz9c2k3bq2di2mrkj65mgmfdg86jk0z0zzjk90y1";
|
2018-12-21 17:25:29 +00:00
|
|
|
};
|
|
|
|
|
2021-02-09 19:39:10 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry
|
|
|
|
];
|
|
|
|
|
2020-11-20 18:17:56 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2
|
|
|
|
docopt
|
|
|
|
easywatch
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2021-01-25 14:17:20 +00:00
|
|
|
pytest-check
|
2020-11-20 18:17:56 +00:00
|
|
|
markdown
|
|
|
|
];
|
2018-12-21 17:25:29 +00:00
|
|
|
|
2021-02-09 19:39:10 +00:00
|
|
|
# The tests need to find and call the installed staticjinja executable
|
2020-11-20 18:17:56 +00:00
|
|
|
preCheck = ''
|
2021-01-25 14:17:20 +00:00
|
|
|
export PATH="$PATH:$out/bin";
|
2020-11-20 18:17:56 +00:00
|
|
|
'';
|
2018-12-21 17:25:29 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A library and cli tool that makes it easy to build static sites using Jinja2";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://staticjinja.readthedocs.io/en/latest/";
|
2018-12-21 17:25:29 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
};
|
|
|
|
}
|