forked from mirrors/nixpkgs
Adding freenet
I don't build freenet_ext or bcprov, I just take the jar. Freenet irc people told me that freenet_ext barely changes and it's a hell to build.
This commit is contained in:
parent
a3fce096af
commit
49d4d308d4
54
pkgs/applications/networking/p2p/freenet/default.nix
Normal file
54
pkgs/applications/networking/p2p/freenet/default.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{ 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
|
||||
cp lib/freenet/freenet-ext.jar $out/share/freenet
|
||||
cp dist/freenet.jar $out/share/freenet
|
||||
|
||||
cat <<EOF > $out/bin/freenet
|
||||
${jre}/bin/java -cp $out/share/freenet/freenet-ext.jar:$out/share/freenet/freenet.jar \\
|
||||
-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;
|
||||
};
|
||||
}
|
|
@ -7057,6 +7057,8 @@ let
|
|||
jre = jdk;
|
||||
};
|
||||
|
||||
freenet = callPackage ../applications/networking/p2p/freenet { };
|
||||
|
||||
freepv = callPackage ../applications/graphics/freepv { };
|
||||
|
||||
xfontsel = callPackage ../applications/misc/xfontsel { };
|
||||
|
|
Loading…
Reference in a new issue