<div dir="ltr">You need to specify the flag in the stack.yaml file, via something like:<div><br></div><div>flags:</div><div> gtk:</div><div> have-quartz-gtk: true</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 8, 2016 at 7:45 AM, frantisek kocun <span dir="ltr"><<a href="mailto:frantisek.kocun@gmail.com" target="_blank">frantisek.kocun@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is there a way to specify these flags in cabal file? I'm sure this will resolve my issue<div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 8, 2016 at 12:43 AM, frantisek kocun <span dir="ltr"><<a href="mailto:frantisek.kocun@gmail.com" target="_blank">frantisek.kocun@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This works for me<div>
<p><span>$ stack build gtk --flag gtk:have-quartz-gtk</span></p><p>but I sitll need to specify gtk also in cabal file (having it only in stack.yaml do not find the package)</p><p>but then I get</p><p>$ stack build</p><p>
</p><p><span>gtk-0.13.9: unregistering (flags changed from ["-fhave-quartz-gtk"] to [])</span></p></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 8, 2016 at 12:16 AM, frantisek kocun <span dir="ltr"><<a href="mailto:frantisek.kocun@gmail.com" target="_blank">frantisek.kocun@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I found this<div>
<p><span>cabal install gtk -fhave-quartz-gtk --reinstall</span></p><p><span>but it does not help me when I run stack build afterwards..</span></p></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 7, 2016 at 11:13 PM, frantisek kocun <span dir="ltr"><<a href="mailto:frantisek.kocun@gmail.com" target="_blank">frantisek.kocun@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Found that gtk was not installed. So I did<div> brew install gtk</div><div><br></div><div>but I got different problem</div><div><br></div><div>
<p><span>[ 22 of 209] Compiling Graphics.UI.Gtk.Embedding.Plug ( .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Graphics/UI/Gtk/Embedding/Plug.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/Graphics/UI/Gtk/Embedding/Plug.o )</span></p>
<p><span> </span></p>
<p><span> Graphics/UI/Gtk/Embedding/Plug.chs:120:6:</span></p>
<p><span> Couldn't match expected type ‘Ptr ()’</span></p>
<p><span> with actual type ‘Maybe DrawWindow’</span></p>
<p><span> In the first argument of ‘gtk_plug_new’, namely</span></p>
<p><span> ‘(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’</span></p>
<p><span> In the second argument of ‘($)’, namely</span></p>
<p><span> ‘gtk_plug_new</span></p>
<p><span> (fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’</span></p></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 7, 2016 at 10:46 PM, frantisek kocun <span dir="ltr"><<a href="mailto:frantisek.kocun@gmail.com" target="_blank">frantisek.kocun@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I'm new to cabal/stack. I want to use "stack build" to build my project.</div><div><br></div><div>I can not use latest gkt >= 0.14.2 because of<br></div><div> setup: The pkg-config package 'cairo' version >=1.2.0 is required but it could<br></div><div><br></div><div>Neither can I now use older version gtk >=0.12.0 && < 0.13</div><div>
<p><span>While constructing the BuildPlan the following exceptions were encountered:</span></p>
<p><span>-- Failure when adding dependencies: </span></p>
<p><span> gtk: needed (>=0.12.0 && <0.13), 0.14.2 found (latest version available)</span></p>
<p><span> needed for package: ships-0.1.0.0</span></p><p><span><br></span></p><p><span><br></span></p><p><span>What can i do? Thanks</span></p></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>