2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-06-18 07:06:33 +00:00
|
|
|
, python
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-06-18 07:06:33 +00:00
|
|
|
, substituteAll
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyparsing
|
2020-06-18 07:06:33 +00:00
|
|
|
, graphviz
|
|
|
|
, texlive
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dot2tex";
|
|
|
|
version = "2.11.3";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "1kp77wiv7b5qib82i3y3sn9r49rym43aaqm5aw1bwnzfbbq2m6i9";
|
|
|
|
};
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./path.patch;
|
|
|
|
inherit graphviz;
|
|
|
|
})
|
|
|
|
./test.patch # https://github.com/kjellmf/dot2tex/issues/5
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ pyparsing ];
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
checkInputs = [
|
|
|
|
(texlive.combine {
|
|
|
|
inherit (texlive) scheme-small preview pstricks;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} tests/test_dot2tex.py
|
|
|
|
'';
|
|
|
|
|
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";
|
|
|
|
homepage = "https://github.com/kjellmf/dot2tex";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|