Commit fff8abc7 authored by Andrew Marshall's avatar Andrew Marshall
Browse files

factorio: use actual args instead of sample in download help

Makes it easier for the user since they should no longer have to
manually replace things. Remove the note about the name as it may no
longer be true, and the user now has to care less since the values are
more easily copy-pastable.
parent 88195a94
Loading
Loading
Loading
Loading
+37 −36
Original line number Diff line number Diff line
@@ -40,7 +40,9 @@ let

  mods = args.mods or [ ];

  helpMsg = ''
  helpMsg =
    { dlName, storeName }:
    ''

      ===FETCH FAILED===
      Please ensure you have set the username and token with config.nix, or
@@ -65,11 +67,7 @@ let
      download the release through https://factorio.com/download , then add it to
      the store using e.g.:

      releaseType=alpha
      version=0.17.74
      nix-prefetch-url file://\''$HOME/Downloads/factorio_\''${releaseType}_x64_\''${version}.tar.xz --name factorio_\''${releaseType}_x64-\''${version}.tar.xz

    Note the ultimate "_" is replaced with "-" in the --name arg!
        nix-prefetch-url file://\''$HOME/Downloads/${dlName} --name ${storeName}

      If you go this route you might want to tell Nix to explicitly hold on to the
      source tarball. Otherwise it could get GC'd from the Nix store and you'd
@@ -155,7 +153,10 @@ let
                  '';
              failureHook = ''
                cat <<EOF
                ${helpMsg}
                ${helpMsg {
                  dlName = if candidateHashFilenames != [ ] then builtins.head candidateHashFilenames else name;
                  storeName = name;
                }}
                EOF
              '';
            })