Skip to content

Instantly share code, notes, and snippets.

@felixbuenemann
Last active April 21, 2021 23:54
Show Gist options
  • Save felixbuenemann/ccc7cf3797e8f2513b80 to your computer and use it in GitHub Desktop.
Save felixbuenemann/ccc7cf3797e8f2513b80 to your computer and use it in GitHub Desktop.
Homebrew formula for official ghc 7.10.2 binaries
class Ghc < Formula
desc "Glorious Glasgow Haskell Compilation System"
homepage "https://haskell.org/ghc/"
url "https://downloads.haskell.org/~ghc/7.10.2/ghc-7.10.2-x86_64-apple-darwin.tar.xz"
sha256 "ef0f00885096e3621cec84a112dfae050cf546ad39bdef29a7719407c6bc5b36"
def install
system "./configure", "--prefix=#{prefix}"
ENV.deparallelize { system "make", "install" }
end
test do
(testpath/"hello.hs").write('main = putStrLn "Hello Homebrew"')
system "runghc", testpath/"hello.hs"
end
end
@felixbuenemann
Copy link
Author

Install official ghc 7.10.2 binaries using homebrew

Usage:

rm -f $(brew --cache)/ghc-7.10.2.tar.xz
brew install https://gist.githubusercontent.com/felixbuenemann/ccc7cf3797e8f2513b80/raw/fea13175bd982783abc8e4b4fea767620c154f3a/ghc.rb

The rm -f is to remove conflicting source tarballs from the official ghc homebrew formula.

@magnusart
Copy link

Would you mind updating this to use 7.10.3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment