python3.pkgs.anytree: make graphviz optional
It is a runtime dependency that produces dependency loop: anytree → graphviz → pango → glib → gtk-doc → anytree
This commit is contained in:
parent
91a276cd79
commit
4522205507
@ -5,6 +5,7 @@
|
|||||||
, fetchpatch
|
, fetchpatch
|
||||||
, nose
|
, nose
|
||||||
, six
|
, six
|
||||||
|
, withGraphviz ? true
|
||||||
, graphviz
|
, graphviz
|
||||||
, fontconfig
|
, fontconfig
|
||||||
}:
|
}:
|
||||||
@ -18,7 +19,7 @@ buildPythonPackage rec {
|
|||||||
sha256 = "05736hamjv4f38jw6z9y4wckc7mz18ivbizm1s3pb0n6fp1sy4zk";
|
sha256 = "05736hamjv4f38jw6z9y4wckc7mz18ivbizm1s3pb0n6fp1sy4zk";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = lib.optionals withGraphviz [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./graphviz.patch;
|
src = ./graphviz.patch;
|
||||||
inherit graphviz;
|
inherit graphviz;
|
||||||
@ -33,11 +34,14 @@ buildPythonPackage rec {
|
|||||||
six
|
six
|
||||||
];
|
];
|
||||||
|
|
||||||
# Fontconfig error: Cannot load default config file
|
# tests print “Fontconfig error: Cannot load default config file”
|
||||||
preCheck = ''
|
preCheck = lib.optionalString withGraphviz ''
|
||||||
export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
|
export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# circular dependency anytree → graphviz → pango → glib → gtk-doc → anytree
|
||||||
|
doCheck = withGraphviz;
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
runHook preCheck
|
runHook preCheck
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user