python.pkgs.graphviz: hardcode path to graphviz's bin/
This commit is contained in:
@@ -1,25 +1,51 @@
|
||||
{ stdenv
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pkgs
|
||||
, fetchFromGitHub
|
||||
, substituteAll
|
||||
, graphviz
|
||||
, makeFontsConf
|
||||
, freefont_ttf
|
||||
, mock
|
||||
, pytest
|
||||
, pytest-mock
|
||||
, pytestcov
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "graphviz";
|
||||
version = "0.10.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
extension = "zip";
|
||||
sha256 = "d311be4fddfe832a56986ac5e1d6e8715d7fcb0208560da79d1bb0f72abef41f";
|
||||
# patch does not apply to PyPI tarball due to different line endings
|
||||
src = fetchFromGitHub {
|
||||
owner = "xflr6";
|
||||
repo = "graphviz";
|
||||
rev = version;
|
||||
sha256 = "1vqk4xy45c72la56j24z9jmjp5a0aa2k32fybnlbkzqjvvbl72d8";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ pkgs.graphviz ];
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./hardcode-graphviz-path.patch;
|
||||
inherit graphviz;
|
||||
})
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
# 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 ];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user