Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, substituteAll 5, graphviz 6, python 7, chardet 8, pyparsing 9}: 10 11buildPythonPackage rec { 12 pname = "pydot"; 13 version = "1.4.1"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "d49c9d4dd1913beec2a997f831543c8cbd53e535b1a739e921642fe416235f01"; 18 }; 19 20 patches = [ 21 (substituteAll { 22 src = ./hardcode-graphviz-path.patch; 23 inherit graphviz; 24 }) 25 ]; 26 27 postPatch = '' 28 # test_graphviz_regression_tests also fails upstream: https://github.com/pydot/pydot/pull/198 29 substituteInPlace test/pydot_unittest.py \ 30 --replace "test_graphviz_regression_tests" "no_test_graphviz_regression_tests" 31 ''; 32 33 propagatedBuildInputs = [ pyparsing ]; 34 35 checkInputs = [ chardet ]; 36 37 checkPhase = '' 38 cd test 39 ${python.interpreter} pydot_unittest.py 40 ''; 41 42 meta = { 43 homepage = https://github.com/erocarrera/pydot; 44 description = "Allows to easily create both directed and non directed graphs from Python"; 45 license = lib.licenses.mit; 46 }; 47}