Add support for foreign-library to v2-install
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
`cabal v2-install .` does install foreign libraries (`foreign-library`) into the store but doesn't symlink/copy them into `~/.cabal/lib` directory.
[3.3.2.8.Foreign libraries, Cabal User's Guide](https://www.haskell.org/cabal/users-guide/developing-packages.html#foreign-libraries) says
> ... we install foreign libraries in `~/.cabal/lib`, much like we install executables in `~/.cabal/bin`.
but it only applies to `v1-install`.
I'd like to `v2-install` foreign libraries, not just `v2-build`, because the former embeds proper rpaths that refer to `~/.cabal/store/`, whereas the latter leaves references to `dist-newstyle/`.
Currently I'm doing something like:
```
find ~/.cabal/store -name 'libmyforeignlib.so' -exec ls -t {} + |
head -n1 |
xargs cp -t /path/to/lib/
```
but I'd like to be able to do something like this instead:
```
cabal v2-install --installdir-lib=/path/to/lib/ .
```
Contributor guide
Assessment
This issue has not been assessed yet.