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.2"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchFromGitHub { 19 owner = "lepture"; 20 repo = "mistune"; 21 tag = "v${version}"; 22 hash = "sha256-XvDp+X/+s6TsUC889qjTGzrde6s/BYoXUw2AblaATnI="; 23 }; 24 25 dependencies = lib.optionals (pythonOlder "3.11") [ 26 typing-extensions 27 ]; 28 29 build-system = [ setuptools ]; 30 31 nativeCheckInputs = [ pytestCheckHook ]; 32 33 pythonImportsCheck = [ "mistune" ]; 34 35 meta = { 36 changelog = "https://github.com/lepture/mistune/blob/${src.tag}/docs/changes.rst"; 37 description = "Sane Markdown parser with useful plugins and renderers"; 38 homepage = "https://github.com/lepture/mistune"; 39 license = lib.licenses.bsd3; 40 maintainers = with lib.maintainers; [ dotlambda ]; 41 }; 42}