Merge pull request #734 from babbaj/extra-jdks

nix: add package argument for extra jdks
This commit is contained in:
txtsd 2022-06-09 05:57:23 +05:30 committed by Sefa Eyeoglu
parent 1c70b29b3d
commit f169173afa
No known key found for this signature in database
GPG Key ID: C10411294912A422

View File

@ -14,6 +14,7 @@
, quazip
, libGL
, msaClientID ? ""
, extraJDKs ? [ ]
# flake
, self
@ -36,6 +37,8 @@ let
# This variable will be passed to Minecraft by PolyMC
gameLibraryPath = libpath + ":/run/opengl-driver/lib";
javaPaths = lib.makeSearchPath "bin/java" ([ jdk jdk8 ] ++ extraJDKs);
in
stdenv.mkDerivation rec {
@ -67,7 +70,7 @@ stdenv.mkDerivation rec {
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
wrapQtApp $out/bin/polymc \
--set GAME_LIBRARY_PATH ${gameLibraryPath} \
--prefix POLYMC_JAVA_PATHS : ${jdk}/lib/openjdk/bin/java:${jdk8}/lib/openjdk/bin/java \
--prefix POLYMC_JAVA_PATHS : ${javaPaths} \
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
'';