2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-01-15 22:18:51 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-01-15 22:18:51 +00:00
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
, docopt
|
|
|
|
, easywatch
|
|
|
|
, jinja2
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, markdown
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "staticjinja";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "0.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
disabled = isPy27; # 0.4.0 drops python2 support
|
|
|
|
|
|
|
|
# For some reason, in pypi the tests get disabled when using
|
|
|
|
# PY_IGNORE_IMPORTMISMATCH, so we just fetch from GitHub
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "staticjinja";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0pysk8pzmcg1nfxz8m4i6bvww71w2zg6xp33zgg5vrf8yd2dfx9i";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2
|
|
|
|
docopt
|
|
|
|
easywatch
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
markdown
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
# Import paths differ by a "build/lib" subdirectory, but the files are
|
|
|
|
# the same, so we ignore import mismatches.
|
|
|
|
preCheck = ''
|
|
|
|
export PY_IGNORE_IMPORTMISMATCH=1
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A library and cli tool that makes it easy to build static sites using Jinja2";
|
|
|
|
homepage = "https://staticjinja.readthedocs.io/en/latest/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
};
|
|
|
|
}
|