nixpkgs-suyu/pkgs/misc/emulators/ryujinx/default.nix

84 lines
2.3 KiB
Nix
Raw Normal View History

2021-10-25 00:15:04 +02:00
{ lib, buildDotnetModule, fetchFromGitHub, makeDesktopItem, copyDesktopItems
2021-05-13 17:38:29 +02:00
, libX11, libgdiplus, ffmpeg
2021-07-07 03:55:52 +02:00
, SDL2_mixer, openal, libsoundio, sndio, pulseaudio
2021-01-25 20:23:05 +01:00
, gtk3, gobject-introspection, gdk-pixbuf, wrapGAppsHook
2020-07-31 13:34:41 +02:00
}:
2021-08-19 17:10:41 +02:00
buildDotnetModule rec {
2020-07-31 13:34:41 +02:00
pname = "ryujinx";
2021-11-18 01:52:45 +01:00
version = "1.0.7105"; # Versioning is based off of the official appveyor builds: https://ci.appveyor.com/project/gdkchan/ryujinx
2020-07-31 13:34:41 +02:00
src = fetchFromGitHub {
owner = "Ryujinx";
repo = "Ryujinx";
2021-11-18 01:52:45 +01:00
rev = "b9d83cc97ee1cb8c60d9b01c162bab742567fe6e";
sha256 = "0plchh8f9xhhza1wfw3ys78f0pa1bh3898fqhfhcc0kxb39px9is";
2020-07-31 13:34:41 +02:00
};
2021-08-19 17:10:41 +02:00
projectFile = "Ryujinx.sln";
nugetDeps = ./deps.nix;
2020-07-31 13:34:41 +02:00
2021-10-25 00:15:04 +02:00
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" ];
nativeBuildInputs = [
copyDesktopItems
wrapGAppsHook
gobject-introspection
gdk-pixbuf
];
2021-08-19 17:10:41 +02:00
runtimeDeps = [
gtk3
libX11
libgdiplus
ffmpeg
SDL2_mixer
openal
libsoundio
sndio
pulseaudio
];
2020-07-31 13:34:41 +02:00
2021-01-28 21:40:11 +01:00
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.
];
2020-07-31 13:34:41 +02:00
2021-08-19 17:10:41 +02:00
preInstall = ''
2021-07-07 03:55:52 +02:00
# 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
2021-08-19 17:10:41 +02:00
makeWrapperArgs+=(
--suffix LD_LIBRARY_PATH : "$out/lib/sndio-6"
)
2020-07-31 13:34:41 +02:00
for i in 16 32 48 64 96 128 256 512 1024; do
2021-01-25 20:23:05 +01:00
install -D ${src}/Ryujinx/Ui/Resources/Logo_Ryujinx.png $out/share/icons/hicolor/''${i}x$i/apps/ryujinx.png
2020-07-31 13:34:41 +02:00
done
'';
2021-10-25 00:15:04 +02:00
desktopItems = [(makeDesktopItem {
desktopName = "Ryujinx";
name = "ryujinx";
exec = "Ryujinx";
icon = "ryujinx";
comment = meta.description;
type = "Application";
categories = "Game;";
})];
meta = with lib; {
2020-07-31 13:34:41 +02:00
description = "Experimental Nintendo Switch Emulator written in C#";
homepage = "https://ryujinx.org/";
license = licenses.mit;
2021-10-25 00:15:04 +02:00
changelog = "https://github.com/Ryujinx/Ryujinx/wiki/Changelog";
2020-07-31 13:34:41 +02:00
maintainers = [ maintainers.ivar ];
platforms = [ "x86_64-linux" ];
};
2021-03-30 01:56:02 +02:00
passthru.updateScript = ./updater.sh;
2020-07-31 13:34:41 +02:00
}