third_party/factorio: init

We turn the existing experimental BUILD file into a nicely abstracted
starlark rule generator, for generating both external repositories and
container build rules from a single source of truth.

We also add 0.18.22 (which we already pushed via :push_latest).

Change-Id: I521d6e5cb9447eaf6f237671b7ef07d621cd9c77
diff --git a/WORKSPACE b/WORKSPACE
index 5af740d..411a361 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -133,50 +133,9 @@
     digest = "sha256:8f58236129e6547d92502a2e9d8f40129f45f15007beaeafb59fed4faffddb3e",
 )
 
-# HTTP stuff from the Internet
-load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
-
-http_file(
-    name = "factorio-headless-0.16.51",
-    urls = ["https://factorio.com/get-download/0.16.51/headless/linux64"],
-    sha256 = "6cb09f5ac87f16f8d5b43cef26c0ae26cc46a57a0382e253dfda032dc5bb367f",
-    downloaded_file_path = "factorio.tar.xz",
-)
-
-http_file(
-    name = "factorio-headless-0.17.41",
-    urls = ["https://factorio.com/get-download/0.17.41/headless/linux64"],
-    sha256 = "bf2d16b23c3bbd97e41889d3e27670b6d958fa3d50f0befb41d234f735e8e6d1",
-    downloaded_file_path = "factorio.tar.xz",
-)
-
-http_file(
-    name = "factorio-headless-0.17.52",
-    urls = ["https://factorio.com/get-download/0.17.52/headless/linux64"],
-    sha256 = "24458a4e16875b0b63677b7e7a068ce2e5b298c110381d17c6f596fd1406db0e",
-    downloaded_file_path = "factorio.tar.xz",
-)
-
-http_file(
-    name = "factorio-headless-0.17.79",
-    urls = ["https://factorio.com/get-download/0.17.79/headless/linux64"],
-    sha256 = "9ace12fa986df028dc1851bf4de2cb038044d743e98823bc1c48ba21aa4d23df",
-    downloaded_file_path = "factorio.tar.xz",
-)
-
-http_file(
-    name = "factorio-headless-0.18.12",
-    urls = ["https://factorio.com/get-download/0.18.12/headless/linux64"],
-    sha256 = "e0c6a46d66cfc02cba294a5fd34265e7e7a5168b8c8a7b16ad8dbac31470ed33",
-    downloaded_file_path = "factorio.tar.xz",
-)
-
-http_file(
-    name = "factorio-headless-0.18.17",
-    urls = ["https://factorio.com/get-download/0.18.17/headless/linux64"],
-    sha256 = "42adce9fddde393023afb0aae19dd030a32ca0810191c0e7b9b7c55556e9bbce",
-    downloaded_file_path = "factorio.tar.xz",
-)
+# third_party/factorio
+load("//third_party/factorio:factorio.bzl", "factorio_repositories")
+factorio_repositories()
 
 # Go rules