From 9acbfbc7b72f3dbf1afcb64f77602c475a47bd5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edward=20Tj=C3=B6rnhammar?= Date: Sun, 29 Oct 2017 10:20:12 +0100 Subject: [PATCH] shogun: init at 6.0.0 --- .../machine-learning/shogun/default.nix | 51 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/applications/science/machine-learning/shogun/default.nix 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 000000000000..9d736694cbdc --- /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 ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 042c38880225..596051f4ea7f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15808,6 +15808,8 @@ with pkgs; libmlt = mlt; }; + shogun = callPackage ../applications/science/machine-learning/shogun { }; + smplayer = libsForQt5.callPackage ../applications/video/smplayer { }; smtube = libsForQt56.callPackage ../applications/video/smtube {};