Files
2026-10-18 09:51:09 -07:00

55 lines
952 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
replaceVars,
pyparsing,
graphviz,
setuptools,
pytestCheckHook,
texliveSmall,
}:
buildPythonPackage (finalAttrs: {
pname = "dot2tex";
version = "2.12.0";
pyproject = true;
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-EbCXOQuU0ab1BywIxQY35yTi+BtGN5SXLD1CMAW19TY=";
};
patches = [
(replaceVars ./path.patch {
inherit graphviz;
})
];
build-system = [ setuptools ];
dependencies = [ pyparsing ];
nativeCheckInputs = [
pytestCheckHook
(texliveSmall.withPackages (
ps: with ps; [
preview
pstricks
standalone
]
))
];
disabledTests = [
"test_semicolon"
];
meta = {
description = "Convert graphs generated by Graphviz to LaTeX friendly formats";
mainProgram = "dot2tex";
homepage = "https://github.com/kjellmf/dot2tex";
license = lib.licenses.mit;
};
})