about summary refs log tree commit diff
path: root/pkgs/games/factorio
diff options
context:
space:
mode:
authorDaniel Hill <daniel@gluo.nz>2022-10-31 22:38:57 +1300
committerDaniel Hill <daniel@gluo.nz>2022-10-31 22:38:57 +1300
commita1115f5ea5a82c5758194e7ad72718237a85c1ba (patch)
tree26b562faeb21a4d9ce9597e20d368431d719fa6d /pkgs/games/factorio
parentdfb35cb5bd4542035df7a00faba885d6a2fbede2 (diff)
factorio: make it easier to supply a custom versions.json
Signed-off-by: Daniel Hill <daniel@gluo.nz>
Diffstat (limited to 'pkgs/games/factorio')
-rw-r--r--pkgs/games/factorio/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/games/factorio/default.nix b/pkgs/games/factorio/default.nix
index 17f9947b49824..f47eda65b6c1a 100644
--- a/pkgs/games/factorio/default.nix
+++ b/pkgs/games/factorio/default.nix
@@ -3,6 +3,7 @@
 , libSM, libICE, libXext, factorio-utils
 , releaseType
 , mods ? []
+, versionsJson ? ./versions.json
 , username ? "", token ? "" # get/reset token at https://factorio.com/profile
 , experimental ? false # true means to always use the latest branch
 }:
@@ -60,7 +61,7 @@ let
 
   # NB `experimental` directs us to take the latest build, regardless of its branch;
   # hence the (stable, experimental) pairs may sometimes refer to the same distributable.
-  versions = importJSON ./versions.json;
+  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.");