i2p: fix wrapper

This commit is contained in:
Joel Moberg 2015-04-15 12:59:25 +02:00
parent 5b075eb400
commit e82a94f816

View File

@ -1,4 +1,4 @@
{ stdenv, procps, coreutils, fetchurl, openjdk8, ant, gcj, gettext }:
{ stdenv, procps, coreutils, fetchurl, openjdk8, openjre, ant, gcj, gettext }:
stdenv.mkDerivation rec {
name = "i2p-0.9.18";
@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
url = "https://github.com/i2p/i2p.i2p/archive/${name}.tar.gz";
sha256 = "1hahdzvfh1zqb8qdc59xbjpqm8qq95k2xx22mpnhcdh90lb6xqnl";
};
buildInputs = [ openjdk8 ant gcj gettext ];
buildInputs = [ openjdk8 ant gettext ];
buildPhase = ''
export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
ant preppkg-linux-only
@ -21,7 +21,8 @@ stdenv.mkDerivation rec {
-e "s#/usr/ucb/ps#${procps}/bin/ps#" \
-e "s#/usr/bin/tr#${coreutils}/bin/tr#" \
-e 's#%USER_HOME#$HOME#' \
-e "s#%SYSTEM_java_io_tmpdir#/tmp#"
-e "s#%SYSTEM_java_io_tmpdir#/tmp#" \
-e 's#JAVA=java#JAVA=${openjre}/bin/java#'
mv $out/runplain.sh $out/bin/i2prouter-plain
mv $out/man $out/share/
chmod +x $out/bin/* $out/i2psvc