summaryrefslogtreecommitdiff
path: root/customized/factorio-fetch.nix
diff options
context:
space:
mode:
Diffstat (limited to 'customized/factorio-fetch.nix')
-rw-r--r--customized/factorio-fetch.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/customized/factorio-fetch.nix b/customized/factorio-fetch.nix
new file mode 100644
index 00000000..04b31ac1
--- /dev/null
+++ b/customized/factorio-fetch.nix
@@ -0,0 +1,33 @@
1{ stdenv, curl, xidel, cacert
2# Begin download parameters
3, username ? ""
4, password ? ""
5}:
6
7{
8 # URL to fetch.
9 url ? ""
10
11 # Login URL.
12, loginUrl ? "https://www.factorio.com/login"
13
14 # SHA256 of the fetched URL.
15, sha256 ? ""
16}:
17
18stdenv.mkDerivation {
19 name = "factorio.tar.gz";
20
21 buildInputs = [ curl xidel ];
22
23 inherit url loginUrl username password cacert;
24
25 builder = ./fetch.sh;
26
27 outputHashAlgo = "sha256";
28 outputHash = sha256;
29 outputHashMode = "flat";
30
31 # There's no point in downloading remotely, we'd just slow things down.
32 preferLocalBuild = true;
33}