2018-12-19 13:53:12 +00:00
|
|
|
{ lib
|
2018-10-17 05:29:06 +01:00
|
|
|
, buildPythonPackage
|
2018-12-19 13:53:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, substituteAll
|
|
|
|
, graphviz
|
|
|
|
, makeFontsConf
|
|
|
|
, freefont_ttf
|
|
|
|
, mock
|
2021-01-16 09:53:01 +00:00
|
|
|
, pytestCheckHook
|
2018-12-19 13:53:12 +00:00
|
|
|
, pytest-mock
|
|
|
|
, pytestcov
|
2018-10-17 05:29:06 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "graphviz";
|
2021-01-16 09:53:01 +00:00
|
|
|
version = "0.16";
|
2018-10-17 05:29:06 +01:00
|
|
|
|
2018-12-19 13:53:12 +00:00
|
|
|
# patch does not apply to PyPI tarball due to different line endings
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xflr6";
|
|
|
|
repo = "graphviz";
|
|
|
|
rev = version;
|
2021-01-16 09:53:01 +00:00
|
|
|
sha256 = "147vi60mi57z623lhllwwzczzicv2iwj1yrmllj5xx5788i73j6g";
|
2018-10-17 05:29:06 +01:00
|
|
|
};
|
|
|
|
|
2018-12-19 13:53:12 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./hardcode-graphviz-path.patch;
|
|
|
|
inherit graphviz;
|
|
|
|
})
|
|
|
|
];
|
2018-10-17 05:29:06 +01:00
|
|
|
|
2020-08-25 03:07:09 +01:00
|
|
|
# Fontconfig error: Cannot load default config file
|
|
|
|
FONTCONFIG_FILE = makeFontsConf {
|
|
|
|
fontDirectories = [ freefont_ttf ];
|
2018-12-19 13:53:12 +00:00
|
|
|
};
|
|
|
|
|
2021-01-16 09:53:01 +00:00
|
|
|
checkInputs = [ mock pytestCheckHook pytest-mock pytestcov ];
|
2018-12-19 13:53:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2018-10-17 05:29:06 +01:00
|
|
|
description = "Simple Python interface for Graphviz";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/xflr6/graphviz";
|
2018-10-17 05:29:06 +01:00
|
|
|
license = licenses.mit;
|
2018-12-19 13:53:12 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2018-10-17 05:29:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|