[Haskell-cafe] Offline compilation with Stack/Cabal
Ivan Lazar Miljenovic
ivan.miljenovic at gmail.com
Thu Nov 24 12:40:49 UTC 2016
On 24 November 2016 at 23:34, Jan von Löwenstein
<jan.loewenstein at gmail.com> wrote:
> Thanks for all the responses.
> I couldn't yet find an option in stack to point to local source tarballs.
> Custom snapshots at least currently only support Hackage packages and that
> was the closest I found.
> I briefly looked into `stack unpack <package>`, that might indeed provide a
> workable solution. Although options other than the list of packages would
> have to be duplicated between my "normal" stack.yaml and the one I use to
> enable offline compilation.
> I already thought about that, yackage sounds like a package that would help
> implement it. Not sure if I like that option very much though.
> Not sure if I get your proposal.
> Running `stack build --prefetch --dry-run` lists my local packages as "Would
> build". How would I get source tarballs of my dependencies and how would I
> build them on an offline machine?
> David Turner <dct25-561bs at mythic-beasts.com> schrieb am Do., 24. Nov. 2016
> um 10:13 Uhr:
>> stack build --prefetch --dry-run
>> get close to what you want? That seems to download all the necessary
>> packages, and by using stack you get the ability to share compiled
>> dependencies between packages.
>> On 24 November 2016 at 06:57, Jan von Löwenstein
>> <jan.loewenstein at gmail.com> wrote:
>>> Consider the following use case:
>>> I have to ship a Haskell application as source, bundled with its
>>> dependencies and a script that can produce the binary on a machine without
>>> internet connectivity.
>>> Is that possible with Stack or Cabal?
>>> Any pointers would be much appreciated.
>>> Ideally I would like to build each dependency package individually. That
>>> way I could cache results per Haskell package and don't need to rebuild
>>> dependencies until they actually change.
>>> Haskell-Cafe mailing list
>>> To (un)subscribe, modify options or view archives go to:
>>> Only members subscribed via the mailman list are allowed to post.
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
More information about the Haskell-Cafe