weka: use makeWrapper
This commit is contained in:
parent
05bffb5a0d
commit
fb3b3d6394
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, jre, unzip }:
|
{ stdenv, fetchurl, jre, unzip, makeWrapper }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "weka-${version}";
|
name = "weka-${version}";
|
||||||
|
@ -9,20 +9,16 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0zwmhspmqb0a7cm6k6i0s6q3w19ws1g9dx3cp2v3g3vsif6cdh31";
|
sha256 = "0zwmhspmqb0a7cm6k6i0s6q3w19ws1g9dx3cp2v3g3vsif6cdh31";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ unzip ];
|
buildInputs = [ unzip makeWrapper ];
|
||||||
|
|
||||||
# The -Xmx1000M comes suggested from their download page:
|
# The -Xmx1000M comes suggested from their download page:
|
||||||
# http://www.cs.waikato.ac.nz/ml/weka/downloading.html
|
# http://www.cs.waikato.ac.nz/ml/weka/downloading.html
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -pv $out/share/weka $out/bin
|
mkdir -pv $out/share/weka
|
||||||
cp -Rv * $out/share/weka
|
cp -Rv * $out/share/weka
|
||||||
|
|
||||||
cat > $out/bin/weka << EOF
|
makeWrapper ${jre}/bin/java $out/bin/weka \
|
||||||
#!${stdenv.shell}
|
--add-flags "-Xmx1000M -jar $out/share/weka/weka.jar"
|
||||||
${jre}/bin/java -Xmx1000M -jar $out/share/weka/weka.jar
|
|
||||||
EOF
|
|
||||||
|
|
||||||
chmod +x $out/bin/weka
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
Loading…
Reference in New Issue