python.pkgs.dot2tex: enable python3 and run tests

This commit is contained in:
Robert Schütz
2020-06-14 15:10:07 +02:00
parent 029a5de083
commit 0c30b9ef73
4 changed files with 140 additions and 4 deletions

View File

@@ -1,8 +1,11 @@
{ stdenv
, python
, buildPythonPackage
, fetchPypi
, isPy3k
, substituteAll
, pyparsing
, graphviz
, texlive
}:
buildPythonPackage rec {
@@ -14,11 +17,26 @@ buildPythonPackage rec {
sha256 = "1kp77wiv7b5qib82i3y3sn9r49rym43aaqm5aw1bwnzfbbq2m6i9";
};
# Tests fail with 3.x. Furthermore, package is no longer maintained.
disabled = isPy3k;
patches = [
(substituteAll {
src = ./path.patch;
inherit graphviz;
})
./test.patch # https://github.com/kjellmf/dot2tex/issues/5
];
propagatedBuildInputs = [ pyparsing ];
checkInputs = [
(texlive.combine {
inherit (texlive) scheme-small preview pstricks;
})
];
checkPhase = ''
${python.interpreter} tests/test_dot2tex.py
'';
meta = with stdenv.lib; {
description = "Convert graphs generated by Graphviz to LaTeX friendly formats";
homepage = "https://github.com/kjellmf/dot2tex";