Ghc 8.8.3 => 9.0.2 (#9679)

This commit is contained in:
Ed Reel
2024-04-19 05:41:33 -05:00
committed by GitHub
parent 56e8415d3f
commit 0375a25dcd

View File

@@ -3,24 +3,24 @@ require 'package'
class Ghc < Package
description 'The Glasgow Haskell Compiler is a state-of-the-art, open source compiler and interactive environment for the functional language Haskell.'
homepage 'https://www.haskell.org/ghc/'
version '8.8.3'
version '9.0.2'
license 'BSD'
compatibility 'all'
source_url 'https://downloads.haskell.org/~ghc/8.8.3/ghc-8.8.3-src.tar.xz.sig'
source_sha256 'fcdb99dabdf74c5a0607df5276df2cd12b8b7bedcac4079546bb9418c8438f02'
compatibility 'x86_64'
source_url 'SKIP'
no_compile_needed
depends_on 'stack'
depends_on 'libtinfo'
def self.build
system "stack setup ghc-#{version}"
system "echo '#!/bin/bash' > ghc"
system "echo 'stack exec -- ghc \"\$@\"' >> ghc"
File.write 'ghc', <<~EOF
#!/bin/bash
stack exec -- ghc "$@"
EOF
end
def self.install
system "install -Dm755 ghc #{CREW_DEST_PREFIX}/bin/ghc"
FileUtils.install 'ghc', "#{CREW_DEST_PREFIX}/bin/ghc", mode: 0o755
end
end