depot/third_party/nixpkgs/pkgs/development/python-modules/latex2mathml/default.nix
Default email 87f9c27ba9 Project import generated by Copybara.
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
2023-04-12 14:48:02 +02:00

55 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, poetry-core
, setuptools
, pytestCheckHook
, multidict
, xmljson
}:
buildPythonPackage rec {
pname = "latex2mathml";
version = "3.75.2";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "roniemartinez";
repo = pname;
rev = version;
hash = "sha256-i/F1B/Rndg66tiKok1PDMK/rT5c2e8upnQrMSCTUzpU=";
};
format = "pyproject";
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
setuptools # needs pkg_resources at runtime
];
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 ];
};
}