a3d4720129
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
146 lines
3.2 KiB
Nix
146 lines
3.2 KiB
Nix
{ lib
|
|
, buildDotnetModule
|
|
, dotnetCorePackages
|
|
, stdenvNoCC
|
|
, fetchFromGitHub
|
|
, wrapGAppsHook
|
|
, libX11
|
|
, libgdiplus
|
|
, ffmpeg
|
|
, openal
|
|
, libsoundio
|
|
, sndio
|
|
, pulseaudio
|
|
, gtk3
|
|
, gdk-pixbuf
|
|
, vulkan-loader
|
|
, libICE
|
|
, libSM
|
|
, libXi
|
|
, libXcursor
|
|
, libXext
|
|
, libXrandr
|
|
, fontconfig
|
|
, glew
|
|
, libGL
|
|
, SDL2
|
|
, SDL2_mixer
|
|
}:
|
|
|
|
buildDotnetModule rec {
|
|
pname = "ryujinx";
|
|
version = "1.1.489"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Ryujinx";
|
|
repo = "Ryujinx";
|
|
rev = "37d27c4c99486312d9a282d7fc056c657efe0848";
|
|
sha256 = "0h55vv2g9i81km0jzlb62arlky5ci4i45jyxig3znqr1zb4l0a67";
|
|
};
|
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_7_0;
|
|
dotnet-runtime = dotnetCorePackages.runtime_7_0;
|
|
|
|
nugetDeps = ./deps.nix;
|
|
|
|
nativeBuildInputs = [
|
|
wrapGAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
gtk3
|
|
gdk-pixbuf
|
|
];
|
|
|
|
runtimeDeps = [
|
|
gtk3
|
|
libX11
|
|
libgdiplus
|
|
SDL2_mixer
|
|
openal
|
|
libsoundio
|
|
sndio
|
|
pulseaudio
|
|
vulkan-loader
|
|
ffmpeg
|
|
|
|
# Avalonia UI
|
|
libICE
|
|
libSM
|
|
libXi
|
|
libXcursor
|
|
libXext
|
|
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"
|
|
"--set SDL_VIDEODRIVER x11"
|
|
];
|
|
|
|
preInstall = ''
|
|
# workaround for 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
|
|
'';
|
|
|
|
preFixup = ''
|
|
mkdir -p $out/share/{applications,icons/hicolor/scalable/apps,mime/packages}
|
|
pushd ${src}/distribution/linux
|
|
|
|
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"
|
|
|
|
ln -s $out/bin/Ryujinx $out/bin/ryujinx
|
|
|
|
popd
|
|
'';
|
|
|
|
passthru.updateScript = ./updater.sh;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://ryujinx.org/";
|
|
changelog = "https://github.com/Ryujinx/Ryujinx/wiki/Changelog";
|
|
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";
|
|
};
|
|
}
|