summary refs log tree commit diff
path: root/pkgs/applications/emulators
diff options
context:
space:
mode:
author06kellyjac <dev@j-k.io>2022-02-28 19:05:58 +0000
committer06kellyjac <dev@j-k.io>2022-02-28 19:05:58 +0000
commit36d6f93c6f1b7abe8e77ba1fe83387e40837371c (patch)
tree246d0e340e95133a77b8872fefef252983d6d402 /pkgs/applications/emulators
parent644ad81cc54d4741cd0b26336d6ce1418ca7afa3 (diff)
downloadnixpkgs-36d6f93c6f1b7abe8e77ba1fe83387e40837371c.tar
nixpkgs-36d6f93c6f1b7abe8e77ba1fe83387e40837371c.tar.gz
nixpkgs-36d6f93c6f1b7abe8e77ba1fe83387e40837371c.tar.bz2
nixpkgs-36d6f93c6f1b7abe8e77ba1fe83387e40837371c.tar.lz
nixpkgs-36d6f93c6f1b7abe8e77ba1fe83387e40837371c.tar.xz
nixpkgs-36d6f93c6f1b7abe8e77ba1fe83387e40837371c.tar.zst
nixpkgs-36d6f93c6f1b7abe8e77ba1fe83387e40837371c.zip
ryujinx: 1.0.7168 -> 1.1.54
- changed the update script to now look at GH Actions
- formatted with nixpkgs-fmt
- added myself as a maintainer
Diffstat (limited to 'pkgs/applications/emulators')
-rw-r--r--pkgs/applications/emulators/ryujinx/default.nix60
-rw-r--r--pkgs/applications/emulators/ryujinx/deps.nix4
-rwxr-xr-xpkgs/applications/emulators/ryujinx/updater.sh71
3 files changed, 87 insertions, 48 deletions
diff --git a/pkgs/applications/emulators/ryujinx/default.nix b/pkgs/applications/emulators/ryujinx/default.nix
index 6dbd356f24c..1a2d122e637 100644
--- a/pkgs/applications/emulators/ryujinx/default.nix
+++ b/pkgs/applications/emulators/ryujinx/default.nix
@@ -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";
   };
diff --git a/pkgs/applications/emulators/ryujinx/deps.nix b/pkgs/applications/emulators/ryujinx/deps.nix
index 991d00a5a4b..804b17d8946 100644
--- a/pkgs/applications/emulators/ryujinx/deps.nix
+++ b/pkgs/applications/emulators/ryujinx/deps.nix
@@ -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"; })
diff --git a/pkgs/applications/emulators/ryujinx/updater.sh b/pkgs/applications/emulators/ryujinx/updater.sh
index 0861414f0bf..4b5fa4834fa 100755
--- a/pkgs/applications/emulators/ryujinx/updater.sh
+++ b/pkgs/applications/emulators/ryujinx/updater.sh
@@ -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")"
-
-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
-
-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)"
-
-if [[ "$new_version" == "$old_version" ]]; then
-  echo "Already up to date! Doing nothing"
-  exit 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')
+
+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/'
+)
+
+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
 
+SHA="$(nix-prefetch-git https://github.com/ryujinx/ryujinx --rev "$COMMIT" --quiet | jq -r '.sha256')"
+
 cd ../../../..
-update-source-version ryujinx "$new_version" "$new_hash" --rev="$new_rev"
+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"
+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"