diff --git a/help/_posts/1970-01-01-hackage.md b/help/_posts/1970-01-01-hackage.md index 01c59a1..2dc386f 100644 --- a/help/_posts/1970-01-01-hackage.md +++ b/help/_posts/1970-01-01-hackage.md @@ -55,6 +55,8 @@ remote-repo: {{ site.hostname }}:http://{{ site.hostname }}/hackage ## 在 [`stack`](https://github.com/commercialhaskell/stack) 中使用 +本镜像推荐与 TUNA 的 [Stackage 镜像](https://{{ site.hostname }}/help/hackage/)配合使用。 + ### stack >= v2.1.1 修改`~/.stack/config.yaml`, 加上: diff --git a/help/_posts/1970-01-01-stackage.md b/help/_posts/1970-01-01-stackage.md index e5b7ee8..32730bb 100644 --- a/help/_posts/1970-01-01-stackage.md +++ b/help/_posts/1970-01-01-stackage.md @@ -8,6 +8,20 @@ mirrorid: 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/ +``` + +此外,还需要手动下载 到 `~/.stack/pantry/global-hints-cache.yaml`(在 Windows 下是 `%APPDATA%\stack\pantry\global-hints-cache.yaml`)。注意文件名不同。这是由于 `stack` 暂时不支持配置该文件的上游地址。 + ### stack >= v2.3.1 修改`~/.stack/config.yaml`(在 Windows 下是 `%APPDATA%\stack\config.yaml`), 加上: