Hi David, Yes, this is possible. It didn't used to work fully, but now it does, and is merely a little wonky in the corners.
The magic all lies behind stack setup --stack-setup-yaml with which you can point at a config.yaml which says where to get each element. If you download the elements in advance and serve them up from a fresh (local) http server it will work. In addition I've found that copying the config.yaml into the stack root makes things work better (reasons not really clear...). There are certainly ways this could be easier - for example if the stack.yaml could point at the setup-yaml. Currently if you do stack build before stack setup with the right setup flag then everything gets a bit wonky and deleting stack root seems advisable. See https://docs.haskellstack.org/en/stable/yaml_configuration/#non-project-specific-config for some docs. A how-to guide for your situation would have been very useful when I attempted it, as I imagine inside some organisations it's quite a common thing to do. Note that there's no automatic way of mirroring just the packages you need, yet... Thanks, Neil On Sat, Jan 21, 2017 at 4:25 PM, David Sicilia <[email protected]> wrote: > Hi there, > > > I am behind a firewall with strict rules about downloading software from the > internet, > > so I would like to know if it is possible to download an entire stackage LTS > snapshot > > in one go and then serve it on a local server, to which we could then point > the stack tool. > > > By "snapshot" I would be referring to the source code for all packages > because > > we'd need to draw from that local server to build on both Linux and Windows. > > > For example, perhaps we'd be able to go to a server within the firewall and > run > > "stack new", then edit the yaml file to point it to a local stackage server > with given > > resolver number, then it would just behave normally from then on, except > always > > downloading packages from the local server. > > > What about compilers? I know that stack also downloads the compilers, so I > guess > > those would have to be included in the downloaded snapshot-package for > various > > platforms? > > > Any guidance would be appreciated, because we will not be able to make use > of > > stack/stackage without something like this! > > > Thank you > > David > > -- > You received this message because you are subscribed to the Google Groups > "haskell-stack" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/haskell-stack/0629a320-d923-47ae-9b8e-8d1828e5b66b%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "haskell-stack" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/CAKcFpm%2BMmg-BALg4Nbmk1Z4Tj40NZ4Wfb8W8dK-imzNfp8jHGw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
