at master 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 replaceVars, 7 graphviz-nox, 8 xdg-utils, 9 makeFontsConf, 10 freefont_ttf, 11 setuptools, 12 mock, 13 pytest-cov-stub, 14 pytest-mock, 15 pytest7CheckHook, 16 writableTmpDirAsHomeHook, 17}: 18 19buildPythonPackage rec { 20 pname = "graphviz"; 21 version = "0.21"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "xflr6"; 26 repo = "graphviz"; 27 tag = version; 28 hash = "sha256-o6woY+UhbsJtUqIzYGXlC0Pw3su7WG4xlAKSslSADwI="; 29 }; 30 31 patches = [ 32 (replaceVars ./paths.patch { 33 graphviz = graphviz-nox; 34 xdgutils = xdg-utils; 35 }) 36 ]; 37 38 # Fontconfig error: Cannot load default config file 39 FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ freefont_ttf ]; }; 40 41 build-system = [ setuptools ]; 42 43 nativeCheckInputs = [ 44 mock 45 pytest-cov-stub 46 pytest-mock 47 pytest7CheckHook 48 writableTmpDirAsHomeHook 49 ]; 50 51 # Too many failures due to attempting to connect to com.apple.fonts daemon 52 doCheck = !stdenv.hostPlatform.isDarwin; 53 54 meta = { 55 description = "Simple Python interface for Graphviz"; 56 homepage = "https://github.com/xflr6/graphviz"; 57 changelog = "https://github.com/xflr6/graphviz/blob/${src.tag}/CHANGES.rst"; 58 license = lib.licenses.mit; 59 maintainers = with lib.maintainers; [ dotlambda ]; 60 }; 61}