mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-26 05:02:48 +00:00
56 lines
1.9 KiB
Markdown
56 lines
1.9 KiB
Markdown
---
|
||
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/
|
||
```
|