about summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorAndrew Childs <lorne@cons.org.nz>2020-02-26 00:31:53 +0900
committerGitHub <noreply@github.com>2020-02-25 10:31:53 -0500
commit1a73b69e2067a3b3daf0fc7a9d9479e8a5f16b2f (patch)
tree6c578fd82fa56ac53d624a4e1ea410df89b192ee /pkgs/development/libraries
parentb9ee6cd85cbbdd477d7b40b035eea636115b5af6 (diff)
downloadnixlib-1a73b69e2067a3b3daf0fc7a9d9479e8a5f16b2f.tar
nixlib-1a73b69e2067a3b3daf0fc7a9d9479e8a5f16b2f.tar.gz
nixlib-1a73b69e2067a3b3daf0fc7a9d9479e8a5f16b2f.tar.bz2
nixlib-1a73b69e2067a3b3daf0fc7a9d9479e8a5f16b2f.tar.lz
nixlib-1a73b69e2067a3b3daf0fc7a9d9479e8a5f16b2f.tar.xz
nixlib-1a73b69e2067a3b3daf0fc7a9d9479e8a5f16b2f.tar.zst
nixlib-1a73b69e2067a3b3daf0fc7a9d9479e8a5f16b2f.zip
liblinear: use absolute install name on Darwin (#81015)
nixpkgs prefers absolute install names. Replace the manually specified
relative install name with the standard hook.
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/liblinear/default.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/development/libraries/liblinear/default.nix b/pkgs/development/libraries/liblinear/default.nix
index 7b70510dec3c..a306eb2ed68f 100644
--- a/pkgs/development/libraries/liblinear/default.nix
+++ b/pkgs/development/libraries/liblinear/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl}:
+{ stdenv, fetchurl, fixDarwinDylibNames }:
 
 stdenv.mkDerivation rec {
   pname = "liblinear";
@@ -14,14 +14,11 @@ stdenv.mkDerivation rec {
     make lib
   '';
 
-  installPhase = let
-    libSuff = stdenv.hostPlatform.extensions.sharedLibrary;
-  in ''
+  installPhase = ''
     mkdir -p $out/lib $out/bin $out/include
     ${if stdenv.isDarwin then ''
       cp liblinear.so.3 $out/lib/liblinear.3.dylib
       ln -s $out/lib/liblinear.3.dylib $out/lib/liblinear.dylib
-      install_name_tool -id liblinear.3.dylib $out/lib/liblinear.3.dylib
     '' else ''
       cp liblinear.so.3 $out/lib/liblinear.so.3
       ln -s $out/lib/liblinear.so.3 $out/lib/liblinear.so
@@ -31,6 +28,8 @@ stdenv.mkDerivation rec {
     cp linear.h $out/include
   '';
 
+  nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames ];
+
   meta = with stdenv.lib; {
     description = "A library for large linear classification";
     homepage = https://www.csie.ntu.edu.tw/~cjlin/liblinear/;