dbeaver: allow custom java -Xmx value

DBeaver has its Java heap size setting written in dbeaver.ini, which is
copied on install to $out/opt/dbeaver. This means that, to increase the
java heap size, it needs to happen in Nix build. This change proposes to
allow passing this setting to the function so that one can override it.
This commit is contained in:
Guillaume Desforges 2024-10-31 13:49:45 +01:00
parent 3b1283bc3b
commit 100a0fa0af

View File

@ -12,6 +12,7 @@
glib,
webkitgtk_4_0,
glib-networking,
override_xmx ? "1024m",
}:
stdenvNoCC.mkDerivation (finalAttrs: {
@ -54,6 +55,11 @@ stdenvNoCC.mkDerivation (finalAttrs: {
dontConfigure = true;
dontBuild = true;
prePatch = ''
substituteInPlace dbeaver.ini \
--replace-fail '-Xmx1024m' '-Xmx${override_xmx}'
'';
installPhase =
if !stdenvNoCC.hostPlatform.isDarwin then
''