Skip to content

Commit

Permalink
Document how to use GHCup's msys2 with stack, fixes #1040
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Apr 23, 2024
1 parent df6205c commit 7d662bb
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,24 @@ Stack metadata doesn't have a concept of those and we don't try to be smart when

### Windows

On windows, you may find the following config options useful too:
`skip-msys`, `extra-path`, `extra-include-dirs`, `extra-lib-dirs`.
#### Using GHCup's MSYS2 installation

Stack usually maintains its own msys2 installation. However, you can instruct it to use GHCup's MSYS2 or any other. E.g. if you
had GHCup install msys2 into `C:\ghcup\msys64\`, then you would add the following config to stack's `config.yaml`
(you can find its location via `stack path --stack-root`):

```yaml
skip-msys: true
extra-lib-dirs:
- C:\ghcup\msys64\mingw64\lib
- C:\ghcup\msys64\mingw64\bin
extra-path:
- C:\ghcup\msys64\mingw64\bin
- C:\ghcup\msys64\usr\bin
- C:\ghcup\msys64\usr\local\bin
extra-include-dirs:
- C:\ghcup\msys64\mingw64\include
```

Also check out: [https://docs.haskellstack.org/en/stable/yaml_configuration](https://docs.haskellstack.org/en/stable/yaml_configuration)

Expand Down

0 comments on commit 7d662bb

Please sign in to comment.