2018-12-21 18:25:29 +01:00
|
|
|
{ lib
|
2020-11-20 19:17:56 +01:00
|
|
|
, fetchFromGitHub
|
2018-12-21 18:25:29 +01:00
|
|
|
, buildPythonPackage
|
2021-08-24 09:44:02 +02:00
|
|
|
, poetry-core
|
2021-08-12 18:43:07 +02:00
|
|
|
, docopt-ng
|
2018-12-21 18:25:29 +01:00
|
|
|
, easywatch
|
|
|
|
, jinja2
|
2020-11-20 19:17:56 +01:00
|
|
|
, pytestCheckHook
|
2021-01-25 15:17:20 +01:00
|
|
|
, pytest-check
|
2021-08-24 09:44:02 +02:00
|
|
|
, pythonOlder
|
2020-11-20 19:17:56 +01:00
|
|
|
, markdown
|
2021-06-15 03:01:10 +02:00
|
|
|
, testVersion
|
2021-08-24 09:44:02 +02:00
|
|
|
, tomlkit
|
2021-06-15 03:01:10 +02:00
|
|
|
, staticjinja
|
2018-12-21 18:25:29 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "staticjinja";
|
2021-08-12 18:43:07 +02:00
|
|
|
version = "4.1.0";
|
2021-02-09 20:39:10 +01:00
|
|
|
format = "pyproject";
|
2018-12-21 18:25:29 +01:00
|
|
|
|
2021-08-24 09:44:02 +02:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2021-02-09 20:39:10 +01:00
|
|
|
# No tests in pypi
|
2020-11-20 19:17:56 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "staticjinja";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-08-12 18:43:07 +02:00
|
|
|
sha256 = "sha256-4IL+7ncJPd1e7k5oFRjQ6yvDjozcBAAZPf88biNTiLU=";
|
2018-12-21 18:25:29 +01:00
|
|
|
};
|
|
|
|
|
2021-02-09 20:39:10 +01:00
|
|
|
nativeBuildInputs = [
|
2021-08-24 09:44:02 +02:00
|
|
|
poetry-core
|
2021-02-09 20:39:10 +01:00
|
|
|
];
|
|
|
|
|
2020-11-20 19:17:56 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2
|
2021-08-12 18:43:07 +02:00
|
|
|
docopt-ng
|
2020-11-20 19:17:56 +01:00
|
|
|
easywatch
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2021-01-25 15:17:20 +01:00
|
|
|
pytest-check
|
2020-11-20 19:17:56 +01:00
|
|
|
markdown
|
2021-08-24 09:44:02 +02:00
|
|
|
tomlkit
|
2020-11-20 19:17:56 +01:00
|
|
|
];
|
2018-12-21 18:25:29 +01:00
|
|
|
|
2021-02-09 20:39:10 +01:00
|
|
|
# The tests need to find and call the installed staticjinja executable
|
2020-11-20 19:17:56 +01:00
|
|
|
preCheck = ''
|
2021-01-25 15:17:20 +01:00
|
|
|
export PATH="$PATH:$out/bin";
|
2020-11-20 19:17:56 +01:00
|
|
|
'';
|
2018-12-21 18:25:29 +01:00
|
|
|
|
2021-06-15 03:01:10 +02:00
|
|
|
passthru.tests.version = testVersion {
|
|
|
|
package = staticjinja;
|
|
|
|
};
|
|
|
|
|
2018-12-21 18:25:29 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A library and cli tool that makes it easy to build static sites using Jinja2";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://staticjinja.readthedocs.io/en/latest/";
|
2018-12-21 18:25:29 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
};
|
|
|
|
}
|