From 8af72d55305fe1e0ba8657a2b69fb20ca347fc9a Mon Sep 17 00:00:00 2001 From: notgne2 Date: Thu, 6 Aug 2020 19:01:30 -0700 Subject: [PATCH] osu-lazer: osu-lazer: 2020.801.0 -> 2020.806.0 --- .../osu-lazer/bypass-tamper-detection.patch | 23 +++++++++++++++++++ pkgs/games/osu-lazer/default.nix | 7 ++++-- pkgs/games/osu-lazer/deps.nix | 4 ++-- 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 pkgs/games/osu-lazer/bypass-tamper-detection.patch diff --git a/pkgs/games/osu-lazer/bypass-tamper-detection.patch b/pkgs/games/osu-lazer/bypass-tamper-detection.patch new file mode 100644 index 000000000000..576f83a96c57 --- /dev/null +++ b/pkgs/games/osu-lazer/bypass-tamper-detection.patch @@ -0,0 +1,23 @@ +diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs +index 98f60d52d..a27ce47ca 100644 +--- a/osu.Game/OsuGameBase.cs ++++ b/osu.Game/OsuGameBase.cs +@@ -135,17 +135,7 @@ public OsuGameBase() + [BackgroundDependencyLoader] + private void load() + { +- try +- { +- using (var str = File.OpenRead(typeof(OsuGameBase).Assembly.Location)) +- VersionHash = str.ComputeMD5Hash(); +- } +- catch +- { +- // special case for android builds, which can't read DLLs from a packed apk. +- // should eventually be handled in a better way. +- VersionHash = $"{Version}-{RuntimeInfo.OS}".ComputeMD5Hash(); +- } ++ VersionHash = "253aa3a3a356a71295bf5b018cd4fda1"; + + Resources.AddStore(new DllResourceStore(OsuResources.ResourceAssembly)); + diff --git a/pkgs/games/osu-lazer/default.nix b/pkgs/games/osu-lazer/default.nix index 81b5e626c8e8..d8197fae1561 100644 --- a/pkgs/games/osu-lazer/default.nix +++ b/pkgs/games/osu-lazer/default.nix @@ -13,15 +13,18 @@ let in stdenv.mkDerivation rec { pname = "osu-lazer"; - version = "2020.801.0"; + version = "2020.806.0"; src = fetchFromGitHub { owner = "ppy"; repo = "osu"; rev = version; - sha256 = "02klqc56fskc8r8p3z9d38r1i0rwgglfilb97pdqm1ph8jpr1c20"; + sha256 = "BelmqcDnrGH84fTs6M0krwWz6SHn2hOm7y+PNEOOOZM="; }; + patches = [ ./bypass-tamper-detection.patch ]; + patchFlags = [ "--binary" "-p1" ]; + nativeBuildInputs = [ dotnet-sdk dotnetPackages.Nuget makeWrapper ]; nugetDeps = linkFarmFromDrvs "${pname}-nuget-deps" (import ./deps.nix { diff --git a/pkgs/games/osu-lazer/deps.nix b/pkgs/games/osu-lazer/deps.nix index a7f2214fb5bb..c29035e5724c 100644 --- a/pkgs/games/osu-lazer/deps.nix +++ b/pkgs/games/osu-lazer/deps.nix @@ -586,8 +586,8 @@ }) (fetchNuGet { name = "ppy.osu.Framework"; - version = "2020.730.1"; - sha256 = "0hsrb01rhcpan00bwk9zxzgj1ghsgsmx36g7sd8rlygr3v5sfvmr"; + version = "2020.806.0"; + sha256 = "1d4aprz81xbhk5addl1n7jwj8xxny51s6nvpn37alld0x6n7k8nv"; }) (fetchNuGet { name = "ppy.osu.Framework.NativeLibs";