2016-08-14 23:47:00 +01:00
|
|
|
{ stdenv, curl, xidel, cacert
|
2016-01-22 23:54:49 +00:00
|
|
|
# Begin download parameters
|
|
|
|
, username ? ""
|
|
|
|
, password ? ""
|
|
|
|
}:
|
|
|
|
|
|
|
|
{
|
|
|
|
# URL to fetch.
|
|
|
|
url ? ""
|
|
|
|
|
|
|
|
# Login URL.
|
|
|
|
, loginUrl ? "https://www.factorio.com/login"
|
|
|
|
|
|
|
|
# SHA256 of the fetched URL.
|
|
|
|
, sha256 ? ""
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "factorio.tar.gz";
|
|
|
|
|
2016-08-14 23:47:00 +01:00
|
|
|
buildInputs = [ curl xidel ];
|
2016-01-22 23:54:49 +00:00
|
|
|
|
2016-04-21 15:09:53 +01:00
|
|
|
inherit url loginUrl username password cacert;
|
2016-01-22 23:54:49 +00:00
|
|
|
|
|
|
|
builder = ./fetch.sh;
|
|
|
|
|
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHash = sha256;
|
|
|
|
outputHashMode = "flat";
|
|
|
|
|
|
|
|
# There's no point in downloading remotely, we'd just slow things down.
|
|
|
|
preferLocalBuild = true;
|
|
|
|
}
|