1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/pkgs/games/factorio/fetch.nix

34 lines
579 B
Nix
Raw Normal View History

{ stdenv, curl, xidel, cacert
2016-01-22 18:54:49 -05: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";
buildInputs = [ curl xidel ];
2016-01-22 18:54:49 -05:00
inherit url loginUrl username password cacert;
2016-01-22 18:54:49 -05: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;
}