From fd48ed5022b6c367adbffcfc7aa89a694f5508e6 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Wed, 8 Sep 2021 20:50:37 -0400 Subject: [PATCH 1/2] multimc: unstable-2021-06-21 -> unstable-2021-09-08 --- .../multimc/0001-pick-latest-java-first.patch | 16 ++++++++-------- pkgs/games/multimc/default.nix | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pkgs/games/multimc/0001-pick-latest-java-first.patch b/pkgs/games/multimc/0001-pick-latest-java-first.patch index 31ab0497f8df..a65dcbfd037d 100644 --- a/pkgs/games/multimc/0001-pick-latest-java-first.patch +++ b/pkgs/games/multimc/0001-pick-latest-java-first.patch @@ -4,14 +4,14 @@ Date: Tue, 22 Jun 2021 21:50:11 +0300 Subject: [PATCH] pick latest java first --- - api/logic/java/JavaInstallList.cpp | 4 ++-- - api/logic/java/JavaUtils.cpp | 2 +- + launcher/java/JavaInstallList.cpp | 4 ++-- + launcher/java/JavaUtils.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -diff --git a/api/logic/java/JavaInstallList.cpp b/api/logic/java/JavaInstallList.cpp +diff --git a/launcher/java/JavaInstallList.cpp b/launcher/java/JavaInstallList.cpp index 0bded03c..40898e20 100644 ---- a/api/logic/java/JavaInstallList.cpp -+++ b/api/logic/java/JavaInstallList.cpp +--- a/launcher/java/JavaInstallList.cpp ++++ b/launcher/java/JavaInstallList.cpp @@ -120,8 +120,8 @@ void JavaInstallList::updateListData(QList versions) bool sortJavas(BaseVersionPtr left, BaseVersionPtr right) @@ -23,10 +23,10 @@ index 0bded03c..40898e20 100644 return (*rleft) > (*rright); } -diff --git a/api/logic/java/JavaUtils.cpp b/api/logic/java/JavaUtils.cpp +diff --git a/launcher/java/JavaUtils.cpp b/launcher/java/JavaUtils.cpp index 5f004a10..6d633631 100644 ---- a/api/logic/java/JavaUtils.cpp -+++ b/api/logic/java/JavaUtils.cpp +--- a/launcher/java/JavaUtils.cpp ++++ b/launcher/java/JavaUtils.cpp @@ -350,7 +350,6 @@ QList JavaUtils::FindJavaPaths() qDebug() << "Linux Java detection incomplete - defaulting to \"java\""; diff --git a/pkgs/games/multimc/default.nix b/pkgs/games/multimc/default.nix index 8e72b9588561..76326b48bb82 100644 --- a/pkgs/games/multimc/default.nix +++ b/pkgs/games/multimc/default.nix @@ -4,12 +4,12 @@ let libpath = with xorg; lib.makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio libGL ]; in mkDerivation rec { pname = "multimc"; - version = "unstable-2021-06-21"; + version = "unstable-2021-09-08"; src = fetchFromGitHub { owner = "MultiMC"; repo = "MultiMC5"; - rev = "8179a89103833805d5374399d80a4305be1b8355"; - sha256 = "lPz6ZM7TjaixfwWMPaXijKZJQKFPrCegBhvbJ8Xg4P8="; + rev = "e2355eb276bf355ca4acf526a0f3cc390aa88f8b"; + sha256 = "3G9QPoAbC+uVfUYR0Kq6hnxl9c2mvCzIEYGjwfarQJ8="; fetchSubmodules = true; }; nativeBuildInputs = [ cmake file makeWrapper ]; @@ -19,7 +19,7 @@ in mkDerivation rec { postPatch = '' # hardcode jdk paths - substituteInPlace api/logic/java/JavaUtils.cpp \ + 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")' ''; @@ -27,8 +27,8 @@ in mkDerivation rec { cmakeFlags = [ "-DMultiMC_LAYOUT=lin-system" ]; postInstall = '' - install -Dm644 ../application/resources/multimc/scalable/multimc.svg $out/share/pixmaps/multimc.svg - install -Dm755 ../application/package/linux/multimc.desktop $out/share/applications/multimc.desktop + install -Dm644 ../launcher/resources/multimc/scalable/multimc.svg $out/share/pixmaps/multimc.svg + install -Dm755 ../launcher/package/linux/multimc.desktop $out/share/applications/multimc.desktop # xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128 wrapProgram $out/bin/multimc \ From 82397b844d8bf4e84e694e2be836cadd3ab6be31 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Fri, 10 Sep 2021 10:31:47 -0400 Subject: [PATCH 2/2] multimc: user-provided client ID --- pkgs/games/multimc/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/games/multimc/default.nix b/pkgs/games/multimc/default.nix index 76326b48bb82..732a66ef8b41 100644 --- a/pkgs/games/multimc/default.nix +++ b/pkgs/games/multimc/default.nix @@ -1,4 +1,4 @@ -{ lib, mkDerivation, fetchFromGitHub, cmake, jdk8, jdk, zlib, file, makeWrapper, xorg, libpulseaudio, qtbase, libGL }: +{ lib, mkDerivation, fetchFromGitHub, cmake, jdk8, jdk, zlib, file, makeWrapper, xorg, libpulseaudio, qtbase, libGL, msaClientID ? "" }: let libpath = with xorg; lib.makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio libGL ]; @@ -22,6 +22,10 @@ in mkDerivation rec { 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")' + + # add client ID + substituteInPlace notsecrets/Secrets.cpp \ + --replace 'QString MSAClientID = "";' 'QString MSAClientID = "${msaClientID}";' ''; cmakeFlags = [ "-DMultiMC_LAYOUT=lin-system" ];