From ed298980c48f3c71ec15b91fe7779d8e89639f2a Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 22 Feb 2018 05:11:30 +0100 Subject: pkgs/games/gog: Add Stardew Valley This is quite straightforward and very similar to most other Mono games and even uses XDG directories already. Signed-off-by: aszlig --- pkgs/games/gog/default.nix | 1 + pkgs/games/gog/stardew-valley.nix | 46 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 pkgs/games/gog/stardew-valley.nix (limited to 'pkgs/games') diff --git a/pkgs/games/gog/default.nix b/pkgs/games/gog/default.nix index 8d8379a3..122a6396 100644 --- a/pkgs/games/gog/default.nix +++ b/pkgs/games/gog/default.nix @@ -12,6 +12,7 @@ let }; albion = callPackage_i686 ./albion { inherit (pkgs) buildSandbox; }; + stardew-valley = callPackage ./stardew-valley.nix {}; }; in { options.gog = { diff --git a/pkgs/games/gog/stardew-valley.nix b/pkgs/games/gog/stardew-valley.nix new file mode 100644 index 00000000..ee39fbd9 --- /dev/null +++ b/pkgs/games/gog/stardew-valley.nix @@ -0,0 +1,46 @@ +{ lib, buildGame, fetchGog, unzip, makeWrapper, mono50, SDL2, openal }: + +buildGame rec { + name = "stardew-valley-${version}"; + version = "1.2.33"; + + src = fetchGog { + productId = 1453375253; + downloadName = "en3installer10"; + sha256 = "199xf008cxm6ywb4d8c3dz0h7iiv9d0ka5k93gq0jqj3ga3fjn3i"; + }; + + unpackCmd = "${unzip}/bin/unzip -qq \"$curSrc\" 'data/noarch/game/*' || :"; + + nativeBuildInputs = [ makeWrapper ]; + + buildPhase = let + dllmap = { + SDL2 = "${SDL2}/lib/libSDL2.so"; + soft_oal = "${openal}/lib/libopenal.so"; + }; + in lib.concatStrings (lib.mapAttrsToList (dll: target: '' + sed -i -e '/