recommended way to `cabal install --global`?
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
I am the instructor for some programming-related classes, and I want to install (compiler, tools, and) libraries for all students to use, in a computer pool (currently, for remote use only, but that does not matter much here).
Yes yes at some point students will have to learn how to do that on their own (and trust binary downloads ...) but in the beginning of courses, this detracts from actual teaching. I rather show how to use `ssh` (possibly `x2go`), and be done.
So, I was used to `cabal install --global` the packages that I need. The following worked until recently,
but for `cabal-install-3.2.0.0` and `ghc-8.10.2` it does not, and I find it hard to trace where it's going wrong.
Ghc is configured with `--prefix=/opt/ghc/ghc-8.10.2`,
students put `/opt/ghc/ghc-8.10.2/bin` in their PATH.
In my `.cabal/config`:
```
install-dirs global
prefix: /opt/ghc/$compiler
```
Then (after checking that `--user` install works), e.g.,
```
cabal install --global --lib csound-expression
```
With 8.10.2, this still puts in my `HOME/.ghc/x86_64-linux-8.10.2/environments/default`
```
package-id csound-expression-5.3.3-dc2...
```
and when I then start `ghci` (no arguments), I get
```
: cannot satisfy -package-id csound-expression-5.3.3-dc2...
```
NB: Yes, I guess it's fighting windmills (also sometimes called "progress") - I guess nobody really has this problem as they all install a complete binary distribution of compilers, tools and libraries in their HOME (add a bloated Editor for good measure) but that seems such a waste. Or - expose students to surveillance by "online programming" web sites and their 3rd-party JS ...
Just sayin - `cabal` did work for my use case - I wonder what I am missing now.
Contributor guide
Assessment
This issue has not been assessed yet.