1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00
nixpkgs/pkgs/development/python-modules/pydot/default.nix

48 lines
1,021 B
Nix
Raw Normal View History

2017-05-03 07:42:24 +01:00
{ lib
, buildPythonPackage
, fetchPypi
, substituteAll
, graphviz
, python
2017-05-03 07:42:24 +01:00
, chardet
, pyparsing
}:
buildPythonPackage rec {
pname = "pydot";
2018-12-19 14:42:05 +00:00
version = "1.4.1";
2017-05-03 07:42:24 +01:00
src = fetchPypi {
inherit pname version;
2018-12-19 14:42:05 +00:00
sha256 = "d49c9d4dd1913beec2a997f831543c8cbd53e535b1a739e921642fe416235f01";
2017-05-03 07:42:24 +01: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 ];
checkPhase = ''
cd test
${python.interpreter} pydot_unittest.py
'';
2017-05-03 07:42:24 +01:00
meta = {
homepage = https://github.com/erocarrera/pydot;
description = "Allows to easily create both directed and non directed graphs from Python";
license = lib.licenses.mit;
2017-05-03 07:42:24 +01:00
};
}