depot/third_party/nixpkgs/pkgs/development/python-modules/latex2mathml/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

50 lines
1,013 B
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, poetry-core
, pytestCheckHook
, multidict
, xmljson
}:
buildPythonPackage rec {
pname = "latex2mathml";
version = "3.77.0";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "roniemartinez";
repo = pname;
rev = version;
hash = "sha256-DLdSFMsNA0gD6Iw0kn+0IrbvyI0VEGOpz0ZYD48nRkY=";
};
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 ];
};
}