at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatchling, 6 igraph, 7 matplotlib, 8 networkx, 9 numpy, 10 pandas, 11 pylint, 12 pytestCheckHook, 13}: 14 15buildPythonPackage rec { 16 pname = "iplotx"; 17 version = "0.9.0"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "fabilab"; 22 repo = "iplotx"; 23 tag = version; 24 hash = "sha256-VYqNz6sbLgniNB9DTCbhgno/91Pd7zoGFg2vx68211Q="; 25 }; 26 27 build-system = [ hatchling ]; 28 29 dependencies = [ 30 matplotlib 31 numpy 32 pandas 33 pylint 34 ]; 35 36 pythonRelaxDeps = [ "pylint" ]; 37 38 optional-dependencies = { 39 igraph = [ igraph ]; 40 networkx = [ networkx ]; 41 }; 42 43 postPatch = '' 44 # silence matplotlib warning 45 export MPLCONFIGDIR=$(mktemp -d) 46 ''; 47 48 disabledTests = [ 49 # These tests result in an ImageComparisonFailure 50 "test_complex" 51 "test_complex_rotatelabels" 52 "test_directed_graph" 53 "test_display_shortest_path" 54 "test_labels" 55 "test_labels_and_colors" 56 ]; 57 58 nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (lib.attrValues optional-dependencies); 59 60 pythonImportsCheck = [ "iplotx" ]; 61 62 meta = { 63 description = "Plot networkx from igraph and networkx"; 64 homepage = "https://iplotx.readthedocs.io/"; 65 license = lib.licenses.mit; 66 maintainers = with lib.maintainers; [ jboy ]; 67 }; 68}