From 8233fd5c6a3690acaa2117c060544d63a3e58b32 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Wed, 15 Apr 2015 20:49:19 +0200 Subject: [PATCH 1/3] i2p: add service to module-list --- nixos/modules/module-list.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 023d67a01424..61cc551f4358 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -272,6 +272,7 @@ ./services/networking/haproxy.nix ./services/networking/hostapd.nix ./services/networking/i2pd.nix + ./services/networking/i2p.nix ./services/networking/ifplugd.nix ./services/networking/iodined.nix ./services/networking/ircd-hybrid/default.nix From c6562348b830c6cf8695c39f0eea33ecc2fd5381 Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Wed, 15 Apr 2015 21:13:44 +0200 Subject: [PATCH 2/3] i2p: update 0.9.18 -> 0.9.19 --- pkgs/tools/networking/i2p/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/i2p/default.nix b/pkgs/tools/networking/i2p/default.nix index 9a20e009e58a..60dfd0067766 100644 --- a/pkgs/tools/networking/i2p/default.nix +++ b/pkgs/tools/networking/i2p/default.nix @@ -1,10 +1,10 @@ { stdenv, procps, coreutils, fetchurl, openjdk8, openjre, ant, gcj, gettext }: stdenv.mkDerivation rec { - name = "i2p-0.9.18"; + name = "i2p-0.9.19"; src = fetchurl { url = "https://github.com/i2p/i2p.i2p/archive/${name}.tar.gz"; - sha256 = "1hahdzvfh1zqb8qdc59xbjpqm8qq95k2xx22mpnhcdh90lb6xqnl"; + sha256 = "1q9sda1a708laxf452qnzbfv7bwfwyam5n1giw2n3z3ar602i936"; }; buildInputs = [ openjdk8 ant gettext ]; buildPhase = '' From 9754783b06597fc133b955ab3c360660aa9fd4dc Mon Sep 17 00:00:00 2001 From: Herwig Hochleitner Date: Wed, 15 Apr 2015 21:14:02 +0200 Subject: [PATCH 3/3] i2p: fix compilation - use system jdk instead of hardcoded openjdk - remove backgrounding of service launcher --- pkgs/tools/networking/i2p/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/i2p/default.nix b/pkgs/tools/networking/i2p/default.nix index 60dfd0067766..b5ef06c34eaa 100644 --- a/pkgs/tools/networking/i2p/default.nix +++ b/pkgs/tools/networking/i2p/default.nix @@ -1,4 +1,4 @@ -{ stdenv, procps, coreutils, fetchurl, openjdk8, openjre, ant, gcj, gettext }: +{ stdenv, procps, coreutils, fetchurl, jdk, jre, ant, gettext, which }: stdenv.mkDerivation rec { name = "i2p-0.9.19"; @@ -6,7 +6,7 @@ stdenv.mkDerivation rec { url = "https://github.com/i2p/i2p.i2p/archive/${name}.tar.gz"; sha256 = "1q9sda1a708laxf452qnzbfv7bwfwyam5n1giw2n3z3ar602i936"; }; - buildInputs = [ openjdk8 ant gettext ]; + buildInputs = [ jdk ant gettext which ]; buildPhase = '' export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" ant preppkg-linux-only @@ -22,7 +22,10 @@ stdenv.mkDerivation rec { -e "s#/usr/bin/tr#${coreutils}/bin/tr#" \ -e 's#%USER_HOME#$HOME#' \ -e "s#%SYSTEM_java_io_tmpdir#/tmp#" \ - -e 's#JAVA=java#JAVA=${openjre}/bin/java#' + -e 's#JAVA=java#JAVA=${jre}/bin/java#' + sed -i $out/runplain.sh \ + -e "s#nohup \(.*Launch\) .*#\1#" \ + -e "s#echo \$\! .*##" mv $out/runplain.sh $out/bin/i2prouter-plain mv $out/man $out/share/ chmod +x $out/bin/* $out/i2psvc