summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ry/ryujinx/package.nix
diff options
context:
space:
mode:
authorArtemis Tosini <me@artem.ist>2024-03-04 22:41:22 +0000
committerArtemis Tosini <me@artem.ist>2024-03-04 22:54:24 +0000
commit23e7c1a6b8cd0492964e608614dc1cd084430af6 (patch)
tree238ada4bd7eef65fe56ad6e80476631dec0d88d3 /pkgs/by-name/ry/ryujinx/package.nix
parent32062737fd2aa308f77131c86d15a3458d1211a7 (diff)
ryujinx: 1.1.1155 → 1.1.1217
* Update ryujinx to 1.1.1217 * Remove the Ryujinx.Ava build, as that's now the default * Move to pkgs/by-name * Add artemist as maintainer * Enable build on AArch64
Diffstat (limited to 'pkgs/by-name/ry/ryujinx/package.nix')
-rw-r--r--pkgs/by-name/ry/ryujinx/package.nix140
1 files changed, 140 insertions, 0 deletions
diff --git a/pkgs/by-name/ry/ryujinx/package.nix b/pkgs/by-name/ry/ryujinx/package.nix
new file mode 100644
index 000000000000..acbe67ede219
--- /dev/null
+++ b/pkgs/by-name/ry/ryujinx/package.nix
@@ -0,0 +1,140 @@
+{ lib
+, buildDotnetModule
+, dotnetCorePackages
+, 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.1217"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
+
+ src = fetchFromGitHub {
+ owner = "Ryujinx";
+ repo = "Ryujinx";
+ rev = "bc4d99a0786dbcbfde62d3bdeb98ed3d12c94852";
+ sha256 = "00qvwhl18f09lgs94b66kzxyf0pbhwdkcyrsc7vjyv5dl88f5120";
+ };
+
+ dotnet-sdk = dotnetCorePackages.sdk_8_0;
+ dotnet-runtime = dotnetCorePackages.runtime_8_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
+ ];
+
+ projectFile = "Ryujinx.sln";
+ testProjectFile = "src/Ryujinx.Tests/Ryujinx.Tests.csproj";
+ doCheck = true;
+
+ dotnetFlags = [
+ "/p:ExtraDefineConstants=DISABLE_UPDATER%2CFORCE_EXTERNAL_BASE_DIR"
+ ];
+
+ executables = [
+ "Ryujinx.Headless.SDL2"
+ "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 ./mime/Ryujinx.xml $out/share/mime/packages/Ryujinx.xml
+ install -D ../misc/Logo.svg $out/share/icons/hicolor/scalable/apps/Ryujinx.svg
+
+ substituteInPlace $out/share/applications/Ryujinx.desktop \
+ --replace "Ryujinx %f" "$out/bin/Ryujinx %f"
+
+ 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 artemist ];
+ platforms = [ "x86_64-linux" ];
+ mainProgram = "Ryujinx";
+ };
+}