about summary refs log tree commit diff
path: root/pkgs/games/gog/fetch-gog
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Replace pkgconfig with pkg-configaszlig2021-06-161-2/+2
| | | | | | | | | | | | | | This is another alias which got introduced in 2018, because the actual command is "pkg-config" and so the package name containing a dash is more reasonable. The reason why I'm doing this is because NixOS VM tests now disallow aliases and while the evaluation error in question only affected the "gnupg" test, I decided to change all occurences in the event that we might want to disallow aliases for things other than VM tests. Signed-off-by: aszlig <aszlig@nix.build> Cc: @sternenseemann for "opam-env"
* treewide: stdenv.lib -> pkgs.libProfpatsch2021-02-051-1/+1
| | | | Upstream is deprecating `stdenv.lib`, so let’s do the same.
* fetchGog: Default downloadName to "en3installer0"aszlig2020-06-231-1/+5
| | | | | | | | | | | | | Most of the games are using "en3installer0" as the downloadName, so it makes sense to use this as the default, since first of all do not support languages other than English except for a few games (eg. Albion) and second, there is no game with several installer packages to chose from (at least not on top of my head). Even if there would be, it would still be the exception rather than the rule, so let's optimise for the common scenario. Signed-off-by: aszlig <aszlig@nix.build>
* pkgs/games/fetch-gog: fix fetch redirection in curlProfpatsch2020-06-061-0/+1
| | | | Upstream has 30x redirects for some URLs.
* fetch-gog: Fix login with captchaaszlig2019-09-301-9/+20
| | | | | | | | | | | | | | | The way GOG embeds recaptcha has changed a while ago and it's now embedded via additional JavaScript which no longer directly contains "google.com/recaptcha", because it is now contained within an iframe. Fortunately, the fix is relatively easy, because everything else is still implemented in the same way, we just need to match portions of that JavaScript code. I also fixed up the Qt plugin path for the captcha prompt if a newer nixpkgs revision is used, where we have wrapQtAppsHook. Signed-off-by: aszlig <aszlig@nix.build>
* games: Use preferLocalBuild for fetchersaszlig2019-06-111-0/+3
| | | | | | | | | | | | | | | | If we're on a machine with remote builds enabled, we'd like to prefer not having our login credentials to be pushed on a remote server. We of course also don't want the actual games to end up on a different machine, so let's use preferLocalBuild to avoid this. Unfortunately avoidance is not at any cost, because if we for example use a different system attribute, it might be built on a remote machine nevertheless. Ideally there would be something like "forceLocalBuild", which avoids remote builds at any cost. Signed-off-by: aszlig <aszlig@nix.build> Cc: @Profpatsch
* fetch-gog: Provide a better login failure messageaszlig2019-06-111-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | So far if the login credentials were wrong, you get something like this: Traceback (most recent call last): File "/nix/store/...-fetch-gog.py", line 113, in <module> GogFetcher(sys.argv[1], sys.argv[2], sys.argv[3]).fetch() File "/nix/store/...-fetch-gog.py", line 15, in __init__ self.login() File "/nix/store/...-fetch-gog.py", line 28, in login auth_code = parse_qs(urlsplit(browser.get_url()).query)['code'] KeyError: 'code' This is isn't very helpful and might hint that there is something wrong with the fetcher. Of course, if GOG would change their login interface and no longer expose the "code" query string item, it might still say login failure, but right now we don't have a better way to detect it. At least if we get a login failure with a login that has been working so far, we know something has changed upstream :-) Signed-off-by: aszlig <aszlig@nix.build> Reported-by: @Profpatsch
* pkgs/fetch-gog: List more download typesaszlig2018-05-191-1/+1
| | | | | | | | | | | So far we only showed the main installer packages that are available for a certain game. However there are other things such as downloadable content and related products that we might be interested in. I needed this mainly because the Stardew Valley beta download is listed as bonus content. Signed-off-by: aszlig <aszlig@nix.build>
* fetch-gog: Try to login without captchaaszlig2018-02-222-16/+327
| | | | | | | | On some occasions a captcha isn't needed for login (not sure exactly when this is the case), so we really should just log in without it instead of bailing out with an error. Signed-off-by: aszlig <aszlig@nix.build>
* pkgs/games: Add a basic fetcher for GOGaszlig2018-02-211-0/+243
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>