mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
2641d97cbf
Reproduction script: # Bulk rewrite ./maintainers/scripts/sha-to-sri.py pkgs/by-name # Revert some packages which will need manual intervention for n in amdvlk azure-cli cargo-profiler corefonts flatito fluxcd gist perf_data_converter protoc-gen-js solana-cli swt verible; do git checkout -- "pkgs/by-name/${n:0:2}/${n}" done
117 lines
2.9 KiB
Nix
117 lines
2.9 KiB
Nix
{ lib
|
|
, buildDotnetModule
|
|
, dotnetCorePackages
|
|
, fetchFromGitHub
|
|
, libX11
|
|
, libgdiplus
|
|
, ffmpeg
|
|
, openal
|
|
, libsoundio
|
|
, sndio
|
|
, pulseaudio
|
|
, vulkan-loader
|
|
, glew
|
|
, libGL
|
|
, udev
|
|
, SDL2
|
|
, SDL2_mixer
|
|
}:
|
|
|
|
buildDotnetModule rec {
|
|
pname = "ryujinx";
|
|
version = "1.1.1385"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Ryujinx";
|
|
repo = "Ryujinx";
|
|
rev = "ca59c3f4998e2d1beb3b0d0214611e3332238557";
|
|
hash = "sha256-pLE8UUH4BzYyR3pqyUwQ112vBOump0wKyZaKwE131yY=";
|
|
};
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
|
dotnet-runtime = dotnetCorePackages.runtime_8_0;
|
|
|
|
nugetDeps = ./deps.nix;
|
|
|
|
runtimeDeps = [
|
|
libX11
|
|
libgdiplus
|
|
SDL2_mixer
|
|
openal
|
|
libsoundio
|
|
sndio
|
|
pulseaudio
|
|
vulkan-loader
|
|
ffmpeg
|
|
udev
|
|
|
|
# Avalonia UI
|
|
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 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.sh $out/bin/Ryujinx.sh
|
|
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.sh %f" "$out/bin/Ryujinx.sh %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; [ jk artemist ];
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
|
mainProgram = "Ryujinx";
|
|
};
|
|
}
|