-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add support for mirrors wrt #357 #700
Conversation
Looks good! btw will the installer script use this config? We'd like to enable our users to use the mirror when installing ghcup itself. |
Right now not, but this could be made an option via an env var, e.g. curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | GHCUP_MIRROR=sjtu sh But first, the directory structure needs to match so we can test this out. |
@PhotonQuantum can we give it a test? |
I'm willing to help, but this requires some significant modifications to our codebase, and I'm occupied these days. I'll have some time available next month and we may start testing this design then. Sorry for the inconvenience! |
I'm going to merge this for now. If there are issues, please raise them in a new ticket. |
@PhotonQuantum ...this might resolve the need for you to modify the metadata file itself. But you will have to replicate the path components. The mirror support allows to
E.g. when we have https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.7.yaml and the following mirror config:
then the resulting url will be https://mirror.sjtu.edu.cn/ghcup/yaml/haskell/ghcup-metadata/master/ghcup-0.0.7.yaml
The current hosts are: