3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/math/weka/default.nix

36 lines
979 B
Nix
Raw Normal View History

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}";
version = "3.9.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";
sha256 = "0zwmhspmqb0a7cm6k6i0s6q3w19ws1g9dx3cp2v3g3vsif6cdh31";
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 = {
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";
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ stdenv.lib.maintainers.mimadrid ];
platforms = stdenv.lib.platforms.unix;
2013-06-19 15:12:55 +01:00
};
}