From e3e703844d22801decd958ef5598a8a66d4505b7 Mon Sep 17 00:00:00 2001 From: Ivar Scholten Date: Tue, 23 Aug 2022 04:09:33 +0200 Subject: [PATCH] ryujinx: 1.1.223 -> 1.1.248 Its now running unit tests, and the headless frontend is packaged as well. The latter is a bit inconsistent, on the OpenGL backend it will always fail to create an SDL+OpenGL instance, causing a crash. The Vulkan backend mostly works fine, although it might need a few restarts before it decides to show graphics. Better than nothing though. --- .../emulators/ryujinx/default.nix | 44 ++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/emulators/ryujinx/default.nix b/pkgs/applications/emulators/ryujinx/default.nix index b21bc5e5fa26..12d6d0a40515 100644 --- a/pkgs/applications/emulators/ryujinx/default.nix +++ b/pkgs/applications/emulators/ryujinx/default.nix @@ -1,18 +1,16 @@ { lib , buildDotnetModule , fetchFromGitHub -, dotnetCorePackages +, wrapGAppsHook , libX11 , libgdiplus , ffmpeg -, SDL2_mixer , openal , libsoundio , sndio , pulseaudio , gtk3 , gdk-pixbuf -, wrapGAppsHook , vulkan-loader , libICE , libSM @@ -22,28 +20,24 @@ , libXrandr , fontconfig , glew +, libGL +, SDL2 +, SDL2_mixer }: buildDotnetModule rec { pname = "ryujinx"; - version = "1.1.223"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml + version = "1.1.248"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml src = fetchFromGitHub { owner = "Ryujinx"; repo = "Ryujinx"; - rev = "951700fdd8f54fb34ffe8a3fb328a68b5bf37abe"; - sha256 = "0kzchsxir8wh74rxvp582mci855hbd0vma6yhcc9vpz0zmhi2cpf"; + rev = "5ff5fe47bad947a95545390865c597bec6c62070"; + sha256 = "0nfzf7q58mhdyszwv3mbz3wqf4w0m1p3fmf3cpga1pf9mfq65nqz"; }; - projectFile = "Ryujinx.sln"; nugetDeps = ./deps.nix; - dotnetFlags = [ "/p:ExtraDefineConstants=DISABLE_UPDATER" ]; - - # TODO: Add the headless frontend. Currently errors on the following: - # System.Exception: SDL2 initlaization failed with error "No available video device" - executables = [ "Ryujinx" "Ryujinx.Ava" ]; - nativeBuildInputs = [ wrapGAppsHook ]; @@ -74,12 +68,30 @@ buildDotnetModule rec { libXrandr fontconfig glew + + # Headless executable + libGL + SDL2 ]; patches = [ ./appdir.patch # Ryujinx attempts to write to the nix store. This patch redirects it to "~/.config/Ryujinx" on Linux. ]; + projectFile = "Ryujinx.sln"; + testProjectFile = "Ryujinx.Tests/Ryujinx.Tests.csproj"; + doCheck = true; + + dotnetFlags = [ + "/p:ExtraDefineConstants=DISABLE_UPDATER" + ]; + + executables = [ + "Ryujinx.Headless.SDL2" + "Ryujinx.Ava" + "Ryujinx" + ]; + makeWrapperArgs = [ # Without this Ryujinx fails to start on wayland. See https://github.com/Ryujinx/Ryujinx/issues/2714 "--set GDK_BACKEND x11" @@ -100,8 +112,10 @@ buildDotnetModule rec { install -D ./ryujinx-mime.xml $out/share/mime/packages/ryujinx-mime.xml install -D ./ryujinx-logo.svg $out/share/icons/hicolor/scalable/apps/ryujinx.svg - substituteInPlace $out/share/applications/ryujinx.desktop --replace \ - "Exec=Ryujinx" "Exec=$out/bin/Ryujinx" + substituteInPlace $out/share/applications/ryujinx.desktop \ + --replace "Exec=Ryujinx" "Exec=$out/bin/Ryujinx" + + ln -s $out/bin/Ryujinx $out/bin/ryujinx popd '';