16 buildPythonPackage rec {
20 disabled = pythonOlder "3.8";
24 src = fetchFromGitHub {
26 repo = "python-igraph";
27 rev = "refs/tags/${version}";
29 # export-subst prevents reproducability
30 rm $out/.git_archival.json
32 hash = "sha256-FEp9kwUAPSAnGcAuxApAq1AXiT0klXuXE2M6xNVilRg=";
38 # TODO remove starting with 0.11.9
39 substituteInPlace pyproject.toml \
40 --replace-fail "setuptools>=64,<72.2.0" setuptools
43 nativeBuildInputs = [ pkg-config ];
45 build-system = [ setuptools ];
47 buildInputs = [ igraph ];
49 dependencies = [ texttable ];
51 optional-dependencies = {
52 cairo = [ cairocffi ];
53 matplotlib = [ matplotlib ];
55 plotting = [ cairocffi ];
58 # NB: We want to use our igraph, not vendored igraph, but even with
59 # pkg-config on the PATH, their custom setup.py still needs to be explicitly
61 env.IGRAPH_USE_PKG_CONFIG = true;
65 ] ++ lib.flatten (lib.attrValues optional-dependencies);
72 pythonImportsCheck = [ "igraph" ];
75 description = "High performance graph data structures and algorithms";
76 mainProgram = "igraph";
77 homepage = "https://igraph.org/python/";
78 changelog = "https://github.com/igraph/python-igraph/blob/${src.rev}/CHANGELOG.md";
79 license = licenses.gpl2Plus;
80 maintainers = with maintainers; [