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