depot/third_party/nixpkgs/pkgs/development/python-modules/igraph/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

60 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, pkg-config
, igraph
, texttable
, unittestCheckHook
}:
buildPythonPackage rec {
pname = "igraph";
version = "0.11.2";
disabled = pythonOlder "3.8";
format = "setuptools";
src = fetchFromGitHub {
owner = "igraph";
repo = "python-igraph";
rev = "refs/tags/${version}";
hash = "sha256-evYnUv2PWO+LbVBBQPa708dQb8Wq8SQ92bJ6clQNV/g=";
};
postPatch = ''
rm -r vendor
'';
nativeBuildInputs = [
pkg-config
];
buildInputs = [
igraph
];
propagatedBuildInputs = [
texttable
];
# 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" ];
nativeCheckInputs = [
unittestCheckHook
];
pythonImportsCheck = [ "igraph" ];
meta = with lib; {
description = "High performance graph data structures and algorithms";
homepage = "https://igraph.org/python/";
changelog = "https://github.com/igraph/python-igraph/blob/${src.rev}/CHANGELOG.md";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ MostAwesomeDude dotlambda ];
};
}