nix: add package argument for extra jdks
This commit is contained in:
parent
8966364648
commit
3f1251e78b
@ -14,6 +14,7 @@
|
|||||||
, quazip
|
, quazip
|
||||||
, libGL
|
, libGL
|
||||||
, msaClientID ? ""
|
, msaClientID ? ""
|
||||||
|
, extraJDKs ? [ ]
|
||||||
|
|
||||||
# flake
|
# flake
|
||||||
, self
|
, self
|
||||||
@ -36,6 +37,8 @@ let
|
|||||||
|
|
||||||
# This variable will be passed to Minecraft by PolyMC
|
# This variable will be passed to Minecraft by PolyMC
|
||||||
gameLibraryPath = libpath + ":/run/opengl-driver/lib";
|
gameLibraryPath = libpath + ":/run/opengl-driver/lib";
|
||||||
|
|
||||||
|
javaPaths = lib.makeSearchPath "bin/java" ([ jdk jdk8 ] ++ extraJDKs);
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
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
|
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||||
wrapQtApp $out/bin/polymc \
|
wrapQtApp $out/bin/polymc \
|
||||||
--set GAME_LIBRARY_PATH ${gameLibraryPath} \
|
--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 ]}
|
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user