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.78.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "roniemartinez";
21 repo = "latex2mathml";
22 tag = version;
23 hash = "sha256-FB1VM2z9y17q+6/wv4oTrhe/rD2QzdAc0VMbFmcrIAw=";
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 = {
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/${src.tag}";
45 license = lib.licenses.mit;
46 mainProgram = "latex2mathml";
47 maintainers = with lib.maintainers; [ sfrijters ];
48 };
49}