2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
substituteAll,
|
|
|
|
pyparsing,
|
|
|
|
graphviz,
|
|
|
|
pytestCheckHook,
|
|
|
|
texliveSmall,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dot2tex";
|
|
|
|
version = "2.11.3";
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-KZoq8FruW74CV6VipQapPieSk9XDjyjQirissyM/584=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./path.patch;
|
|
|
|
inherit graphviz;
|
|
|
|
})
|
|
|
|
./test.patch # https://github.com/kjellmf/dot2tex/issues/5
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
# https://github.com/xyz2tex/dot2tex/pull/104 does not merge cleanly
|
|
|
|
./remove-duplicate-script.patch
|
2020-06-18 07:06:33 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ pyparsing ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
pytestCheckHook
|
2024-06-05 15:53:02 +00:00
|
|
|
(texliveSmall.withPackages (
|
|
|
|
ps: with ps; [
|
|
|
|
preview
|
|
|
|
pstricks
|
|
|
|
]
|
|
|
|
))
|
2020-06-18 07:06:33 +00:00
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Convert graphs generated by Graphviz to LaTeX friendly formats";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "dot2tex";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/kjellmf/dot2tex";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|