Packaging Haskell Environment for Mac App

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Packaging Haskell Environment for Mac App

Andrew Gibiansky
Hey all,

[This is an xpost from Reddit, where the post seems not to be showing up for some reason...]

I'd like to package the Haskell Platform and GHC (for GHC API) together in one bundle in order to distribute it with a Mac app. (Specifically, I am working on a Mac app for IHaskell, so beginners can download that to immediately get started playing with Haskell).

Does anyone have any experience with this? What's the easiest way to do this? My list of dependencies is fairly long:

  • Haskell Platform (well, all packages in it)
  • A few other packages installed via cabal
  • A native library (libzmq); cabal packages depend on it
  • Functioning Python > 2.6ish
  • GHC API

My current best idea is to package this all in a Virtualbox VM. I need to run a server that my Mac app client can use, so mount shared folders in the VM so that the VM can read/write to disk and expose some ports from the VM. If this is the best solution, what Linux distro would you suggest to use in the VM? I'd want something very lightweight.

I've also considered using Docker somehow, as IHaskell is already packaged with a Dockerfile. However, I'm not sure how I'd package docker so that its all doable via a single Mac app install.

Ideas? Suggestions?

Thanks! I know this isn't directly related to Haskell, but I'm hoping someone here has experience packaging Haskell applications.

-- Andrew Gibiansky


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Haskell Environment for Mac App

Bob Ippolito
Have you made any progress on this? I have some domain experience here; I built most of the infrastructure for packaging Python apps on Mac, although it's been years since I've touched any of that. I would be happy to pitch in now that I have a little more time on my hands.


On Thu, May 1, 2014 at 2:22 PM, Andrew Gibiansky <[hidden email]> wrote:
Hey all,

[This is an xpost from Reddit, where the post seems not to be showing up for some reason...]

I'd like to package the Haskell Platform and GHC (for GHC API) together in one bundle in order to distribute it with a Mac app. (Specifically, I am working on a Mac app for IHaskell, so beginners can download that to immediately get started playing with Haskell).

Does anyone have any experience with this? What's the easiest way to do this? My list of dependencies is fairly long:

  • Haskell Platform (well, all packages in it)
  • A few other packages installed via cabal
  • A native library (libzmq); cabal packages depend on it
  • Functioning Python > 2.6ish
  • GHC API

My current best idea is to package this all in a Virtualbox VM. I need to run a server that my Mac app client can use, so mount shared folders in the VM so that the VM can read/write to disk and expose some ports from the VM. If this is the best solution, what Linux distro would you suggest to use in the VM? I'd want something very lightweight.

I've also considered using Docker somehow, as IHaskell is already packaged with a Dockerfile. However, I'm not sure how I'd package docker so that its all doable via a single Mac app install.

Ideas? Suggestions?

Thanks! I know this isn't directly related to Haskell, but I'm hoping someone here has experience packaging Haskell applications.

-- Andrew Gibiansky


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Haskell Environment for Mac App

Andrew Gibiansky
I've done a bit more thinking but haven't gotten very far.

I found this (awesome!) article/writeup:


Although its tailored towards running multiple GHC versions on your own laptop, I think that perhaps it can be retrofitted towards bundling GHC+cabal in a *.app format instead. I haven't had the time to try it yet, though.

If you have some extra time to pitch in, I'd certainly gladly accept any help; ping me in private or via the IHaskell github and we can figure out how to best organize that. 

General advice or suggestions on things to do or things to avoid also welcomed.

-- Andrew


On Sun, May 18, 2014 at 8:33 AM, Bob Ippolito <[hidden email]> wrote:
Have you made any progress on this? I have some domain experience here; I built most of the infrastructure for packaging Python apps on Mac, although it's been years since I've touched any of that. I would be happy to pitch in now that I have a little more time on my hands.


On Thu, May 1, 2014 at 2:22 PM, Andrew Gibiansky <[hidden email]> wrote:
Hey all,

[This is an xpost from Reddit, where the post seems not to be showing up for some reason...]

I'd like to package the Haskell Platform and GHC (for GHC API) together in one bundle in order to distribute it with a Mac app. (Specifically, I am working on a Mac app for IHaskell, so beginners can download that to immediately get started playing with Haskell).

