From d8039594c5852606fddd11e47b62a3026d91177c Mon Sep 17 00:00:00 2001 From: Patrick Chilton Date: Mon, 14 Oct 2024 21:05:39 +0200 Subject: [PATCH] anyk: use OpenJDK with JavaFX --- pkgs/by-name/an/anyk/package.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/an/anyk/package.nix b/pkgs/by-name/an/anyk/package.nix index 4e9a92081d5d..d5a38a800304 100644 --- a/pkgs/by-name/an/anyk/package.nix +++ b/pkgs/by-name/an/anyk/package.nix @@ -3,6 +3,7 @@ , fetchurl , fetchzip , openjdk +, openjfx , writeScript , runCommandLocal , bash @@ -24,10 +25,16 @@ let stripRoot = false; }; - # ÁNYK uses some SOAP stuff that's not shipped with OpenJDK any more. - # We don't really want to use openjdk8 because it's unusable on HiDPI - # and people are more likely to have a modern OpenJDK installed. + # ÁNYK needs JavaFX for the Ügyfélkapu login webview. + jdkWithFX = openjdk.override { + enableJavaFX = true; + openjfx = openjfx.override { withWebKit = true; }; + }; + extraClasspath = [ + # ÁNYK uses some SOAP stuff that's not shipped with OpenJDK any more. + # We don't really want to use openjdk8 because it's unusable on HiDPI + # and people are more likely to have a modern OpenJDK installed. (fetchurl { url = "mirror://maven/org/glassfish/metro/webservices-rt/2.4.10/webservices-rt-2.4.10.jar"; sha256 = "sha256-lHclIZn3HR2B2lMttmmQGIV67qJi5KhL5jT2WNUQpPI="; @@ -43,7 +50,7 @@ let sha256 = "sha256-ueJLfdbgdJVWLqllMb4xMMltuk144d/Yitu96/QzKHE="; }) - # Patch one of the classes so it works with the packages above by removing .internal. from the package names. + # Patch one of the ÁNYK classes so it works with the packages above by removing .internal. from the package names. (runCommandLocal "anyk-patch" {} '' mkdir $out cd $out @@ -83,7 +90,7 @@ let SCALING_PROP="-Dsun.java2d.uiScale=''${WINDOW_SCALING_FACTOR}" fi # ÁNYK crashes with NullPointerException with the GTK look and feel so use the cross-platform one. - exec ${openjdk}/bin/java -Dswing.systemlaf=javax.swing.plaf.metal.MetalLookAndFeel $SCALING_PROP "$@" + exec ${jdkWithFX}/bin/java -Dswing.systemlaf=javax.swing.plaf.metal.MetalLookAndFeel $SCALING_PROP "$@" ''; in stdenv.mkDerivation { pname = "anyk";