Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 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 = [ pyparsing ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 (texliveSmall.withPackages ( 38 ps: with ps; [ 39 preview 40 pstricks 41 ] 42 )) 43 ]; 44 45 meta = with lib; { 46 description = "Convert graphs generated by Graphviz to LaTeX friendly formats"; 47 mainProgram = "dot2tex"; 48 homepage = "https://github.com/kjellmf/dot2tex"; 49 license = licenses.mit; 50 }; 51}