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 {
|
stdenv.mkDerivation rec {
|
||||||
pname = "liblinear";
|
pname = "liblinear";
|
||||||
@ -14,14 +14,11 @@ stdenv.mkDerivation rec {
|
|||||||
make lib
|
make lib
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = let
|
installPhase = ''
|
||||||
libSuff = stdenv.hostPlatform.extensions.sharedLibrary;
|
|
||||||
in ''
|
|
||||||
mkdir -p $out/lib $out/bin $out/include
|
mkdir -p $out/lib $out/bin $out/include
|
||||||
${if stdenv.isDarwin then ''
|
${if stdenv.isDarwin then ''
|
||||||
cp liblinear.so.3 $out/lib/liblinear.3.dylib
|
cp liblinear.so.3 $out/lib/liblinear.3.dylib
|
||||||
ln -s $out/lib/liblinear.3.dylib $out/lib/liblinear.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 ''
|
'' else ''
|
||||||
cp liblinear.so.3 $out/lib/liblinear.so.3
|
cp liblinear.so.3 $out/lib/liblinear.so.3
|
||||||
ln -s $out/lib/liblinear.so.3 $out/lib/liblinear.so
|
ln -s $out/lib/liblinear.so.3 $out/lib/liblinear.so
|
||||||
@ -31,6 +28,8 @@ stdenv.mkDerivation rec {
|
|||||||
cp linear.h $out/include
|
cp linear.h $out/include
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin [ fixDarwinDylibNames ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A library for large linear classification";
|
description = "A library for large linear classification";
|
||||||
homepage = https://www.csie.ntu.edu.tw/~cjlin/liblinear/;
|
homepage = https://www.csie.ntu.edu.tw/~cjlin/liblinear/;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user