<commit_before>{ stdenv, fetchurl, perl, ghcWithPackages }:

let ghc = ghcWithPackages (hpkgs: with hpkgs; [
            binary zlib utf8-string readline fgl regex-compat HsSyck random
          ]);
in

stdenv.mkDerivation rec {
  name = "jhc-${version}";
  version = "0.8.2";

  src = fetchurl {
    url    = "http://repetae.net/dist/${name}.tar.gz";
    sha256 = "0lrgg698mx6xlrqcylba9z4g1f053chrzc92ri881dmb1knf83bz";
  };

  buildInputs = [ perl ghc ];

  meta = {
    description = "Whole-program, globally optimizing Haskell compiler";
    homepage = "http://repetae.net/computer/jhc/";
    license = stdenv.lib.licenses.bsd3;
    platforms = ["x86_64-linux"]; # 32 bit builds are broken
    maintainers = with stdenv.lib.maintainers; [ aforemny thoughtpolice ];
  };
}<commit_msg>jhc: Use the cc that's in scope when building<commit_after>{ stdenv, fetchurl, perl, ghcWithPackages }:

let ghc = ghcWithPackages (hpkgs: with hpkgs; [
            binary zlib utf8-string readline fgl regex-compat HsSyck random
          ]);
in

stdenv.mkDerivation rec {
  name = "jhc-${version}";
  version = "0.8.2";

  src = fetchurl {
    url    = "http://repetae.net/dist/${name}.tar.gz";
    sha256 = "0lrgg698mx6xlrqcylba9z4g1f053chrzc92ri881dmb1knf83bz";
  };

  buildInputs = [ perl ghc ];

  preConfigure = ''
    configureFlagsArray+=("CC=cc")
    configureFlagsArray+=("--with-hsc2hs=${ghc}/bin/hsc2hs --cc=cc")
  '';

  meta = {
    description = "Whole-program, globally optimizing Haskell compiler";
    homepage = "http://repetae.net/computer/jhc/";
    license = stdenv.lib.licenses.bsd3;
    platforms = ["x86_64-linux"]; # 32 bit builds are broken
    maintainers = with stdenv.lib.maintainers; [ aforemny thoughtpolice ];
  };
}
{'fraction_non_alphanumeric': 0.13874496257915947, 'fraction_numerical': 0.03914795624640184, 'mean_word_length': 3.345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3619532', 'n_tokens_mistral': 696, 'n_tokens_neox': 637, 'n_words': 128}