From 3d2dff4264cc032ab76506843333f5cc9e4290f0 Mon Sep 17 00:00:00 2001 From: "[Assassin]" Date: Wed, 11 Jun 2025 18:26:30 +0200 Subject: [PATCH] miru: set `ELECTRON_OZONE_PLATFORM_HINT` to x11 --- pkgs/by-name/mi/miru/linux.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/mi/miru/linux.nix b/pkgs/by-name/mi/miru/linux.nix index 80d5850e1ebc..b04d2df6b219 100644 --- a/pkgs/by-name/mi/miru/linux.nix +++ b/pkgs/by-name/mi/miru/linux.nix @@ -1,5 +1,6 @@ { fetchurl, + makeWrapper, appimageTools, pname, @@ -22,6 +23,8 @@ appimageTools.wrapType2 rec { hash = "sha256-nLPqEI6u5NNQ/kPbXRWPG0pIwutKNK2J8JeTPN6wHlg="; }; + nativeBuildInputs = [ makeWrapper ]; + extraInstallCommands = let contents = appimageTools.extractType2 { inherit pname version src; }; @@ -32,6 +35,9 @@ appimageTools.wrapType2 rec { cp -r ${contents}/{locales,resources} "$out/share/lib/miru" cp -r ${contents}/usr/* "$out" cp "${contents}/${pname}.desktop" "$out/share/applications/" + # https://github.com/ThaUnknown/miru/issues/562 + # Miru does not work under wayland currently, so force it to use X11 + wrapProgram $out/bin/miru --set ELECTRON_OZONE_PLATFORM_HINT x11 substituteInPlace $out/share/applications/${pname}.desktop --replace 'Exec=AppRun' 'Exec=${pname}' ''; }