From 7f2b73d9488736d59d27c021a62ff816e5b9ec15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=B0=D1=80=D0=B8=D0=BA?= Date: Wed, 28 Aug 2019 20:01:35 +0300 Subject: [PATCH] i2p: 0.9.41 -> 0.9.42 --- pkgs/tools/networking/i2p/default.nix | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/networking/i2p/default.nix b/pkgs/tools/networking/i2p/default.nix index 7d709df75b60..681d5d0e7a97 100644 --- a/pkgs/tools/networking/i2p/default.nix +++ b/pkgs/tools/networking/i2p/default.nix @@ -1,13 +1,16 @@ { stdenv, ps, coreutils, fetchurl, jdk, jre, ant, gettext, which }: let wrapper = stdenv.mkDerivation rec { - name = "wrapper-${version}"; + pname = "wrapper"; version = "3.5.35"; + src = fetchurl { url = "https://wrapper.tanukisoftware.com/download/${version}/wrapper_${version}_src.tar.gz"; sha256 = "0mjyw9ays9v6lnj21pmfd3qdvd9b6rwxfmw3pg6z0kyf2jadixw2"; }; + buildInputs = [ jdk ]; + buildPhase = '' export ANT_HOME=${ant} export JAVA_HOME=${jdk}/lib/openjdk/jre/ @@ -16,6 +19,7 @@ let wrapper = stdenv.mkDerivation rec { sed 's/ testsuite$//' -i src/c/Makefile-linux-x86-64.make ${if stdenv.isi686 then "./build32.sh" else "./build64.sh"} ''; + installPhase = '' mkdir -p $out/{bin,lib} cp bin/wrapper $out/bin/wrapper @@ -27,17 +31,22 @@ let wrapper = stdenv.mkDerivation rec { in stdenv.mkDerivation rec { - name = "i2p-0.9.41"; + pname = "i2p"; + version = "0.9.42"; + src = fetchurl { - url = "https://github.com/i2p/i2p.i2p/archive/${name}.tar.gz"; - sha256 = "0adrj56i3pcc9ainj22akjrrvy73carz5jk29qa1h2b9q03di73b"; + url = "https://download.i2p2.de/releases/${version}/i2psource_${version}.tar.bz2"; + sha256 = "04y71hzkdpjzbac569rhyg1zfx37j0alggbl9gnkaqfbprb2nj1h"; }; + buildInputs = [ jdk ant gettext which ]; patches = [ ./i2p.patch ]; + buildPhase = '' export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" ant preppkg-linux-only - ''; + ''; + installPhase = '' set -B mkdir -p $out/{bin,share} @@ -61,13 +70,13 @@ stdenv.mkDerivation rec { mv $out/man $out/share/ chmod +x $out/bin/* $out/i2psvc rm $out/{osid,postinstall.sh,INSTALL-headless.txt} - ''; + ''; meta = with stdenv.lib; { - homepage = https://geti2p.net; description = "Applications and router for I2P, anonymity over the Internet"; - maintainers = [ maintainers.joelmo ]; + homepage = "https://geti2p.net"; license = licenses.gpl2; platforms = [ "x86_64-linux" "i686-linux" ]; + maintainers = [ maintainers.joelmo ]; }; }