New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package IHaskell [$25 awarded] #205
Comments
Not just for Haskell end-users, it's apparently even hard for people who have used Haskell a bit to get it to install :) |
The packaging will be intended for intro users, and might not support things such as using the system-installed cabal. But installation and compilation issues will be addressed ASAP as well :) I'm currently thinking of handling the packaging by bundling a Vagrant machine with everything. We'll see how it goes. |
I'll start looking into what it would take to make a self-contained relocatable GHC on Mac, which could then be leveraged for IHaskell. I dug around a bit in the GHC 7.8.2 binary distribution and the only non-relocatable stuff I found were the package.conf.d files which might be able to be rewritten to use |
Great! IHaskell isn't currently upgraded to GHC 7.8, but should be soonish. |
Here's a proof of concept that wraps up GHC in a relocatable way https://github.com/etrepum/ghc-dot-app |
http://ghcformacosx.github.io/ – ping me when 7.8.2 support happens and I'll take a stab at doing something similar for IHaskell |
This is awesome. I'll try to get IHaskell on GHC 7.8 ASAP, I really want to |
@etrepum 7.8.2 support is here! On branch I have a pretty Obj-C/Cocoa app that I'd like to stick IHaskell in. This app simply relies on IHaskell already running on a given port. How might I package this app with IHaskell so that everything works locally without sticking stuff in other filesystem places? |
I'm out of town this week but will try and take a look mid next week when I'm done catching up with other things. It really depends on how amenable the dependencies are to relocation. Is that app open source somewhere? I can poke at it and see what it would take to integrate the two. The current ghc-dot-app is in two very distinct pieces, a simple Haskell build script that forces GHC into a relocatable state, and then a Cocoa app that assumes that all of the GHC files are in the right place in the application bundle (which is handled by calling out to the build script and rsync from the xcode project). |
It's a pretty simple app: https://github.com/gibiansky/ihaskell-app I'm not sure it's really all that relevant. Would be nice to package IPython with it, too. Any suggestions on how to do that? Or just let IHaskell install it itself on first run? |
Cool, I'll take a look at making this happen this week. The app I built for the helper tool is actually kinda similar, I use Xcode to build it (mostly to get all of the Info.plist and icons generated properly) but I didn't use nibs and it's just a webkit shell: https://github.com/ghcformacosx/ghc-dot-app/blob/master/GHC/GHC/GHCAppDelegate.m |
Haven't had a chance to make much progress yet, but just wanted to make some notes in here. It seems the "state of the art" for embedding IPython into an app is these two projects:
|
So far I've just managed to get IHaskell to build properly, haven't worked on the relocatable app part just yet. Here's all of the steps from fresh homebrew + GHC install to working build (given my relocatable branch which makes a few smallish changes) https://github.com/etrepum/IHaskell/tree/relocatable brew tap homebrew/versions
brew install gcc48
brew install cairo --without-x11
brew install pango --without-x11
brew install zeromq
brew install libmagic
brew install python
cabal sandbox init
cabal install --only-dependencies --package-db=clear --package-db=global
cabal install magic --package-db=clear --package-db=global --extra-lib-dirs=/usr/local/lib --extra-include-dirs=/usr/local/include
cabal install gtk2hs-buildtools --package-db=clear --package-db=global
cabal install cairo glib pango --package-db=clear --package-db=global --with-gcc=gcc-4.8
./build.sh all display
here=$PWD
(cd $TMPDIR; bash $here/installation/virtualenv.sh --always-copy $here/env)
bash installation/ipython.sh env
python $TMPDIR/virtualenv-1.11.6/virtualenv.py --relocatable $here/env
./.cabal-sandbox/bin/IHaskell -i $PWD/env/bin/ipython notebook I'm not 100% sure the package-db flags are necessary but I wanted to do my best to avoid picking up things I have installed in my ~/.ghc. |
That looks good. Let me know if I can help or add any features to make it easier :) |
Having again run into issues with installing IHaskell, I'm very interested in this. However, I'm curious about how closely the Haskell-environment required to build IHaskell is tied to the environment that you are actually evaluating code in. If it was not possible to install any new libraries etc, it would be quite useless to me. Currently I am struggling to install IHaskell because I tried using Stackage, which has worked great for other libraries, but which only supplies for example haskell-src-exts 0.16, which does not work with IHaskell... It would be great to just get the IHaskell binary, and then be able to use that with whatever other libraries I want (I limitation in GHC version could be acceptable). So I'm not so concerned with having everything in a GUI executable (although that would be neat for some people), but more to be able to quickly get the latest version of IHaskell without having to worry about all the dependencies... (Adding IHaskell to Stackage would be another way of getting this, but it would mean aligning with the versions of libraries that are current there). |
Using Halcyon, I have repackaged IHaskell as Instant IHaskell. Instant IHaskell can be installed with a single command, complete with all of its display modules. The same command can build IHaskell from scratch, or restore IHaskell using previously-built archives — in seconds.
A couple caveats — this is freshly made, and while I have verified all display modules appear to work, I have not done any serious testing. Additionally:
The Halcyon-specific magic files are contained in a single directory. The purpose of each magic file is explained in the Halcyon user’s reference. Please also see the section on declaring dependencies in the Halcyon user’s guide. |
Very cool! With regards to "I have pulled out the main IHaskell executable into a separate package", is that something that you think should be changed about the main repo? Also, I do not have access to a Ubuntu box to test his at the moment (though I may spin up an AWS server for it) – is it possible to do this all on a Mac? (The Halcyon documentation is a little unclear on this point. I find it a little strange that it writes into a nonexistent |
Ah, nevermind, just saw the 'supported platforms' bit. |
The documentation is still a work in progress, and definitely needs to be improved. Comments are welcome. Initially, Halcyon started out as supporting Ubuntu only, and support for other distros is a recent addition. Halcyon does work on OS X, but automatic installation of native OS packages is not yet supported there. Getting an Ubuntu test box is easiest on DigitalOcean — they spin up in under 60 seconds, and can be set up for Halcyon in about the same time. The |
@houshuang Check out Kronos Haskell. |
@mietek I'm closing this issue as I meant it mostly for Kronos Haskell but I experimented a bit with BountySource so there's a $25 bounty on it. If you want to claim it please do so – your work on Halcyon is pretty awesome! (I came to the conclusion that I am not a big fan of BountySource... I do not like their model very much.) Other issues with more specific requests can be opened – things like packaging for Windows via virtual machine, packaging for homebrew or apt-get, etc, are still valid and potentially desirable. |
Thanks. As an update — Instant IHaskell now supports one-click deployment to DigitalOcean instances running Ubuntu 14.04. CentOS 7 is not fully supported yet, as a problem with My packaging should also allow IHaskell to be deployed to Heroku. Unfortunately, the 1.6GB installation directory chokes Heroku’s internal distribution systems. Hopefully, this will be fixed in the future, and everyone will be able to spin up their own IHaskell instances, for free, on Heroku. |
This is a while out, but it might be nice to package IHaskell nicely for end-users that aren't as experienced with Haskell.
Other ideas:
Not sure which of these are worthwhile, but might be a good effort to get IHaskell and Haskell out to a wider audience.
The $25 bounty on this issue has been claimed at Bountysource.
The text was updated successfully, but these errors were encountered: