Merge pull request #163214 from IvarWithoutBones/bump/ryu
This commit is contained in:
commit
ad12c8677f
23
pkgs/applications/emulators/ryujinx/appdir.patch
Normal file
23
pkgs/applications/emulators/ryujinx/appdir.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
diff --git a/Ryujinx.Common/ReleaseInformations.cs b/Ryujinx.Common/ReleaseInformations.cs
|
||||||
|
index 35890406..cca77163 100644
|
||||||
|
--- a/Ryujinx.Common/ReleaseInformations.cs
|
||||||
|
+++ b/Ryujinx.Common/ReleaseInformations.cs
|
||||||
|
@@ -42,12 +42,14 @@ namespace Ryujinx.Common
|
||||||
|
|
||||||
|
public static string GetBaseApplicationDirectory()
|
||||||
|
{
|
||||||
|
- if (IsFlatHubBuild())
|
||||||
|
- {
|
||||||
|
+ //if (IsFlatHubBuild())
|
||||||
|
+ //{
|
||||||
|
+ // This needs to be a mutable path, while CurrentDomain.BaseDirectory refers to the nix store.
|
||||||
|
+ // AppDataManager.BaseDirPath refers to ".config/Ryujinx" on Linux.
|
||||||
|
return AppDataManager.BaseDirPath;
|
||||||
|
- }
|
||||||
|
+ //}
|
||||||
|
|
||||||
|
- return AppDomain.CurrentDomain.BaseDirectory;
|
||||||
|
+ //return AppDomain.CurrentDomain.BaseDirectory;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,6 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildDotnetModule
|
, buildDotnetModule
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, makeDesktopItem
|
|
||||||
, copyDesktopItems
|
|
||||||
, dotnetCorePackages
|
, dotnetCorePackages
|
||||||
, libX11
|
, libX11
|
||||||
, libgdiplus
|
, libgdiplus
|
||||||
@ -19,13 +17,13 @@
|
|||||||
|
|
||||||
buildDotnetModule rec {
|
buildDotnetModule rec {
|
||||||
pname = "ryujinx";
|
pname = "ryujinx";
|
||||||
version = "1.1.54"; # Versioning is based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
|
version = "1.1.64"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Ryujinx";
|
owner = "Ryujinx";
|
||||||
repo = "Ryujinx";
|
repo = "Ryujinx";
|
||||||
rev = "3705c206688c69d3348f5cec84dc480d8d7c578e";
|
rev = "54bfaa125d9b6ae1be53ec431d40326fba51d0de";
|
||||||
sha256 = "1lhnr11x46yjpka865m0dzkbkdxmrrhjcpvq4ab4wll6j0ipy908";
|
sha256 = "0p8wmnm8sjx7wqb5z62mp8c3cwrv241ji3fawj2qgqx3k9jlb31i";
|
||||||
};
|
};
|
||||||
|
|
||||||
dotnet-sdk = dotnetCorePackages.sdk_6_0;
|
dotnet-sdk = dotnetCorePackages.sdk_6_0;
|
||||||
@ -41,7 +39,6 @@ buildDotnetModule rec {
|
|||||||
executables = [ "Ryujinx" ];
|
executables = [ "Ryujinx" ];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
copyDesktopItems
|
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -54,7 +51,6 @@ buildDotnetModule rec {
|
|||||||
gtk3
|
gtk3
|
||||||
libX11
|
libX11
|
||||||
libgdiplus
|
libgdiplus
|
||||||
ffmpeg
|
|
||||||
SDL2_mixer
|
SDL2_mixer
|
||||||
openal
|
openal
|
||||||
libsoundio
|
libsoundio
|
||||||
@ -63,34 +59,31 @@ buildDotnetModule rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./log.patch # Without this, Ryujinx attempts to write logs to the nix store. This patch makes it write to "~/.config/Ryujinx/Logs" on Linux.
|
./appdir.patch # Ryujinx attempts to write to the nix store. This patch redirects it to "~/.config/Ryujinx" on Linux.
|
||||||
];
|
];
|
||||||
|
|
||||||
preInstall = ''
|
preInstall = ''
|
||||||
# TODO: fix this hack https://github.com/Ryujinx/Ryujinx/issues/2349
|
# Ryujinx tries to use ffmpeg from PATH
|
||||||
mkdir -p $out/lib/sndio-6
|
|
||||||
ln -s ${sndio}/lib/libsndio.so $out/lib/sndio-6/libsndio.so.6
|
|
||||||
|
|
||||||
makeWrapperArgs+=(
|
makeWrapperArgs+=(
|
||||||
--suffix LD_LIBRARY_PATH : "$out/lib/sndio-6"
|
--suffix PATH : ${lib.makeBinPath [ ffmpeg ]}
|
||||||
)
|
)
|
||||||
|
|
||||||
for i in 16 32 48 64 96 128 256 512 1024; do
|
|
||||||
install -D ${src}/Ryujinx/Ui/Resources/Logo_Ryujinx.png $out/share/icons/hicolor/''${i}x$i/apps/ryujinx.png
|
|
||||||
done
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
desktopItems = [
|
preFixup = ''
|
||||||
(makeDesktopItem {
|
mkdir -p $out/share/{applications,icons/hicolor/scalable/apps,mime/packages}
|
||||||
desktopName = "Ryujinx";
|
pushd ${src}/distribution/linux
|
||||||
name = "ryujinx";
|
|
||||||
exec = "Ryujinx";
|
install -D ./ryujinx.desktop $out/share/applications/ryujinx.desktop
|
||||||
icon = "ryujinx";
|
install -D ./ryujinx-mime.xml $out/share/mime/packages/ryujinx-mime.xml
|
||||||
comment = meta.description;
|
install -D ./ryujinx-logo.svg $out/share/icons/hicolor/scalable/apps/ryujinx.svg
|
||||||
type = "Application";
|
|
||||||
categories = [ "Game" ];
|
substituteInPlace $out/share/applications/ryujinx.desktop --replace \
|
||||||
})
|
"Exec=Ryujinx" "Exec=$out/bin/Ryujinx"
|
||||||
];
|
|
||||||
|
popd
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.updateScript = ./updater.sh;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://ryujinx.org/";
|
homepage = "https://ryujinx.org/";
|
||||||
@ -108,5 +101,4 @@ buildDotnetModule rec {
|
|||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
mainProgram = "Ryujinx";
|
mainProgram = "Ryujinx";
|
||||||
};
|
};
|
||||||
passthru.updateScript = ./updater.sh;
|
|
||||||
}
|
}
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
diff --git a/Ryujinx/Configuration/LoggerModule.cs b/Ryujinx/Configuration/LoggerModule.cs
|
|
||||||
index 44631ea0..534576bc 100644
|
|
||||||
--- a/Ryujinx/Configuration/LoggerModule.cs
|
|
||||||
+++ b/Ryujinx/Configuration/LoggerModule.cs
|
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
using Ryujinx.Common;
|
|
||||||
using Ryujinx.Common.Logging;
|
|
||||||
using System;
|
|
||||||
+using System.IO;
|
|
||||||
|
|
||||||
namespace Ryujinx.Configuration
|
|
||||||
{
|
|
||||||
@@ -74,7 +75,7 @@ namespace Ryujinx.Configuration
|
|
||||||
if (e.NewValue)
|
|
||||||
{
|
|
||||||
Logger.AddTarget(new AsyncLogTargetWrapper(
|
|
||||||
- new FileLogTarget(AppDomain.CurrentDomain.BaseDirectory, "file"),
|
|
||||||
+ new FileLogTarget(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Ryujinx"), "file"),
|
|
||||||
1000,
|
|
||||||
AsyncLogTargetOverflowAction.Block
|
|
||||||
));
|
|
@ -1,6 +1,6 @@
|
|||||||
#! /usr/bin/env nix-shell
|
#! /usr/bin/env nix-shell
|
||||||
#! nix-shell -i bash -p coreutils gnused curl common-updater-scripts nuget-to-nix nix-prefetch-git jq dotnet-sdk_6
|
#! nix-shell -i bash -p coreutils gnused curl common-updater-scripts nuget-to-nix nix-prefetch-git jq dotnet-sdk_6
|
||||||
set -euxo pipefail
|
set -euo pipefail
|
||||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||||
|
|
||||||
DEPS_FILE="$(realpath "./deps.nix")"
|
DEPS_FILE="$(realpath "./deps.nix")"
|
||||||
@ -31,7 +31,7 @@ NEW_VERSION="${BASE_VERSION}.${PATCH_VERSION}"
|
|||||||
|
|
||||||
OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
|
OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
|
||||||
|
|
||||||
echo "comparing versions $OLD_VERSION => $NEW_VERSION"
|
echo "comparing versions $OLD_VERSION -> $NEW_VERSION"
|
||||||
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
|
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
|
||||||
echo "Already up to date! Doing nothing"
|
echo "Already up to date! Doing nothing"
|
||||||
exit 0
|
exit 0
|
||||||
@ -42,6 +42,8 @@ SHA="$(nix-prefetch-git https://github.com/ryujinx/ryujinx --rev "$COMMIT" --qui
|
|||||||
cd ../../../..
|
cd ../../../..
|
||||||
update-source-version ryujinx "$NEW_VERSION" "$SHA" --rev="$COMMIT"
|
update-source-version ryujinx "$NEW_VERSION" "$SHA" --rev="$COMMIT"
|
||||||
|
|
||||||
|
echo "building Nuget lockfile"
|
||||||
|
|
||||||
STORE_SRC="$(nix-build . -A ryujinx.src --no-out-link)"
|
STORE_SRC="$(nix-build . -A ryujinx.src --no-out-link)"
|
||||||
SRC="$(mktemp -d /tmp/ryujinx-src.XXX)"
|
SRC="$(mktemp -d /tmp/ryujinx-src.XXX)"
|
||||||
cp -rT "$STORE_SRC" "$SRC"
|
cp -rT "$STORE_SRC" "$SRC"
|
||||||
|
Loading…
Reference in New Issue
Block a user