python.pkgs.pygraphviz: use pkgs.pkgconfig and improve expression
This commit is contained in:
parent
c78f98db56
commit
733a3f3e9a
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, buildPythonPackage, fetchPypi, graphviz
|
{ stdenv, buildPythonPackage, fetchPypi, substituteAll, graphviz
|
||||||
, pkgconfig, doctest-ignore-unicode, mock, nose }:
|
, pkgconfig, doctest-ignore-unicode, mock, nose }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -10,17 +10,18 @@ buildPythonPackage rec {
|
|||||||
sha256 = "7c294cbc9d88946be671cc0d8602aac176d8c56695c0a7d871eadea75a958408";
|
sha256 = "7c294cbc9d88946be671cc0d8602aac176d8c56695c0a7d871eadea75a958408";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ doctest-ignore-unicode mock nose ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
propagatedBuildInputs = [ graphviz pkgconfig ];
|
buildInputs = [ graphviz ];
|
||||||
|
checkInputs = [ doctest-ignore-unicode mock nose ];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# pygraphviz depends on graphviz being in PATH. This patch always prepends
|
# pygraphviz depends on graphviz being in PATH. This patch always prepends
|
||||||
# graphviz to PATH.
|
# graphviz to PATH.
|
||||||
./graphviz-path.patch
|
(substituteAll {
|
||||||
|
src = ./graphviz-path.patch;
|
||||||
|
inherit graphviz;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace pygraphviz/agraph.py --subst-var-by graphvizPath '${graphviz}/bin'
|
|
||||||
'';
|
|
||||||
|
|
||||||
# The tests are currently failing because of a bug in graphviz 2.40.1.
|
# The tests are currently failing because of a bug in graphviz 2.40.1.
|
||||||
# Upstream does not want to skip the relevant tests:
|
# Upstream does not want to skip the relevant tests:
|
||||||
|
@ -7,7 +7,7 @@ index 8f72024..2d8358e 100644
|
|||||||
import glob
|
import glob
|
||||||
|
|
||||||
- paths = os.environ["PATH"]
|
- paths = os.environ["PATH"]
|
||||||
+ paths = '@graphvizPath@:' + os.environ["PATH"]
|
+ paths = '@graphviz@/bin:' + os.environ["PATH"]
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
exe = ".exe"
|
exe = ".exe"
|
||||||
else:
|
else:
|
||||||
|
@ -3141,7 +3141,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pygraphviz = callPackage ../development/python-modules/pygraphviz {
|
pygraphviz = callPackage ../development/python-modules/pygraphviz {
|
||||||
graphviz = pkgs.graphviz; # not the python package
|
inherit (pkgs) graphviz pkgconfig; # not the python package
|
||||||
};
|
};
|
||||||
|
|
||||||
pymc3 = callPackage ../development/python-modules/pymc3 { };
|
pymc3 = callPackage ../development/python-modules/pymc3 { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user