forked from mirrors/nixpkgs
liblinear: use absolute install name on Darwin (#81015)
nixpkgs prefers absolute install names. Replace the manually specified relative install name with the standard hook.
This commit is contained in:
parent
b9ee6cd85c
commit
1a73b69e20
|
@ -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/;
|
||||
|
|
Loading…
Reference in a new issue