From 283d90b11097c95f3694258375ed9206f46f8a34 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Fri, 12 Aug 2022 12:20:25 -0700 Subject: [PATCH 1/2] ryujinx: Add dependencies for the Avalonia UI --- .../emulators/ryujinx/default.nix | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/ryujinx/default.nix b/pkgs/applications/emulators/ryujinx/default.nix index 8d77e00e8201..bda8f40dfcc0 100644 --- a/pkgs/applications/emulators/ryujinx/default.nix +++ b/pkgs/applications/emulators/ryujinx/default.nix @@ -14,6 +14,14 @@ , gdk-pixbuf , wrapGAppsHook , vulkan-loader +, libICE +, libSM +, libXi +, libXcursor +, libXext +, libXrandr +, fontconfig +, glew }: buildDotnetModule rec { @@ -34,7 +42,7 @@ buildDotnetModule rec { # TODO: Add the headless frontend. Currently errors on the following: # System.Exception: SDL2 initlaization failed with error "No available video device" - executables = [ "Ryujinx" ]; + executables = [ "Ryujinx" "Ryujinx.Ava" ]; nativeBuildInputs = [ wrapGAppsHook @@ -56,6 +64,16 @@ buildDotnetModule rec { pulseaudio vulkan-loader ffmpeg + + # Avalonia UI + libICE + libSM + libXi + libXcursor + libXext + libXrandr + fontconfig + glew ]; patches = [ From 6247b00637c93ae28f2e247cb62dc36e956818de Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Wed, 17 Aug 2022 10:48:54 -0600 Subject: [PATCH 2/2] ryujinx: Force display backend to X11 --- pkgs/applications/emulators/ryujinx/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/emulators/ryujinx/default.nix b/pkgs/applications/emulators/ryujinx/default.nix index bda8f40dfcc0..41348c9848c1 100644 --- a/pkgs/applications/emulators/ryujinx/default.nix +++ b/pkgs/applications/emulators/ryujinx/default.nix @@ -80,6 +80,11 @@ buildDotnetModule rec { ./appdir.patch # Ryujinx attempts to write to the nix store. This patch redirects it to "~/.config/Ryujinx" on Linux. ]; + makeWrapperArgs = [ + # Without this Ryujinx fails to start on wayland. See https://github.com/Ryujinx/Ryujinx/issues/2714 + "--set GDK_BACKEND x11" + ]; + preInstall = '' # workaround for https://github.com/Ryujinx/Ryujinx/issues/2349 mkdir -p $out/lib/sndio-6