From 2a5017a5550a32dfdf4000bd8fa2fea89e6a0f95 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Wed, 8 May 2024 12:34:01 +0200 Subject: [PATCH] prismlauncher: deprecate withWaylandGLFW option Signed-off-by: Sefa Eyeoglu --- pkgs/by-name/pr/prismlauncher/package.nix | 46 ++++------------------- 1 file changed, 7 insertions(+), 39 deletions(-) diff --git a/pkgs/by-name/pr/prismlauncher/package.nix b/pkgs/by-name/pr/prismlauncher/package.nix index c1425a3099bd..b74fce498767 100644 --- a/pkgs/by-name/pr/prismlauncher/package.nix +++ b/pkgs/by-name/pr/prismlauncher/package.nix @@ -7,9 +7,7 @@ alsa-lib, flite, gamemode, - glfw, - glfw-wayland-minecraft, - mesa-demos, + glfw3-minecraft, jdk8, jdk17, jdk21, @@ -18,7 +16,7 @@ libjack2, libpulseaudio, libusb1, - makeWrapper, + mesa-demos, openal, pciutils, pipewire, @@ -37,15 +35,6 @@ ], msaClientID ? null, textToSpeechSupport ? stdenv.isLinux, - - # Adds `glfw-wayland-minecraft` to `LD_LIBRARY_PATH` - # when launched on wayland, allowing for the game to be run natively. - # Make sure to enable "Use system installation of GLFW" in instance settings - # for this to take effect - # - # Warning: This build of glfw may be unstable, and the launcher - # itself can take slightly longer to start - withWaylandGLFW ? false, }: assert lib.assertMsg ( @@ -56,10 +45,6 @@ assert lib.assertMsg ( textToSpeechSupport -> stdenv.isLinux ) "textToSpeechSupport only has an effect on Linux."; -assert lib.assertMsg ( - withWaylandGLFW -> stdenv.isLinux -) "withWaylandGLFW is only available on Linux."; - let prismlauncher' = prismlauncher-unwrapped.override { inherit msaClientID gamemodeSupport; }; in @@ -69,11 +54,7 @@ symlinkJoin { paths = [ prismlauncher' ]; - nativeBuildInputs = - [ kdePackages.wrapQtAppsHook ] - # purposefully using a shell wrapper here for variable expansion - # see https://github.com/NixOS/nixpkgs/issues/172583 - ++ lib.optional withWaylandGLFW makeWrapper; + nativeBuildInputs = [ kdePackages.wrapQtAppsHook ]; buildInputs = [ @@ -84,30 +65,17 @@ symlinkJoin { lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.isLinux ) kdePackages.qtwayland; - env = { - waylandPreExec = lib.optionalString withWaylandGLFW '' - if [ -n "$WAYLAND_DISPLAY" ]; then - export LD_LIBRARY_PATH=${lib.getLib glfw-wayland-minecraft}/lib:"$LD_LIBRARY_PATH" - fi - ''; - }; - - postBuild = - lib.optionalString withWaylandGLFW '' - qtWrapperArgs+=(--run "$waylandPreExec") - '' - + '' - wrapQtAppsHook - ''; + postBuild = '' + wrapQtAppsHook + ''; qtWrapperArgs = let runtimeLibs = [ - # lwjgl stdenv.cc.cc.lib ## native versions - glfw + glfw3-minecraft openal ## openal