From 4d374b59d8b5c5e6d602782a9a14a800f8277faf Mon Sep 17 00:00:00 2001 From: aszlig Date: Sun, 7 Jun 2020 08:34:30 +0200 Subject: games/gog: Add Hollow Knight version 1.4.3.2 Hollow Knight is a 2D Metroidvania action-adventure game, which takes place in Hallownest, a fictional ancient kingdom. The player controls an insect-like, silent, and nameless knight while exploring the underground world. Packaging the game would have been almost straightforward, would there not be another occasion where the developer has mixed up the persistent data path with the non-persistent data path, which is quite common in many games. Fortunately, this is pretty easy to fix with our Mono game patcher. Signed-off-by: aszlig --- pkgs/games/gog/default.nix | 1 + pkgs/games/gog/hollow-knight.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/games/gog/hollow-knight.nix (limited to 'pkgs/games/gog') diff --git a/pkgs/games/gog/default.nix b/pkgs/games/gog/default.nix index 723392b7..2c195dbe 100644 --- a/pkgs/games/gog/default.nix +++ b/pkgs/games/gog/default.nix @@ -17,6 +17,7 @@ let epistory = callPackage ./epistory.nix { }; freedom-planet = callPackage ./freedom-planet.nix {}; homm3 = callPackage ./homm3 {}; + hollow-knight = callPackage ./hollow-knight.nix {}; kingdoms-and-castles = callPackage ./kingdoms-and-castles.nix {}; overload = callPackage ./overload.nix {}; party-hard = callPackage ./party-hard.nix {}; diff --git a/pkgs/games/gog/hollow-knight.nix b/pkgs/games/gog/hollow-knight.nix new file mode 100644 index 00000000..05c839f6 --- /dev/null +++ b/pkgs/games/gog/hollow-knight.nix @@ -0,0 +1,24 @@ +{ buildUnity, fetchGog, monogamePatcher }: + +buildUnity { + name = "hollow-knight"; + fullName = "hollow_knight"; + saveDir = "Team Cherry/Hollow Knight"; + version = "1.4.3.2"; + + src = fetchGog { + productId = 1308320804; + downloadName = "en3installer0"; + sha256 = "19g0b6mzjahvj1y3mk25li61wardgk4fnl5cn9v24s9lhq8i8d28"; + }; + + nativeBuildInputs = [ monogamePatcher ]; + + buildPhase = '' + monogame-patcher replace-call \ + -i hollow_knight_Data/Managed/Assembly-CSharp.dll \ + 'System.String UnityEngine.Application::get_dataPath()' \ + 'System.String UnityEngine.Application::get_persistentDataPath()' \ + ConfigManager::Awake + ''; +} -- cgit 1.4.1