3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/misc/emulators/ryujinx/default.nix

72 lines
2 KiB
Nix
Raw Normal View History

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