2022-02-28 19:05:58 +00:00
|
|
|
{ lib
|
|
|
|
, buildDotnetModule
|
2022-09-26 17:45:48 +00:00
|
|
|
, dotnetCorePackages
|
2022-02-28 19:05:58 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, libX11
|
|
|
|
, libgdiplus
|
|
|
|
, ffmpeg
|
|
|
|
, openal
|
|
|
|
, libsoundio
|
|
|
|
, sndio
|
|
|
|
, pulseaudio
|
2022-08-07 23:57:42 +00:00
|
|
|
, vulkan-loader
|
2022-08-12 19:20:25 +00:00
|
|
|
, libICE
|
|
|
|
, libSM
|
|
|
|
, libXi
|
|
|
|
, libXcursor
|
|
|
|
, libXext
|
|
|
|
, libXrandr
|
|
|
|
, fontconfig
|
|
|
|
, glew
|
2022-08-23 02:09:33 +00:00
|
|
|
, libGL
|
2024-03-28 03:48:24 +00:00
|
|
|
, udev
|
2022-08-23 02:09:33 +00:00
|
|
|
, SDL2
|
|
|
|
, SDL2_mixer
|
2020-07-31 11:34:41 +00:00
|
|
|
}:
|
|
|
|
|
2021-08-19 15:10:41 +00:00
|
|
|
buildDotnetModule rec {
|
2020-07-31 11:34:41 +00:00
|
|
|
pname = "ryujinx";
|
2024-06-19 21:19:55 +00:00
|
|
|
version = "1.1.1336"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
|
2020-07-31 11:34:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ryujinx";
|
|
|
|
repo = "Ryujinx";
|
2024-06-19 21:19:55 +00:00
|
|
|
rev = "0afa8f2c14f046b46ac5ba14c96f3a5ce523ba16";
|
|
|
|
sha256 = "1n8f0ijj8amp1nvw2pm2gric51i21kv2gl9r6vwnp64hi08vczqg";
|
2020-07-31 11:34:41 +00:00
|
|
|
};
|
|
|
|
|
2023-12-05 10:32:10 +00:00
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
|
|
|
dotnet-runtime = dotnetCorePackages.runtime_8_0;
|
2022-11-23 21:39:38 +00:00
|
|
|
|
2021-08-19 15:10:41 +00:00
|
|
|
nugetDeps = ./deps.nix;
|
2020-07-31 11:34:41 +00:00
|
|
|
|
2021-08-19 15:10:41 +00:00
|
|
|
runtimeDeps = [
|
|
|
|
libX11
|
|
|
|
libgdiplus
|
|
|
|
SDL2_mixer
|
|
|
|
openal
|
|
|
|
libsoundio
|
|
|
|
sndio
|
|
|
|
pulseaudio
|
2022-08-07 23:57:42 +00:00
|
|
|
vulkan-loader
|
2022-08-12 18:09:12 +00:00
|
|
|
ffmpeg
|
2024-03-28 03:48:24 +00:00
|
|
|
udev
|
2022-08-12 19:20:25 +00:00
|
|
|
|
|
|
|
# Avalonia UI
|
|
|
|
libICE
|
|
|
|
libSM
|
|
|
|
libXi
|
|
|
|
libXcursor
|
|
|
|
libXext
|
|
|
|
libXrandr
|
|
|
|
fontconfig
|
|
|
|
glew
|
2022-08-23 02:09:33 +00:00
|
|
|
|
|
|
|
# Headless executable
|
|
|
|
libGL
|
|
|
|
SDL2
|
2022-05-02 17:55:14 +00:00
|
|
|
];
|
|
|
|
|
2022-08-23 02:09:33 +00:00
|
|
|
projectFile = "Ryujinx.sln";
|
2023-05-04 09:32:17 +00:00
|
|
|
testProjectFile = "src/Ryujinx.Tests/Ryujinx.Tests.csproj";
|
2022-08-23 02:09:33 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
dotnetFlags = [
|
2023-02-25 18:32:00 +00:00
|
|
|
"/p:ExtraDefineConstants=DISABLE_UPDATER%2CFORCE_EXTERNAL_BASE_DIR"
|
2022-08-23 02:09:33 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
executables = [
|
|
|
|
"Ryujinx.Headless.SDL2"
|
|
|
|
"Ryujinx"
|
|
|
|
];
|
|
|
|
|
2022-08-17 16:48:54 +00:00
|
|
|
makeWrapperArgs = [
|
|
|
|
# Without this Ryujinx fails to start on wayland. See https://github.com/Ryujinx/Ryujinx/issues/2714
|
2022-08-18 19:49:45 +00:00
|
|
|
"--set SDL_VIDEODRIVER x11"
|
2022-08-17 16:48:54 +00:00
|
|
|
];
|
|
|
|
|
2021-08-19 15:10:41 +00:00
|
|
|
preInstall = ''
|
2022-04-06 18:21:50 +00:00
|
|
|
# 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
|
2022-03-07 22:17:46 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
mkdir -p $out/share/{applications,icons/hicolor/scalable/apps,mime/packages}
|
|
|
|
pushd ${src}/distribution/linux
|
|
|
|
|
2023-02-25 18:32:00 +00:00
|
|
|
install -D ./Ryujinx.desktop $out/share/applications/Ryujinx.desktop
|
2024-03-09 00:34:13 +00:00
|
|
|
install -D ./Ryujinx.sh $out/bin/Ryujinx.sh
|
2023-02-25 18:32:00 +00:00
|
|
|
install -D ./mime/Ryujinx.xml $out/share/mime/packages/Ryujinx.xml
|
|
|
|
install -D ../misc/Logo.svg $out/share/icons/hicolor/scalable/apps/Ryujinx.svg
|
2020-07-31 11:34:41 +00:00
|
|
|
|
2023-02-25 18:32:00 +00:00
|
|
|
substituteInPlace $out/share/applications/Ryujinx.desktop \
|
2024-03-09 00:34:13 +00:00
|
|
|
--replace "Ryujinx.sh %f" "$out/bin/Ryujinx.sh %f"
|
2022-08-23 02:09:33 +00:00
|
|
|
|
|
|
|
ln -s $out/bin/Ryujinx $out/bin/ryujinx
|
2022-03-07 22:17:46 +00:00
|
|
|
|
|
|
|
popd
|
2020-07-31 11:34:41 +00:00
|
|
|
'';
|
|
|
|
|
2022-03-07 22:17:46 +00:00
|
|
|
passthru.updateScript = ./updater.sh;
|
2021-10-24 22:15:04 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-07-31 11:34:41 +00:00
|
|
|
homepage = "https://ryujinx.org/";
|
2021-10-24 22:15:04 +00:00
|
|
|
changelog = "https://github.com/Ryujinx/Ryujinx/wiki/Changelog";
|
2022-02-28 19:05:58 +00:00
|
|
|
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;
|
2024-06-24 21:05:06 +00:00
|
|
|
maintainers = with maintainers; [ jk artemist ];
|
2024-03-04 23:11:02 +00:00
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
2022-01-11 23:07:08 +00:00
|
|
|
mainProgram = "Ryujinx";
|
2020-07-31 11:34:41 +00:00
|
|
|
};
|
|
|
|
}
|