From 4522205507f7d259b39eec24463a0d2f8b91d139 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 14 Dec 2019 17:35:47 +0100 Subject: [PATCH] python3.pkgs.anytree: make graphviz optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is a runtime dependency that produces dependency loop: anytree → graphviz → pango → glib → gtk-doc → anytree --- pkgs/development/python-modules/anytree/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/anytree/default.nix b/pkgs/development/python-modules/anytree/default.nix index 8fccf590a96..712944568f2 100644 --- a/pkgs/development/python-modules/anytree/default.nix +++ b/pkgs/development/python-modules/anytree/default.nix @@ -5,6 +5,7 @@ , fetchpatch , nose , six +, withGraphviz ? true , graphviz , fontconfig }: @@ -18,7 +19,7 @@ buildPythonPackage rec { sha256 = "05736hamjv4f38jw6z9y4wckc7mz18ivbizm1s3pb0n6fp1sy4zk"; }; - patches = [ + patches = lib.optionals withGraphviz [ (substituteAll { src = ./graphviz.patch; inherit graphviz; @@ -33,11 +34,14 @@ buildPythonPackage rec { six ]; - # Fontconfig error: Cannot load default config file - preCheck = '' + # tests print “Fontconfig error: Cannot load default config file” + preCheck = lib.optionalString withGraphviz '' export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf ''; + # circular dependency anytree → graphviz → pango → glib → gtk-doc → anytree + doCheck = withGraphviz; + checkPhase = '' runHook preCheck