aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/libsvm
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-08-03 20:22:12 +0300
committerDoron Behar <doron.behar@gmail.com>2020-08-03 22:20:54 +0300
commit0eafcccbc2007ff12d709ea77d295707d847ca13 (patch)
treeea20f110a99e297d908e6437feba9fb2f35f0d14 /pkgs/development/libraries/libsvm
parent6e4d33a0019282c1d3c1bcd5c2fb2a0dba43bb46 (diff)
libsvm: make it possible to use it for saga
saga, as possibly other packages too, searches for svm.h in include/libsvm/svm.h. Since the package doesn't hold a proper install target, it should be OK to link the `svm.h` to `libsvm/svm.h` in `$out/include/`.
Diffstat (limited to 'pkgs/development/libraries/libsvm')
-rw-r--r--pkgs/development/libraries/libsvm/default.nix15
1 files changed, 8 insertions, 7 deletions
diff --git a/pkgs/development/libraries/libsvm/default.nix b/pkgs/development/libraries/libsvm/default.nix
index 0709f3867e45..5dc4deb30be9 100644
--- a/pkgs/development/libraries/libsvm/default.nix
+++ b/pkgs/development/libraries/libsvm/default.nix
@@ -10,18 +10,19 @@ stdenv.mkDerivation rec {
};
buildPhase = ''
- make
- make lib
+ 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;
+ install -D libsvm.so.2 $out/lib/libsvm.2${libSuff}
+ ln -s $out/lib/libsvm.2${libSuff} $out/lib/libsvm${libSuff}
+ install -Dt $out/bin/ svm-scale svm-train svm-predict
+ install -Dm644 -t $out/include svm.h
+ mkdir $out/include/libsvm
+ ln -s $out/include/svm.h $out/include/libsvm/svm.h
'';
postFixup = stdenv.lib.optionalString stdenv.isDarwin ''