summary refs log blame commit diff
path: root/pkgs/games/factorio/fetch.nix
blob: 439f2478a66739f637f629fb94aa6a654e1e5be4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                             








                           

                          







                                             
                               
 
                                                     









                                                                         
{ stdenv, curl, xidel, cacert
# Begin download parameters
, username ? ""
, password ? ""
}:

{
  # URL to fetch.
  url ? ""

, name ? "factorio.tar.gz"

  # Login URL.
, loginUrl ? "https://www.factorio.com/login"

  # SHA256 of the fetched URL.
, sha256 ? ""
}:

stdenv.mkDerivation {
  buildInputs = [ curl xidel ];

  inherit name url loginUrl username password cacert;

  builder = ./fetch.sh;

  outputHashAlgo = "sha256";
  outputHash = sha256;
  outputHashMode = "flat";

  # There's no point in downloading remotely, we'd just slow things down.
  preferLocalBuild = true;
}