depot/third_party/nixpkgs/pkgs/development/python-modules/staticjinja/default.nix
Default email 456cea78a8 Project import generated by Copybara.
GitOrigin-RevId: 88226ea038e538e09c272a7c56ba73c3f5eed57f
2021-08-25 10:27:29 +02:00

64 lines
1.2 KiB
Nix

{ lib
, fetchFromGitHub
, buildPythonPackage
, poetry-core
, docopt-ng
, easywatch
, jinja2
, pytestCheckHook
, pytest-check
, pythonOlder
, markdown
, testVersion
, tomlkit
, staticjinja
}:
buildPythonPackage rec {
pname = "staticjinja";
version = "4.1.0";
format = "pyproject";
disabled = pythonOlder "3.6";
# No tests in pypi
src = fetchFromGitHub {
owner = "staticjinja";
repo = pname;
rev = version;
sha256 = "sha256-4IL+7ncJPd1e7k5oFRjQ6yvDjozcBAAZPf88biNTiLU=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
jinja2
docopt-ng
easywatch
];
checkInputs = [
pytestCheckHook
pytest-check
markdown
tomlkit
];
# The tests need to find and call the installed staticjinja executable
preCheck = ''
export PATH="$PATH:$out/bin";
'';
passthru.tests.version = testVersion {
package = staticjinja;
};
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 ];
};
}