2021-03-20 04:20:00 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, arpack
|
|
|
|
, bison
|
|
|
|
, blas
|
|
|
|
, cmake
|
|
|
|
, flex
|
|
|
|
, fop
|
|
|
|
, glpk
|
|
|
|
, gmp
|
|
|
|
, lapack
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
2022-04-15 01:41:22 +00:00
|
|
|
, llvmPackages
|
2021-03-20 04:20:00 +00:00
|
|
|
, pkg-config
|
2022-04-15 01:41:22 +00:00
|
|
|
, plfit
|
2021-03-20 04:20:00 +00:00
|
|
|
, python3
|
|
|
|
, sourceHighlight
|
|
|
|
, xmlto
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
assert (blas.isILP64 == lapack.isILP64 &&
|
|
|
|
blas.isILP64 == arpack.isILP64 &&
|
|
|
|
!blas.isILP64);
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "igraph";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.10.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "igraph";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-LsTOxUktGZcp46Ec9QH3+9C+VADMYTZZCjKF1gp36xk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-07-18 16:06:22 +00:00
|
|
|
echo "${version}" > IGRAPH_VERSION
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-04-18 02:13:31 +00:00
|
|
|
bison
|
2021-03-20 04:20:00 +00:00
|
|
|
cmake
|
2021-04-18 02:13:31 +00:00
|
|
|
flex
|
2021-03-20 04:20:00 +00:00
|
|
|
fop
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
sourceHighlight
|
|
|
|
xmlto
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
arpack
|
|
|
|
blas
|
|
|
|
glpk
|
|
|
|
gmp
|
|
|
|
lapack
|
|
|
|
libxml2
|
2022-04-15 01:41:22 +00:00
|
|
|
plfit
|
|
|
|
] ++ lib.optionals stdenv.cc.isClang [
|
|
|
|
llvmPackages.openmp
|
2021-03-20 04:20:00 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DIGRAPH_USE_INTERNAL_BLAS=OFF"
|
|
|
|
"-DIGRAPH_USE_INTERNAL_LAPACK=OFF"
|
|
|
|
"-DIGRAPH_USE_INTERNAL_ARPACK=OFF"
|
|
|
|
"-DIGRAPH_USE_INTERNAL_GLPK=OFF"
|
|
|
|
"-DIGRAPH_USE_INTERNAL_GMP=OFF"
|
2022-04-15 01:41:22 +00:00
|
|
|
"-DIGRAPH_USE_INTERNAL_PLFIT=OFF"
|
2021-03-20 04:20:00 +00:00
|
|
|
"-DIGRAPH_GLPK_SUPPORT=ON"
|
|
|
|
"-DIGRAPH_GRAPHML_SUPPORT=ON"
|
2022-04-15 01:41:22 +00:00
|
|
|
"-DIGRAPH_OPENMP_SUPPORT=ON"
|
2021-05-20 23:08:51 +00:00
|
|
|
"-DIGRAPH_ENABLE_LTO=AUTO"
|
2021-03-20 04:20:00 +00:00
|
|
|
"-DIGRAPH_ENABLE_TLS=ON"
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
];
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share"
|
|
|
|
cp -r doc "$out/share"
|
|
|
|
'';
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
postFixup = lib.optionalString stdenv.isDarwin ''
|
|
|
|
install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libigraph.dylib
|
|
|
|
'';
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
meta = with lib; {
|
2022-11-21 17:40:18 +00:00
|
|
|
description = "C library for complex network analysis and graph theory";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://igraph.org/";
|
2022-04-27 09:35:20 +00:00
|
|
|
changelog = "https://github.com/igraph/igraph/blob/${src.rev}/CHANGELOG.md";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ MostAwesomeDude dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|