Open edgmnt opened 8 years ago
On initial inspection, it's not clear to me if appimage is distribution agnostic. Because it doesn't bundle everything there's the possibility of version mismatches? Flatpak looks more possible. That said, do you have examples of other compilers packaged in such a way? Distributing compilers this way feels somewhat different than distributing end-user applications -- some examples of how people have done this for one of these systems would be nice, to take inspiration from.
On initial inspection, it's not clear to me if appimage is distribution agnostic. Because it doesn't bundle everything there's the possibility of version mismatches?
AppImage is basically just a self-mounting filesystem that contains what you put in there. So, if you put the generic binaries from https://www.haskell.org/platform/#linux-generic inside an AppImage, the result should be no more and no less distribution agnostic than the generic binaries you used.
I have it working in principle, but I can't get Haskell Platform activated as non-root. Can someone help me here? This has nothing to do with AppImage specifically - imagine you extract the generic binaries from https://www.haskell.org/platform/#linux-generic at some random location in your $HOME
and want to activate/use them on a per-user basis, without being root. What are you supposed to do?
In case you are curious, here is the .yml
file that puts together the AppImage, and here is the file that runs it.
This ticket seems to be relevant: https://github.com/haskell/haskell-platform/issues/234
(It would be great if en passant to appimages or the like we also solved that more general non-root/relocatable problem in general)
I don't entirely understand the script in https://github.com/haskell/haskell-platform/issues/234#issuecomment-191046183 - where does this need to go? Do I have to run any other activate script in addition to it?
Not sure which script you mean. There, the script that's run on installing the generic distro is https://github.com/haskell/haskell-platform/blob/master/hptool/os-extras/posix/installer/install-haskell-platform.sh.mu
The suggestion is to then do a global find and replace on the bin subdirectory to fix up the following snippet, which is not a script per se, but is the header of each executable (since each are wrapped by a script that sets up their environment, and that script is hardcoded to the install location).
Its a bit weird to explain, but it makes sense once you just poke at the product of a generic install :-)
Each executable is wrapped in a script? Why that? Couldn't something like patchelf be used instead to set the library search path to $ORIGIN/../lib
or something along these lines?
This sets a variety of paths, not just library search paths. As to exactly why and how its done the way it is -- you'd have to ask the GHC team. To the best of my knowledge this is already the way ghc does things, and the platform just wraps it...
It sounds like a good way to install multiple versions of GHC on any Linux system, not only Ubuntu via ppa:hvr/ghc.
Consider packaging Haskell Platform for Flatpak, AppImage or Snap as Linux distribution-agnostic variants. It may even serve as a reference platform or testbed, since it's a better-controlled environment.