From 2d64c6d79bc5f9071fec3045161093c551875042 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 7 May 2021 22:33:13 +0200 Subject: igraph: enable autodetection for LTO support (#122058) > The IGRAPH_ENABLE_LTO build option now supports the AUTO value, which > uses LTO only if the compiler supports it. Warning: CMake may not > always be able to detect that LTO is not fully supported. Therefore, > the default setting is OFF. https://igraph.org/2021/03/23/igraph-0.9.1-c.html --- pkgs/development/libraries/igraph/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pkgs/development/libraries/igraph') diff --git a/pkgs/development/libraries/igraph/default.nix b/pkgs/development/libraries/igraph/default.nix index 8dab59e99472a..29e12cc8541d0 100644 --- a/pkgs/development/libraries/igraph/default.nix +++ b/pkgs/development/libraries/igraph/default.nix @@ -77,15 +77,17 @@ stdenv.mkDerivation rec { "-DIGRAPH_USE_INTERNAL_GMP=OFF" "-DIGRAPH_GLPK_SUPPORT=ON" "-DIGRAPH_GRAPHML_SUPPORT=ON" - "-DIGRAPH_ENABLE_LTO=ON" + "-DIGRAPH_ENABLE_LTO=AUTO" "-DIGRAPH_ENABLE_TLS=ON" "-DBUILD_SHARED_LIBS=ON" ]; doCheck = true; - preCheck = '' - # needed to find libigraph.so + # needed to find libigraph, and liblas on darwin + preCheck = if stdenv.isDarwin then '' + export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [ blas ]}:$PWD/src" + '' else '' export LD_LIBRARY_PATH="$PWD/src" ''; -- cgit 1.4.1