diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/emulators/ryujinx/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/emulators/ryujinx/default.nix | 76 |
1 files changed, 45 insertions, 31 deletions
diff --git a/nixpkgs/pkgs/applications/emulators/ryujinx/default.nix b/nixpkgs/pkgs/applications/emulators/ryujinx/default.nix index 2f684257114a..2ac16662b882 100644 --- a/nixpkgs/pkgs/applications/emulators/ryujinx/default.nix +++ b/nixpkgs/pkgs/applications/emulators/ryujinx/default.nix @@ -1,18 +1,29 @@ -{ lib, buildDotnetModule, fetchFromGitHub, makeDesktopItem, copyDesktopItems -, dotnetCorePackages, libX11, libgdiplus, ffmpeg -, SDL2_mixer, openal, libsoundio, sndio, pulseaudio -, gtk3, gdk-pixbuf, wrapGAppsHook +{ lib +, buildDotnetModule +, fetchFromGitHub +, dotnetCorePackages +, libX11 +, libgdiplus +, ffmpeg +, SDL2_mixer +, openal +, libsoundio +, sndio +, pulseaudio +, gtk3 +, gdk-pixbuf +, wrapGAppsHook }: buildDotnetModule rec { pname = "ryujinx"; - version = "1.0.7168"; # Versioning is based off of the official appveyor builds: https://ci.appveyor.com/project/gdkchan/ryujinx + version = "1.1.64"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml src = fetchFromGitHub { owner = "Ryujinx"; repo = "Ryujinx"; - rev = "6e0799580f0d1b473a79471c5d365c6524d97a86"; - sha256 = "145sn9xkjxj79292faypcdmpmbxm1w70q0iprg6pfymf9920gvfv"; + rev = "54bfaa125d9b6ae1be53ec431d40326fba51d0de"; + sha256 = "0p8wmnm8sjx7wqb5z62mp8c3cwrv241ji3fawj2qgqx3k9jlb31i"; }; dotnet-sdk = dotnetCorePackages.sdk_6_0; @@ -28,7 +39,6 @@ buildDotnetModule rec { executables = [ "Ryujinx" ]; nativeBuildInputs = [ - copyDesktopItems wrapGAppsHook ]; @@ -41,7 +51,6 @@ buildDotnetModule rec { gtk3 libX11 libgdiplus - ffmpeg SDL2_mixer openal libsoundio @@ -50,41 +59,46 @@ buildDotnetModule rec { ]; patches = [ - ./log.patch # Without this, Ryujinx attempts to write logs to the nix store. This patch makes it write to "~/.config/Ryujinx/Logs" on Linux. + ./appdir.patch # Ryujinx attempts to write to the nix store. This patch redirects it to "~/.config/Ryujinx" on Linux. ]; preInstall = '' - # TODO: fix this hack https://github.com/Ryujinx/Ryujinx/issues/2349 - mkdir -p $out/lib/sndio-6 - ln -s ${sndio}/lib/libsndio.so $out/lib/sndio-6/libsndio.so.6 - + # Ryujinx tries to use ffmpeg from PATH makeWrapperArgs+=( - --suffix LD_LIBRARY_PATH : "$out/lib/sndio-6" + --suffix PATH : ${lib.makeBinPath [ ffmpeg ]} ) + ''; + + preFixup = '' + mkdir -p $out/share/{applications,icons/hicolor/scalable/apps,mime/packages} + pushd ${src}/distribution/linux - for i in 16 32 48 64 96 128 256 512 1024; do - install -D ${src}/Ryujinx/Ui/Resources/Logo_Ryujinx.png $out/share/icons/hicolor/''${i}x$i/apps/ryujinx.png - done + install -D ./ryujinx.desktop $out/share/applications/ryujinx.desktop + 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" + + popd ''; - desktopItems = [(makeDesktopItem { - desktopName = "Ryujinx"; - name = "ryujinx"; - exec = "Ryujinx"; - icon = "ryujinx"; - comment = meta.description; - type = "Application"; - categories = "Game;"; - })]; + passthru.updateScript = ./updater.sh; meta = with lib; { - description = "Experimental Nintendo Switch Emulator written in C#"; homepage = "https://ryujinx.org/"; - license = licenses.mit; changelog = "https://github.com/Ryujinx/Ryujinx/wiki/Changelog"; - maintainers = [ maintainers.ivar ]; + description = "Experimental Nintendo Switch Emulator written in C#"; + longDescription = '' + Ryujinx is an open-source Nintendo Switch emulator, created by gdkchan, + written in C#. This emulator aims at providing excellent accuracy and + performance, a user-friendly interface and consistent builds. It was + written from scratch and development on the project began in September + 2017. + ''; + license = licenses.mit; + maintainers = with maintainers; [ ivar jk ]; platforms = [ "x86_64-linux" ]; mainProgram = "Ryujinx"; }; - passthru.updateScript = ./updater.sh; } |