From 2bd39ab0136e967ff32af0616f651798630c5682 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 25 Apr 2017 20:11:48 +0200 Subject: [PATCH 1/2] csdp: fix darwin build the build sets CC=clang causing it to essentially ignore the cc wrapper --- pkgs/applications/science/math/csdp/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/math/csdp/default.nix b/pkgs/applications/science/math/csdp/default.nix index 7aafe9da41e4..796e8b7264fb 100644 --- a/pkgs/applications/science/math/csdp/default.nix +++ b/pkgs/applications/science/math/csdp/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation { sha256 = "1f9ql6cjy2gwiyc51ylfan24v1ca9sjajxkbhszlds1lqmma8n05"; }; - buildInputs = [ blas gfortran liblapack ]; + buildInputs = [ blas gfortran.cc.lib liblapack ]; postPatch = '' substituteInPlace Makefile --replace /usr/local/bin $out/bin From f240276000a03fe91c840ce8a48c0ca7f56b17ec Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Thu, 27 Apr 2017 23:25:07 +0200 Subject: [PATCH 2/2] blas: fix darwin library id --- pkgs/development/libraries/science/math/blas/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/libraries/science/math/blas/default.nix b/pkgs/development/libraries/science/math/blas/default.nix index ce35743e8bc6..6f729e8a0b2a 100644 --- a/pkgs/development/libraries/science/math/blas/default.nix +++ b/pkgs/development/libraries/science/math/blas/default.nix @@ -46,6 +46,13 @@ stdenv.mkDerivation rec { ln -s libblas.so.${version} "$out/lib/libblas.so" ''; + preFixup = stdenv.lib.optionalString stdenv.isDarwin '' + for fn in $(find $out/lib -name "*.so*"); do + if [ -L "$fn" ]; then continue; fi + install_name_tool -id "$fn" "$fn" + done + ''; + meta = { description = "Basic Linear Algebra Subprograms"; license = stdenv.lib.licenses.publicDomain;