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