It would be good if users of Mac OS X could install Elm via the Homebrew package manager, like so:
$ brew install elm
It seems that this could be implemented as a so-called "bottled" homebrew package which would avoid the need to depend on the entire Haskell Platform and Cabal. Also, elm-repl's dependency on Node.js could be managed by Homebrew.
I'd be happy to volunteer to do (and maintain) this work.
Thoughts?
Sounds great.
I'd be thankful if you did this.
Dylan Sale
On 28 Aug 2014 17:54, "Paul Burt" [email protected] wrote:
It would be good if users of Mac OS X could install Elm via the Homebrew
package manager https://github.com/Homebrew/homebrew, like so:$ brew install elm
It seems that this could be implemented as a so-called "bottled" homebrew
package which would avoid the need to depend on the entire Haskell Platform
and Cabal. Also, elm-repl's dependency on Node.js could be managed by
Homebrew.I'd be happy to volunteer to do (and maintain) this work.
Thoughts?
—
Reply to this email directly or view it on GitHub
https://github.com/elm-lang/Elm/issues/776.
Also in favor. Most people coding on a Mac will have homebrew installed (enough to make this worthwhile).
OK, I'll take a crack at it.
@peeb, thank you, this sounds like a good idea. I'd recommend following the elm-platform repo though, specifically the new-instructions branch for now.
That repos has scripts to bundle all elm command line tools as executables independent of Haskell. The Mac installer just places 4 or 5 binaries in the right directory and things just work. I don't know anything about brew, but that seems like the way to go.
Also, there's a slight chance that this repo is renamed to elm-compiler someday, so I'd kind of want to call things elm-platform in general.
@agazso, @laszlopandy, and I are trying to make it so it's possible to press a button and get out a bunch of installers so that releases are easier, so it'd be cool if the brew stuff could be part of that.
OK @evancz thanks for the heads up!
Essentially, Homebrew can either install from source or from what they call "bottles" - which are just pre-compiled binaries. Node.js, for example, is a bottled formula. These get installed into a Homebrew-managed directory and then symlinked into /usr/local (or wherever the user has opted to place their Homebrew installation).
The result would be the same as installing the existing .pkg file except that the files in /usr/local/bin and /usr/local/share would be symlinks.
I think it's desirable because it allows you to:
install, uninstall, upgrade lifecycleI will report back.
Cool, I'm excited for this :)
Quick update on this. After a lot of tinkering and trying things out, the cleanest way to get Elm (and PureScript for that matter) installed via Homebrew is actually already in place:
$ brew install cabal-install
$ cabal update
$ cabal install elm ....
Originally I had thought that creating a dependency on Node might be desirable, but there are at least 4 ways to install Node on Mac OS X - Homebrew itself has 2 ways (brew install node and brew install nvm) so this dependency would have to remain "soft", in any case.
It strikes me that the above steps are already pretty straightforward for casual users so I would suggest closing this ticket.
For users who prefer not to build from source, Homebrew Cask is a viable alternative. We offer the standard Elm Platform distribution, which I have been tracking for the past few months.
As a collaborator of Homebrew Cask, I am compelled to note that our infrastructure is not fully mature; most notably, we lack an upgrade verb.
Alright, I am going to close as an issue that it is not possible to address in this repo. I have seen some discussions about getting this kind of thing maintained since this issue, and I think we'd need to do it as part of elm-platform or ideally as an independently maintained thing.
So what's the verdict on this? Virtually all programming languages/platforms are installed via Homebrew on OS X since that makes clean upgrades and uninstalls possible, and it adds a level of security to the installation. Isolated .pkgs are discouraged.
A proper homebrew formula would be welcome, but the issue should be tracked in the elm-platform repo https://github.com/elm-lang/elm-platform instead of here.
Elm can be installed using Homebrew Cask:
brew cask install elm-platform
This is broken, at least for me, now:
$ brew cask install elm-platform
[snip]
==> Downloading http://install.elm-lang.org/Elm-Platform-0.18.pkg
curl: (6) Could not resolve host: install.elm-lang.org
Error: Download failed on Cask 'elm-platform' with message: Download failed: http://install.elm-lang.org/Elm-Platform-0.18.pkg
Ah, but this now works just fine:
brew install elm
Most helpful comment
Elm can be installed using Homebrew Cask: