<div dir="ltr">What I have always done to solve this is to create a custom Setup.hs. Something like:<div><br></div><div>Setup.hs</div><div>-------------</div><div>import Distribution.Simple</div><div><br></div><div>main :: IO ()</div>
<div>main = doThisBeforeInstall >> defaultMain</div><div>-------------<br></div><div><br></div><div>Then you specify in your .cabal file that the Build-Type is Custom.</div><div><br></div><div>Best regards,</div><div>
Daniel Díaz.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 16, 2013 at 11:58 AM, Alfredo Di Napoli <span dir="ltr"><<a href="mailto:alfredo.dinapoli@gmail.com" target="_blank">alfredo.dinapoli@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">Hello guys,<div><br></div><div>I'm pretty sure the answer is "no", but I was hoping to get some extra insight / best practices. The problem can be summarised by this SO question (not the OP, but I have the same problem):</div>
<div><br></div><div><a href="http://stackoverflow.com/questions/15731170/cabal-how-to-add-text-file-as-a-build-dependency" target="_blank">http://stackoverflow.com/questions/15731170/cabal-how-to-add-text-file-as-a-build-dependency</a><br>
</div><div><br></div><div>As someone states, "data-files" in for run-time, whereas I need to tell cabal "please copy these files in place before trying to compile", so at compile-time.</div><div><br></div>
<div>Does something similar exist?</div><div><br></div><div>I think the best solution, unless someone prove me wrong, is to create a small startup script which copies the files for me (I *think* yesod is using something similar, namely a script called EmbeddedFiles.hs) and then triggers "cabal install" the usual way. Can you come up with a better way?</div>
<div><br></div><div>Thanks in advance!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Alfredo</div></font></span></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>