<commit_before>pkg_name=ghcjs
pkg_origin=alasconnect
commit_hash=7361890
pkg_version=0.2.1-${commit_hash}
pkg_maintainer="AlasConnect LLC <<EMAIL>>"
pkg_license=('MIT')
pkg_upstream_url=https://github.com/ghcjs/ghcjs
pkg_description="GHCJS is a Haskell to JavaScript compiler that uses the GHC API."
pkg_source=https://api.github.com/repos/ghcjs/ghcjs/tarball/${commit_hash}
pkg_filename=${pkg_name}-${pkg_version}.tar.gz
pkg_shasum=bddc12c4f0630bd1ae6bb854b5a1e0d2c51cc6ae7f566c5478437f1a514a8d42
pkg_dirname=ghcjs-ghcjs-${commit_hash}

pkg_bin_dirs=(bin)

ghc_version=8.0.2

pkg_deps=(
  core/glibc
  core/gmp/6.1.0/20170513202112
  core/libffi
  core/libiconv
  alasconnect/ncurses
)

pkg_build_deps=(
  alasconnect/ghc/${ghc_version}
  alasconnect/cabal-install
  core/gcc
  core/coreutils
  alasconnect/happy
  alasconnect/alex
)

do_clean() {
  return 0
  do_default_clean

  rm -rf /root/.cabal
}

do_build() {
  # Setup /usr/bin/env as ghcjs compile looks for it
  ln -sfv "$(pkg_path_for coreutils)"/bin/env /usr/bin/env

  export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(pkg_path_for core/gcc)/lib"

  cabal update

  cabal install --only-dependencies
  cabal build
}

do_install() {
  attach
  cabal install --prefix="$pkg_prefix"
}

do_end() {
  rm -fv /usr/bin/env
}<commit_msg>Updated GHCJS to build from GHC-8.0 branch releases<commit_after>pkg_name=ghcjs
pkg_origin=alasconnect
pkg_version=0.2.1
pkg_maintainer="AlasConnect LLC <<EMAIL>>"
pkg_license=('MIT')
pkg_upstream_url=https://github.com/ghcjs/ghcjs
pkg_description="GHCJS is a Haskell to JavaScript compiler that uses the GHC API."
pkg_source=http://ghcjs.luite.com/ghc-8.0.tar.gz
pkg_filename=${pkg_name}-${pkg_version}.tar.gz
pkg_shasum=b2070325fa4ae55c2000d5e61a782e26198ccea292a3c82c8ac2919334e8768a

pkg_bin_dirs=(bin)
pkg_lib_dirs=(lib)

ghc_version=8.0.2

pkg_deps=(
  core/glibc
  core/gmp/6.1.0/20170513202112
  core/libffi
  core/libiconv
  alasconnect/ncurses
  core/node
)

pkg_build_deps=(
  alasconnect/ghc/${ghc_version}
  alasconnect/cabal-install
  core/gcc
  core/coreutils
  alasconnect/happy
  alasconnect/alex
  # core/git
  # core/make
  # core/autoconf
)

do_clean() {
  do_default_clean

  rm -rf /root/.cabal
}

do_build() {
  # Setup /usr/bin/env as ghcjs compile looks for it
  ln -sfv "$(pkg_path_for coreutils)"/bin/env /usr/bin/env

  export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(pkg_path_for gcc)/lib"

  cabal sandbox init
  cabal update

  cabal install --only-dependencies
  cabal build
}

do_install() {
  cabal install --prefix="$pkg_prefix"
  # attach
  # $pkg_prefix/bin/ghcjs-boot \
  #   --with-gmp-includes="$(pkg_path_for gmp)/include" \
  #   --with-gmp-libraries="$(pkg_path_for gmp)/lib" \
  #   --with-iconv-includes="$(pkg_path_for libiconv)/include" \
  #   --with-iconv-libraries="$(pkg_path_for libiconv)/lib"
}

do_end() {
  rm -fv /usr/bin/env
}
{'fraction_non_alphanumeric': 0.1300557880055788, 'fraction_numerical': 0.04811715481171548, 'mean_word_length': 4.549323017408124, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6762030', 'n_tokens_mistral': 1309, 'n_tokens_neox': 1221, 'n_words': 180}