1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, poetry-core 5, docopt-ng 6, easywatch 7, jinja2 8, pytestCheckHook 9, pytest-check 10, pythonOlder 11, markdown 12, testers 13, tomlkit 14, typing-extensions 15, staticjinja 16, callPackage 17}: 18 19buildPythonPackage rec { 20 pname = "staticjinja"; 21 version = "5.0.0"; 22 format = "pyproject"; 23 24 disabled = pythonOlder "3.6"; 25 26 # No tests in pypi 27 src = fetchFromGitHub { 28 owner = "staticjinja"; 29 repo = pname; 30 rev = version; 31 hash = "sha256-LfJTQhZtnTOm39EWF1m2MP5rxz/5reE0G1Uk9L7yx0w="; 32 }; 33 34 nativeBuildInputs = [ 35 poetry-core 36 ]; 37 38 propagatedBuildInputs = [ 39 jinja2 40 docopt-ng 41 easywatch 42 ]; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 pytest-check 47 markdown 48 tomlkit 49 typing-extensions 50 ]; 51 52 # The tests need to find and call the installed staticjinja executable 53 preCheck = '' 54 export PATH="$PATH:$out/bin"; 55 ''; 56 57 passthru.tests = { 58 version = testers.testVersion { package = staticjinja; }; 59 minimal-template = callPackage ./test-minimal-template {}; 60 }; 61 62 meta = with lib; { 63 description = "A library and cli tool that makes it easy to build static sites using Jinja2"; 64 homepage = "https://staticjinja.readthedocs.io/en/latest/"; 65 license = licenses.mit; 66 maintainers = with maintainers; [ fgaz ]; 67 }; 68}