about summary refs log tree commit diff
path: root/pkgs/games/gog/default.nix
Commit message (Collapse)AuthorAgeFilesLines
* games: Add Factorioaszlig2020-12-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been laying around since a few weeks but instead of just using a simple shell script wrapper (which I had in the first place), I decided to directly patch the binary during rC3. The main reason why I went this route was because in the long run we want to have a generic implementation we can use to patch all sorts of games, similar to what we have with monogame-patcher. So the way the *current* patcher roughly works is by allocating an area called "compost", which is then used as some kind of abstraction for allocating code and data to be used for the references/logic that we need to patch. The latter involves patching XDG_DATA_HOME into the game and changing the "/usr/share/factorio" path to use the ones within the store path ($out/share/factorio). Fortunately, Factorio already assumes that everything within /usr/share/factorio (or our path for that matter) is read-only, so we don't need to add extra code/conditions specifically to handle that. Patching both cases is made possible by patching a third location (get_executable_name), which tries to get the current executable path via several methods (using /proc/self/exe, running "ps", ...) at runtime, which in our case is really unnecessary and a perfect opportunity to replace the function logic by the hardcoded path and using the rest of the function for our compost area. While patching might sound straigtforward, I actually introduced two little (but hard to debug) bugs, where I'm very grateful to all those folks (you know who you are) at rC3 who were actually following along and provided helpful input. In the long term, the goal is to rewrite the patcher with more elaborate type information (eg. right now function/opcode information is raw JSON) and generalise it enough that we can use it to get rid of a few other wrappers. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Graveyard Keeperaszlig2020-12-201-0/+1
| | | | | | | | | | | | | This has been mentioned on Discourse[1] and since I have that game in my GOG library, I just decided to package it. I only went to the main menu and didn't actually play it, since I'm somewhat time constrained at the moment. So this only is "for the sake of completeness" :-) [1]: https://discourse.nixos.org/t/nix-expression-for-downloaded-gog-game/10595/7 Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add "The Longing"aszlig2020-11-101-0/+1
| | | | | | | Another game that I already finished (in less than 400 days obviously) but haven't yet committed so far. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Always Awakening/Legacyaszlig2020-11-101-0/+2
| | | | | | | I've already packaged both games a while ago and already finished them, so this is basically to get rid of a dirty Git working tree. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Baldur's Gate I and IIaszlig2020-07-121-0/+2
| | | | | | | | | | | | | | Both are the enhanced edition from GOG. Packaging is mostly straightforward, although I had to use patchelf with a custom patch, since while --remove-needed removes the DT_NEEDED entries from the ELF it doesn't however remove the corresponding entries in the .gnu.version_r section. The reason why I did this is because we really should not need Expat and OpenSSL, because they're only used by the XMPP portions of the statically linked libjingle. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Into the Breachaszlig2020-06-081-0/+1
| | | | | | | | | | | | The second game from Subset Games after FTL: The remnants of human civilization are threatened by gigantic creatures breeding beneath the earth. You must control powerful mechs from the future to hold off this alien threat. Each attempt to save the world presents a new randomly generated challenge in this turn-based strategy game. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Gibbous and Knights and Bikesaszlig2020-06-081-0/+2
| | | | | | | | Both games have been laying around uncommitted for quite a while and since they work out of the box with the generic Unity3d builder they're also straightforward to package without any surprises. Signed-off-by: aszlig <aszlig@nix.build>
* pkgs/games/gog: init sunless-skies at 1.3.6Profpatsch2020-06-071-0/+1
| | | | | | I had some problems where it got stuck in the loading screen, but after restarting a few times to find out why, it suddenly worked. So no guarantees that it’s bug-free.
* games/gog: Add Hollow Knight version 1.4.3.2aszlig2020-06-071-0/+1
| | | | | | | | | | | | | | | | | 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 <aszlig@nix.build>
* games/gog: Add Freedom Planet version 1.21.5aszlig2020-06-071-0/+1
| | | | | | | | | | | | | | | A game that I had laying around since quite a while but I was too lazy to patch properly, since the game expects its data files as well as its save files in the current working directory. While I did patch the game via an LD_PRELOAD wrapper of fopen it also feels kinda rendundant with code we have in preloaders of other games. So in the long term we might want to implement something a bit more generic, but for now the game works and config and saves are properly placed in XDG_CONFIG_HOME and XDG_DATA_HOME. Signed-off-by: aszlig <aszlig@nix.build>
* pkgs/games/gog: add Planescape Torment: Enhanced EditionProfpatsch2019-11-011-0/+1
|
* add kindoms and castlesGuillaume Maudoux2019-09-281-0/+1
|
* pkgs/games: Add Warcraft II BNEaszlig2019-06-211-0/+1
| | | | | | | | | | This is supported by the Stratagus/Wargus engine and it's using the data files from the GOG version. I had this laying in the repository for a while but didn't commit and push it yet, so let's call it done by now :-) Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add The Longest Journeyaszlig2019-06-111-0/+1
| | | | | | | | | | | | This is basically a wrapper around ResidualVM, which I also patched so that we can inject a basic config file from the Nix store that contains the basic game information. The ResidualVM build is pretty minimal in that we only use those dependencies that we actually need for the game. Signed-off-by: aszlig <aszlig@nix.build> Cc: @Profpatsch
* games/gog: Add Heroes of Might & Magic 3: Completeaszlig2019-06-111-0/+1
| | | | | | | | | | | | | | | I had this laying around for quite a while but haven't committed it yet, so I decided to update VCMI to the latest master version. Instead of using the "mp3" directory in the game assets, I decided to go for "music" instead, because all of the files within that directory are actually Ogg Vorbis and it's the game's music. Another thing I've changed is that the launcher now uses execl() instead of QProcess::startDetached, because the latter doesn't work very well with our sandbox and will subsequently cause the client to be killed. Signed-off-by: aszlig <aszlig@nix.build>
* Merge pull requests for Epistory and The Bridgeaszlig2018-12-081-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | This adds the games Epistory and The Bridge to our games collection, packaged by @layous (thanks a lot). I don't own these games, so I can't really test them, but from looking at the code they look fine to me and even if they'd break it would still only affect the games in question and not other games. Merges: https://github.com/openlab-aux/vuizvui/pull/19 Merges: https://github.com/openlab-aux/vuizvui/pull/20
| * epistory: initGuillaume Maudoux2018-10-031-0/+1
| |
* | games/gog: Add CrossCodeaszlig2018-09-221-0/+1
|/ | | | | | | | | Packaging is pretty straightforward because the game is written in JS, so only the assets need to be copied along with wrapper for NW.js pointing to the directory and we're done. Signed-off-by: aszlig <aszlig@nix.build> Cc: @Profpatsch
* stardew-valley: Update to version 1.3.27 (stable)aszlig2018-08-011-3/+0
| | | | | | | | | | | | These small fixes mark the end of the beta: * Changes to the NetList events we added for modding * Gift limits not resetting sometimes in single-player So we now can finally get rid of the "stardew-valley-beta" attribute and track the stable version from now on. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add War for the Overworldaszlig2018-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was the whole reason why I implemented the monogame-patcher even though it is very useful for other games as well. So the main issue why patching was needed is that the game writes its savegames into the same directories as other assets, so we need to be very careful about which method we patch and how in order to avoid failures to load other assets rather than savegames. However while in principle the game runs fine there is a Heisenbug hidden, so it segfaults whenever strace is not used. Here is the backtrace: #0 0x0000000000f973be in ?? () #1 0x0000000000f8f444 in ?? () #2 0x0000000000f2379b in ?? () #3 0x0000000000f2940b in ?? () #4 0x0000000000f1fa87 in ?? () #5 0x00000000008e8cc8 in ?? () #6 0x00007ffff79bc5a7 in start_thread () from libpthread.so.0 #7 0x00007ffff61cf22f in clone () from libc.so.6 Disassembly around 0xf973be: f973a2: 45 0f b6 4f 02 movzbl 0x2(%r15),%r9d f973a7: ba 04 00 00 00 mov $0x4,%edx f973ac: 41 80 f9 02 cmp $0x2,%r9b f973b0: 74 05 je f973b7 f973b2: 41 0f b6 57 03 movzbl 0x3(%r15),%edx f973b7: 48 8b 40 30 mov 0x30(%rax),%rax f973bb: 83 f9 1b cmp $0x1b,%ecx >f973be: 8b 40 08 mov 0x8(%rax),%eax f973c1: 89 44 24 58 mov %eax,0x58(%rsp) f973c5: 0f 86 6d 01 00 00 jbe f97538 f973cb: c6 44 24 5f 00 movb $0x0,0x5f(%rsp) f973d0: 45 31 ff xor %r15d,%r15d f973d3: 89 54 24 28 mov %edx,0x28(%rsp) f973d7: 89 74 24 20 mov %esi,0x20(%rsp) f973db: 44 88 44 24 18 mov %r8b,0x18(%rsp) f973e0: 44 88 4c 24 30 mov %r9b,0x30(%rsp) f973e5: e8 16 fa 92 ff callq 8c6e00 The last callq is for <operator new(unsigned long)@@Base+0x27c9d0>, so I'd suppose this might be a bug in the patched Mono version of Unity but could also be a chain reaction (who knows). Probably the reason why it works with strace might be a race condition, but I haven't thoroughly debugged this. Especially if there are no symbols available it's very hard to debug, so I'll leave that to some day in the future. Signed-off-by: aszlig <aszlig@nix.build>
* gomes/gog: Add Settlers 2 Gold edition using RTTRaszlig2018-07-051-0/+1
| | | | | | | | | | | | | | | | | | | | This packages "Return to the Roots" along with the game data fetched from GOG. So basically it's RTTR with a "RTTR_GAMEDIR" set to the files extracted from the GOG version. In reality it's a bit more involved as we need to patch a few things and also make sure that the sounds are built via Nix rather to be generated at runtime. The RTTR standard procedure would be to just install RTTR and you put your game data somewhere in /usr/share (or any other place you've configured) and on first startup it's generating the SOUND.LST file. We want all the games in Vuizvui to be completely dispensible so that the persistent files are *only* in $XDG_DATA_HOME/settlers2, so I've made sure that everything is baked in at *build* time instead. Signed-off-by: aszlig <aszlig@nix.build>
* pkgs: Fix passing through i686-linux package setaszlig2018-07-041-1/+1
| | | | | | | | | | | | | | | | | So far in the games namespace we have just used the callPackage_i686 function from <nixpkgs> instead of our augmented set. If we just use packages that are available in <nixpkgs> everything is fine, but as soon as we want to use one of our own packages for i686-linux we can't simply do that. One example is the override in the gog.albion derivation which just uses buildSandbox from the main pkgs attribute set. We now properly pass through the whole pkgsi686Linux set to the games namespace, so we can drop that hack for Albion. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Satelite Reignaszlig2018-07-011-0/+1
| | | | | | | | | | | Another Unit3d game, so packaging is pretty straightforward but the save games and settings are in $XDG_DATA_HOME/SatelliteReign instead of the standard Unity3d directory ($XDG_CONFIG_HOME/unity3d). The standard Unity3d directory however is still used, but it only contains the player log file. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Thimbleweed Parkaszlig2018-06-281-0/+1
| | | | | | | | | | | | | | | | | This also supports the "Ransome Unbeeped" addon which should get rid of all the beeps from Ransome's voice tracks. I added this by default in the package, because in order to enable it you still either need to enable it every time you start the game or set "forceRansomeUnbeeped: 1" in "$XDG_DATA_HOME/Terrible Toybox/Thimbleweed Park/Prefs.json" to make it permanent. The packaging is pretty straightforward except a small preloader which changes the working directory to the shared data directory so the "ggpack" files can be found. From inspecting the binary this should also be doable by setting the THIMBLEENGINE_GAMEROOT environment variable, but I haven't tried yet. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Dungeons 3aszlig2018-06-281-0/+1
| | | | | | | | Unfortunately this game doesn't work on my machine, as I don't have support for OpenGL 4.3. However, the game at least gets to the loading screen, so it should work in theory. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Wizard of Legendaszlig2018-06-281-0/+1
| | | | | | A Unity3d game, so packaging is pretty straightforward. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Overloadaszlig2018-06-221-0/+1
| | | | | | | I have only tested whether loading and saving games works and flew around for about 1 minute in the first mission. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add Party Hardaszlig2018-06-141-0/+1
| | | | | | | | | Packaging is pretty straightforward, because it's a Unity3d game and we have a build hepler for that. Upstream site: http://www.tinybuild.com/partyhard Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add World of Xeenaszlig2018-06-091-0/+1
| | | | | | | | | | This is the result when you combine Might and Magic 4 and 5 and ScummVM very recently got support for that. See http://scummvm.org/news/20180501 for the announcement. So we're wrapping the game using latest git version of ScummVM. Signed-off-by: aszlig <aszlig@nix.build>
* games/stardew-valley: Mark beta as lowPrioaszlig2018-05-191-1/+3
| | | | | | | This is to make sure that noone accidentally installs this either via "nix-env -i" or via "nix-env -u". Signed-off-by: aszlig <aszlig@nix.build>
* games/stardew-valley: Add multiplayer betaaszlig2018-05-191-0/+1
| | | | | | | | | | 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 <aszlig@nix.build>
* pkgs/games/gog: Add Stardew Valleyaszlig2018-02-221-0/+1
| | | | | | | This is quite straightforward and very similar to most other Mono games and even uses XDG directories already. Signed-off-by: aszlig <aszlig@nix.build>
* games/gog: Add statically recompiled Albionaszlig2018-02-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only fetch the data files from GOG here and use the port from OpenPandora (https://repo.openpandora.org/?page=detail&app=albion_sr) for the main game executable. Instead of using the binaries of the static recompiler, this is completely compiled from source and comes with a few changes in the form of a few patches: config.patch: Hide the mouse cursor and set the default scaled resolution to 1280x960 (the window can still be resized) in the default albion.cfg. error-log-stderr.patch: Whenever an error happens, the game usually creates a file called "error.log", which contains the actual error message. This patch makes sure the file isn't created but the error message is printed to stderr. scons.patch: Fixes a few SConstruct/SConscript files to use the builder's environment, so that it can find executables such as gcc. sdl2.patch: SDL 2 has dropped support for the keysym.unicode field at some point, so use keysym.sym instead. This has the disadvantage that it doesn't recognize key modifiers, so we might want to switch this to use the SDL_TEXTINPUT event. xdg-paths.patch: We want to use XDG_CONFIG_HOME and XDG_DATA_HOME instead of writing everything to one directory, so this patch makes sure that the paths are correctly read depending on whether its an XDG directory or one of the store paths of the game. Signed-off-by: aszlig <aszlig@nix.build>
* pkgs/games: Add a basic fetcher for GOGaszlig2018-02-211-0/+39
We're in almost the same misery here as with HumbleBundle, because we can't get stable download URLs with manifests for games that have an "os" field of either "windows" or "osx". Unfortunately, this isn't the only hoop we're going to, because similar to the HumbleBundle fetcher, we need to solve a (re)captcha in order to login (and I've been annoyed by countless cars, street signs, roads, busses, store fronts, hills and mountains during development). I tried looking for a way to get an API key similar to what itch.io is doing, but the only mechanism in place is a temporary key which needs to be refreshed using the old key after a while, so it's unsuitable for our case. The code currently is very much _not_ DRY, because a lot of it is copied over and modified from fetchHumbleBundle, especially the captcha solving application. It's really a shame to see the same situation that we have for HumbleBundle in GOG, given that HB is getting less DRM-free games these days and GOG is DRM-free *only* (which is a very good thing). Signed-off-by: aszlig <aszlig@nix.build>