From e8929599a52a7df3a67b76fd7bf586a219030247 Mon Sep 17 00:00:00 2001 From: Babbaj Date: Fri, 25 Feb 2022 16:47:47 -0500 Subject: [PATCH] nix: Use POLYMC_JAVA_PATHS --- packages/nix/polymc/default.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/nix/polymc/default.nix b/packages/nix/polymc/default.nix index a9610017..9a986be4 100644 --- a/packages/nix/polymc/default.nix +++ b/packages/nix/polymc/default.nix @@ -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 ]} '';