git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #165756 from 06kellyjac/ryujinx

ryujinx: 1.1.77 -> 1.1.91

commitf0885a45f2847ae19d5bf3928101b6e6894cd23e authorIvv <41924494+IvarWithoutBones@users.noreply.github.com> dateWed 6 Apr 2022, 22:13 (5 years ago) parentd8d21360b94920
3 files changed+59−29
pkgs/applications/emulators/ryujinx/default.nix+7−3 pkgs/applications/emulators/ryujinx/deps.nix+1−2 pkgs/applications/emulators/ryujinx/updater.sh+51−24
pkgs/applications/emulators/ryujinx/default.nix+7−3
@@ -17,13 +17,13 @@
1717
1818buildDotnetModule rec {
1919 pname = "ryujinx";
20− version = "1.1.77"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
20+ version = "1.1.91"; # Based off of the official github actions builds: https://github.com/Ryujinx/Ryujinx/actions/workflows/release.yml
2121
2222 src = fetchFromGitHub {
2323 owner = "Ryujinx";
2424 repo = "Ryujinx";
25− rev = "df70442c46e7ee133b1fb79dc23ddd134e618085";
26− sha256 = "1m9msp7kxsj7251l2yjcfzrb4k1lisk9sip7acm22pxmi1a7gw73";
25+ rev = "3f4fb8f73a6635dbdca9dd11738c3a793f53ac65";
26+ sha256 = "1amky7a2rikl5sg8y0y6il0jjqwhjgxw0d2ivynfhmhz2v2ciwwi";
2727 };
2828
2929 dotnet-sdk = dotnetCorePackages.sdk_6_0;
@@ -63,6 +63,10 @@ buildDotnetModule rec {
6363 ];
6464
6565 preInstall = ''
66+ # workaround for https://github.com/Ryujinx/Ryujinx/issues/2349
67+ mkdir -p $out/lib/sndio-6
68+ ln -s ${sndio}/lib/libsndio.so $out/lib/sndio-6/libsndio.so.6
69+
6670 # Ryujinx tries to use ffmpeg from PATH
6771 makeWrapperArgs+=(
6872 --suffix PATH : ${lib.makeBinPath [ ffmpeg ]}
pkgs/applications/emulators/ryujinx/deps.nix+1−2
@@ -23,9 +23,8 @@
2323 (fetchNuGet { pname = "Microsoft.IdentityModel.Logging"; version = "6.15.0"; sha256 = "0jn9a20a2zixnkm3bmpmvmiv7mk0hqdlnpi0qgjkg1nir87czm19"; })
2424 (fetchNuGet { pname = "Microsoft.IdentityModel.Tokens"; version = "6.15.0"; sha256 = "1nbgydr45f7lp980xyrkzpyaw2mkkishjwp3slgxk7f0mz6q8i1v"; })
2525 (fetchNuGet { pname = "Microsoft.NET.Test.Sdk"; version = "16.8.0"; sha256 = "1ln2mva7j2mpsj9rdhpk8vhm3pgd8wn563xqdcwd38avnhp74rm9"; })
26− (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "6.0.3"; sha256 = "1py3nrfvllqlnb9mhs0qwgy7c14n33b2hfb0qc49rx22sqv8ylbp"; })
27− (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "6.0.3"; sha256 = "1y428glba68s76icjzfl1v3p61pcz7rd78wybhabs8zq8w9cp2pj"; })
2826 (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "6.0.3"; sha256 = "0k9gc94cvn36p0v3pj296asg2sq9a8ah6lfw0xvvmd4hq2k72s79"; })
27+ (fetchNuGet { pname = "Microsoft.NETCore.App.Host.win-x64"; version = "6.0.3"; sha256 = "1y428glba68s76icjzfl1v3p61pcz7rd78wybhabs8zq8w9cp2pj"; })
2928 (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.3"; sha256 = "0f04srx6q0jk81a60n956hz32fdngzp0xmdb2x7gyl77gsq8yijj"; })
3029 (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "6.0.3"; sha256 = "0180ipzzz9pc6f6l17rg5bxz1ghzbapmiqq66kdl33bmbny6vmm9"; })
3130 (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.win-x64"; version = "6.0.3"; sha256 = "1rjkzs2013razi2xs943q62ys1jh8blhjcnj75qkvirf859d11qw"; })
pkgs/applications/emulators/ryujinx/updater.sh+51−24
@@ -1,33 +1,60 @@
11#! /usr/bin/env nix-shell
2−#! nix-shell -i bash -p coreutils gnused curl common-updater-scripts nuget-to-nix nix-prefetch-git jq dotnet-sdk_6
2+#! nix-shell -I nixpkgs=./. -i bash -p coreutils gnused curl common-updater-scripts nuget-to-nix nix-prefetch-git jq dotnet-sdk_6
33set -euo pipefail
44cd "$(dirname "${BASH_SOURCE[0]}")"
55
66DEPS_FILE="$(realpath "./deps.nix")"
77
8−RELEASE_JOB_DATA=$(
9− curl -s -H "Accept: application/vnd.github.v3+json" \
10− https://api.github.com/repos/Ryujinx/Ryujinx/actions/workflows |
11− jq -r '.workflows[] | select(.name == "Release job") | { id, path }'
12−)
13−RELEASE_JOB_ID=$(echo "$RELEASE_JOB_DATA" | jq -r '.id')
14−RELEASE_JOB_FILE=$(echo "$RELEASE_JOB_DATA" | jq -r '.path')
15−
16−BASE_VERSION=$(
17− curl -s "https://raw.githubusercontent.com/Ryujinx/Ryujinx/master/${RELEASE_JOB_FILE}" |
18− grep -Po 'RYUJINX_BASE_VERSION:.*?".*"' |
19− sed 's/RYUJINX_BASE_VERSION: "\(.*\)"/\1/'
20−)
21−
22−LATEST_RELEASE_JOB_DATA=$(
23− curl -s -H "Accept: application/vnd.github.v3+json" \
24− "https://api.github.com/repos/Ryujinx/Ryujinx/actions/workflows/${RELEASE_JOB_ID}/runs" |
25− jq -r '.workflow_runs[0] | { head_sha, run_number }'
26−)
27−COMMIT=$(echo "$LATEST_RELEASE_JOB_DATA" | jq -r '.head_sha')
28−PATCH_VERSION=$(echo "$LATEST_RELEASE_JOB_DATA" | jq -r '.run_number')
29−
30−NEW_VERSION="${BASE_VERSION}.${PATCH_VERSION}"
8+# provide a github token so you don't get rate limited
9+# if you use gh cli you can use:
10+# `export GITHUB_TOKEN="$(cat ~/.config/gh/config.yml | yq '.hosts."github.com".oauth_token' -r)"`
11+# or just set your token by hand:
12+# `read -s -p "Enter your token: " GITHUB_TOKEN; export GITHUB_TOKEN`
13+# (we use read so it doesn't show in our shell history and in secret mode so the token you paste isn't visible)
14+if [ -z "${GITHUB_TOKEN:-}" ]; then
15+ echo "no GITHUB_TOKEN provided - you could meet API request limiting" >&2
16+fi
17+
18+# or provide the new version manually
19+# manually modify and uncomment or export these env vars in your shell so they're accessable within the script
20+# make sure you don't commit your changes here
21+#
22+# NEW_VERSION=""
23+# COMMIT=""
24+
25+if [ -z ${NEW_VERSION+x} ] && [ -z ${COMMIT+x} ]; then
26+ RELEASE_JOB_DATA=$(
27+ curl -s -H "Accept: application/vnd.github.v3+json" \
28+ ${GITHUB_TOKEN:+ -H "Authorization: bearer $GITHUB_TOKEN"} \
29+ https://api.github.com/repos/Ryujinx/Ryujinx/actions/workflows
30+ )
31+ if [ -z "$RELEASE_JOB_DATA" ] || [[ $RELEASE_JOB_DATA =~ "rate limit exceeded" ]]; then
32+ echo "failed to get release job data" >&2
33+ exit 1
34+ fi
35+ RELEASE_JOB_ID=$(echo "$RELEASE_JOB_DATA" | jq -r '.workflows[] | select(.name == "Release job") | .id')
36+ RELEASE_JOB_FILE=$(echo "$RELEASE_JOB_DATA" | jq -r '.workflows[] | select(.name == "Release job") | .path')
37+
38+ LATEST_RELEASE_JOB_DATA=$(
39+ curl -s -H "Accept: application/vnd.github.v3+json" \
40+ ${GITHUB_TOKEN:+ -H "Authorization: bearer $GITHUB_TOKEN"} \
41+ "https://api.github.com/repos/Ryujinx/Ryujinx/actions/workflows/${RELEASE_JOB_ID}/runs"
42+ )
43+ if [ -z "$LATEST_RELEASE_JOB_DATA" ] || [[ $LATEST_RELEASE_JOB_DATA =~ "rate limit exceeded" ]]; then
44+ echo "failed to get latest release job data" >&2
45+ exit 1
46+ fi
47+ COMMIT=$(echo "$LATEST_RELEASE_JOB_DATA" | jq -r '.workflow_runs[0] | .head_sha')
48+ PATCH_VERSION=$(echo "$LATEST_RELEASE_JOB_DATA" | jq -r '.workflow_runs[0] | .run_number')
49+
50+ BASE_VERSION=$(
51+ curl -s "https://raw.githubusercontent.com/Ryujinx/Ryujinx/master/${RELEASE_JOB_FILE}" |
52+ grep -Po 'RYUJINX_BASE_VERSION:.*?".*"' |
53+ sed 's/RYUJINX_BASE_VERSION: "\(.*\)"/\1/'
54+ )
55+
56+ NEW_VERSION="${BASE_VERSION}.${PATCH_VERSION}"
57+fi
3158
3259OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
3360