diff --git a/pkgs/development/libraries/glfw/3.x-wayland-minecraft.nix b/pkgs/development/libraries/glfw/3.x-wayland-minecraft.nix deleted file mode 100644 index 03baa891b3b4d..0000000000000 --- a/pkgs/development/libraries/glfw/3.x-wayland-minecraft.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, fetchpatch2, cmake, extra-cmake-modules -, libGL, wayland, wayland-protocols, libxkbcommon, libdecor -}: - -stdenv.mkDerivation { - version = "unstable-2023-06-01"; - pname = "glfw-wayland-minecraft"; - - src = fetchFromGitHub { - owner = "glfw"; - repo = "GLFW"; - rev = "3eaf1255b29fdf5c2895856c7be7d7185ef2b241"; - sha256 = "sha256-UnwuE/3q6I4dS5syagpnqrDEVDK9XSVdyOg7KNkdUUA="; - }; - - patches = [ - (fetchpatch2 { - url = "https://raw.githubusercontent.com/Admicos/minecraft-wayland/15f88a515c63a9716cfdf4090fab8e16543f4ebd/0003-Don-t-crash-on-calls-to-focus-or-icon.patch"; - hash = "sha256-NZbKh16h+tWXXnz13QcFBFaeGXMNxZKGQb9xJEahFnE="; - }) - (fetchpatch2 { - url = "https://raw.githubusercontent.com/Admicos/minecraft-wayland/15f88a515c63a9716cfdf4090fab8e16543f4ebd/0005-Add-warning-about-being-an-unofficial-patch.patch"; - hash = "sha256-QMUNlnlCeFz5gIVdbM+YXPsrmiOl9cMwuVRSOvlw+T0="; - }) - ]; - - propagatedBuildInputs = [ libGL ]; - - nativeBuildInputs = [ cmake extra-cmake-modules ]; - - buildInputs = [ wayland wayland-protocols libxkbcommon ]; - - cmakeFlags = [ - "-DBUILD_SHARED_LIBS=ON" - "-DGLFW_BUILD_WAYLAND=ON" - "-DGLFW_BUILD_X11=OFF" - "-DCMAKE_C_FLAGS=-D_GLFW_EGL_LIBRARY='\"${lib.getLib libGL}/lib/libEGL.so.1\"'" - ]; - - postPatch = '' - substituteInPlace src/wl_init.c \ - --replace "libxkbcommon.so.0" "${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0" - - substituteInPlace src/wl_init.c \ - --replace "libdecor-0.so.0" "${lib.getLib libdecor}/lib/libdecor-0.so.0" - - substituteInPlace src/wl_init.c \ - --replace "libwayland-client.so.0" "${lib.getLib wayland}/lib/libwayland-client.so.0" - - substituteInPlace src/wl_init.c \ - --replace "libwayland-cursor.so.0" "${lib.getLib wayland}/lib/libwayland-cursor.so.0" - - substituteInPlace src/wl_init.c \ - --replace "libwayland-egl.so.1" "${lib.getLib wayland}/lib/libwayland-egl.so.1" - ''; - - meta = with lib; { - description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time - with patches to support Minecraft on Wayland"; - homepage = "https://www.glfw.org/"; - license = licenses.zlib; - maintainers = with maintainers; [ Scrumplex ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/games/prismlauncher/wrapper.nix b/pkgs/games/prismlauncher/wrapper.nix index d91b2731135e0..4f81c8c4bb010 100644 --- a/pkgs/games/prismlauncher/wrapper.nix +++ b/pkgs/games/prismlauncher/wrapper.nix @@ -1,7 +1,6 @@ { lib , stdenv , symlinkJoin -, makeWrapper , wrapQtAppsHook , addOpenGLRunpath @@ -14,7 +13,6 @@ , libpulseaudio , libGL , glfw -, glfw-wayland-minecraft , openal , jdk8 , jdk17 @@ -32,13 +30,6 @@ , textToSpeechSupport ? stdenv.isLinux , controllerSupport ? 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 , jdks ? [ jdk21 jdk17 jdk8 ] @@ -46,8 +37,8 @@ , additionalPrograms ? [ ] }: -assert lib.assertMsg (withWaylandGLFW -> stdenv.isLinux) "withWaylandGLFW is only available on Linux"; - +# glfw 3.4 works without any further patches. TODO: remove this option for 24.10 +assert lib.assertMsg (!withWaylandGLFW) "withWaylandGLFW is no longer needed. This option is going to be removed"; let prismlauncher' = prismlauncher-unwrapped.override { inherit msaClientID gamemodeSupport; @@ -61,10 +52,7 @@ symlinkJoin { nativeBuildInputs = [ wrapQtAppsHook - ] - # purposefully using a shell wrapper here for variable expansion - # see https://github.com/NixOS/nixpkgs/issues/172583 - ++ lib.optional withWaylandGLFW makeWrapper; + ]; buildInputs = [ qtbase @@ -72,20 +60,6 @@ symlinkJoin { ] ++ lib.optional (lib.versionAtLeast qtbase.version "6" && stdenv.isLinux) qtwayland; - waylandPreExec = '' - 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 - ''; - qtWrapperArgs = let runtimeLibs = [ diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index b6d176e5713f7..bb3b5ca4dde93 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -416,6 +416,7 @@ mapAliases ({ gitter = throw "gitter has been removed since the client has been abandoned by upstream with the backend migration to Matrix"; # Added 2023-09-18 glide = throw "'glide' has been removed as it is unmaintained, please use Go modules instead"; # Added 2023-12-26 glfw-wayland = glfw; # Added 2024-04-19 + glfw-wayland-minecraft = throw "glfw-wayland-minecraft has been removed, as it is no longer needed since glfw 3.4"; # Added 2024-04-25 gmailieer = lieer; # Added 2020-04-19 gmic-qt-krita = throw "gmic-qt-krita was removed as it's no longer supported upstream."; # Converted to throw 2023-02-02 gnatboot11 = gnat-bootstrap11; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0909458a92c12..888aaaea5d2fe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21101,7 +21101,6 @@ with pkgs; }; glfw = glfw3; - glfw-wayland-minecraft = callPackage ../development/libraries/glfw/3.x-wayland-minecraft.nix {}; glfw2 = callPackage ../development/libraries/glfw/2.x.nix { }; glfw3 = callPackage ../development/libraries/glfw/3.x.nix { inherit (darwin.apple_sdk.frameworks) Carbon Cocoa Kernel OpenGL;