From c1efe2557219b022d0ddc1d9abe355a5aa7a6347 Mon Sep 17 00:00:00 2001 From: Fazzi Date: Mon, 24 Feb 2025 15:17:53 +0000 Subject: [PATCH] prismlauncher-unwrapped: add patch to make MangoHud 0.8 work correctly --- .../by-name/pr/prismlauncher-unwrapped/package.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix index 39d05e56805c..ba5602ee52f2 100644 --- a/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix +++ b/pkgs/by-name/pr/prismlauncher-unwrapped/package.nix @@ -5,6 +5,7 @@ cmake, cmark, extra-cmake-modules, + fetchpatch, gamemode, ghc_filesystem, jdk17, @@ -14,11 +15,9 @@ stripJavaArchivesHook, tomlplusplus, zlib, - msaClientID ? null, gamemodeSupport ? stdenv.hostPlatform.isLinux, }: - let libnbtplusplus = fetchFromGitHub { owner = "PrismLauncher"; @@ -27,11 +26,9 @@ let hash = "sha256-yy0q+bky80LtK1GWzz7qpM+aAGrOqLuewbid8WT1ilk="; }; in - assert lib.assertMsg ( gamemodeSupport -> stdenv.hostPlatform.isLinux ) "gamemodeSupport is only available on Linux."; - stdenv.mkDerivation (finalAttrs: { pname = "prismlauncher-unwrapped"; version = "9.2"; @@ -87,6 +84,15 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}/Applications/") ]; + patches = [ + # This patch allows Mangohud 0.8 to run correctly with Prism Launcher. + # This should be removed on the next Prism Launcher release. + (fetchpatch { + url = "https://github.com/PrismLauncher/PrismLauncher/commit/3295b0717a8c4805022eccb74fee2304361d8dab.patch"; + hash = "sha256-A7DrmI00dFUNZLoMFDfym7e5rSFg6V4/MjVxAnQwT6E="; + }) + ]; + doCheck = true; dontWrapQtApps = true;