From c04219a9d5af1fbe7254352e6d61a38552161015 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sun, 18 Oct 2020 13:05:33 -0700 Subject: [PATCH] spooles: fix build on darwin --- pkgs/development/libraries/science/math/spooles/default.nix | 4 ++++ pkgs/development/libraries/science/math/spooles/spooles.patch | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/science/math/spooles/default.nix b/pkgs/development/libraries/science/math/spooles/default.nix index 953f5a70b8aa..c55a1b8002e1 100644 --- a/pkgs/development/libraries/science/math/spooles/default.nix +++ b/pkgs/development/libraries/science/math/spooles/default.nix @@ -15,6 +15,10 @@ stdenv.mkDerivation rec { ./spooles.patch ]; + postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace makefile --replace '-Wl,-soname' '-Wl,-install_name' + ''; + buildPhase = '' make lib ''; diff --git a/pkgs/development/libraries/science/math/spooles/spooles.patch b/pkgs/development/libraries/science/math/spooles/spooles.patch index c0c93c9365c9..71fb4a7f44e1 100644 --- a/pkgs/development/libraries/science/math/spooles/spooles.patch +++ b/pkgs/development/libraries/science/math/spooles/spooles.patch @@ -166,7 +166,7 @@ index f014c7d..7c8042a 100755 #cd MPI ; make lib -#cd MT ; make lib + cd MT ; make lib -+ gcc -shared */*/*.lo -Wl,-soname,libspooles.so.2.2 -o libspooles.so.2.2 -lpthread -lm ++ $(CC) -shared */*/*.lo -Wl,-soname,libspooles.so.2.2 -o libspooles.so.2.2 -lpthread -lm + ln -s libspooles.so.2.2 libspooles.so global :