2013-06-19 15:12:55 +01:00
|
|
|
{ stdenv, fetchurl, jre, unzip }:
|
|
|
|
|
2016-06-07 22:05:52 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "weka-${version}";
|
2018-01-18 14:25:35 +00:00
|
|
|
version = "3.8.2";
|
2016-06-07 22:05:52 +01:00
|
|
|
|
2013-06-19 15:12:55 +01:00
|
|
|
src = fetchurl {
|
2016-06-07 22:05:52 +01:00
|
|
|
url = "mirror://sourceforge/weka/${stdenv.lib.replaceChars ["."]["-"] name}.zip";
|
2018-01-18 14:25:35 +00:00
|
|
|
sha256 = "0p353lhhcv3swwn1bl64vkyjk480vv9ghhlyqjxiar4p3xifjayb";
|
2013-06-19 15:12:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ unzip ];
|
2016-06-07 22:05:52 +01:00
|
|
|
|
2013-06-19 15:12:55 +01: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 22:05:52 +01:00
|
|
|
|
2013-06-19 15:12:55 +01:00
|
|
|
cat > $out/bin/weka << EOF
|
|
|
|
#!${stdenv.shell}
|
|
|
|
${jre}/bin/java -Xmx1000M -jar $out/share/weka/weka.jar
|
|
|
|
EOF
|
2016-06-07 22:05:52 +01:00
|
|
|
|
2013-06-19 15:12:55 +01:00
|
|
|
chmod +x $out/bin/weka
|
|
|
|
'';
|
2016-06-07 22:05:52 +01:00
|
|
|
|
2013-06-19 15:12:55 +01:00
|
|
|
meta = {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.cs.waikato.ac.nz/ml/weka/;
|
2013-06-19 15:12:55 +01:00
|
|
|
description = "Collection of machine learning algorithms for data mining tasks";
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2017-12-05 22:20:11 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.mimadrid ];
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2013-06-19 15:12:55 +01:00
|
|
|
};
|
|
|
|
}
|