2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-06-14 14:10:07 +01:00
|
|
|
, python
|
2018-10-29 18:49:18 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-06-14 14:10:07 +01:00
|
|
|
, substituteAll
|
2018-10-29 18:49:18 +00:00
|
|
|
, pyparsing
|
2020-06-14 14:10:07 +01:00
|
|
|
, graphviz
|
|
|
|
, texlive
|
2018-10-29 18:49:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dot2tex";
|
2019-07-16 09:37:47 +01:00
|
|
|
version = "2.11.3";
|
2018-10-29 18:49:18 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-07-16 09:37:47 +01:00
|
|
|
sha256 = "1kp77wiv7b5qib82i3y3sn9r49rym43aaqm5aw1bwnzfbbq2m6i9";
|
2018-10-29 18:49:18 +00:00
|
|
|
};
|
|
|
|
|
2020-06-14 14:10:07 +01:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./path.patch;
|
|
|
|
inherit graphviz;
|
|
|
|
})
|
|
|
|
./test.patch # https://github.com/kjellmf/dot2tex/issues/5
|
|
|
|
];
|
2018-10-29 18:49:18 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ pyparsing ];
|
|
|
|
|
2020-06-14 14:10:07 +01:00
|
|
|
checkInputs = [
|
|
|
|
(texlive.combine {
|
|
|
|
inherit (texlive) scheme-small preview pstricks;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} tests/test_dot2tex.py
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-29 18:49:18 +00:00
|
|
|
description = "Convert graphs generated by Graphviz to LaTeX friendly formats";
|
|
|
|
homepage = "https://github.com/kjellmf/dot2tex";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|