@@ -1,4 +1,4 @@
1−{ stdenv, procps, coreutils, fetchurl, openjdk8, openjre, ant, gcj, gettext }:
1+{ stdenv, procps, coreutils, fetchurl, jdk, jre, ant, gettext, which }:
22
33stdenv.mkDerivation rec {
44 name = "i2p-0.9.19";
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
66 url = "https://github.com/i2p/i2p.i2p/archive/${name}.tar.gz";
77 sha256 = "1q9sda1a708laxf452qnzbfv7bwfwyam5n1giw2n3z3ar602i936";
88 };
9− buildInputs = [ openjdk8 ant gettext ];
9+ buildInputs = [ jdk ant gettext which ];
1010 buildPhase = ''
1111 export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8"
1212 ant preppkg-linux-only
@@ -22,7 +22,10 @@ stdenv.mkDerivation rec {
2222 -e "s#/usr/bin/tr#${coreutils}/bin/tr#" \
2323 -e 's#%USER_HOME#$HOME#' \
2424 -e "s#%SYSTEM_java_io_tmpdir#/tmp#" \
25− -e 's#JAVA=java#JAVA=${openjre}/bin/java#'
25+ -e 's#JAVA=java#JAVA=${jre}/bin/java#'
26+ sed -i $out/runplain.sh \
27+ -e "s#nohup \(.*Launch\) .*#\1#" \
28+ -e "s#echo \$\! .*##"
2629 mv $out/runplain.sh $out/bin/i2prouter-plain
2730 mv $out/man $out/share/
2831 chmod +x $out/bin/* $out/i2psvc