2022-03-05 16:20:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildDotnetModule
|
2022-10-06 18:32:54 +00:00
|
|
|
, dotnetCorePackages
|
|
|
|
, stdenvNoCC
|
2022-03-05 16:20:37 +00:00
|
|
|
, fetchFromGitHub
|
2022-09-09 14:08:57 +00:00
|
|
|
, wrapGAppsHook
|
2022-03-05 16:20:37 +00:00
|
|
|
, libX11
|
|
|
|
, libgdiplus
|
|
|
|
, ffmpeg
|
|
|
|
, openal
|
|
|
|
, libsoundio
|
|
|
|
, sndio
|
|
|
|
, pulseaudio
|
|
|
|
, gtk3
|
|
|
|
, gdk-pixbuf
|
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
|
|
|
|
, 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";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "1.1.665"; # 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";
|
2023-03-24 00:07:29 +00:00
|
|
|
rev = "da073fce6127243fcd93b736cde951c4e835e508";
|
|
|
|
sha256 = "0zbww3mhmmakfaqh8q1bzn7liz4i85kmkz967jqbnlq90w0a7i3f";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_7_0;
|
|
|
|
dotnet-runtime = dotnetCorePackages.runtime_7_0;
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
nugetDeps = ./deps.nix;
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
2022-01-19 23:45:15 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
2021-10-28 06:52:43 +00:00
|
|
|
gdk-pixbuf
|
|
|
|
];
|
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
runtimeDeps = [
|
|
|
|
gtk3
|
|
|
|
libX11
|
|
|
|
libgdiplus
|
|
|
|
SDL2_mixer
|
|
|
|
openal
|
|
|
|
libsoundio
|
|
|
|
sndio
|
|
|
|
pulseaudio
|
2022-08-21 13:32:41 +00:00
|
|
|
vulkan-loader
|
|
|
|
ffmpeg
|
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";
|
|
|
|
testProjectFile = "Ryujinx.Tests/Ryujinx.Tests.csproj";
|
|
|
|
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.Ava"
|
|
|
|
"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 GDK_BACKEND x11"
|
|
|
|
"--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
|
|
|
|
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 \
|
2022-09-09 14:08:57 +00:00
|
|
|
--replace "Exec=Ryujinx" "Exec=$out/bin/Ryujinx"
|
|
|
|
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ ivar jk ];
|
2020-08-20 17:08:02 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2022-01-19 23:45:15 +00:00
|
|
|
mainProgram = "Ryujinx";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|