Per-package extra-include-dirs/extra-lib-dirs

61 views
Skip to first unread message

Adam Bergmark

unread,
Aug 25, 2016, 7:28:58 AM8/25/16
to haskell-stack
Hi,

I'm struck by https://github.com/phonohawk/HsOpenSSL/issues/41 where one solution is to specify extra-include-dirs and extra-lib-dirs to use when compiling HsOpenSSL. 

One way is to add these to the stack.yaml's of all projects that use HsOpenSSL along with  ~/.stack/global-project/stack.yaml. This could be added to the stack.yaml template but for shared stack.yaml's this is cruft for non-OS X users.

Another way is to set this globally in ~/.stack/config.yaml. The disadvantage here is that this flag is set for local packages *and* extra-deps, so when building unrelated things I get recompiles along these lines: "haskell-src-exts-1.18.2: unregistering (flags changed from [] to ["--extra-include-dirs=/usr/local/opt/openssl/include","--extra-lib-dirs=/usr/local/opt/openssl/lib"])".

Optimally I would be able to specify this globally in ~/.stack/config.yaml but only have it apply to HsOpenSSL.

As far as I can see this is not possible at the moment. Has it been discussed? Do you think it's a good idea?

Regards,
Adam

Michael Sloan

unread,
Sep 23, 2016, 4:24:41 PM9/23/16
to Adam Bergmark, haskell-stack
Hi Adam!

Thanks for emailing the list, I am currently processing my big backlog of email.  I've turned this into a stack issue: https://github.com/commercialhaskell/stack/issues/2626  What do you think of that approach?

-Michael

--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stack+unsubscribe@googlegroups.com.
To post to this group, send email to haskel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/CACnqJZYhm73Dz6p25KF7aUhRxH9iiTR8bz3ru28rCshx3rGZrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Adam Bergmark

unread,
Sep 25, 2016, 7:11:55 AM9/25/16
to Michael Sloan, haskell-stack
That looks exactly like what I need, thanks Michael!




On Fri, Sep 23, 2016 at 10:24 PM Michael Sloan <sl...@fpcomplete.com> wrote:
Hi Adam!

Thanks for emailing the list, I am currently processing my big backlog of email.  I've turned this into a stack issue: https://github.com/commercialhaskell/stack/issues/2626  What do you think of that approach?

-Michael

On Thu, Aug 25, 2016 at 4:28 AM, Adam Bergmark <ad...@bergmark.nl> wrote:
Hi,

I'm struck by https://github.com/phonohawk/HsOpenSSL/issues/41 where one solution is to specify extra-include-dirs and extra-lib-dirs to use when compiling HsOpenSSL. 

One way is to add these to the stack.yaml's of all projects that use HsOpenSSL along with  ~/.stack/global-project/stack.yaml. This could be added to the stack.yaml template but for shared stack.yaml's this is cruft for non-OS X users.

Another way is to set this globally in ~/.stack/config.yaml. The disadvantage here is that this flag is set for local packages *and* extra-deps, so when building unrelated things I get recompiles along these lines: "haskell-src-exts-1.18.2: unregistering (flags changed from [] to ["--extra-include-dirs=/usr/local/opt/openssl/include","--extra-lib-dirs=/usr/local/opt/openssl/lib"])".

Optimally I would be able to specify this globally in ~/.stack/config.yaml but only have it apply to HsOpenSSL.

As far as I can see this is not possible at the moment. Has it been discussed? Do you think it's a good idea?

Regards,
Adam

--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stac...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stac...@googlegroups.com.

To post to this group, send email to haskel...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages