suitesparse: fixup darwin libraries

The build created libraries with an install_name that points to the
build directory instead of the installation prefix.  Causing errors like
this when other packages try to link against it's libraries.

    Library not loaded: /private/tmp/nix-build-suitesparse-5.3.0.drv-0/SuiteSparse/lib/libcholmod.3.0.12.dylib
This commit is contained in:
Daiderd Jordan 2018-11-13 00:23:58 +01:00
parent 2df88cb6f9
commit 5b8c4b0646
No known key found for this signature in database
GPG Key ID: D02435D05B810C96

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, gfortran, openblas, cmake
{ stdenv, fetchurl, gfortran, openblas, cmake, fixDarwinDylibNames
, enableCuda ? false, cudatoolkit
}:
@ -96,8 +96,11 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ openblas gfortran.cc.lib ] ++ stdenv.lib.optionals enableCuda [cudatoolkit];
nativeBuildInputs = [ cmake ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs = [ openblas gfortran.cc.lib ]
++ stdenv.lib.optional enableCuda cudatoolkit;
meta = with stdenv.lib; {
homepage = http://faculty.cse.tamu.edu/davis/suitesparse.html;