mirror-web/help/_posts/1970-01-01-stackage.md
2022-01-19 23:27:12 +08:00

56 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
category: help
layout: help
mirrorid: stackage
---
## stackage 镜像使用帮助
本镜像推荐与 TUNA 的 [Hackage 镜像](https://{{ site.hostname }}/help/hackage/)配合使用。
### stack >= v2.5.1
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上:
```yaml
setup-info-locations: ["http://{{ site.hostname }}/stackage/stack-setup.yaml"]
urls:
latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json
snapshot-location-base: https://mirrors.tuna.tsinghua.edu.cn/stackage/stackage-snapshots/
```
此外,还需要手动下载 <https://{{ site.hostname }}/github-raw/fpco/stackage-content/master/stack/global-hints.yaml>`~/.stack/pantry/global-hints-cache.yaml`(在 Windows 下是 `%APPDATA%\stack\pantry\global-hints-cache.yaml`)。注意文件名不同。这是由于 `stack` 暂时不支持配置该文件的上游地址。该文件需要在每当第一次用到新版本的 GHC 时更新。
### stack >= v2.3.1
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上:
```yaml
setup-info-locations: ["http://{{ site.hostname }}/stackage/stack-setup.yaml"]
urls:
latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json
```
### stack >= v2.1.1
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上:
```yaml
setup-info: "http://{{ site.hostname }}/stackage/stack-setup.yaml"
urls:
latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json
```
### stack < v2.1.1
修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`, 加上:
```yaml
setup-info: "http://{{ site.hostname }}/stackage/stack-setup.yaml"
urls:
latest-snapshot: http://{{ site.hostname }}/stackage/snapshots.json
lts-build-plans: http://{{ site.hostname }}/stackage/lts-haskell/
nightly-build-plans: http://{{ site.hostname }}/stackage/stackage-nightly/
```