1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pythonOlder, 7 setuptools, 8 typing-extensions, 9}: 10 11buildPythonPackage rec { 12 pname = "mistune"; 13 version = "3.1.3"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "lepture"; 18 repo = "mistune"; 19 tag = "v${version}"; 20 hash = "sha256-aD+c41nuSmLUoYzK8adP0eLYRU0FihHEqG4e0b0GZ9k="; 21 }; 22 23 dependencies = lib.optionals (pythonOlder "3.11") [ 24 typing-extensions 25 ]; 26 27 build-system = [ setuptools ]; 28 29 nativeCheckInputs = [ pytestCheckHook ]; 30 31 pythonImportsCheck = [ "mistune" ]; 32 33 meta = { 34 changelog = "https://github.com/lepture/mistune/blob/${src.tag}/docs/changes.rst"; 35 description = "Sane Markdown parser with useful plugins and renderers"; 36 homepage = "https://github.com/lepture/mistune"; 37 license = lib.licenses.bsd3; 38 maintainers = with lib.maintainers; [ dotlambda ]; 39 }; 40}