2019-05-16 19:51:23 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, substituteAll
|
|
|
|
, fetchpatch
|
|
|
|
, nose
|
|
|
|
, six
|
|
|
|
, graphviz
|
|
|
|
, fontconfig
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "anytree";
|
2019-11-20 10:49:56 +00:00
|
|
|
version = "2.7.2";
|
2019-05-16 19:51:23 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "c0fec0de";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2019-11-20 10:49:56 +00:00
|
|
|
sha256 = "0ag5ir9h5p7rbm2pmpxlkflwigrm7z4afh24jvbhqj7pyrbjmk9w";
|
2019-05-16 19:51:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./graphviz.patch;
|
|
|
|
inherit graphviz;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
nose
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
# Fontconfig error: Cannot load default config file
|
|
|
|
preCheck = ''
|
|
|
|
export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
nosetests
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Powerful and Lightweight Python Tree Data Structure";
|
|
|
|
homepage = https://github.com/c0fec0de/anytree;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.worldofpeace ];
|
|
|
|
};
|
|
|
|
}
|