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