Merge pull request #286123 from dotlambda/leidenalg-fix

python311Packages.leidenalg: 0.10.1 -> 0.10.2
This commit is contained in:
Robert Schütz 2024-02-04 18:02:13 +00:00 committed by GitHub
commit ee0c6b3e4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 55 additions and 17 deletions

View File

@ -0,0 +1,35 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, igraph
}:
stdenv.mkDerivation rec {
pname = "libleidenalg";
version = "0.11.1";
src = fetchFromGitHub {
owner = "vtraag";
repo = "libleidenalg";
rev = "refs/tags/${version}";
hash = "sha256-hEES/OHvgN0yRDp5ZBZTCQfWr1j7s8NqE+Sp9WMHEEY=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [
igraph
];
meta = {
changelog = "https://github.com/vtraag/libleidenalg/blob/${version}/CHANGELOG";
description = "C++ library of Leiden algorithm";
homepage = "https://github.com/vtraag/libleidenalg";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ dotlambda ];
platforms = lib.platforms.all;
};
}

View File

@ -88,7 +88,10 @@ stdenv.mkDerivation (finalAttrs: {
cp -r doc "$out/share"
'';
postFixup = lib.optionalString stdenv.isDarwin ''
postFixup = ''
substituteInPlace $dev/lib/cmake/igraph/igraph-targets.cmake \
--replace-fail "_IMPORT_PREFIX \"$out\"" "_IMPORT_PREFIX \"$dev\""
'' + lib.optionalString stdenv.isDarwin ''
install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libigraph.dylib
'';

View File

@ -1,9 +1,10 @@
{ lib
, buildPythonPackage
, ddt
, fetchPypi
, fetchFromGitHub
, igraph
, igraph-c
, libleidenalg
, pythonOlder
, setuptools-scm
, unittestCheckHook
@ -11,31 +12,29 @@
buildPythonPackage rec {
pname = "leidenalg";
version = "0.10.1";
format = "setuptools";
version = "0.10.2";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-RXrZaYKoC9XGVxifQt/rd+6807dEoRDlosFhjS64C0c=";
src = fetchFromGitHub {
owner = "vtraag";
repo = "leidenalg";
rev = "refs/tags/${version}";
hash = "sha256-oaTV+BIB/YQBWKrVXuiIEMH/1MxPxeHhjUzbmxt6hlw=";
};
postPatch = ''
substituteInPlace ./setup.py \
--replace "[\"/usr/include/igraph\", \"/usr/local/include/igraph\"]" \
"[\"${igraph-c.dev}/include/igraph\"]"
rm -r vendor
'';
nativeBuildInputs = [
setuptools-scm
];
buildInputs = [
igraph-c
libleidenalg
];
propagatedBuildInputs = [
igraph
igraph-c
];
checkInputs = [
@ -46,8 +45,9 @@ buildPythonPackage rec {
pythonImportsCheck = [ "leidenalg" ];
meta = with lib; {
changelog = "https://github.com/vtraag/leidenalg/blob/${version}/CHANGELOG";
description = "Implementation of the Leiden algorithm for various quality functions to be used with igraph in Python";
homepage = "https://leidenalg.readthedocs.io";
homepage = "https://github.com/vtraag/leidenalg";
license = licenses.gpl3Only;
maintainers = with maintainers; [ jboy ];
};