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
|
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
|
|
|
|
, markdown
|
2018-12-21 17:25:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "staticjinja";
|
2020-11-29 14:04:43 +00:00
|
|
|
version = "0.4.0";
|
2018-12-21 17:25:29 +00:00
|
|
|
|
2020-11-20 18:17:56 +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";
|
2018-12-21 17:25:29 +00:00
|
|
|
};
|
|
|
|
|
2020-11-20 18:17:56 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2
|
|
|
|
docopt
|
|
|
|
easywatch
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
markdown
|
|
|
|
];
|
2018-12-21 17:25:29 +00:00
|
|
|
|
2020-11-20 18:17:56 +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
|
|
|
|
'';
|
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 ];
|
|
|
|
};
|
|
|
|
}
|