1{ stdenv, buildPythonPackage, fetchPypi, substituteAll, graphviz
2, pkgconfig, doctest-ignore-unicode, mock, nose }:
3
4buildPythonPackage rec {
5 pname = "pygraphviz";
6 version = "1.5";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "179i3mjprhn200gcj6jq7c4mdrzckyqlh1srz78hynnw0nijka2h";
11 extension = "zip";
12 };
13
14 nativeBuildInputs = [ pkgconfig ];
15 buildInputs = [ graphviz ];
16 checkInputs = [ doctest-ignore-unicode mock nose ];
17
18 patches = [
19 # pygraphviz depends on graphviz being in PATH. This patch always prepends
20 # graphviz to PATH.
21 (substituteAll {
22 src = ./graphviz-path.patch;
23 inherit graphviz;
24 })
25 ];
26
27 # The tests are currently failing because of a bug in graphviz 2.40.1.
28 # Upstream does not want to skip the relevant tests:
29 # https://github.com/pygraphviz/pygraphviz/pull/129
30 doCheck = false;
31
32 meta = with stdenv.lib; {
33 description = "Python interface to Graphviz graph drawing package";
34 homepage = https://github.com/pygraphviz/pygraphviz;
35 license = licenses.bsd3;
36 maintainers = with maintainers; [ matthiasbeyer ];
37 };
38}