15 buildPythonPackage rec {
20 inherit pname version;
21 sha256 = "3f0f93f355a91bc3e6245319bf4c1d50e3416cc7a35cc1133c1ff38306bbccab";
24 patches = lib.optionals withGraphviz [
26 src = ./graphviz.patch;
31 propagatedBuildInputs = [
35 # tests print “Fontconfig error: Cannot load default config file”
36 preCheck = lib.optionalString withGraphviz ''
37 export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
40 # circular dependency anytree → graphviz → pango → glib → gtk-doc → anytree
41 doCheck = withGraphviz;
43 checkInputs = [ pytestCheckHook nose ];
45 pytestFlagsArray = lib.optionals (pythonOlder "3.4") [
46 # Use enums, which aren't available pre-python3.4
47 "--ignore=tests/test_resolver.py"
48 "--ignore=tests/test_search.py"
52 description = "Powerful and Lightweight Python Tree Data Structure";
53 homepage = "https://github.com/c0fec0de/anytree";
54 license = licenses.asl20;