<div dir="ltr"><div>Hi,<br></div>it seems that 'cabal configure' fails if some 
dependencies are missing. Then cabal copy complains that I should run 
'cabal configure' first...</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 11, 2014 at 4:23 PM, Tom Feron <span dir="ltr"><<a href="mailto:tho.feron@gmail.com" target="_blank">tho.feron@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 Corentin,<div><br></div><div>I think you're searching for `cabal configure && cabal copy`. It will still have an exit code of 1 if you don't compile anything but it will copy the files from data-files (and alike).</div>

<div><br></div><div>On my machine, it copies share/index.html into .cabal-sandbox/share/x86_64-openbsd-ghc-7.6.3/dummy-0.1.0.0/share/index.html.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Tom</div>
</font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On 11 June 2014 16:00, Corentin Dupont <span dir="ltr"><<a href="mailto:corentin.dupont@gmail.com" target="_blank">corentin.dupont@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"><div>In the .cabal file you can put a directive "data-files" and they will be deployed in ~/.cabal/share...<br></div>I want to trigger only this.<br></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">
On Wed, Jun 11, 2014 at 3:40 PM, Tom Nielsen <span dir="ltr"><<a href="mailto:tanielsen@gmail.com" target="_blank">tanielsen@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">Not sure what you mean - cabal doesn't do any deployment, or at least I have not found a useful way of making it do so. In our case the deployment is done by running apt-get update && apt-get install on the server.<span><font color="#888888"><div>




<br></div><div>Tom<br><div>
<br></div><div><br></div></div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 11, 2014 at 3:18 PM, Corentin Dupont <span dir="ltr"><<a href="mailto:corentin.dupont@gmail.com" target="_blank">corentin.dupont@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"><div>Thanks for your response!<br></div>Is there a way to ask Cabal to just deploy the resources and not compile everything?<br>




<br></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 11, 2014 at 11:47 AM, Tom Nielsen <span dir="ltr"><<a href="mailto:tanielsen@gmail.com" target="_blank">tanielsen@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">We package up the executables and other files into a Debain .deb package using fpm after running cabal. Here is an example Makefile which runs cabal, creates the debian package and adds it to our apt server:<div>







<br></div><div><a href="https://github.com/openbrainsrc/debcd/blob/master/Makefile" target="_blank">https://github.com/openbrainsrc/debcd/blob/master/Makefile</a><br></div><div><br></div><div>This is run by our CI server after every commit to GitHub.</div>





<span><font color="#888888">

<div><br></div><div>Tom<br></div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 11, 2014 at 11:33 AM, Vo Minh Thu <span dir="ltr"><<a href="mailto:noteed@gmail.com" target="_blank">noteed@gmail.com</a>></span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
These days, an increasingly popular solution to package an application<br>
with its dependencies is to use Docker. You can build the Docker image<br>
locally and push it to a Docker registry and retrieve it on your<br>
remote machine, or you can dump it as a tarball and load it on your<br>
remote machine.<br>
<br>
You have different ways to create the Docker image, one of which would<br>
be similar to pushing your Haskell binary to your remote machine. That<br>
way is simply to compile your exectuable locally, and copy it to the<br>
remote machine with is assets if any (you might even move it to a<br>
.cabal directory as if it was installed through `cabal install`). By<br>
default your executable will be statically linked, except for libgmp<br>
that you have to install on the remote machine.<br>
<br>
I recommand you look into Docker. You will be able to e-use its<br>
knowledge to package increasingly complex applications (that might<br>
have more numerous dependencies that you wouldn't have to manage on<br>
the host).<br>
<br>
HTH,<br>
Thu<br>
<br>
2014-06-11 12:24 GMT+02:00 Corentin Dupont <<a href="mailto:corentin.dupont@gmail.com" target="_blank">corentin.dupont@gmail.com</a>>:<br>
<div><div>> Hi guys!<br>
> Is there a procedure to deploy a Haskell application?<br>
> I have an Amazon EC2 micro instance to run my application, but it's way too<br>
> small to compile it using cabal (compilation takes half a day rouhgly), so I<br>
> compile it on my computer.<br>
> Is there a convenient way to bundle the executable with the resources and<br>
> ship it to the server?<br>
><br>
> Thanks!<br>
> Corentin<br>
><br>
</div></div>> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org" target="_blank">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>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">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>
</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>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">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>
</div></div></blockquote></div><br></div>