hpack
hpack copied to clipboard
support for foreign library artifacts (cabal 'foreign-library' stanza)
This capability would allow us to easily configure shared native library output with hpack.
Yes, absolutely! PRs accepted!
BTW, do you know when this was added to Cabal? I didn't find anything in the docs at https://www.haskell.org/cabal/users-guide/developing-packages.html#foreign-libraries. We need to know this to set the cabal-version
accordingly.
According to the changelog, it was added in v2.0.0.2.
https://qnikst.github.io/posts/2018-05-02-cabal-foreign-library.html
i would like the feature too
For what it's worth, for the time being it should be possible to use verbatim
to add foreign libraries to a package.yaml
file.
I'd like this feature too!
I would love to work on this, but I had never dive into the source code of HPack
. Can someone give me a big picture of which part of HPack
is relevant, and perhaps which part should be modified?
I wrote a demo of foreign-library feature here: https://github.com/pdlla/haskell-ffi-cabal-foreign-library-examples it works with stack too but you need to write your own .cabal file (see stack branch, which will get merged eventually).
I'd definitely love this feature for hpack :).
PR for a basic attempt at this feature: https://github.com/sol/hpack/pull/518