Merge pull request #117512 from dotlambda/igraph-0.9.1
This commit is contained in:
commit
cadb3d9e19
@ -1,20 +1,43 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub,
|
{ stdenv
|
||||||
pkg-config, autoreconfHook,
|
, lib
|
||||||
flex, yacc, zlib, libxml2 }:
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
|
, arpack
|
||||||
|
, bison
|
||||||
|
, blas
|
||||||
|
, cmake
|
||||||
|
, flex
|
||||||
|
, fop
|
||||||
|
, glpk
|
||||||
|
, gmp
|
||||||
|
, lapack
|
||||||
|
, libxml2
|
||||||
|
, libxslt
|
||||||
|
, pkg-config
|
||||||
|
, python3
|
||||||
|
, sourceHighlight
|
||||||
|
, suitesparse
|
||||||
|
, xmlto
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "igraph";
|
pname = "igraph";
|
||||||
version = "0.8.5";
|
version = "0.9.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "igraph";
|
owner = "igraph";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0cb0kp6mpmgz74kbymqw4xxads8ff7jh0n59dsm76xy6nn8hpqcz";
|
sha256 = "sha256-i6Zg6bfHZ9NHwqCouX9m9YqD0VtiWW8DEkxS0hdUyIE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
patches = [
|
||||||
buildInputs = [ flex yacc zlib libxml2 ];
|
(fetchpatch {
|
||||||
|
name = "pkg-config-paths.patch";
|
||||||
|
url = "https://github.com/igraph/igraph/commit/980521cc948777df471893f7b6de8f3e3916a3c0.patch";
|
||||||
|
sha256 = "0mbq8v5h90c3dhgmyjazjvva3rn57qhnv7pkc9hlbqdln9gpqg0g";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
# Normally, igraph wants us to call bootstrap.sh, which will call
|
# Normally, igraph wants us to call bootstrap.sh, which will call
|
||||||
# tools/getversion.sh. Instead, we're going to put the version directly
|
# tools/getversion.sh. Instead, we're going to put the version directly
|
||||||
@ -22,16 +45,69 @@ stdenv.mkDerivation rec {
|
|||||||
# bootstrap. ~ C.
|
# bootstrap. ~ C.
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
echo "${version}" > IGRAPH_VERSION
|
echo "${version}" > IGRAPH_VERSION
|
||||||
|
'' + lib.optionalString stdenv.isAarch64 ''
|
||||||
|
# https://github.com/igraph/igraph/issues/1694
|
||||||
|
substituteInPlace tests/CMakeLists.txt \
|
||||||
|
--replace "igraph_scg_grouping3" "" \
|
||||||
|
--replace "igraph_scg_semiprojectors2" ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
outputs = [ "out" "dev" "doc" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
fop
|
||||||
|
libxml2
|
||||||
|
libxslt
|
||||||
|
pkg-config
|
||||||
|
python3
|
||||||
|
sourceHighlight
|
||||||
|
xmlto
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
arpack
|
||||||
|
bison
|
||||||
|
blas
|
||||||
|
flex
|
||||||
|
glpk
|
||||||
|
gmp
|
||||||
|
lapack
|
||||||
|
libxml2
|
||||||
|
suitesparse
|
||||||
|
];
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DIGRAPH_USE_INTERNAL_BLAS=OFF"
|
||||||
|
"-DIGRAPH_USE_INTERNAL_LAPACK=OFF"
|
||||||
|
"-DIGRAPH_USE_INTERNAL_ARPACK=OFF"
|
||||||
|
"-DIGRAPH_USE_INTERNAL_GLPK=OFF"
|
||||||
|
"-DIGRAPH_USE_INTERNAL_CXSPARSE=OFF"
|
||||||
|
"-DIGRAPH_USE_INTERNAL_GMP=OFF"
|
||||||
|
"-DIGRAPH_GLPK_SUPPORT=ON"
|
||||||
|
"-DIGRAPH_GRAPHML_SUPPORT=ON"
|
||||||
|
"-DIGRAPH_ENABLE_LTO=ON"
|
||||||
|
"-DIGRAPH_ENABLE_TLS=ON"
|
||||||
|
"-DBUILD_SHARED_LIBS=ON"
|
||||||
|
];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
meta = {
|
preCheck = ''
|
||||||
|
# needed to find libigraph.so
|
||||||
|
export LD_LIBRARY_PATH="$PWD/src"
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p "$out/share"
|
||||||
|
cp -r doc "$out/share"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "The network analysis package";
|
description = "The network analysis package";
|
||||||
homepage = "https://igraph.org/";
|
homepage = "https://igraph.org/";
|
||||||
license = lib.licenses.gpl2;
|
license = licenses.gpl2Plus;
|
||||||
# NB: Known to fail tests on aarch64.
|
platforms = platforms.all;
|
||||||
platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin;
|
maintainers = with maintainers; [ MostAwesomeDude dotlambda ];
|
||||||
maintainers = [ lib.maintainers.MostAwesomeDude ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,32 +1,54 @@
|
|||||||
{ buildPythonPackage, fetchPypi, lib, isPy3k
|
{ lib
|
||||||
, pkg-config, igraph
|
, buildPythonPackage
|
||||||
, texttable }:
|
, pythonOlder
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pkg-config
|
||||||
|
, igraph
|
||||||
|
, texttable
|
||||||
|
, python
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "python-igraph";
|
pname = "python-igraph";
|
||||||
version = "0.8.3";
|
version = "0.9.1";
|
||||||
disabled = !isPy3k; # fails to build
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
disabled = pythonOlder "3.6";
|
||||||
buildInputs = [ igraph ];
|
|
||||||
propagatedBuildInputs = [ texttable ];
|
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "igraph";
|
||||||
sha256 = "e1f27622eddeb2bd5fdcbadb41ef048e884790bb050f9627c086dc609d0f1236";
|
repo = "python-igraph";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1ldyzza25zvwh144lw8x856z76s8gfvnbdm56fcmwkvm7aj81npw";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
igraph
|
||||||
|
igraph.dev
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
texttable
|
||||||
|
];
|
||||||
|
|
||||||
# NB: We want to use our igraph, not vendored igraph, but even with
|
# 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
|
# pkg-config on the PATH, their custom setup.py still needs to be explicitly
|
||||||
# told to do it. ~ C.
|
# told to do it. ~ C.
|
||||||
setupPyGlobalFlags = [ "--use-pkg-config" ];
|
setupPyGlobalFlags = [ "--use-pkg-config" ];
|
||||||
|
|
||||||
doCheck = !isPy3k;
|
checkPhase = ''
|
||||||
|
${python.interpreter} -m unittest
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
pythonImportsCheck = [ "igraph" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "High performance graph data structures and algorithms";
|
description = "High performance graph data structures and algorithms";
|
||||||
homepage = "https://igraph.org/python/";
|
homepage = "https://igraph.org/python/";
|
||||||
license = lib.licenses.gpl2;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = [ lib.maintainers.MostAwesomeDude ];
|
maintainers = with maintainers; [ MostAwesomeDude dotlambda ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user