1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/anytree/default.nix

56 lines
934 B
Nix
Raw Normal View History

2019-05-16 19:51:23 +01:00
{ lib
, buildPythonPackage
2019-12-14 14:59:12 +00:00
, fetchPypi
2019-05-16 19:51:23 +01:00
, substituteAll
, fetchpatch
, nose
, six
, graphviz
, fontconfig
}:
buildPythonPackage rec {
pname = "anytree";
2019-12-14 14:59:12 +00:00
version = "2.7.3";
2019-05-16 19:51:23 +01:00
2019-12-14 14:59:12 +00:00
src = fetchPypi {
inherit pname version;
sha256 = "05736hamjv4f38jw6z9y4wckc7mz18ivbizm1s3pb0n6fp1sy4zk";
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 ];
};
}