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/graphviz/default.nix

52 lines
1,016 B
Nix
Raw Normal View History

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