moneydance: add 'jvmFlags'

An example use case is that Java/Swing UIs, including Moneydance, are
often difficult to use on very high-resolution screens but can be fixed by
adding something like `-Dsun.java2d.uiScale=2` to JVM flags.
This commit is contained in:
Lucas Bergman 2024-01-29 13:16:59 -06:00
parent a59c532c0a
commit d3bca4cb5d

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchzip, makeWrapper, openjdk21, openjfx21, }:
{ lib, stdenv, fetchzip, makeWrapper, openjdk21, openjfx21, jvmFlags ? [ ] }:
let jdk = openjdk21.override { enableJavaFX = true; };
in stdenv.mkDerivation (finalAttrs: {
pname = "moneydance";
@ -27,7 +27,7 @@ in stdenv.mkDerivation (finalAttrs: {
"javafx.swing,javafx.controls,javafx.graphics"
"-classpath"
"${placeholder "out"}/libexec/*"
] ++ [ "Moneydance" ];
] ++ jvmFlags ++ [ "Moneydance" ];
in ''
runHook preInstall