2021-03-20 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, igraph
|
|
|
|
, texttable
|
|
|
|
, python
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "igraph";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.9.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "igraph";
|
|
|
|
repo = "python-igraph";
|
|
|
|
rev = version;
|
2022-06-16 17:23:12 +00:00
|
|
|
hash = "sha256-tvkV5ve9X+LXx3LOdHIPljQKZc1v6yts0juo4SwDmfY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
rm -r vendor
|
|
|
|
'';
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
igraph
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
texttable
|
|
|
|
];
|
|
|
|
|
2020-07-18 16:06:22 +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-20 04:20:00 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "igraph" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "High performance graph data structures and algorithms";
|
|
|
|
homepage = "https://igraph.org/python/";
|
2022-04-27 09:35:20 +00:00
|
|
|
changelog = "https://github.com/igraph/python-igraph/blob/${src.rev}/CHANGELOG.md";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ MostAwesomeDude dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|