<commit_before><commit_msg>Install a newer version of cabal into the environment<commit_after>name "cabal-install"
default_version "1.20.0.1"

dependency 'curl'

cabal_install = ["/usr/bin/cabal install",
                 "--prefix=#{install_dir}/embedded",
                 "--extra-include-dirs=#{install_dir}/embedded/include",
                 "--extra-include-dirs=#{install_dir}/embedded/include/openssl",
                 "--extra-include-dirs=#{install_dir}/embedded/include/curl",
                 "--extra-lib-dirs=#{install_dir}/embedded/lib"].join(" ")

cabal_sandbox = ["#{install_dir}/embedded/bin/cabal",
                 "sandbox --sandbox=#{install_dir}/embedded init"].join(" ")

env = {
  "CFLAGS"  => ["-I#{install_dir}/embedded/include",
                "-I#{install_dir}/embedded/include/openssl",
                "-I#{install_dir}/embedded/include/curl"].join(" "),
  "LDFLAGS" => "-L#{install_dir}/embedded/lib",
  "LANG"    => "en_US.UTF-8",
  "PATH"    => "#{install_dir}/embedded/bin:#{ENV["PATH"]}"
}

build do
  command "rm -rf ~/.cabal ~/.ghc"
  command "/usr/bin/cabal update"
  command "#{cabal_install} cabal cabal-install==#{default_version}", :env => env
  command "#{cabal_sandbox}", :env => env
end
{'fraction_non_alphanumeric': 0.1951417004048583, 'fraction_numerical': 0.004858299595141701, 'mean_word_length': 3.026058631921824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '5086440', 'n_tokens_mistral': 431, 'n_tokens_neox': 411, 'n_words': 59}