Files
chromebrew/packages/ghc.rb
chromebrew-actions[bot] fff854ebab updater-ghc-9.12.2 — ghc → 9.12.2 (#12590)
* Add unbuilt ghc to updater-ghc-9.12.2

* updater-ghc-9.12.2: Build Run on linux/amd64.

---------

Co-authored-by: satmandu <satmandu@users.noreply.github.com>
Co-authored-by: chromebrew-actions[bot] <chromebrew-actions[bot]@users.noreply.github.com>
2025-08-21 18:47:35 +00:00

28 lines
640 B
Ruby

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 '9.12.2-release'
license 'BSD'
compatibility 'x86_64'
source_url 'SKIP'
no_compile_needed
depends_on 'libtinfo'
depends_on 'stack'
def self.build
system "stack setup ghc-#{version}"
File.write 'ghc', <<~EOF
#!/bin/bash
stack exec -- ghc "$@"
EOF
end
def self.install
FileUtils.install 'ghc', "#{CREW_DEST_PREFIX}/bin/ghc", mode: 0o755
end
end