Merge pull request #161809 from 06kellyjac/ryujinx
ryujinx: 1.0.7168 -> 1.1.54
This commit is contained in:
commit
92030d5f57
3 changed files with 85 additions and 46 deletions
|
@ -1,18 +1,31 @@
|
|||
{ lib, buildDotnetModule, fetchFromGitHub, makeDesktopItem, copyDesktopItems
|
||||
, dotnetCorePackages, libX11, libgdiplus, ffmpeg
|
||||
, SDL2_mixer, openal, libsoundio, sndio, pulseaudio
|
||||
, gtk3, gdk-pixbuf, wrapGAppsHook
|
||||
{ lib
|
||||
, buildDotnetModule
|
||||
, fetchFromGitHub
|
||||
, makeDesktopItem
|
||||
, copyDesktopItems
|
||||
, dotnetCorePackages
|
||||
, libX11
|
||||
, libgdiplus
|
||||
, ffmpeg
|
||||
, SDL2_mixer
|
||||
, openal
|
||||
, libsoundio
|
||||
, sndio
|
||||
, pulseaudio
|
||||
, gtk3
|
||||
, gdk-pixbuf
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
buildDotnetModule rec {
|
||||
pname = "ryujinx";
|
||||
version = "1.0.7168"; # Versioning is based off of the official appveyor builds: https://ci.appveyor.com/project/gdkchan/ryujinx
|
||||
version = "1.1.54"; # Versioning is based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Ryujinx";
|
||||
repo = "Ryujinx";
|
||||
rev = "6e0799580f0d1b473a79471c5d365c6524d97a86";
|
||||
sha256 = "145sn9xkjxj79292faypcdmpmbxm1w70q0iprg6pfymf9920gvfv";
|
||||
rev = "3705c206688c69d3348f5cec84dc480d8d7c578e";
|
||||
sha256 = "1lhnr11x46yjpka865m0dzkbkdxmrrhjcpvq4ab4wll6j0ipy908";
|
||||
};
|
||||
|
||||
dotnet-sdk = dotnetCorePackages.sdk_6_0;
|
||||
|
@ -67,22 +80,31 @@ buildDotnetModule rec {
|
|||
done
|
||||
'';
|
||||
|
||||
desktopItems = [(makeDesktopItem {
|
||||
desktopName = "Ryujinx";
|
||||
name = "ryujinx";
|
||||
exec = "Ryujinx";
|
||||
icon = "ryujinx";
|
||||
comment = meta.description;
|
||||
type = "Application";
|
||||
categories = [ "Game" ];
|
||||
})];
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
desktopName = "Ryujinx";
|
||||
name = "ryujinx";
|
||||
exec = "Ryujinx";
|
||||
icon = "ryujinx";
|
||||
comment = meta.description;
|
||||
type = "Application";
|
||||
categories = [ "Game" ];
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Experimental Nintendo Switch Emulator written in C#";
|
||||
homepage = "https://ryujinx.org/";
|
||||
license = licenses.mit;
|
||||
changelog = "https://github.com/Ryujinx/Ryujinx/wiki/Changelog";
|
||||
maintainers = [ maintainers.ivar ];
|
||||
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 ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "Ryujinx";
|
||||
};
|
||||
|
|
4
pkgs/applications/emulators/ryujinx/deps.nix
generated
4
pkgs/applications/emulators/ryujinx/deps.nix
generated
|
@ -10,8 +10,8 @@
|
|||
(fetchNuGet { pname = "GioSharp"; version = "3.22.25.128"; sha256 = "0syfa1f2hg7wsxln5lh86n8m1lihhprc51b6km91gkl25l5hw5bv"; })
|
||||
(fetchNuGet { pname = "GLibSharp"; version = "3.22.25.128"; sha256 = "1j8i5izk97ga30z1qpd765zqd2q5w71y8bhnkqq4bj59768fyxp5"; })
|
||||
(fetchNuGet { pname = "GtkSharp"; version = "3.22.25.128"; sha256 = "0z0wx0p3gc02r8d7y88k1rw307sb2vapbr1k1yc5qdc38fxz5jsy"; })
|
||||
(fetchNuGet { pname = "GtkSharp.Dependencies"; version = "1.1.0"; sha256 = "1g1rhcn38ww97638rds6l5bysra43hkhv47fy71fvq89623zgyxn"; })
|
||||
(fetchNuGet { pname = "LibHac"; version = "0.14.3"; sha256 = "13pv5dwffj8c2mfibra3hkd1pgg5cj075sf48kgp82y501l25q5m"; })
|
||||
(fetchNuGet { pname = "GtkSharp.Dependencies"; version = "1.1.1"; sha256 = "0ffywnc3ca1lwhxdnk99l238vsprsrsh678bgm238lb7ja7m52pw"; })
|
||||
(fetchNuGet { pname = "LibHac"; version = "0.16.0"; sha256 = "1kivnf4c4km1a8y0sl34z9gfazlivna0x31q0065n0sz13g82spi"; })
|
||||
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.0"; sha256 = "0r6jyxl3h1asj30la78skd5gsxgwjpvkspmkw1gglxfg85hnqc8w"; })
|
||||
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "6.0.0"; sha256 = "1hnqhvgjp342nx9s47w5sknmlpkfxbcfi50pa4vary2r7sv8ka2w"; })
|
||||
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.win-x64"; version = "6.0.0"; sha256 = "1j8cn97swc67ly7ca7m05akczrswbg0gjsk7473vad6770ph79vm"; })
|
||||
|
|
|
@ -1,40 +1,57 @@
|
|||
#! /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
|
||||
set -eo pipefail
|
||||
set -euxo pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
deps_file="$(realpath "./deps.nix")"
|
||||
DEPS_FILE="$(realpath "./deps.nix")"
|
||||
|
||||
nix-prefetch-git https://github.com/ryujinx/ryujinx --quiet > repo_info
|
||||
new_hash="$(jq -r ".sha256" < repo_info)"
|
||||
new_rev="$(jq -r ".rev" < repo_info)"
|
||||
rm repo_info
|
||||
RELEASE_JOB_DATA=$(
|
||||
curl -s -H "Accept: application/vnd.github.v3+json" \
|
||||
https://api.github.com/repos/Ryujinx/Ryujinx/actions/workflows |
|
||||
jq -r '.workflows[] | select(.name == "Release job") | { id, path }'
|
||||
)
|
||||
RELEASE_JOB_ID=$(echo "$RELEASE_JOB_DATA" | jq -r '.id')
|
||||
RELEASE_JOB_FILE=$(echo "$RELEASE_JOB_DATA" | jq -r '.path')
|
||||
|
||||
new_version="$(
|
||||
curl -s https://ci.appveyor.com/api/projects/gdkchan/ryujinx/branch/master \
|
||||
| grep -Po '"version":.*?[^\\]",' \
|
||||
| sed 's/"version":"\(.*\)",/\1/'
|
||||
)"
|
||||
old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
|
||||
BASE_VERSION=$(
|
||||
curl -s "https://raw.githubusercontent.com/Ryujinx/Ryujinx/master/${RELEASE_JOB_FILE}" |
|
||||
grep -Po 'RYUJINX_BASE_VERSION:.*?".*"' |
|
||||
sed 's/RYUJINX_BASE_VERSION: "\(.*\)"/\1/'
|
||||
)
|
||||
|
||||
if [[ "$new_version" == "$old_version" ]]; then
|
||||
echo "Already up to date! Doing nothing"
|
||||
exit 0
|
||||
LATEST_RELEASE_JOB_DATA=$(
|
||||
curl -s -H "Accept: application/vnd.github.v3+json" \
|
||||
"https://api.github.com/repos/Ryujinx/Ryujinx/actions/workflows/${RELEASE_JOB_ID}/runs" |
|
||||
jq -r '.workflow_runs[0] | { head_sha, run_number }'
|
||||
)
|
||||
COMMIT=$(echo "$LATEST_RELEASE_JOB_DATA" | jq -r '.head_sha')
|
||||
PATCH_VERSION=$(echo "$LATEST_RELEASE_JOB_DATA" | jq -r '.run_number')
|
||||
|
||||
NEW_VERSION="${BASE_VERSION}.${PATCH_VERSION}"
|
||||
|
||||
OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
|
||||
|
||||
echo "comparing versions $OLD_VERSION => $NEW_VERSION"
|
||||
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
|
||||
echo "Already up to date! Doing nothing"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd ../../../..
|
||||
update-source-version ryujinx "$new_version" "$new_hash" --rev="$new_rev"
|
||||
SHA="$(nix-prefetch-git https://github.com/ryujinx/ryujinx --rev "$COMMIT" --quiet | jq -r '.sha256')"
|
||||
|
||||
store_src="$(nix-build . -A ryujinx.src --no-out-link)"
|
||||
src="$(mktemp -d /tmp/ryujinx-src.XXX)"
|
||||
cp -rT "$store_src" "$src"
|
||||
chmod -R +w "$src"
|
||||
pushd "$src"
|
||||
cd ../../../..
|
||||
update-source-version ryujinx "$NEW_VERSION" "$SHA" --rev="$COMMIT"
|
||||
|
||||
STORE_SRC="$(nix-build . -A ryujinx.src --no-out-link)"
|
||||
SRC="$(mktemp -d /tmp/ryujinx-src.XXX)"
|
||||
cp -rT "$STORE_SRC" "$SRC"
|
||||
chmod -R +w "$SRC"
|
||||
pushd "$SRC"
|
||||
|
||||
mkdir nuget_tmp.packages
|
||||
dotnet restore Ryujinx.sln --packages nuget_tmp.packages
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT=1 dotnet restore Ryujinx.sln --packages nuget_tmp.packages
|
||||
|
||||
nuget-to-nix ./nuget_tmp.packages > "$deps_file"
|
||||
nuget-to-nix ./nuget_tmp.packages >"$DEPS_FILE"
|
||||
|
||||
popd
|
||||
rm -r "$src"
|
||||
rm -r "$SRC"
|
||||
|
|
Loading…
Reference in a new issue