3
0
Fork 0
forked from mirrors/nixpkgs

freenet: Reduce closure size

Reduce the closure size from 1.0G to 174.7M.
This commit is contained in:
Daniel Nagy 2023-04-19 21:15:00 +02:00
parent 23968f4c5d
commit c158c5bc15
No known key found for this signature in database
GPG key ID: 1B8E8DCB576FB671
3 changed files with 16 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, fetchFromGitHub, jdk, gradle, bash, coreutils
{ lib, stdenv, fetchurl, fetchFromGitHub, jdk, jre, gradle, bash, coreutils
, substituteAll, nixosTests, perl, fetchpatch, writeText }:
let
@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
wrapper = substituteAll {
src = ./freenetWrapper;
inherit bash coreutils jdk seednodes;
inherit bash coreutils jre seednodes;
};
# https://github.com/freenet/fred/blob/next/build-offline.sh

View file

@ -15,4 +15,4 @@ cp -u -- @seednodes@ $FREENET_HOME/seednodes.fref
chmod u+rw -- $FREENET_HOME/seednodes.fref
cd -- $FREENET_HOME
exec @jdk@/bin/java -Xmx1024M freenet.node.NodeStarter "$@"
exec @jre@/bin/java -Xmx1024M freenet.node.NodeStarter "$@"

View file

@ -30495,6 +30495,19 @@ with pkgs;
freenet = callPackage ../applications/networking/p2p/freenet {
gradle = gradle_7;
jdk = jdk_headless;
# Reduce closure size
jre = pkgs.jre_minimal.override {
modules = [
"java.base"
"java.logging"
"java.naming"
"java.sql"
"java.desktop"
"java.management"
];
jdk = jdk_headless;
};
};
freeoffice = callPackage ../applications/office/softmaker/freeoffice.nix { };