hpack icon indicating copy to clipboard operation
hpack copied to clipboard

support for foreign library artifacts (cabal 'foreign-library' stanza)

Open aztecrex opened this issue 7 years ago • 8 comments

This capability would allow us to easily configure shared native library output with hpack.

aztecrex avatar Jan 28 '18 17:01 aztecrex

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.

sol avatar Feb 02 '18 05:02 sol

According to the changelog, it was added in v2.0.0.2.

koflerdavid avatar May 12 '18 15:05 koflerdavid

https://qnikst.github.io/posts/2018-05-02-cabal-foreign-library.html

i would like the feature too

flip111 avatar Dec 29 '18 00:12 flip111

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.

sol avatar Dec 30 '18 13:12 sol

I'd like this feature too!

isovector avatar Jun 03 '19 15:06 isovector

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?

Krantz-XRF avatar Oct 28 '19 03:10 Krantz-XRF

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 :).

minimapletinytools avatar Dec 31 '19 16:12 minimapletinytools

PR for a basic attempt at this feature: https://github.com/sol/hpack/pull/518

ropwareJB avatar Jul 22 '22 06:07 ropwareJB