My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/staticjinja/default.nix

66 lines
1.2 KiB

{ lib
, fetchFromGitHub
, buildPythonPackage
, poetry-core
, docopt-ng
, easywatch
, jinja2
, pytestCheckHook
, pytest-check
, pythonOlder
, markdown
, testers
, tomlkit
, staticjinja
, callPackage
}:
buildPythonPackage rec {
pname = "staticjinja";
version = "4.1.2";
format = "pyproject";
disabled = pythonOlder "3.6";
# No tests in pypi
src = fetchFromGitHub {
owner = "staticjinja";
repo = pname;
rev = version;
sha256 = "0qqyadhqsn66b7qrpfj08qc899pjwfa2byqqzh73xq1n22i4cy30";
};
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 = testers.testVersion { package = staticjinja; };
minimal-template = callPackage ./test-minimal-template {};
};
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 ];
};
}