mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-07 22:11:45 +03:00
Merge pull request #165756 from 06kellyjac/ryujinx
ryujinx: 1.1.77 -> 1.1.91
This commit is contained in:
commit
f0885a45f2
@ -17,13 +17,13 @@
|
||||
|
||||
buildDotnetModule rec {
|
||||
pname = "ryujinx";
|
||||
version = "1.1.77"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
|
||||
version = "1.1.91"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Ryujinx";
|
||||
repo = "Ryujinx";
|
||||
rev = "df70442c46e7ee133b1fb79dc23ddd134e618085";
|
||||
sha256 = "1m9msp7kxsj7251l2yjcfzrb4k1lisk9sip7acm22pxmi1a7gw73";
|
||||
rev = "3f4fb8f73a6635dbdca9dd11738c3a793f53ac65";
|
||||
sha256 = "1amky7a2rikl5sg8y0y6il0jjqwhjgxw0d2ivynfhmhz2v2ciwwi";
|
||||
};
|
||||
|
||||
dotnet-sdk = dotnetCorePackages.sdk_6_0;
|
||||
@ -63,6 +63,10 @@ buildDotnetModule rec {
|
||||
];
|
||||
|
||||
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
|
||||
|
||||
# Ryujinx tries to use ffmpeg from PATH
|
||||
makeWrapperArgs+=(
|
||||
--suffix PATH : ${lib.makeBinPath [ ffmpeg ]}
|
||||
|
3
pkgs/applications/emulators/ryujinx/deps.nix
generated
3
pkgs/applications/emulators/ryujinx/deps.nix
generated
@ -23,9 +23,8 @@
|
||||
(fetchNuGet { pname = "Microsoft.IdentityModel.Logging"; version = "6.15.0"; sha256 = "0jn9a20a2zixnkm3bmpmvmiv7mk0hqdlnpi0qgjkg1nir87czm19"; })
|
||||
(fetchNuGet { pname = "Microsoft.IdentityModel.Tokens"; version = "6.15.0"; sha256 = "1nbgydr45f7lp980xyrkzpyaw2mkkishjwp3slgxk7f0mz6q8i1v"; })
|
||||
(fetchNuGet { pname = "Microsoft.NET.Test.Sdk"; version = "16.8.0"; sha256 = "1ln2mva7j2mpsj9rdhpk8vhm3pgd8wn563xqdcwd38avnhp74rm9"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "6.0.3"; sha256 = "1py3nrfvllqlnb9mhs0qwgy7c14n33b2hfb0qc49rx22sqv8ylbp"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "6.0.3"; sha256 = "1y428glba68s76icjzfl1v3p61pcz7rd78wybhabs8zq8w9cp2pj"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "6.0.3"; sha256 = "0k9gc94cvn36p0v3pj296asg2sq9a8ah6lfw0xvvmd4hq2k72s79"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "6.0.3"; sha256 = "1y428glba68s76icjzfl1v3p61pcz7rd78wybhabs8zq8w9cp2pj"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.3"; sha256 = "0f04srx6q0jk81a60n956hz32fdngzp0xmdb2x7gyl77gsq8yijj"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "6.0.3"; sha256 = "0180ipzzz9pc6f6l17rg5bxz1ghzbapmiqq66kdl33bmbny6vmm9"; })
|
||||
(fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "6.0.3"; sha256 = "1rjkzs2013razi2xs943q62ys1jh8blhjcnj75qkvirf859d11qw"; })
|
||||
|
@ -1,33 +1,60 @@
|
||||
#! /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 nixpkgs=./. -i bash -p coreutils gnused curl common-updater-scripts nuget-to-nix nix-prefetch-git jq dotnet-sdk_6
|
||||
set -euo pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
DEPS_FILE="$(realpath "./deps.nix")"
|
||||
|
||||
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')
|
||||
# provide a github token so you don't get rate limited
|
||||
# if you use gh cli you can use:
|
||||
# `export GITHUB_TOKEN="$(cat ~/.config/gh/config.yml | yq '.hosts."github.com".oauth_token' -r)"`
|
||||
# or just set your token by hand:
|
||||
# `read -s -p "Enter your token: " GITHUB_TOKEN; export GITHUB_TOKEN`
|
||||
# (we use read so it doesn't show in our shell history and in secret mode so the token you paste isn't visible)
|
||||
if [ -z "${GITHUB_TOKEN:-}" ]; then
|
||||
echo "no GITHUB_TOKEN provided - you could meet API request limiting" >&2
|
||||
fi
|
||||
|
||||
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/'
|
||||
)
|
||||
# or provide the new version manually
|
||||
# manually modify and uncomment or export these env vars in your shell so they're accessable within the script
|
||||
# make sure you don't commit your changes here
|
||||
#
|
||||
# NEW_VERSION=""
|
||||
# COMMIT=""
|
||||
|
||||
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')
|
||||
if [ -z ${NEW_VERSION+x} ] && [ -z ${COMMIT+x} ]; then
|
||||
RELEASE_JOB_DATA=$(
|
||||
curl -s -H "Accept: application/vnd.github.v3+json" \
|
||||
${GITHUB_TOKEN:+ -H "Authorization: bearer $GITHUB_TOKEN"} \
|
||||
https://api.github.com/repos/Ryujinx/Ryujinx/actions/workflows
|
||||
)
|
||||
if [ -z "$RELEASE_JOB_DATA" ] || [[ $RELEASE_JOB_DATA =~ "rate limit exceeded" ]]; then
|
||||
echo "failed to get release job data" >&2
|
||||
exit 1
|
||||
fi
|
||||
RELEASE_JOB_ID=$(echo "$RELEASE_JOB_DATA" | jq -r '.workflows[] | select(.name == "Release job") | .id')
|
||||
RELEASE_JOB_FILE=$(echo "$RELEASE_JOB_DATA" | jq -r '.workflows[] | select(.name == "Release job") | .path')
|
||||
|
||||
NEW_VERSION="${BASE_VERSION}.${PATCH_VERSION}"
|
||||
LATEST_RELEASE_JOB_DATA=$(
|
||||
curl -s -H "Accept: application/vnd.github.v3+json" \
|
||||
${GITHUB_TOKEN:+ -H "Authorization: bearer $GITHUB_TOKEN"} \
|
||||
"https://api.github.com/repos/Ryujinx/Ryujinx/actions/workflows/${RELEASE_JOB_ID}/runs"
|
||||
)
|
||||
if [ -z "$LATEST_RELEASE_JOB_DATA" ] || [[ $LATEST_RELEASE_JOB_DATA =~ "rate limit exceeded" ]]; then
|
||||
echo "failed to get latest release job data" >&2
|
||||
exit 1
|
||||
fi
|
||||
COMMIT=$(echo "$LATEST_RELEASE_JOB_DATA" | jq -r '.workflow_runs[0] | .head_sha')
|
||||
PATCH_VERSION=$(echo "$LATEST_RELEASE_JOB_DATA" | jq -r '.workflow_runs[0] | .run_number')
|
||||
|
||||
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/'
|
||||
)
|
||||
|
||||
NEW_VERSION="${BASE_VERSION}.${PATCH_VERSION}"
|
||||
fi
|
||||
|
||||
OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user