Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dn-use-aliases'
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Jan 19, 2025
2 parents be3040a + 0e4ebee commit f30e6ca
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ of metadata files to understand their purpose. These can be combined.
For example, if you want access to both prerelease and cross bindists, you'd do:

```sh
ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml
ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-cross-0.0.8.yaml
ghcup config add-release-channel prereleases
ghcup config add-release-channel cross
```

This results in the following configuration in `~/.ghcup/config.yaml`:
Expand All @@ -180,10 +180,9 @@ This results in the following configuration in `~/.ghcup/config.yaml`:
url-source:
# the base url that contains all the release bindists
- GHCupURL
# prereleases
- https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml
- prereleases
# cross bindists
- https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-cross-0.0.8.yaml
- cross
```

You can add as many channels as you like. They are combined under *Last*, so versions from the prerelease channel
Expand All @@ -202,11 +201,11 @@ for more options.
You can also use an alternative metadata via the one-shot CLI option:

```sh
ghcup --url-source=https://some-url/ghcup-0.0.8.yaml tui
ghcup --url-source=https://some-url/ghcup-0.0.9.yaml tui
```

One main caveat of using URLs is that you might need to check whether there are new versions
of the file (e.g. `ghcup-0.0.7.yaml` vs `ghcup-0.0.8.yaml`). Although old metadata files
of the file (e.g. `ghcup-0.0.8.yaml` vs `ghcup-0.0.9.yaml`). Although old metadata files
are supported for some time, they are not so indefinitely.

### Mirrors
Expand All @@ -216,7 +215,7 @@ a URL instead of the `GHCupURL` alias. E.g. in `~/.ghcup/config.yaml`, you'd do:

```yml
url-source:
- https://mirror.sjtu.edu.cn/ghcup/yaml/ghcup/data/ghcup-0.0.6.yaml
- https://mirror.sjtu.edu.cn/ghcup/yaml/ghcup/data/ghcup-0.0.9.yaml
```

Note that later versions of GHCup allow more sophisticated mirror support, see [here](#mirrors-proper).
Expand All @@ -242,9 +241,9 @@ Then tell ghcup to use file locations in `~/.ghcup/config.yaml`, e.g.:

```yaml
url-source:
- file:///home/user/git/ghcup-metadata/ghcup-0.0.8.yaml
- file:///home/user/git/ghcup-metadata/ghcup-cross-0.0.8.yaml
- file:///home/user/git/ghcup-metadata/ghcup-prereleases-0.0.8.yaml
- file:///home/user/git/ghcup-metadata/ghcup-0.0.9.yaml
- file:///home/user/git/ghcup-metadata/ghcup-cross-0.0.9.yaml
- file:///home/user/git/ghcup-metadata/ghcup-prereleases-0.0.9.yaml
```

Now, if you invoke `ghcup tui`, it will open instantly without any download, since it just
Expand Down Expand Up @@ -375,8 +374,8 @@ As an example, this would be a complete mirror configuration in `~/.ghcup/config
```yaml
mirrors:
# yaml download location, would result in:
# https://raw.githubusercontent.com/haskell/ghcup-metadata/develop/ghcup-0.0.8.yaml
# -> https://mirror.sjtu.edu.cn/ghcup/yaml/haskell/ghcup-metadata/master/ghcup-0.0.8.yaml
# https://raw.githubusercontent.com/haskell/ghcup-metadata/develop/ghcup-0.0.9.yaml
# -> https://mirror.sjtu.edu.cn/ghcup/yaml/haskell/ghcup-metadata/master/ghcup-0.0.9.yaml
"raw.githubusercontent.com":
authority:
host: "mirror.sjtu.edu.cn"
Expand Down Expand Up @@ -575,7 +574,7 @@ If you run into bugs or missing behavior, join the dev chat at https://matrix.to
First, add the cross release channel:

```sh
ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/develop/ghcup-cross-0.0.8.yaml
ghcup config add-release-channel cross
```

The next sections explain how to install each cross bindist.
Expand Down

0 comments on commit f30e6ca

Please sign in to comment.