10 stdenv.mkDerivation rec {
14 src = fetchFromGitHub {
17 rev = "v${builtins.replaceStrings [ "." ] [ "" ] version}";
18 sha256 = "sha256-so7uCc/52NdN0V2Ska8EUdw/wSegaudX5AF+c0xe5jk=";
22 "AR=${stdenv.cc.targetPrefix}ar"
23 "RANLIB=${stdenv.cc.targetPrefix}ranlib"
40 if stdenv.hostPlatform.isDarwin then
42 install -D liblinear.so.${soVersion} $out/lib/liblinear.${soVersion}.dylib
43 ln -s $out/lib/liblinear.${soVersion}.dylib $out/lib/liblinear.dylib
47 install -Dt $out/lib liblinear.so.${soVersion}
48 ln -s $out/lib/liblinear.so.${soVersion} $out/lib/liblinear.so
51 install -D train $bin/bin/liblinear-train
52 install -D predict $bin/bin/liblinear-predict
53 install -Dm444 -t $dev/include linear.h
57 description = "Library for large linear classification";
58 homepage = "https://www.csie.ntu.edu.tw/~cjlin/liblinear/";
59 license = licenses.bsd3;
61 platforms = platforms.unix;