depot/third_party/nixpkgs/pkgs/development/python-modules/latex2mathml/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

50 lines
1,013 B
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, poetry-core
, pytestCheckHook
, multidict
, xmljson
}:
buildPythonPackage rec {
pname = "latex2mathml";
version = "3.76.0";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "roniemartinez";
repo = pname;
rev = version;
hash = "sha256-CoWXWgu1baM5v7OC+OlRHZB0NkPue4qFzylJk4Xq2e4=";
};
format = "pyproject";
nativeBuildInputs = [
poetry-core
];
nativeCheckInputs = [
pytestCheckHook
multidict
xmljson
];
# Disable code coverage in check phase
postPatch = ''
sed -i '/--cov/d' pyproject.toml
'';
pythonImportsCheck = [ "latex2mathml" ];
meta = with lib; {
description = "Pure Python library for LaTeX to MathML conversion";
homepage = "https://github.com/roniemartinez/latex2mathml";
changelog = "https://github.com/roniemartinez/latex2mathml/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ sfrijters ];
};
}