2013-06-19 16:12:55 +02:00
|
|
|
{ stdenv, fetchurl, jre, unzip }:
|
|
|
|
|
2016-06-07 23:05:52 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "weka-${version}";
|
|
|
|
version = "3.8.0";
|
|
|
|
|
2013-06-19 16:12:55 +02:00
|
|
|
src = fetchurl {
|
2016-06-07 23:05:52 +02:00
|
|
|
url = "mirror://sourceforge/weka/${stdenv.lib.replaceChars ["."]["-"] name}.zip";
|
|
|
|
sha256 = "2586298688059a025e2810b1ffc73f4fb3cf81ebf2183d8d19b0763d33857f61";
|
2013-06-19 16:12:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ unzip ];
|
2016-06-07 23:05:52 +02:00
|
|
|
|
2013-06-19 16:12:55 +02:00
|
|
|
# The -Xmx1000M comes suggested from their download page:
|
|
|
|
# http://www.cs.waikato.ac.nz/ml/weka/downloading.html
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -pv $out/share/weka $out/bin
|
|
|
|
cp -Rv * $out/share/weka
|
2016-06-07 23:05:52 +02:00
|
|
|
|
2013-06-19 16:12:55 +02:00
|
|
|
cat > $out/bin/weka << EOF
|
|
|
|
#!${stdenv.shell}
|
|
|
|
${jre}/bin/java -Xmx1000M -jar $out/share/weka/weka.jar
|
|
|
|
EOF
|
2016-06-07 23:05:52 +02:00
|
|
|
|
2013-06-19 16:12:55 +02:00
|
|
|
chmod +x $out/bin/weka
|
|
|
|
'';
|
2016-06-07 23:05:52 +02:00
|
|
|
|
2013-06-19 16:12:55 +02:00
|
|
|
meta = {
|
|
|
|
homepage = "http://www.cs.waikato.ac.nz/ml/weka/";
|
|
|
|
description = "Collection of machine learning algorithms for data mining tasks";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2016-06-07 23:05:52 +02:00
|
|
|
maintainer = [stdenv.lib.maintainers.mimadrid];
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2013-06-19 16:12:55 +02:00
|
|
|
};
|
|
|
|
}
|