<div dir="ltr">IIUC, you can set additional flags in your stack.yaml file:<div><br></div><div>flags:</div><div> ncurses:</div><div> flagname: true # or false</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 5, 2018 at 7:35 PM John Z. <<a href="mailto:johnz@pleasantnightmare.com">johnz@pleasantnightmare.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
I'll try with tl:dr; first:<br>
I have a project with a dependency that -on my system- needs a build<br>
flag, in order to correctly link against its native dependencies.<br>
What is a proper way to set up a project like this?<br>
<br>
A longer explanation:<br>
My project uses `ncurses` library and I'm running Arch. There seems<br>
to be some religious opinion going around about the layout of<br>
ncurses headers in /usr/include, and -naturally- Arch and `ncurses`<br>
disagree. Fortunately, author of `ncurses` included a build flag to<br>
allow (easy) build on systems which follow the 'wrong' layout.<br>
<br>
Thing is, I couldn't figure out how to add this configuration to the<br>
.cabal of my own project, so for now, I'm stuck with a Makefile that<br>
invokes `stack` commands with `--flag ncurses:force-narrow-library`.<br>
I looked in the manual and there doesn't seem to be a way to handle<br>
this aside the commandline argument.<br>
<br>
So this got me thinking - is there a different way projects like<br>
these are supposed to be organized? For example, am I supposed to<br>
check out `ncurses` as a submodule of my project, then replicate<br>
this build flag on my own project and 'pass it down' somehow?<br>
<br>
Any tips are highly appreciated; I'm really not proficient with<br>
organizing stack projects properly.<br>
<br>
Cheers!<br>
<br>
<br>
<br>
-- <br>
"That gum you like is going to come back in style."<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>