nixpkgs/pkgs/development/libraries/libsvm/default.nix
Ryan Mulligan b0f9c9e6ce libsvm: 3.20 -> 3.22
Semi-automatic update. These checks were done:

- built on NixOS
- ran `/nix/store/97a1nnpdah29fs3v274lnzk0hcyhncg3-libsvm-3.22/bin/svm-scale help` got 0 exit code
- ran `/nix/store/97a1nnpdah29fs3v274lnzk0hcyhncg3-libsvm-3.22/bin/svm-train help` got 0 exit code
- found 3.22 in filename of file in /nix/store/97a1nnpdah29fs3v274lnzk0hcyhncg3-libsvm-3.22
2018-03-08 23:28:46 -08:00

39 lines
1.0 KiB
Nix

{stdenv, fetchurl}:
stdenv.mkDerivation rec {
name = "libsvm-${version}";
version = "3.22";
src = fetchurl {
url = "https://www.csie.ntu.edu.tw/~cjlin/libsvm/libsvm-${version}.tar.gz";
sha256 = "0zd7s19y5vb7agczl6456bn45cj1y64739sslaskw1qk7dywd0bd";
};
buildPhase = ''
make
make lib
'';
installPhase = let
libSuff = stdenv.hostPlatform.extensions.sharedLibrary;
in ''
mkdir -p $out/lib $out/bin $out/include;
cp libsvm.so.2 $out/lib/libsvm.2${libSuff};
ln -s $out/lib/libsvm.2${libSuff} $out/lib/libsvm${libSuff};
cp svm-scale svm-train svm-predict $out/bin;
cp svm.h $out/include;
'';
postFixup = stdenv.lib.optionalString stdenv.isDarwin ''
install_name_tool -id libsvm.2.dylib $out/lib/libsvm.2.dylib;
'';
meta = with stdenv.lib; {
description = "A library for support vector machines";
homepage = https://www.csie.ntu.edu.tw/~cjlin/libsvm/;
license = licenses.bsd3;
maintainers = [ maintainers.spwhitt ];
platforms = platforms.unix;
};
}