1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 poetry-core, 7 pytestCheckHook, 8 multidict, 9 xmljson, 10}: 11 12buildPythonPackage rec { 13 pname = "latex2mathml"; 14 version = "3.77.0"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchFromGitHub { 20 owner = "roniemartinez"; 21 repo = pname; 22 rev = version; 23 hash = "sha256-DLdSFMsNA0gD6Iw0kn+0IrbvyI0VEGOpz0ZYD48nRkY="; 24 }; 25 26 build-system = [ poetry-core ]; 27 28 nativeCheckInputs = [ 29 pytestCheckHook 30 multidict 31 xmljson 32 ]; 33 34 # Disable code coverage in check phase 35 postPatch = '' 36 sed -i '/--cov/d' pyproject.toml 37 ''; 38 39 pythonImportsCheck = [ "latex2mathml" ]; 40 41 meta = with lib; { 42 description = "Pure Python library for LaTeX to MathML conversion"; 43 homepage = "https://github.com/roniemartinez/latex2mathml"; 44 changelog = "https://github.com/roniemartinez/latex2mathml/releases/tag/${version}"; 45 license = licenses.mit; 46 mainProgram = "latex2mathml"; 47 maintainers = with maintainers; [ sfrijters ]; 48 }; 49}