Merge pull request #294241 from wegank/zulu-javafx-linux

zulu: fix build with javafx on linux
This commit is contained in:
Weijia Wang 2024-03-08 13:06:11 +01:00 committed by GitHub
commit a1fae9555d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,10 @@
, gtkSupport ? stdenv.isLinux
, cairo
, glib
, gtk2
, gtk3
# runtime dependencies for JavaFX
, ffmpeg
}:
let
dist = dists.${stdenv.hostPlatform.system}
@ -43,6 +46,10 @@ let
cairo
glib
gtk3
] ++ lib.optionals (gtkSupport && lib.versionOlder dist.jdkVersion "17") [
gtk2
] ++ lib.optionals (stdenv.isLinux && enableJavaFX) [
ffmpeg.lib
];
runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
@ -83,8 +90,14 @@ let
xorg.libXi
xorg.libXrender
xorg.libXtst
xorg.libXxf86vm
zlib
];
] ++ lib.optionals (stdenv.isLinux && enableJavaFX) runtimeDependencies;
autoPatchelfIgnoreMissingDeps = if (stdenv.isLinux && enableJavaFX) then [
"libavcodec*.so.*"
"libavformat*.so.*"
] else null;
installPhase = ''
mkdir -p $out