nix: Use POLYMC_JAVA_PATHS

This commit is contained in:
Babbaj 2022-02-25 16:47:47 -05:00
parent 9e35560554
commit e8929599a5
No known key found for this signature in database
GPG Key ID: F044309848A07CAC

View File

@ -47,12 +47,7 @@ mkDerivation rec {
dontWrapQtApps = true; dontWrapQtApps = true;
postPatch = '' postPatch = lib.optionalString (msaClientID != "") ''
# hardcode jdk paths
substituteInPlace launcher/java/JavaUtils.cpp \
--replace 'scanJavaDir("/usr/lib/jvm")' 'javas.append("${jdk}/lib/openjdk/bin/java")' \
--replace 'scanJavaDir("/usr/lib32/jvm")' 'javas.append("${jdk8}/lib/openjdk/bin/java")'
'' + lib.optionalString (msaClientID != "") ''
# add client ID # add client ID
substituteInPlace CMakeLists.txt \ substituteInPlace CMakeLists.txt \
--replace '17b47edd-c884-4997-926d-9e7f9a6b4647' '${msaClientID}' --replace '17b47edd-c884-4997-926d-9e7f9a6b4647' '${msaClientID}'
@ -77,6 +72,7 @@ mkDerivation rec {
wrapProgram $out/bin/polymc \ wrapProgram $out/bin/polymc \
"''${qtWrapperArgs[@]}" \ "''${qtWrapperArgs[@]}" \
--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 PATH : ${lib.makeBinPath [ xorg.xrandr ]} --prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
''; '';