Merge pull request #195 from babbaj/nix-refactor

nix: Use POLYMC_JAVA_PATHS
This commit is contained in:
timoreo22 2022-02-26 07:34:19 +01:00 committed by GitHub
commit 692b9cf0e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,12 +47,7 @@ mkDerivation rec {
dontWrapQtApps = true;
postPatch = ''
# 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 != "") ''
postPatch = lib.optionalString (msaClientID != "") ''
# add client ID
substituteInPlace CMakeLists.txt \
--replace '17b47edd-c884-4997-926d-9e7f9a6b4647' '${msaClientID}'
@ -77,6 +72,7 @@ mkDerivation rec {
wrapProgram $out/bin/polymc \
"''${qtWrapperArgs[@]}" \
--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 ]}
'';