1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, pkg-config
6, igraph
7, texttable
8, python
9}:
10
11buildPythonPackage rec {
12 pname = "igraph";
13 version = "0.9.8";
14
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 owner = "igraph";
19 repo = "python-igraph";
20 rev = version;
21 sha256 = "sha256-RtvT5/LZ/xP68yBB7DDKJGeNCiX4HyPTCuk+Ijd2nFs=";
22 };
23
24 nativeBuildInputs = [
25 pkg-config
26 ];
27
28 buildInputs = [
29 igraph
30 igraph.dev
31 ];
32
33 propagatedBuildInputs = [
34 texttable
35 ];
36
37 # NB: We want to use our igraph, not vendored igraph, but even with
38 # pkg-config on the PATH, their custom setup.py still needs to be explicitly
39 # told to do it. ~ C.
40 setupPyGlobalFlags = [ "--use-pkg-config" ];
41
42 checkPhase = ''
43 ${python.interpreter} -m unittest
44 '';
45
46 pythonImportsCheck = [ "igraph" ];
47
48 meta = with lib; {
49 description = "High performance graph data structures and algorithms";
50 homepage = "https://igraph.org/python/";
51 license = licenses.gpl2Plus;
52 maintainers = with maintainers; [ MostAwesomeDude dotlambda ];
53 };
54}