From a03fd458f14ad769f252326d7ef593d674e51d68 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 19 May 2018 02:43:33 +0200 Subject: games/stardew-valley: Add multiplayer beta This adds version 1.3.11 of the ongoing multiplayer beta, so it can be conveniently installed via Nix :-) I haven't tested this a whole lot, only started a new farm, walked around and that's it. Signed-off-by: aszlig --- pkgs/games/gog/default.nix | 1 + pkgs/games/gog/stardew-valley.nix | 43 ++++++++++++++++++++++++++++++++------- 2 files changed, 37 insertions(+), 7 deletions(-) (limited to 'pkgs/games') diff --git a/pkgs/games/gog/default.nix b/pkgs/games/gog/default.nix index 122a6396..ca876a6a 100644 --- a/pkgs/games/gog/default.nix +++ b/pkgs/games/gog/default.nix @@ -13,6 +13,7 @@ let albion = callPackage_i686 ./albion { inherit (pkgs) buildSandbox; }; stardew-valley = callPackage ./stardew-valley.nix {}; + stardew-valley-beta = callPackage ./stardew-valley.nix { beta = true; }; }; in { options.gog = { diff --git a/pkgs/games/gog/stardew-valley.nix b/pkgs/games/gog/stardew-valley.nix index 4dcbcbae..39faff37 100644 --- a/pkgs/games/gog/stardew-valley.nix +++ b/pkgs/games/gog/stardew-valley.nix @@ -1,16 +1,27 @@ -{ lib, buildGame, fetchGog, unzip, makeWrapper, mono50, SDL2, libGL, openal }: +{ lib, stdenv, buildGame, fetchGog, unzip, makeWrapper +, mono50, SDL2, libGL, openal + +, beta ? false +}: buildGame rec { name = "stardew-valley-${version}"; - version = "1.2.33"; + version = if beta then "1.3.11" else "1.2.33"; - src = fetchGog { + src = fetchGog (if beta then { + productId = 1453375253; + downloadName = "80335"; + downloadType = "product_bonus"; + suffix = "tar.gz"; + sha256 = "1aqw94paig3q5430vrbh35sghl6snhrdi9aj7bdkfymdmacs2yf3"; + } else { productId = 1453375253; downloadName = "en3installer10"; sha256 = "199xf008cxm6ywb4d8c3dz0h7iiv9d0ka5k93gq0jqj3ga3fjn3i"; - }; + }); - unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :"; + unpackCmd = lib.optionalString (!beta) + "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :"; nativeBuildInputs = [ makeWrapper ]; @@ -23,7 +34,15 @@ buildGame rec { sed -i -e '/