summary refs log tree commit diff
path: root/pkgs/development/libraries/igraph
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2021-05-07 22:33:13 +0200
committerGitHub <noreply@github.com>2021-05-07 22:33:13 +0200
commit2d64c6d79bc5f9071fec3045161093c551875042 (patch)
treef7fbfb3f2b7070a6b7111962b5352b96c8414dcc /pkgs/development/libraries/igraph
parent72755406669073a469b655429f1a9d967bd8cf46 (diff)
downloadnixpkgs-2d64c6d79bc5f9071fec3045161093c551875042.tar
nixpkgs-2d64c6d79bc5f9071fec3045161093c551875042.tar.gz
nixpkgs-2d64c6d79bc5f9071fec3045161093c551875042.tar.bz2
nixpkgs-2d64c6d79bc5f9071fec3045161093c551875042.tar.lz
nixpkgs-2d64c6d79bc5f9071fec3045161093c551875042.tar.xz
nixpkgs-2d64c6d79bc5f9071fec3045161093c551875042.tar.zst
nixpkgs-2d64c6d79bc5f9071fec3045161093c551875042.zip
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
Diffstat (limited to 'pkgs/development/libraries/igraph')
-rw-r--r--pkgs/development/libraries/igraph/default.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/development/libraries/igraph/default.nix b/pkgs/development/libraries/igraph/default.nix
index 8dab59e9947..29e12cc8541 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"
   '';