2013-04-13 13:00:02 +00:00
|
|
|
{ stdenv, fetchurl, apacheAntOpenJDK, jre }:
|
|
|
|
|
|
|
|
let
|
|
|
|
# The .gitmodules in freenet-official-20130413-eccc9b3198
|
|
|
|
# points to freenet-contrib-staging-ce3b7d5
|
|
|
|
freenet_ext = fetchurl {
|
|
|
|
url = https://downloads.freenetproject.org/latest/freenet-ext.jar;
|
|
|
|
sha1 = "507ab3f6ee91f47c187149136fb6d6e98f9a8c7f";
|
|
|
|
};
|
|
|
|
|
|
|
|
bcprov = fetchurl {
|
|
|
|
url = http://www.bouncycastle.org/download/bcprov-jdk15on-148.jar;
|
|
|
|
sha256 = "12129q8rmqwlvj6z4j0gc3w0hq5ccrkf2gdlsggp3iws7cp7wjw0";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "freenet-official-20130413-eccc9b3198";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = https://github.com/freenet/fred-official/tarball/eccc9b3198;
|
|
|
|
name = "freenet-official-eccc9b3198.tar.gz";
|
|
|
|
sha256 = "0x0s8gmb95770l7968r99sq0588vf0n1687ivc2hixar19cw620y";
|
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
cp ${freenet_ext} lib/freenet/freenet-ext.jar
|
|
|
|
cp ${bcprov} lib/bcprov.jar
|
|
|
|
|
|
|
|
sed '/antcall.*-ext/d' -i build.xml
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ apacheAntOpenJDK jre ];
|
|
|
|
|
|
|
|
buildPhase = "ant package-only";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
ensureDir $out/share/freenet $out/bin
|
2013-04-13 13:24:28 +00:00
|
|
|
cp lib/bcprov.jar $out/share/freenet
|
2013-04-13 13:00:02 +00:00
|
|
|
cp lib/freenet/freenet-ext.jar $out/share/freenet
|
|
|
|
cp dist/freenet.jar $out/share/freenet
|
|
|
|
|
|
|
|
cat <<EOF > $out/bin/freenet
|
2013-04-21 06:57:24 +00:00
|
|
|
#!${stdenv.shell}
|
2013-04-13 13:24:28 +00:00
|
|
|
${jre}/bin/java -cp $out/share/freenet/bcprov.jar:$out/share/freenet/freenet-ext.jar:$out/share/freenet/freenet.jar \\
|
2013-04-13 13:00:02 +00:00
|
|
|
-Xmx1024M freenet.node.NodeStarter
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/freenet
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Decentralised and censorship-resistant network";
|
|
|
|
homepage = https://freenetproject.org/;
|
|
|
|
license = "GPLv2+";
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|