New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
factorio: download using token, not password #46586
Conversation
pkgs/games/factorio/fetch.sh
Outdated
{ | ||
packageOverrides = pkgs: rec { | ||
factorio = pkgs.factorio.override { | ||
username = "<username or email address>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Insert a comment saying that this is confidential data and that it should not be shared.
follow-up: Use overlays instead of packageOverrides.
pkgs/games/factorio/fetch.sh
Outdated
echo <<EOF | ||
Fetch failed. | ||
Please ensure you have set the username and token with config.nix,' | ||
or /etc/nix/nixpkgs-config.nix if on NixOS.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we point out that your token can be found at https://www.factorio.com/profile
We can do without the customized |
I figured out I should use note to self: separate version bump into its own commit |
fetchurl happily downloads the redirected login page on bad credentials, and the derivation then fails on the bad hash. I don't know how to avoid this easily, so I just put a shorter WARNING message in. I will ask upstream to return 401 instead. |
@GrahamcOfBorg eval |
Downloads were broken by upstream devs' addition of CAPTCHA to the login form. We now need only a slightly modified fetchurl to retrieve the binary distribution.
I removed the warning now that 403 is returned, and changed the semantics of the @GrahamcOfBorg eval |
Is this ready? |
Yes. |
Downloads were broken by upstream devs' addition of CAPTCHA to the login form.
Changed all references of password to token and used the new GET request + query string to fetch the files.
Fixes #46267
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)