Does anyone have any experience with this? What's the easiest way to do this? My list of dependencies is fairly long:

  • Haskell Platform (well, all packages in it)
  • A few other packages installed via cabal
  • A native library (libzmq); cabal packages depend on it
  • Functioning Python > 2.6ish
  • GHC API

My current best idea is to package this all in a Virtualbox VM. I need to run a server that my Mac app client can use, so mount shared folders in the VM so that the VM can read/write to disk and expose some ports from the VM. If this is the best solution, what Linux distro would you suggest to use in the VM? I'd want something very lightweight.

I've also considered using Docker somehow, as IHaskell is already packaged with a Dockerfile. However, I'm not sure how I'd package docker so that its all doable via a single Mac app install.

Ideas? Suggestions?

Thanks! I know this isn't directly related to Haskell, but I'm hoping someone here has experience packaging Haskell applications.

-- Andrew Gibiansky


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe




_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Haskell Environment for Mac App

Carter Schonwald
In reply to this post by Bob Ippolito
You could perhaps adapt and pare down the Haskell platform install for Mac. 

In fact, there used to be Mac pkg builder in the ghc tree until a bit over a year ago 

On Sunday, May 18, 2014, Bob Ippolito <[hidden email]> wrote:
Have you made any progress on this? I have some domain experience here; I built most of the infrastructure for packaging Python apps on Mac, although it's been years since I've touched any of that. I would be happy to pitch in now that I have a little more time on my hands.


On Thu, May 1, 2014 at 2:22 PM, Andrew Gibiansky <<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;andrew.gibiansky@gmail.com&#39;);" target="_blank">andrew.gibiansky@...> wrote:
Hey all,

[This is an xpost from Reddit, where the post seems not to be showing up for some reason...]

I'd like to package the Haskell Platform and GHC (for GHC API) together in one bundle in order to distribute it with a Mac app. (Specifically, I am working on a Mac app for IHaskell, so beginners can download that to immediately get started playing with Haskell).

Does anyone have any experience with this? What's the easiest way to do this? My list of dependencies is fairly long:

  • Haskell Platform (well, all packages in it)
  • A few other packages installed via cabal
  • A native library (libzmq); cabal packages depend on it
  • Functioning Python > 2.6ish
  • GHC API

My current best idea is to package this all in a Virtualbox VM. I need to run a server that my Mac app client can use, so mount shared folders in the VM so that the VM can read/write to disk and expose some ports from the VM. If this is the best solution, what Linux distro would you suggest to use in the VM? I'd want something very lightweight.

I've also considered using Docker somehow, as IHaskell is already packaged with a Dockerfile. However, I'm not sure how I'd package docker so that its all doable via a single Mac app install.

Ideas? Suggestions?

Thanks! I know this isn't directly related to Haskell, but I'm hoping someone here has experience packaging Haskell applications.

-- Andrew Gibiansky


_______________________________________________
Haskell-Cafe mailing list
<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;Haskell-Cafe@haskell.org&#39;);" target="_blank">Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Haskell Environment for Mac App

Bob Ippolito
I would recommend avoiding anything related to pkgs or installation of any kind, what you really want is a relocatable (and read-only!) .app bundle that you can put wherever you want and it just works. The annoying part, in general, is making sure that nothing has hard-coded paths and for dynamic library references the install name is relative rather than absolute. The actual building of an .app bundle is a matter of putting a few files in the right place and creating an Info.plist file for the metadata.

The next (far more annoying and perhaps not really feasible) step would be trying to make it work sandboxed so you could distribute it in the app store.


On Sun, May 18, 2014 at 8:53 AM, Carter Schonwald <[hidden email]> wrote:
You could perhaps adapt and pare down the Haskell platform install for Mac. 

In fact, there used to be Mac pkg builder in the ghc tree until a bit over a year ago 


On Sunday, May 18, 2014, Bob Ippolito <[hidden email]> wrote:
Have you made any progress on this? I have some domain experience here; I built most of the infrastructure for packaging Python apps on Mac, although it's been years since I've touched any of that. I would be happy to pitch in now that I have a little more time on my hands.


