mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
suitesparse: darwin compatibility
There is no librt on darwin, so it must be disabled.
This commit is contained in:
parent
6da91e9e4a
commit
9d1053dc6d
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue