@@ -1,40 +1,48 @@
1−{ lib, buildPythonPackage, isPy3k, fetchPypi, substituteAll, graphviz
2−, pkg-config, doctest-ignore-unicode, mock, nose }:
1+{ lib
2+, buildPythonPackage
3+, isPy3k
4+, fetchPypi
5+, substituteAll
6+, graphviz
7+, coreutils
8+, pkg-config
9+, pytest
10+}:
311
412buildPythonPackage rec {
513 pname = "pygraphviz";
6− version = "1.6";
14+ version = "1.7";
715
816 disabled = !isPy3k;
917
1018 src = fetchPypi {
1119 inherit pname version;
12− sha256 = "411ae84a5bc313e3e1523a1cace59159f512336318a510573b47f824edef8860";
20+ sha256 = "a7bec6609f37cf1e64898c59f075afd659106cf9356c5f387cecaa2e0cdb2304";
1321 extension = "zip";
1422 };
1523
16− nativeBuildInputs = [ pkg-config ];
17− buildInputs = [ graphviz ];
18− checkInputs = [ doctest-ignore-unicode mock nose ];
19−
2024 patches = [
21− # pygraphviz depends on graphviz being in PATH. This patch always prepends
22− # graphviz to PATH.
25+ # pygraphviz depends on graphviz executables and wc being in PATH
2326 (substituteAll {
24− src = ./graphviz-path.patch;
25− inherit graphviz;
27+ src = ./path.patch;
28+ path = lib.makeBinPath [ graphviz coreutils ];
2629 })
2730 ];
2831
29− # The tests are currently failing because of a bug in graphviz 2.40.1.
30− # Upstream does not want to skip the relevant tests:
31− # https://github.com/pygraphviz/pygraphviz/pull/129
32− doCheck = false;
32+ nativeBuildInputs = [ pkg-config ];
33+
34+ buildInputs = [ graphviz ];
35+
36+ checkInputs = [ pytest ];
37+
38+ checkPhase = ''
39+ pytest --pyargs pygraphviz
40+ '';
3341
3442 meta = with lib; {
3543 description = "Python interface to Graphviz graph drawing package";
3644 homepage = "https://github.com/pygraphviz/pygraphviz";
3745 license = licenses.bsd3;
38− maintainers = with maintainers; [ matthiasbeyer ];
46+ maintainers = with maintainers; [ matthiasbeyer dotlambda ];
3947 };
4048}