From 9d1053dc6dfa6809a82818ba37ab8a03bb16b808 Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Sat, 12 Mar 2016 18:44:31 -0500 Subject: [PATCH] suitesparse: darwin compatibility There is no librt on darwin, so it must be disabled. --- .../libraries/science/math/suitesparse/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/science/math/suitesparse/default.nix b/pkgs/development/libraries/science/math/suitesparse/default.nix index e32b8b344267..679e6f51ddc6 100644 --- a/pkgs/development/libraries/science/math/suitesparse/default.nix +++ b/pkgs/development/libraries/science/math/suitesparse/default.nix @@ -23,6 +23,10 @@ stdenv.mkDerivation { -e 's/METIS_PATH .*$/METIS_PATH =/' \ -e '/CHOLMOD_CONFIG/ s/$/-DNPARTITION -DLONGBLAS=${int_t}/' \ -e '/UMFPACK_CONFIG/ s/$/-DLONGBLAS=${int_t}/' + '' + + stdenv.lib.optionalString stdenv.isDarwin '' + sed -i "SuiteSparse_config/SuiteSparse_config.mk" \ + -e 's/^[[:space:]]*\(LIB = -lm\) -lrt/\1/' ''; makeFlags = [ @@ -33,7 +37,7 @@ stdenv.mkDerivation { "LAPACK=" ]; - NIX_CFLAGS = "-fPIC"; + NIX_CFLAGS = "-fPIC" + stdenv.lib.optionalString stdenv.isDarwin " -DNTIMER"; postInstall = '' # Build and install shared library