From 46cc2d11601487d50b3d646c06e19b08d9e7db96 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 22 Oct 2024 18:51:23 +0100 Subject: [PATCH 01/12] factorio: migrate to by-name hierarchy (cherry picked from commit f68438a9bb75d466f67f6b6ca8b0dd3202273ed1) --- pkgs/{games => by-name/fa}/factorio/mods.nix | 0 .../default.nix => by-name/fa/factorio/package.nix} | 0 pkgs/{games => by-name/fa}/factorio/update.py | 4 ++-- pkgs/{games => by-name/fa}/factorio/utils.nix | 0 pkgs/{games => by-name/fa}/factorio/versions-1.json | 0 pkgs/{games => by-name/fa}/factorio/versions.json | 0 pkgs/top-level/all-packages.nix | 8 ++++---- 7 files changed, 6 insertions(+), 6 deletions(-) rename pkgs/{games => by-name/fa}/factorio/mods.nix (100%) rename pkgs/{games/factorio/default.nix => by-name/fa/factorio/package.nix} (100%) rename pkgs/{games => by-name/fa}/factorio/update.py (99%) rename pkgs/{games => by-name/fa}/factorio/utils.nix (100%) rename pkgs/{games => by-name/fa}/factorio/versions-1.json (100%) rename pkgs/{games => by-name/fa}/factorio/versions.json (100%) diff --git a/pkgs/games/factorio/mods.nix b/pkgs/by-name/fa/factorio/mods.nix similarity index 100% rename from pkgs/games/factorio/mods.nix rename to pkgs/by-name/fa/factorio/mods.nix diff --git a/pkgs/games/factorio/default.nix b/pkgs/by-name/fa/factorio/package.nix similarity index 100% rename from pkgs/games/factorio/default.nix rename to pkgs/by-name/fa/factorio/package.nix diff --git a/pkgs/games/factorio/update.py b/pkgs/by-name/fa/factorio/update.py similarity index 99% rename from pkgs/games/factorio/update.py rename to pkgs/by-name/fa/factorio/update.py index 6da1d9dfee7df..7bae68773e5a1 100755 --- a/pkgs/games/factorio/update.py +++ b/pkgs/by-name/fa/factorio/update.py @@ -55,9 +55,9 @@ class ReleaseChannel: RELEASE_TYPES = [ ReleaseType("alpha", needs_auth=True), - ReleaseType("expansion", needs_auth=True), ReleaseType("demo"), ReleaseType("headless"), + ReleaseType("expansion", needs_auth=True), ] RELEASE_CHANNELS = [ @@ -69,7 +69,7 @@ class ReleaseChannel: def find_versions_json() -> str: if FLAGS.out: return FLAGS.out - try_paths = ["pkgs/games/factorio/versions.json", "versions.json"] + try_paths = ["pkgs/by-name/fa/factorio/versions.json", "versions.json"] for path in try_paths: if os.path.exists(path): return path diff --git a/pkgs/games/factorio/utils.nix b/pkgs/by-name/fa/factorio/utils.nix similarity index 100% rename from pkgs/games/factorio/utils.nix rename to pkgs/by-name/fa/factorio/utils.nix diff --git a/pkgs/games/factorio/versions-1.json b/pkgs/by-name/fa/factorio/versions-1.json similarity index 100% rename from pkgs/games/factorio/versions-1.json rename to pkgs/by-name/fa/factorio/versions-1.json diff --git a/pkgs/games/factorio/versions.json b/pkgs/by-name/fa/factorio/versions.json similarity index 100% rename from pkgs/games/factorio/versions.json rename to pkgs/by-name/fa/factorio/versions.json diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5e1c04fdb8bb5..b436b70c89ada 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36639,9 +36639,9 @@ with pkgs; fltk = fltk-minimal; }; - factorio = callPackage ../games/factorio { + factorio = callPackage ../by-name/fa/factorio/package.nix { releaseType = "alpha"; - versionsJson = ../games/factorio/versions-1.json; + versionsJson = ../by-name/fa/factorio/versions-1.json; }; factorio-experimental = factorio.override { releaseType = "alpha"; experimental = true; }; @@ -36676,9 +36676,9 @@ with pkgs; factorio-space-age-experimental = factorio_2.override { releaseType = "expansion"; experimental = true; }; - factorio-mods = callPackage ../games/factorio/mods.nix { }; + factorio-mods = callPackage ../by-name/fa/factorio/mods.nix { }; - factorio-utils = callPackage ../games/factorio/utils.nix { }; + factorio-utils = callPackage ../by-name/fa/factorio/utils.nix { }; fairymax = callPackage ../games/fairymax { }; From 71869788f4a75ae5555ab1ad967c9dc77f2fc8ee Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Tue, 5 Nov 2024 11:45:30 +0000 Subject: [PATCH 02/12] factorio: fix factorio_2 for by-name migration This is spiritually a merge conflict resolution but I'm putting it in a separate commit to minimise the difference from the cherry-pick source. --- pkgs/top-level/all-packages.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b436b70c89ada..fcfaf2ebc54af 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36662,13 +36662,13 @@ with pkgs; factorio_1-demo = factorio-demo; - factorio_2 = factorio.override { versionsJson = ../games/factorio/versions.json; }; + factorio_2 = factorio.override { versionsJson = ../by-name/fa/factorio/versions.json; }; - factorio_2-experimental = factorio-experimental.override { versionsJson = ../games/factorio/versions.json; }; + factorio_2-experimental = factorio-experimental.override { versionsJson = ../by-name/fa/factorio/versions.json; }; - factorio_2-headless = factorio-headless.override { versionsJson = ../games/factorio/versions.json; }; + factorio_2-headless = factorio-headless.override { versionsJson = ../by-name/fa/factorio/versions.json; }; - factorio_2-headless-experimental = factorio-headless-experimental.override { versionsJson = ../games/factorio/versions.json; }; + factorio_2-headless-experimental = factorio-headless-experimental.override { versionsJson = ../by-name/fa/factorio/versions.json; }; # there is no factorio_2-demo From cd78f5592bf17ee85e3300c9e7ab1e160d1c3b22 Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Wed, 30 Oct 2024 16:32:50 +0000 Subject: [PATCH 03/12] factorio: Drop erictapen as a maintainer In master this was done by #350453 / revision b12bcab. This part is necessary for making the next cherry-pick apply cleanly, but applying the whole patch here seems probably excessive. --- pkgs/by-name/fa/factorio/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/fa/factorio/package.nix b/pkgs/by-name/fa/factorio/package.nix index d342f76a2d9c1..01216cf70f6b1 100644 --- a/pkgs/by-name/fa/factorio/package.nix +++ b/pkgs/by-name/fa/factorio/package.nix @@ -198,7 +198,7 @@ let homepage = "https://www.factorio.com/"; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; license = lib.licenses.unfree; - maintainers = with lib.maintainers; [ Baughn elitak erictapen priegger lukegb ]; + maintainers = with lib.maintainers; [ Baughn elitak priegger lukegb ]; platforms = [ "x86_64-linux" ]; mainProgram = "factorio"; }; From 60ace15cac50458e34874d386f37933214978cd7 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 22 Oct 2024 18:53:11 +0100 Subject: [PATCH 04/12] factorio: nixfmt (cherry picked from commit 8a819d416fec5fca0675a46b0669b983dc282770) --- pkgs/by-name/fa/factorio/package.nix | 266 +++++++++++++++------------ 1 file changed, 147 insertions(+), 119 deletions(-) diff --git a/pkgs/by-name/fa/factorio/package.nix b/pkgs/by-name/fa/factorio/package.nix index 01216cf70f6b1..dd28a761d4cfb 100644 --- a/pkgs/by-name/fa/factorio/package.nix +++ b/pkgs/by-name/fa/factorio/package.nix @@ -1,33 +1,35 @@ -{ lib -, alsa-lib -, factorio-utils -, fetchurl -, libGL -, libICE -, libSM -, libX11 -, libXcursor -, libXext -, libXi -, libXinerama -, libXrandr -, libpulseaudio -, libxkbcommon -, makeDesktopItem -, makeWrapper -, releaseType -, stdenv -, wayland - -, mods-dat ? null -, versionsJson ? ./versions.json -, username ? "" -, token ? "" # get/reset token at https://factorio.com/profile -, experimental ? false # true means to always use the latest branch -, ... -} @ args: - -assert releaseType == "alpha" +{ + lib, + alsa-lib, + factorio-utils, + fetchurl, + libGL, + libICE, + libSM, + libX11, + libXcursor, + libXext, + libXi, + libXinerama, + libXrandr, + libpulseaudio, + libxkbcommon, + makeDesktopItem, + makeWrapper, + releaseType, + stdenv, + wayland, + + mods-dat ? null, + versionsJson ? ./versions.json, + username ? "", + token ? "", # get/reset token at https://factorio.com/profile + experimental ? false, # true means to always use the latest branch + ... +}@args: + +assert + releaseType == "alpha" || releaseType == "headless" || releaseType == "demo" || releaseType == "expansion"; @@ -86,55 +88,69 @@ let versions = importJSON versionsJson; binDists = makeBinDists versions; - actual = binDists.${stdenv.hostPlatform.system}.${releaseType}.${branch} or (throw "Factorio ${releaseType}-${branch} binaries for ${stdenv.hostPlatform.system} are not available for download."); + actual = + binDists.${stdenv.hostPlatform.system}.${releaseType}.${branch} + or (throw "Factorio ${releaseType}-${branch} binaries for ${stdenv.hostPlatform.system} are not available for download."); - makeBinDists = versions: + makeBinDists = + versions: let - f = path: name: value: + f = + path: name: value: if builtins.isAttrs value then - if value ? "name" then - makeBinDist value - else - builtins.mapAttrs (f (path ++ [ name ])) value + if value ? "name" then makeBinDist value else builtins.mapAttrs (f (path ++ [ name ])) value else throw "expected attrset at ${toString path} - got ${toString value}"; in builtins.mapAttrs (f [ ]) versions; - makeBinDist = { name, version, tarDirectory, url, sha256, needsAuth }: { - inherit version tarDirectory; - src = - if !needsAuth then - fetchurl { inherit name url sha256; } - else - (lib.overrideDerivation - (fetchurl { - inherit name url sha256; - curlOptsList = [ - "--get" - "--data-urlencode" - "username@username" - "--data-urlencode" - "token@token" - ]; - }) - (_: { - # This preHook hides the credentials from /proc - preHook = - if username != "" && token != "" then '' - echo -n "${username}" >username - echo -n "${token}" >token - '' else '' - # Deliberately failing since username/token was not provided, so we can't fetch. - # We can't use builtins.throw since we want the result to be used if the tar is in the store already. - exit 1 + makeBinDist = + { + name, + version, + tarDirectory, + url, + sha256, + needsAuth, + }: + { + inherit version tarDirectory; + src = + if !needsAuth then + fetchurl { inherit name url sha256; } + else + (lib.overrideDerivation + (fetchurl { + inherit name url sha256; + curlOptsList = [ + "--get" + "--data-urlencode" + "username@username" + "--data-urlencode" + "token@token" + ]; + }) + (_: { + # This preHook hides the credentials from /proc + preHook = + if username != "" && token != "" then + '' + echo -n "${username}" >username + echo -n "${token}" >token + '' + else + '' + # Deliberately failing since username/token was not provided, so we can't fetch. + # We can't use builtins.throw since we want the result to be used if the tar is in the store already. + exit 1 + ''; + failureHook = '' + cat < Date: Tue, 22 Oct 2024 18:55:55 +0100 Subject: [PATCH 05/12] factorio: change update.py to use the Factorio SHA256 hashes file (cherry picked from commit 44754ac517ceecf2a8b95318c45e28192e813a8b) --- pkgs/by-name/fa/factorio/package.nix | 1 + pkgs/by-name/fa/factorio/update.py | 65 ++++++++++++++------------ pkgs/by-name/fa/factorio/versions.json | 37 ++++++++++++--- 3 files changed, 66 insertions(+), 37 deletions(-) diff --git a/pkgs/by-name/fa/factorio/package.nix b/pkgs/by-name/fa/factorio/package.nix index dd28a761d4cfb..f367930112480 100644 --- a/pkgs/by-name/fa/factorio/package.nix +++ b/pkgs/by-name/fa/factorio/package.nix @@ -111,6 +111,7 @@ let url, sha256, needsAuth, + candidateHashFilenames ? [ ], }: { inherit version tarDirectory; diff --git a/pkgs/by-name/fa/factorio/update.py b/pkgs/by-name/fa/factorio/update.py index 7bae68773e5a1..0b04571cac4c8 100755 --- a/pkgs/by-name/fa/factorio/update.py +++ b/pkgs/by-name/fa/factorio/update.py @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#! nix-shell -i python -p "python3.withPackages (ps: with ps; [ ps.absl-py ps.requests ])" nix +#! nix-shell -i python -p "python3.withPackages (ps: with ps; [ ps.absl-py ps.requests ])" from collections import defaultdict import copy @@ -15,13 +15,12 @@ import requests -FACTORIO_API = "https://factorio.com/api/latest-releases" +FACTORIO_RELEASES = "https://factorio.com/api/latest-releases" +FACTORIO_HASHES = "https://factorio.com/download/sha256sums/" FLAGS = flags.FLAGS -flags.DEFINE_string('username', '', 'Factorio username for retrieving binaries.') -flags.DEFINE_string('token', '', 'Factorio token for retrieving binaries.') flags.DEFINE_string('out', '', 'Output path for versions.json.') flags.DEFINE_list('release_type', '', 'If non-empty, a comma-separated list of release types to update (e.g. alpha).') flags.DEFINE_list('release_channel', '', 'If non-empty, a comma-separated list of release channels to update (e.g. experimental).') @@ -37,6 +36,7 @@ class System: @dataclass class ReleaseType: name: str + hash_filename_format: list[str] needs_auth: bool = False @@ -48,16 +48,18 @@ class ReleaseChannel: FactorioVersionsJSON = Dict[str, Dict[str, str]] OurVersionJSON = Dict[str, Dict[str, Dict[str, Dict[str, str]]]] +FactorioHashes = Dict[str, str] + SYSTEMS = [ System(nix_name="x86_64-linux", url_name="linux64", tar_name="x64"), ] RELEASE_TYPES = [ - ReleaseType("alpha", needs_auth=True), - ReleaseType("demo"), - ReleaseType("headless"), - ReleaseType("expansion", needs_auth=True), + ReleaseType("alpha", needs_auth=True, hash_filename_format=["factorio_linux_{version}.tar.xz"]), + ReleaseType("demo", hash_filename_format=["factorio_demo_x64_{version}.tar.xz"]), + ReleaseType("headless", hash_filename_format=["factorio-headless_linux_{version}.tar.xz", "factorio_headless_x64_{version}.tar.xz"]), + ReleaseType("expansion", needs_auth=True, hash_filename_format=["factorio-space-age_linux_{version}.tar.xz"]), ] RELEASE_CHANNELS = [ @@ -77,7 +79,20 @@ def find_versions_json() -> str: def fetch_versions() -> FactorioVersionsJSON: - return json.loads(requests.get("https://factorio.com/api/latest-releases").text) + return json.loads(requests.get(FACTORIO_RELEASES).text) + + +def fetch_hashes() -> FactorioHashes: + resp = requests.get(FACTORIO_HASHES) + resp.raise_for_status() + out = {} + for ln in resp.text.split('\n'): + ln = ln.strip() + if not ln: + continue + sha256, filename = ln.split() + out[filename] = sha256 + return out def generate_our_versions(factorio_versions: FactorioVersionsJSON) -> OurVersionJSON: @@ -100,6 +115,7 @@ def generate_our_versions(factorio_versions: FactorioVersionsJSON) -> OurVersion "url": f"https://factorio.com/get-download/{version}/{release_type.name}/{system.url_name}", "version": version, "needsAuth": release_type.needs_auth, + "candidateHashFilenames": [fmt.format(version=version) for fmt in release_type.hash_filename_format], "tarDirectory": system.tar_name, } output[system.nix_name][release_type.name][release_channel.name] = this_release @@ -138,38 +154,27 @@ def _merge_version(system_name: str, release_type_name: str, release_channel_nam return iter_version(new, _merge_version) -def nix_prefetch_url(name: str, url: str, algo: str = 'sha256') -> str: - cmd = ['nix-prefetch-url', '--type', algo, '--name', name, url] - logging.info('running %s', cmd) - out = subprocess.check_output(cmd) - return out.decode('utf-8').strip() - - -def fill_in_hash(versions: OurVersionJSON) -> OurVersionJSON: +def fill_in_hash(versions: OurVersionJSON, factorio_hashes: FactorioHashes) -> OurVersionJSON: """Fill in sha256 hashes for anything missing them.""" urls_to_hash = {} def _fill_in_hash(system_name: str, release_type_name: str, release_channel_name: str, release: Dict[str, str]) -> Dict[str, str]: + for candidate_filename in release["candidateHashFilenames"]: + if candidate_filename in factorio_hashes: + release["sha256"] = factorio_hashes[candidate_filename] + break + else: + logging.error("%s/%s/%s: failed to find any of %s in %s", system_name, release_type_name, release_channel_name, release["candidateHashFilenames"], FACTORIO_HASHES) + return release if "sha256" in release: logging.info("%s/%s/%s: skipping fetch, sha256 already present", system_name, release_type_name, release_channel_name) return release - url = release["url"] - if url in urls_to_hash: - logging.info("%s/%s/%s: found url %s in cache", system_name, release_type_name, release_channel_name, url) - release["sha256"] = urls_to_hash[url] - return release - logging.info("%s/%s/%s: fetching %s", system_name, release_type_name, release_channel_name, url) - if release["needsAuth"]: - if not FLAGS.username or not FLAGS.token: - raise Exception("fetching %s/%s/%s from %s requires --username and --token" % (system_name, release_type_name, release_channel_name, url)) - url += f"?username={FLAGS.username}&token={FLAGS.token}" - release["sha256"] = nix_prefetch_url(release["name"], url) - urls_to_hash[url] = release["sha256"] return release return iter_version(versions, _fill_in_hash) def main(argv): factorio_versions = fetch_versions() + factorio_hashes = fetch_hashes() new_our_versions = generate_our_versions(factorio_versions) old_our_versions = None our_versions_path = find_versions_json() @@ -181,7 +186,7 @@ def main(argv): logging.info('Merging in old hashes') new_our_versions = merge_versions(old_our_versions, new_our_versions) logging.info('Fetching necessary tars to get hashes') - new_our_versions = fill_in_hash(new_our_versions) + new_our_versions = fill_in_hash(new_our_versions, factorio_hashes) with open(our_versions_path, 'w') as f: logging.info('Writing versions.json to %s', our_versions_path) json.dump(new_our_versions, f, sort_keys=True, indent=2) diff --git a/pkgs/by-name/fa/factorio/versions.json b/pkgs/by-name/fa/factorio/versions.json index 63ea8becf28f8..1cdd2823e1487 100644 --- a/pkgs/by-name/fa/factorio/versions.json +++ b/pkgs/by-name/fa/factorio/versions.json @@ -2,17 +2,23 @@ "x86_64-linux": { "alpha": { "experimental": { + "candidateHashFilenames": [ + "factorio_linux_2.0.8.tar.xz" + ], "name": "factorio_alpha_x64-2.0.8.tar.xz", "needsAuth": true, - "sha256": "11g1fgfm0lki9j2jsfmvlxzisbyx7482ia2qf7gnjcqhp6jkdsll", + "sha256": "94ea36a5b9103369df7158a8281039dd2f1d7fa7bb3a2d854c715250dd73e185", "tarDirectory": "x64", "url": "https://factorio.com/get-download/2.0.8/alpha/linux64", "version": "2.0.8" }, "stable": { + "candidateHashFilenames": [ + "factorio_linux_2.0.8.tar.xz" + ], "name": "factorio_alpha_x64-2.0.8.tar.xz", "needsAuth": true, - "sha256": "11g1fgfm0lki9j2jsfmvlxzisbyx7482ia2qf7gnjcqhp6jkdsll", + "sha256": "94ea36a5b9103369df7158a8281039dd2f1d7fa7bb3a2d854c715250dd73e185", "tarDirectory": "x64", "url": "https://factorio.com/get-download/2.0.8/alpha/linux64", "version": "2.0.8" @@ -20,17 +26,23 @@ }, "demo": { "experimental": { + "candidateHashFilenames": [ + "factorio_demo_x64_1.1.110.tar.xz" + ], "name": "factorio_demo_x64-1.1.110.tar.xz", "needsAuth": false, - "sha256": "0dasxgrybl00vrabgrlarsvg0hdg5rvn3y4hsljhqc4zpbf93nxx", + "sha256": "bddb91dcba9f300c25d590f861772eaf41f0b6ce8ae6b754de00d0e5f3eb5a35", "tarDirectory": "x64", "url": "https://factorio.com/get-download/1.1.110/demo/linux64", "version": "1.1.110" }, "stable": { + "candidateHashFilenames": [ + "factorio_demo_x64_1.1.110.tar.xz" + ], "name": "factorio_demo_x64-1.1.110.tar.xz", "needsAuth": false, - "sha256": "0dasxgrybl00vrabgrlarsvg0hdg5rvn3y4hsljhqc4zpbf93nxx", + "sha256": "bddb91dcba9f300c25d590f861772eaf41f0b6ce8ae6b754de00d0e5f3eb5a35", "tarDirectory": "x64", "url": "https://factorio.com/get-download/1.1.110/demo/linux64", "version": "1.1.110" @@ -38,9 +50,12 @@ }, "expansion": { "stable": { + "candidateHashFilenames": [ + "factorio-space-age_linux_2.0.8.tar.xz" + ], "name": "factorio_expansion_x64-2.0.8.tar.xz", "needsAuth": true, - "sha256": "0q3abb01ld1mlbp21lgzpa62j1gybs982yzan5j1axma9n1ax3j0", + "sha256": "408eae824daa761564b1ea7b81925efe05298cbaffd120eea235341ac05a6a60", "tarDirectory": "x64", "url": "https://factorio.com/get-download/2.0.8/expansion/linux64", "version": "2.0.8" @@ -48,17 +63,25 @@ }, "headless": { "experimental": { + "candidateHashFilenames": [ + "factorio-headless_linux_2.0.8.tar.xz", + "factorio_headless_x64_2.0.8.tar.xz" + ], "name": "factorio_headless_x64-2.0.8.tar.xz", "needsAuth": false, - "sha256": "1jp1vlc4indicgy0xnrxq87h32wcv9s4g2hqbfb4ygiaam6lqnfr", + "sha256": "d9594c4d552a3e4f965b188a4774da8c8b010fc23ddb0efc63b1d94818dde1ca", "tarDirectory": "x64", "url": "https://factorio.com/get-download/2.0.8/headless/linux64", "version": "2.0.8" }, "stable": { + "candidateHashFilenames": [ + "factorio-headless_linux_2.0.8.tar.xz", + "factorio_headless_x64_2.0.8.tar.xz" + ], "name": "factorio_headless_x64-2.0.8.tar.xz", "needsAuth": false, - "sha256": "1jp1vlc4indicgy0xnrxq87h32wcv9s4g2hqbfb4ygiaam6lqnfr", + "sha256": "d9594c4d552a3e4f965b188a4774da8c8b010fc23ddb0efc63b1d94818dde1ca", "tarDirectory": "x64", "url": "https://factorio.com/get-download/2.0.8/headless/linux64", "version": "2.0.8" From 1fb641c26dd115408674df7da06895e2e081ba8f Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 22 Oct 2024 19:19:23 +0100 Subject: [PATCH 06/12] factorio: make update.py more robust about missing experimental versions When experimental==stable for Space Age, the experimental.expansion key just goes missing, so we need to fall back to stable in that case. (cherry picked from commit b9b0f03e881fc941f82ee6bf038590fefab54ae4) --- pkgs/by-name/fa/factorio/update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/fa/factorio/update.py b/pkgs/by-name/fa/factorio/update.py index 0b04571cac4c8..f7be9b368fd79 100755 --- a/pkgs/by-name/fa/factorio/update.py +++ b/pkgs/by-name/fa/factorio/update.py @@ -101,8 +101,12 @@ def generate_our_versions(factorio_versions: FactorioVersionsJSON) -> OurVersion # Deal with times where there's no experimental version for rc in RELEASE_CHANNELS: - if not factorio_versions[rc.name]: + if rc.name not in factorio_versions or not factorio_versions[rc.name]: factorio_versions[rc.name] = factorio_versions['stable'] + for rt in RELEASE_TYPES: + if rt.name not in factorio_versions[rc.name] or not factorio_versions[rc.name][rt.name]: + factorio_versions[rc.name][rt.name] = factorio_versions['stable'][rt.name] + for system in SYSTEMS: for release_type in RELEASE_TYPES: @@ -185,7 +189,7 @@ def main(argv): if old_our_versions: logging.info('Merging in old hashes') new_our_versions = merge_versions(old_our_versions, new_our_versions) - logging.info('Fetching necessary tars to get hashes') + logging.info('Updating hashes from Factorio SHA256') new_our_versions = fill_in_hash(new_our_versions, factorio_hashes) with open(our_versions_path, 'w') as f: logging.info('Writing versions.json to %s', our_versions_path) From 7d16faa00bd103ed187a90d8a749e0fabaa7d431 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 22 Oct 2024 19:21:05 +0100 Subject: [PATCH 07/12] factorio-experimental: 2.0.8 -> 2.0.9 (cherry picked from commit a9522ff5d2d262aebe38bb6cc171b5496e372da9) --- pkgs/by-name/fa/factorio/versions.json | 33 +++++++++++++++++--------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/fa/factorio/versions.json b/pkgs/by-name/fa/factorio/versions.json index 1cdd2823e1487..273ba332e6462 100644 --- a/pkgs/by-name/fa/factorio/versions.json +++ b/pkgs/by-name/fa/factorio/versions.json @@ -3,14 +3,14 @@ "alpha": { "experimental": { "candidateHashFilenames": [ - "factorio_linux_2.0.8.tar.xz" + "factorio_linux_2.0.9.tar.xz" ], - "name": "factorio_alpha_x64-2.0.8.tar.xz", + "name": "factorio_alpha_x64-2.0.9.tar.xz", "needsAuth": true, - "sha256": "94ea36a5b9103369df7158a8281039dd2f1d7fa7bb3a2d854c715250dd73e185", + "sha256": "34c21cd3cbe91b65483786ccb4467b5d4766c748cbbddd2ce3b30d319d163e3b", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.8/alpha/linux64", - "version": "2.0.8" + "url": "https://factorio.com/get-download/2.0.9/alpha/linux64", + "version": "2.0.9" }, "stable": { "candidateHashFilenames": [ @@ -49,6 +49,17 @@ } }, "expansion": { + "experimental": { + "candidateHashFilenames": [ + "factorio-space-age_linux_2.0.9.tar.xz" + ], + "name": "factorio_expansion_x64-2.0.9.tar.xz", + "needsAuth": true, + "sha256": "6369d23550a7a721d3de1d34253e8321ee601fa759d1fb5efac9abc28aa7509d", + "tarDirectory": "x64", + "url": "https://factorio.com/get-download/2.0.9/expansion/linux64", + "version": "2.0.9" + }, "stable": { "candidateHashFilenames": [ "factorio-space-age_linux_2.0.8.tar.xz" @@ -64,15 +75,15 @@ "headless": { "experimental": { "candidateHashFilenames": [ - "factorio-headless_linux_2.0.8.tar.xz", - "factorio_headless_x64_2.0.8.tar.xz" + "factorio-headless_linux_2.0.9.tar.xz", + "factorio_headless_x64_2.0.9.tar.xz" ], - "name": "factorio_headless_x64-2.0.8.tar.xz", + "name": "factorio_headless_x64-2.0.9.tar.xz", "needsAuth": false, - "sha256": "d9594c4d552a3e4f965b188a4774da8c8b010fc23ddb0efc63b1d94818dde1ca", + "sha256": "f499077b3e2c1313452c350f1faf17db31cae2a0fa738f69166e97c3caa3c86d", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.8/headless/linux64", - "version": "2.0.8" + "url": "https://factorio.com/get-download/2.0.9/headless/linux64", + "version": "2.0.9" }, "stable": { "candidateHashFilenames": [ From c49ef33687fe5f81a1c897143b7d197662c3ce6b Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 22 Oct 2024 19:37:29 +0100 Subject: [PATCH 08/12] factorio-space-age: name drv -space-age, rather than -experimental (cherry picked from commit 8387c1626d200274e5beb968c81327726f057a86) --- pkgs/by-name/fa/factorio/package.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/fa/factorio/package.nix b/pkgs/by-name/fa/factorio/package.nix index f367930112480..4a2363497f8ec 100644 --- a/pkgs/by-name/fa/factorio/package.nix +++ b/pkgs/by-name/fa/factorio/package.nix @@ -176,7 +176,8 @@ let modDir = factorio-utils.mkModDirDrv mods mods-dat; base = with actual; { - pname = "factorio-${releaseType}"; + # remap -expansion to -space-age to better match the attr name in nixpkgs. + pname = "factorio-${if releaseType == "expansion" then "space-age" else releaseType}"; inherit version src; preferLocalBuild = true; From a956600533b4bc68e9cb392921668057a79dc368 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Tue, 22 Oct 2024 19:39:11 +0100 Subject: [PATCH 09/12] factorio: reformat update.py with ruff and make lint clean (cherry picked from commit 0d3fab394f2ceff40afc24ecf73287156407d769) --- pkgs/by-name/fa/factorio/update.py | 173 ++++++++++++++++++++++------- 1 file changed, 131 insertions(+), 42 deletions(-) diff --git a/pkgs/by-name/fa/factorio/update.py b/pkgs/by-name/fa/factorio/update.py index f7be9b368fd79..1fce95179804b 100755 --- a/pkgs/by-name/fa/factorio/update.py +++ b/pkgs/by-name/fa/factorio/update.py @@ -6,7 +6,6 @@ from dataclasses import dataclass import json import os.path -import subprocess from typing import Callable, Dict from absl import app @@ -21,9 +20,17 @@ FLAGS = flags.FLAGS -flags.DEFINE_string('out', '', 'Output path for versions.json.') -flags.DEFINE_list('release_type', '', 'If non-empty, a comma-separated list of release types to update (e.g. alpha).') -flags.DEFINE_list('release_channel', '', 'If non-empty, a comma-separated list of release channels to update (e.g. experimental).') +flags.DEFINE_string("out", "", "Output path for versions.json.") +flags.DEFINE_list( + "release_type", + "", + "If non-empty, a comma-separated list of release types to update (e.g. alpha).", +) +flags.DEFINE_list( + "release_channel", + "", + "If non-empty, a comma-separated list of release channels to update (e.g. experimental).", +) @dataclass @@ -56,10 +63,24 @@ class ReleaseChannel: ] RELEASE_TYPES = [ - ReleaseType("alpha", needs_auth=True, hash_filename_format=["factorio_linux_{version}.tar.xz"]), + ReleaseType( + "alpha", + needs_auth=True, + hash_filename_format=["factorio_linux_{version}.tar.xz"], + ), ReleaseType("demo", hash_filename_format=["factorio_demo_x64_{version}.tar.xz"]), - ReleaseType("headless", hash_filename_format=["factorio-headless_linux_{version}.tar.xz", "factorio_headless_x64_{version}.tar.xz"]), - ReleaseType("expansion", needs_auth=True, hash_filename_format=["factorio-space-age_linux_{version}.tar.xz"]), + ReleaseType( + "headless", + hash_filename_format=[ + "factorio-headless_linux_{version}.tar.xz", + "factorio_headless_x64_{version}.tar.xz", + ], + ), + ReleaseType( + "expansion", + needs_auth=True, + hash_filename_format=["factorio-space-age_linux_{version}.tar.xz"], + ), ] RELEASE_CHANNELS = [ @@ -75,7 +96,9 @@ def find_versions_json() -> str: for path in try_paths: if os.path.exists(path): return path - raise Exception("Couldn't figure out where to write versions.json; try specifying --out") + raise Exception( + "Couldn't figure out where to write versions.json; try specifying --out" + ) def fetch_versions() -> FactorioVersionsJSON: @@ -86,7 +109,7 @@ def fetch_hashes() -> FactorioHashes: resp = requests.get(FACTORIO_HASHES) resp.raise_for_status() out = {} - for ln in resp.text.split('\n'): + for ln in resp.text.split("\n"): ln = ln.strip() if not ln: continue @@ -96,83 +119,148 @@ def fetch_hashes() -> FactorioHashes: def generate_our_versions(factorio_versions: FactorioVersionsJSON) -> OurVersionJSON: - rec_dd = lambda: defaultdict(rec_dd) + def rec_dd(): + return defaultdict(rec_dd) + output = rec_dd() # Deal with times where there's no experimental version for rc in RELEASE_CHANNELS: if rc.name not in factorio_versions or not factorio_versions[rc.name]: - factorio_versions[rc.name] = factorio_versions['stable'] + factorio_versions[rc.name] = factorio_versions["stable"] for rt in RELEASE_TYPES: - if rt.name not in factorio_versions[rc.name] or not factorio_versions[rc.name][rt.name]: - factorio_versions[rc.name][rt.name] = factorio_versions['stable'][rt.name] - + if ( + rt.name not in factorio_versions[rc.name] + or not factorio_versions[rc.name][rt.name] + ): + factorio_versions[rc.name][rt.name] = factorio_versions["stable"][ + rt.name + ] for system in SYSTEMS: for release_type in RELEASE_TYPES: for release_channel in RELEASE_CHANNELS: version = factorio_versions[release_channel.name].get(release_type.name) - if version == None: + if version is None: continue this_release = { - "name": f"factorio_{release_type.name}_{system.tar_name}-{version}.tar.xz", - "url": f"https://factorio.com/get-download/{version}/{release_type.name}/{system.url_name}", - "version": version, - "needsAuth": release_type.needs_auth, - "candidateHashFilenames": [fmt.format(version=version) for fmt in release_type.hash_filename_format], + "name": f"factorio_{release_type.name}_{system.tar_name}-{version}.tar.xz", + "url": f"https://factorio.com/get-download/{version}/{release_type.name}/{system.url_name}", + "version": version, + "needsAuth": release_type.needs_auth, + "candidateHashFilenames": [ + fmt.format(version=version) + for fmt in release_type.hash_filename_format + ], "tarDirectory": system.tar_name, } - output[system.nix_name][release_type.name][release_channel.name] = this_release + output[system.nix_name][release_type.name][release_channel.name] = ( + this_release + ) return output -def iter_version(versions: OurVersionJSON, it: Callable[[str, str, str, Dict[str, str]], Dict[str, str]]) -> OurVersionJSON: +def iter_version( + versions: OurVersionJSON, + it: Callable[[str, str, str, Dict[str, str]], Dict[str, str]], +) -> OurVersionJSON: versions = copy.deepcopy(versions) for system_name, system in versions.items(): for release_type_name, release_type in system.items(): for release_channel_name, release in release_type.items(): - release_type[release_channel_name] = it(system_name, release_type_name, release_channel_name, dict(release)) + release_type[release_channel_name] = it( + system_name, release_type_name, release_channel_name, dict(release) + ) return versions def merge_versions(old: OurVersionJSON, new: OurVersionJSON) -> OurVersionJSON: """Copies already-known hashes from version.json to avoid having to re-fetch.""" - def _merge_version(system_name: str, release_type_name: str, release_channel_name: str, release: Dict[str, str]) -> Dict[str, str]: + + def _merge_version( + system_name: str, + release_type_name: str, + release_channel_name: str, + release: Dict[str, str], + ) -> Dict[str, str]: old_system = old.get(system_name, {}) old_release_type = old_system.get(release_type_name, {}) old_release = old_release_type.get(release_channel_name, {}) if FLAGS.release_type and release_type_name not in FLAGS.release_type: - logging.info("%s/%s/%s: not in --release_type, not updating", system_name, release_type_name, release_channel_name) + logging.info( + "%s/%s/%s: not in --release_type, not updating", + system_name, + release_type_name, + release_channel_name, + ) return old_release if FLAGS.release_channel and release_channel_name not in FLAGS.release_channel: - logging.info("%s/%s/%s: not in --release_channel, not updating", system_name, release_type_name, release_channel_name) + logging.info( + "%s/%s/%s: not in --release_channel, not updating", + system_name, + release_type_name, + release_channel_name, + ) return old_release - if not "sha256" in old_release: - logging.info("%s/%s/%s: not copying sha256 since it's missing", system_name, release_type_name, release_channel_name) + if "sha256" not in old_release: + logging.info( + "%s/%s/%s: not copying sha256 since it's missing", + system_name, + release_type_name, + release_channel_name, + ) return release - if not all(old_release.get(k, None) == release[k] for k in ['name', 'version', 'url']): - logging.info("%s/%s/%s: not copying sha256 due to mismatch", system_name, release_type_name, release_channel_name) + if not all( + old_release.get(k, None) == release[k] for k in ["name", "version", "url"] + ): + logging.info( + "%s/%s/%s: not copying sha256 due to mismatch", + system_name, + release_type_name, + release_channel_name, + ) return release release["sha256"] = old_release["sha256"] return release + return iter_version(new, _merge_version) -def fill_in_hash(versions: OurVersionJSON, factorio_hashes: FactorioHashes) -> OurVersionJSON: +def fill_in_hash( + versions: OurVersionJSON, factorio_hashes: FactorioHashes +) -> OurVersionJSON: """Fill in sha256 hashes for anything missing them.""" - urls_to_hash = {} - def _fill_in_hash(system_name: str, release_type_name: str, release_channel_name: str, release: Dict[str, str]) -> Dict[str, str]: + + def _fill_in_hash( + system_name: str, + release_type_name: str, + release_channel_name: str, + release: Dict[str, str], + ) -> Dict[str, str]: for candidate_filename in release["candidateHashFilenames"]: if candidate_filename in factorio_hashes: release["sha256"] = factorio_hashes[candidate_filename] break else: - logging.error("%s/%s/%s: failed to find any of %s in %s", system_name, release_type_name, release_channel_name, release["candidateHashFilenames"], FACTORIO_HASHES) + logging.error( + "%s/%s/%s: failed to find any of %s in %s", + system_name, + release_type_name, + release_channel_name, + release["candidateHashFilenames"], + FACTORIO_HASHES, + ) return release if "sha256" in release: - logging.info("%s/%s/%s: skipping fetch, sha256 already present", system_name, release_type_name, release_channel_name) + logging.info( + "%s/%s/%s: skipping fetch, sha256 already present", + system_name, + release_type_name, + release_channel_name, + ) return release return release + return iter_version(versions, _fill_in_hash) @@ -183,18 +271,19 @@ def main(argv): old_our_versions = None our_versions_path = find_versions_json() if our_versions_path: - logging.info('Loading old versions.json from %s', our_versions_path) - with open(our_versions_path, 'r') as f: + logging.info("Loading old versions.json from %s", our_versions_path) + with open(our_versions_path, "r") as f: old_our_versions = json.load(f) if old_our_versions: - logging.info('Merging in old hashes') + logging.info("Merging in old hashes") new_our_versions = merge_versions(old_our_versions, new_our_versions) - logging.info('Updating hashes from Factorio SHA256') + logging.info("Updating hashes from Factorio SHA256") new_our_versions = fill_in_hash(new_our_versions, factorio_hashes) - with open(our_versions_path, 'w') as f: - logging.info('Writing versions.json to %s', our_versions_path) + with open(our_versions_path, "w") as f: + logging.info("Writing versions.json to %s", our_versions_path) json.dump(new_our_versions, f, sort_keys=True, indent=2) f.write("\n") -if __name__ == '__main__': + +if __name__ == "__main__": app.run(main) From cf44b89eca8808be9e20605a84b67c248af34c4b Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Wed, 23 Oct 2024 15:38:57 +0100 Subject: [PATCH 10/12] factorio: 2.0.8 -> 2.0.9 (cherry picked from commit b79d605f737267765d3dba54049d0baae5fa5da0) --- pkgs/by-name/fa/factorio/versions.json | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/fa/factorio/versions.json b/pkgs/by-name/fa/factorio/versions.json index 273ba332e6462..6389b381e74aa 100644 --- a/pkgs/by-name/fa/factorio/versions.json +++ b/pkgs/by-name/fa/factorio/versions.json @@ -14,14 +14,14 @@ }, "stable": { "candidateHashFilenames": [ - "factorio_linux_2.0.8.tar.xz" + "factorio_linux_2.0.9.tar.xz" ], - "name": "factorio_alpha_x64-2.0.8.tar.xz", + "name": "factorio_alpha_x64-2.0.9.tar.xz", "needsAuth": true, - "sha256": "94ea36a5b9103369df7158a8281039dd2f1d7fa7bb3a2d854c715250dd73e185", + "sha256": "34c21cd3cbe91b65483786ccb4467b5d4766c748cbbddd2ce3b30d319d163e3b", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.8/alpha/linux64", - "version": "2.0.8" + "url": "https://factorio.com/get-download/2.0.9/alpha/linux64", + "version": "2.0.9" } }, "demo": { @@ -62,14 +62,14 @@ }, "stable": { "candidateHashFilenames": [ - "factorio-space-age_linux_2.0.8.tar.xz" + "factorio-space-age_linux_2.0.9.tar.xz" ], - "name": "factorio_expansion_x64-2.0.8.tar.xz", + "name": "factorio_expansion_x64-2.0.9.tar.xz", "needsAuth": true, - "sha256": "408eae824daa761564b1ea7b81925efe05298cbaffd120eea235341ac05a6a60", + "sha256": "6369d23550a7a721d3de1d34253e8321ee601fa759d1fb5efac9abc28aa7509d", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.8/expansion/linux64", - "version": "2.0.8" + "url": "https://factorio.com/get-download/2.0.9/expansion/linux64", + "version": "2.0.9" } }, "headless": { @@ -87,15 +87,15 @@ }, "stable": { "candidateHashFilenames": [ - "factorio-headless_linux_2.0.8.tar.xz", - "factorio_headless_x64_2.0.8.tar.xz" + "factorio-headless_linux_2.0.9.tar.xz", + "factorio_headless_x64_2.0.9.tar.xz" ], - "name": "factorio_headless_x64-2.0.8.tar.xz", + "name": "factorio_headless_x64-2.0.9.tar.xz", "needsAuth": false, - "sha256": "d9594c4d552a3e4f965b188a4774da8c8b010fc23ddb0efc63b1d94818dde1ca", + "sha256": "f499077b3e2c1313452c350f1faf17db31cae2a0fa738f69166e97c3caa3c86d", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.8/headless/linux64", - "version": "2.0.8" + "url": "https://factorio.com/get-download/2.0.9/headless/linux64", + "version": "2.0.9" } } } From 36e27c3cffbdfef1b158f1c6c5ff73d340e707d5 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Wed, 23 Oct 2024 23:15:12 +0100 Subject: [PATCH 11/12] factorio-experimental: 2.0.9 -> 2.0.10 (cherry picked from commit 33892f852d6e7ae02495a15008a725359fce11d3) --- pkgs/by-name/fa/factorio/versions.json | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/fa/factorio/versions.json b/pkgs/by-name/fa/factorio/versions.json index 6389b381e74aa..701052130b5d4 100644 --- a/pkgs/by-name/fa/factorio/versions.json +++ b/pkgs/by-name/fa/factorio/versions.json @@ -3,14 +3,14 @@ "alpha": { "experimental": { "candidateHashFilenames": [ - "factorio_linux_2.0.9.tar.xz" + "factorio_linux_2.0.10.tar.xz" ], - "name": "factorio_alpha_x64-2.0.9.tar.xz", + "name": "factorio_alpha_x64-2.0.10.tar.xz", "needsAuth": true, - "sha256": "34c21cd3cbe91b65483786ccb4467b5d4766c748cbbddd2ce3b30d319d163e3b", + "sha256": "07508fc5112f95ef5d5afedea66863ea326e039bd872b772b934ed08545c399b", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.9/alpha/linux64", - "version": "2.0.9" + "url": "https://factorio.com/get-download/2.0.10/alpha/linux64", + "version": "2.0.10" }, "stable": { "candidateHashFilenames": [ @@ -51,14 +51,14 @@ "expansion": { "experimental": { "candidateHashFilenames": [ - "factorio-space-age_linux_2.0.9.tar.xz" + "factorio-space-age_linux_2.0.10.tar.xz" ], - "name": "factorio_expansion_x64-2.0.9.tar.xz", + "name": "factorio_expansion_x64-2.0.10.tar.xz", "needsAuth": true, - "sha256": "6369d23550a7a721d3de1d34253e8321ee601fa759d1fb5efac9abc28aa7509d", + "sha256": "f7d346578c812314be8b72fbf6fd291c53d23ecc2dc6556a8948d26b3b95d71e", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.9/expansion/linux64", - "version": "2.0.9" + "url": "https://factorio.com/get-download/2.0.10/expansion/linux64", + "version": "2.0.10" }, "stable": { "candidateHashFilenames": [ @@ -75,15 +75,15 @@ "headless": { "experimental": { "candidateHashFilenames": [ - "factorio-headless_linux_2.0.9.tar.xz", - "factorio_headless_x64_2.0.9.tar.xz" + "factorio-headless_linux_2.0.10.tar.xz", + "factorio_headless_x64_2.0.10.tar.xz" ], - "name": "factorio_headless_x64-2.0.9.tar.xz", + "name": "factorio_headless_x64-2.0.10.tar.xz", "needsAuth": false, - "sha256": "f499077b3e2c1313452c350f1faf17db31cae2a0fa738f69166e97c3caa3c86d", + "sha256": "2d7dd212fa6f715218a5e33bad7d593af8998fa7bf7ce727343159ee1f8c23f4", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.9/headless/linux64", - "version": "2.0.9" + "url": "https://factorio.com/get-download/2.0.10/headless/linux64", + "version": "2.0.10" }, "stable": { "candidateHashFilenames": [ From 9afc5061e68fb730bc08ccdd7a75c61e13e50383 Mon Sep 17 00:00:00 2001 From: RaHoni Date: Thu, 24 Oct 2024 18:57:33 +0200 Subject: [PATCH 12/12] factorio: 2.0.9 -> 2.0.10 (cherry picked from commit 6db8aafdc32b2bb6d84cd5991d0e59e6f32dca37) --- pkgs/by-name/fa/factorio/versions.json | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/fa/factorio/versions.json b/pkgs/by-name/fa/factorio/versions.json index 701052130b5d4..12c9da35eecb4 100644 --- a/pkgs/by-name/fa/factorio/versions.json +++ b/pkgs/by-name/fa/factorio/versions.json @@ -14,14 +14,14 @@ }, "stable": { "candidateHashFilenames": [ - "factorio_linux_2.0.9.tar.xz" + "factorio_linux_2.0.10.tar.xz" ], - "name": "factorio_alpha_x64-2.0.9.tar.xz", + "name": "factorio_alpha_x64-2.0.10.tar.xz", "needsAuth": true, - "sha256": "34c21cd3cbe91b65483786ccb4467b5d4766c748cbbddd2ce3b30d319d163e3b", + "sha256": "07508fc5112f95ef5d5afedea66863ea326e039bd872b772b934ed08545c399b", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.9/alpha/linux64", - "version": "2.0.9" + "url": "https://factorio.com/get-download/2.0.10/alpha/linux64", + "version": "2.0.10" } }, "demo": { @@ -62,14 +62,14 @@ }, "stable": { "candidateHashFilenames": [ - "factorio-space-age_linux_2.0.9.tar.xz" + "factorio-space-age_linux_2.0.10.tar.xz" ], - "name": "factorio_expansion_x64-2.0.9.tar.xz", + "name": "factorio_expansion_x64-2.0.10.tar.xz", "needsAuth": true, - "sha256": "6369d23550a7a721d3de1d34253e8321ee601fa759d1fb5efac9abc28aa7509d", + "sha256": "f7d346578c812314be8b72fbf6fd291c53d23ecc2dc6556a8948d26b3b95d71e", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.9/expansion/linux64", - "version": "2.0.9" + "url": "https://factorio.com/get-download/2.0.10/expansion/linux64", + "version": "2.0.10" } }, "headless": { @@ -87,15 +87,15 @@ }, "stable": { "candidateHashFilenames": [ - "factorio-headless_linux_2.0.9.tar.xz", - "factorio_headless_x64_2.0.9.tar.xz" + "factorio-headless_linux_2.0.10.tar.xz", + "factorio_headless_x64_2.0.10.tar.xz" ], - "name": "factorio_headless_x64-2.0.9.tar.xz", + "name": "factorio_headless_x64-2.0.10.tar.xz", "needsAuth": false, - "sha256": "f499077b3e2c1313452c350f1faf17db31cae2a0fa738f69166e97c3caa3c86d", + "sha256": "2d7dd212fa6f715218a5e33bad7d593af8998fa7bf7ce727343159ee1f8c23f4", "tarDirectory": "x64", - "url": "https://factorio.com/get-download/2.0.9/headless/linux64", - "version": "2.0.9" + "url": "https://factorio.com/get-download/2.0.10/headless/linux64", + "version": "2.0.10" } } }