haskell / haskell/cabal

Support changing install destination of header files for `foreign-library`

Open
#6,072 3 comments 0 reactions 1 assignee Claimed by @typedrat View on GitHub
meta: easy newcomer newcomer: 4-small-feature type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Currently include files listed in `install-includes` are installed into `$libsubdir/include`.
This is reasonable for ordinally libraries that contain C headers.

On the other hand, for foreign-libraries, users may want to include headers into foreign lauguages.
But `$libsubdir` tend to be a very long, unfixed path name. So users have no way to specify include paths within their build tools.

The documentation says,

> With modern ghc regular libraries are installed in directories that contain package keys. This isn’t usually a problem because the package gets registered in ghc’s package DB and so we can figure out what the location of the library is. Foreign libraries however don’t get registered, which means that we’d have to have a way of finding out where a platform library got installed (other than by searching the lib/ directory). Instead, we install foreign libraries in ~/.cabal/lib, much like we install executables in ~/.cabal/bin.

(quoted from https://www.haskell.org/cabal/users-guide/developing-packages.html#foreign-libraries)

I think the same is true for header files.

So in my opinion, there should be a feature to change install destination of header files.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.