2017-05-03 07:42:24 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2018-12-19 14:41:10 +00:00
|
|
|
, substituteAll
|
|
|
|
, graphviz
|
|
|
|
, python
|
2017-05-03 07:42:24 +01:00
|
|
|
, chardet
|
|
|
|
, pyparsing
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydot";
|
2021-02-20 09:09:13 +00:00
|
|
|
version = "1.4.2";
|
2017-05-03 07:42:24 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-02-20 09:09:13 +00:00
|
|
|
sha256 = "248081a39bcb56784deb018977e428605c1c758f10897a339fce1dd728ff007d";
|
2017-05-03 07:42:24 +01:00
|
|
|
};
|
2018-12-19 14:41:10 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./hardcode-graphviz-path.patch;
|
|
|
|
inherit graphviz;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# test_graphviz_regression_tests also fails upstream: https://github.com/pydot/pydot/pull/198
|
|
|
|
substituteInPlace test/pydot_unittest.py \
|
|
|
|
--replace "test_graphviz_regression_tests" "no_test_graphviz_regression_tests"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pyparsing ];
|
|
|
|
|
2017-05-03 07:42:24 +01:00
|
|
|
checkInputs = [ chardet ];
|
2018-12-19 14:41:10 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
cd test
|
|
|
|
${python.interpreter} pydot_unittest.py
|
|
|
|
'';
|
|
|
|
|
2017-05-03 07:42:24 +01:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/erocarrera/pydot";
|
2017-05-03 07:42:24 +01:00
|
|
|
description = "Allows to easily create both directed and non directed graphs from Python";
|
2017-12-05 22:20:11 +00:00
|
|
|
license = lib.licenses.mit;
|
2017-05-03 07:42:24 +01:00
|
|
|
};
|
2017-12-05 22:20:11 +00:00
|
|
|
}
|