liblinear: fix soname path names on linux

This commit is contained in:
Jörg Thalheim 2020-01-15 11:47:40 +00:00
parent f67b539c07
commit 05a507e597
No known key found for this signature in database
GPG key ID: B3F5D81B0C6967C4

View file

@ -18,17 +18,19 @@ stdenv.mkDerivation rec {
libSuff = stdenv.hostPlatform.extensions.sharedLibrary;
in ''
mkdir -p $out/lib $out/bin $out/include
cp liblinear.so.3 $out/lib/liblinear.3${libSuff}
ln -s $out/lib/liblinear.3${libSuff} $out/lib/liblinear${libSuff}
${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
''}
cp train $out/bin/liblinear-train
cp predict $out/bin/liblinear-predict
cp linear.h $out/include
'';
postFixup = stdenv.lib.optionalString stdenv.isDarwin ''
install_name_tool -id liblinear.3.dylib $out/lib/liblinear.3.dylib
'';
meta = with stdenv.lib; {
description = "A library for large linear classification";
homepage = https://www.csie.ntu.edu.tw/~cjlin/liblinear/;