summary refs log tree commit diff
path: root/pkgs/applications/science/machine-learning
diff options
context:
space:
mode:
authorEdward Tjörnhammar <ed@cflags.cc>2017-10-29 10:20:12 +0100
committerEdward Tjörnhammar <ed@cflags.cc>2017-10-29 10:20:55 +0100
commit9acbfbc7b72f3dbf1afcb64f77602c475a47bd5d (patch)
tree31d4c4f65983967f395ad80eadb7bdfdbdc23c64 /pkgs/applications/science/machine-learning
parent77d3869f27cca4b47507cb5e1341838cb5575170 (diff)
downloadnixpkgs-9acbfbc7b72f3dbf1afcb64f77602c475a47bd5d.tar
nixpkgs-9acbfbc7b72f3dbf1afcb64f77602c475a47bd5d.tar.gz
nixpkgs-9acbfbc7b72f3dbf1afcb64f77602c475a47bd5d.tar.bz2
nixpkgs-9acbfbc7b72f3dbf1afcb64f77602c475a47bd5d.tar.lz
nixpkgs-9acbfbc7b72f3dbf1afcb64f77602c475a47bd5d.tar.xz
nixpkgs-9acbfbc7b72f3dbf1afcb64f77602c475a47bd5d.tar.zst
nixpkgs-9acbfbc7b72f3dbf1afcb64f77602c475a47bd5d.zip
shogun: init at 6.0.0
Diffstat (limited to 'pkgs/applications/science/machine-learning')
-rw-r--r--pkgs/applications/science/machine-learning/shogun/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/applications/science/machine-learning/shogun/default.nix b/pkgs/applications/science/machine-learning/shogun/default.nix
new file mode 100644
index 00000000000..9d736694cbd
--- /dev/null
+++ b/pkgs/applications/science/machine-learning/shogun/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, lib, fetchFromGitHub, ccache, cmake, ctags, swig
+# data, compression
+, bzip2, curl, hdf5, json_c, lzma, lzo, protobuf, snappy
+# maths
+, blas, eigen, nlopt, lp_solve, colpack
+# libraries
+, libarchive, liblapack, libxml2
+# extra support
+, pythonSupport ? true, pythonPackages ? null
+, opencvSupport ? false, opencv ? null
+}:
+
+assert pythonSupport -> pythonPackages != null;
+assert opencvSupport -> opencv != null;
+
+stdenv.mkDerivation rec {
+
+  pname = "shogun";
+  version = "6.0.0";
+  name = pname + "-" + version;
+
+  src = fetchFromGitHub {
+    owner = pname + "-toolbox";
+    repo = pname;
+    rev = pname + "_" + version;
+    sha256 = "0f2zwzvn5apvwypkfkq371xp7c5bdb4g1fwqfh8c2d57ysjxhmgf";
+    fetchSubmodules = true;
+  };
+
+  CCACHE_DIR=".ccache";
+
+  buildInputs = with lib; [
+      blas bzip2 ccache cmake colpack curl ctags eigen hdf5 json_c lp_solve lzma lzo
+      protobuf nlopt snappy swig (libarchive.dev) liblapack libxml2
+    ]
+    ++ optionals (pythonSupport) (with pythonPackages; [ python ply numpy ])
+    ++ optional  (opencvSupport) opencv;
+
+  cmakeFlags = with lib; []
+    ++ (optional (pythonSupport) "-DPythonModular=ON")
+    ++ (optional (opencvSupport) "-DOpenCV=ON")
+    ;
+
+  meta = with stdenv.lib; {
+    description = "A toolbox which offers a wide range of efficient and unified machine learning methods";
+    homepage = "http://shogun-toolbox.org/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ edwtjo ];
+  };
+
+}