2021-03-24 19:03:47 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, igraph
|
|
|
|
, texttable
|
|
|
|
, python
|
|
|
|
}:
|
2018-06-29 04:41:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-igraph";
|
2021-03-24 19:03:47 +00:00
|
|
|
version = "0.9.1";
|
2018-06-29 04:41:45 +00:00
|
|
|
|
2021-03-24 19:03:47 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2018-06-29 04:41:45 +00:00
|
|
|
|
2021-03-24 19:03:47 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "igraph";
|
|
|
|
repo = "python-igraph";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1ldyzza25zvwh144lw8x856z76s8gfvnbdm56fcmwkvm7aj81npw";
|
2018-06-29 04:41:45 +00:00
|
|
|
};
|
|
|
|
|
2021-03-24 19:03:47 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
igraph
|
|
|
|
igraph.dev
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
texttable
|
|
|
|
];
|
|
|
|
|
2020-06-26 08:22:00 +00:00
|
|
|
# NB: We want to use our igraph, not vendored igraph, but even with
|
|
|
|
# pkg-config on the PATH, their custom setup.py still needs to be explicitly
|
|
|
|
# told to do it. ~ C.
|
|
|
|
setupPyGlobalFlags = [ "--use-pkg-config" ];
|
|
|
|
|
2021-03-24 19:03:47 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "igraph" ];
|
2019-05-09 17:45:24 +00:00
|
|
|
|
2021-03-24 19:03:47 +00:00
|
|
|
meta = with lib; {
|
2018-06-29 04:41:45 +00:00
|
|
|
description = "High performance graph data structures and algorithms";
|
2019-05-09 17:45:24 +00:00
|
|
|
homepage = "https://igraph.org/python/";
|
2021-03-24 19:03:47 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ MostAwesomeDude dotlambda ];
|
2018-06-29 04:41:45 +00:00
|
|
|
};
|
|
|
|
}
|