Skip to content

Commit 6696110

Browse files
committed
Add documentation about mirrors, fixes haskell#300
1 parent 326af49 commit 6696110

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/guide.md

+25
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,31 @@ and produce the binaries `ghc-8.10.2-eff` and `ghc-head` respectively.
149149
GHCup always needs to know which version the bindist corresponds to (this is not automatically
150150
detected).
151151

152+
## Mirrors
153+
154+
GHCup allows to use custom mirrors/download-info hosted by yourself or 3rd parties.
155+
156+
To use a mirror, set the following option in `~/.ghcup/config.yaml`:
157+
158+
```yml
159+
url-source:
160+
# Accepts file/http/https scheme
161+
OwnSource: "https://some-url/ghcup-0.0.6.yaml"
162+
```
163+
164+
See [config.yaml](https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/data/config.yaml)
165+
for more options.
166+
167+
Alternatively you can do it via a cli switch:
168+
169+
```sh
170+
ghcup --url-source=https://some-url/ghcup-0.0.6.yaml list
171+
```
172+
173+
### Known mirrors
174+
175+
1. [https://mirror.sjtu.edu.cn/docs/ghcup](https://mirror.sjtu.edu.cn/docs/ghcup)
176+
152177
## Isolated installs
153178

154179
Ghcup also enables you to install a tool (GHC, Cabal, HLS, Stack) at an isolated location of your choosing.

0 commit comments

Comments
 (0)