diff --git a/pkgs/by-name/hy/hyprland/asahi-fix.patch b/pkgs/by-name/hy/hyprland/asahi-fix.patch new file mode 100644 index 000000000000..80791045e285 --- /dev/null +++ b/pkgs/by-name/hy/hyprland/asahi-fix.patch @@ -0,0 +1,15 @@ +diff --git a/src/protocols/LinuxDMABUF.cpp b/src/protocols/LinuxDMABUF.cpp +index 0fbf832e..c6077114 100644 +--- a/src/protocols/LinuxDMABUF.cpp ++++ b/src/protocols/LinuxDMABUF.cpp +@@ -492,9 +492,8 @@ CLinuxDMABufV1Protocol::CLinuxDMABufV1Protocol(const wl_interface* iface, const + return; + } + } else { +- protoLog(ERR, "DRM device {} has no render node, disabling linux dmabuf", device->nodes[DRM_NODE_PRIMARY] ? device->nodes[DRM_NODE_PRIMARY] : "null"); ++ protoLog(ERR, "DRM device {} has no render node, disabling linux dmabuf checks", device->nodes[DRM_NODE_PRIMARY] ? device->nodes[DRM_NODE_PRIMARY] : "null"); + drmFreeDevice(&device); +- removeGlobal(); + } + }); + } diff --git a/pkgs/by-name/hy/hyprland/package.nix b/pkgs/by-name/hy/hyprland/package.nix index aa9c8acb2b4b..1359e6f2fa8c 100644 --- a/pkgs/by-name/hy/hyprland/package.nix +++ b/pkgs/by-name/hy/hyprland/package.nix @@ -75,6 +75,10 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-deu8zvgseDg2gQEnZiCda4TrbA6pleE9iItoZlsoMtE="; }; + # Fixes broken OpenGL applications on Apple silicon (Asahi Linux) + # Based on commit https://github.com/hyprwm/Hyprland/commit/279ec1c291021479b050c83a0435ac7076c1aee0 + patches = [ ./asahi-fix.patch ]; + postPatch = '' # Fix hardcoded paths to /usr installation sed -i "s#/usr#$out#" src/render/OpenGL.cpp