On Thu, May 1, 2014 at 2:22 PM, Andrew Gibiansky <[hidden email]> wrote:
Hey all,

[This is an xpost from Reddit, where the post seems not to be showing up for some reason...]

I'd like to package the Haskell Platform and GHC (for GHC API) together in one bundle in order to distribute it with a Mac app. (Specifically, I am working on a Mac app for IHaskell, so beginners can download that to immediately get started playing with Haskell).

Does anyone have any experience with this? What's the easiest way to do this? My list of dependencies is fairly long:

  • Haskell Platform (well, all packages in it)
  • A few other packages installed via cabal
  • A native library (libzmq); cabal packages depend on it
  • Functioning Python > 2.6ish
  • GHC API

My current best idea is to package this all in a Virtualbox VM. I need to run a server that my Mac app client can use, so mount shared folders in the VM so that the VM can read/write to disk and expose some ports from the VM. If this is the best solution, what Linux distro would you suggest to use in the VM? I'd want something very lightweight.

I've also considered using Docker somehow, as IHaskell is already packaged with a Dockerfile. However, I'm not sure how I'd package docker so that its all doable via a single Mac app install.

Ideas? Suggestions?

Thanks! I know this isn't directly related to Haskell, but I'm hoping someone here has experience packaging Haskell applications.

-- Andrew Gibiansky


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe




_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Packaging Haskell Environment for Mac App

Corey O'Connor
How Mac implements dynamic library reference paths is documented here:


For a .app containing an install of the haskell platform I would think @executable_path should be used. I don't know how to apply that to a haskell platform build.

Cheers,
Corey



On Sun, May 18, 2014 at 9:37 AM, Bob Ippolito <[hidden email]> wrote:
I would recommend avoiding anything related to pkgs or installation of any kind, what you really want is a relocatable (and read-only!) .app bundle that you can put wherever you want and it just works. The annoying part, in general, is making sure that nothing has hard-coded paths and for dynamic library references the install name is relative rather than absolute. The actual building of an .app bundle is a matter of putting a few files in the right place and creating an Info.plist file for the metadata.

The next (far more annoying and perhaps not really feasible) step would be trying to make it work sandboxed so you could distribute it in the app store.


On Sun, May 18, 2014 at 8:53 AM, Carter Schonwald <[hidden email]> wrote:
You could perhaps adapt and pare down the Haskell platform install for Mac. 

In fact, there used to be Mac pkg builder in the ghc tree until a bit over a year ago 


On Sunday, May 18, 2014, Bob Ippolito <[hidden email]> wrote:
Have you made any progress on this? I have some domain experience here; I built most of the infrastructure for packaging Python apps on Mac, although it's been years since I've touched any of that. I would be happy to pitch in now that I have a little more time on my hands.


On Thu, May 1, 2014 at 2:22 PM, Andrew Gibiansky <[hidden email]> wrote:
Hey all,

[This is an xpost from Reddit, where the post seems not to be showing up for some reason...]

I'd like to package the Haskell Platform and GHC (for GHC API) together in one bundle in order to distribute it with a Mac app. (Specifically, I am working on a Mac app for IHaskell, so beginners can download that to immediately get started playing with Haskell).

Does anyone have any experience with this? What's the easiest way to do this? My list of dependencies is fairly long:

  • Haskell Platform (well, all packages in it)
  • A few other packages installed via cabal
  • A native library (libzmq); cabal packages depend on it
  • Functioning Python > 2.6ish
  • GHC API

My current best idea is to package this all in a Virtualbox VM. I need to run a server that my Mac app client can use, so mount shared folders in the VM so that the VM can read/write to disk and expose some ports from the VM. If this is the best solution, what Linux distro would you suggest to use in the VM? I'd want something very lightweight.

I've also considered using Docker somehow, as IHaskell is already packaged with a Dockerfile. However, I'm not sure how I'd package docker so that its all doable via a single Mac app install.

Ideas? Suggestions?

Thanks! I know this isn't directly related to Haskell, but I'm hoping someone here has experience packaging Haskell applications.

-- Andrew Gibiansky


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe




_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe