libsvm: fix shared library filename

This commit is contained in:
Yongun Seong 2023-12-31 23:46:03 +09:00
parent e1fa12d4f6
commit c685acbdcc
No known key found for this signature in database

View File

@ -29,12 +29,13 @@ stdenv.mkDerivation rec {
let
libSuff = stdenv.hostPlatform.extensions.sharedLibrary;
soVersion = "3";
libName = if stdenv.isDarwin then "libsvm.${soVersion}${libSuff}" else "libsvm${libSuff}.${soVersion}";
in
''
runHook preInstall
install -D libsvm.so.${soVersion} $out/lib/libsvm.${soVersion}${libSuff}
ln -s $out/lib/libsvm.${soVersion}${libSuff} $out/lib/libsvm${libSuff}
install -D libsvm.so.${soVersion} $out/lib/${libName}
ln -s $out/lib/${libName} $out/lib/libsvm${libSuff}
install -Dt $bin/bin/ svm-scale svm-train svm-predict