On windows, GHCup does not install into the users directory. It installs into e.g. C:\ghcup
.
So all you have to do is set the right global environment variables (and possibly file permissions).
-
GHCUP_MSYS2
(to e.g.C:\ghcup\msys64
) -
GHCUP_INSTALL_BASE_PREFIX
(to e.g.C:\
) -
PATH
to includeC:\ghcup\bin
Then the only caveat is: cabal directory. Make sure CABAL_DIR
env var is not set. Now… if your users need msys2 C libraries, they have to each adjust their cabal.config
accordingly. Also make sure you enable long path behavior.
Also check: