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