forked from mirrors/nixpkgs
freenet: Reduce closure size
Reduce the closure size from 1.0G to 174.7M.
This commit is contained in:
parent
23968f4c5d
commit
c158c5bc15
|
@ -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
|
||||
|
|
|
@ -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 "$@"
|
||||
|
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue