1{ lib 2, buildPythonPackage 3, fetchpatch 4, fetchPypi 5, substituteAll 6, pyparsing 7, graphviz 8, pytestCheckHook 9, texliveSmall 10}: 11 12buildPythonPackage rec { 13 pname = "dot2tex"; 14 version = "2.11.3"; 15 format = "setuptools"; 16 17 src = fetchPypi { 18 inherit pname version; 19 hash = "sha256-KZoq8FruW74CV6VipQapPieSk9XDjyjQirissyM/584="; 20 }; 21 22 patches = [ 23 (substituteAll { 24 src = ./path.patch; 25 inherit graphviz; 26 }) 27 ./test.patch # https://github.com/kjellmf/dot2tex/issues/5 28 29 # https://github.com/xyz2tex/dot2tex/pull/104 does not merge cleanly 30 ./remove-duplicate-script.patch 31 ]; 32 33 propagatedBuildInputs = [ 34 pyparsing 35 ]; 36 37 nativeCheckInputs = [ 38 pytestCheckHook 39 (texliveSmall.withPackages (ps: with ps; [ preview pstricks ])) 40 ]; 41 42 meta = with lib; { 43 description = "Convert graphs generated by Graphviz to LaTeX friendly formats"; 44 homepage = "https://github.com/kjellmf/dot2tex"; 45 license = licenses.mit; 46 }; 47}