<commit_before>{stdenv, fetchurl, perl, libedit, ncurses, gmp, makeWrapper}:

stdenv.mkDerivation rec {
  version = "6.10.2-binary";

  name = "ghc-${version}";

  src =
    if stdenv.system == "i686-linux" then
      fetchurl {
        # This binary requires libedit.so.0 (rather than libedit.so.2).
        url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
        sha256 = "1fw0zr2qshlpk8s0d16k27zcv5263nqdg2xds5ymw8ff6qz9rz9b";
      }
    else if stdenv.system == "x86_64-linux" then
      fetchurl {
        # Idem.
        url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
        sha256 = "1rd2j7lmcfsm2rdfb5g6q0l8dz3sxadk5m3d2f69d4a6g4p4h7jj";
      }
    else if stdenv.system == "i686-darwin" then
      fetchurl {
        # update
        # untested
      }
    else throw "cannot bootstrap GHC on this platform"; 

  buildInputs = [perl makeWrapper];

  postUnpack =
    # Strip is harmful, see also below. It's important that this happens
    # first. The GHC Cabal build system makes use of strip by default and
    # has hardcoded paths to /usr/bin/strip in many places. We replace
    # those below, making them point to our dummy script.
     ''
      mkdir "$TMP/bin"
      for i in strip; do<commit_msg>* Doh.<commit_after>{stdenv, fetchurl, perl, libedit, ncurses, gmp, makeWrapper}:

stdenv.mkDerivation rec {
  version = "6.10.2";

  name = "ghc-${version}-binary";

  src =
    if stdenv.system == "i686-linux" then
      fetchurl {
        # This binary requires libedit.so.0 (rather than libedit.so.2).
        url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-unknown-linux.tar.bz2";
        sha256 = "1fw0zr2qshlpk8s0d16k27zcv5263nqdg2xds5ymw8ff6qz9rz9b";
      }
    else if stdenv.system == "x86_64-linux" then
      fetchurl {
        # Idem.
        url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-unknown-linux.tar.bz2";
        sha256 = "1rd2j7lmcfsm2rdfb5g6q0l8dz3sxadk5m3d2f69d4a6g4p4h7jj";
      }
    else if stdenv.system == "i686-darwin" then
      fetchurl {
        # update
        # untested
      }
    else throw "cannot bootstrap GHC on this platform"; 

  buildInputs = [perl makeWrapper];

  postUnpack =
    # Strip is harmful, see also below. It's important that this happens
    # first. The GHC Cabal build system makes use of strip by default and
    # has hardcoded paths to /usr/bin/strip in many places. We replace
    # those below, making them point to our dummy script.
     ''
      mkdir "$TMP/bin"
      for i in strip; do
{'fraction_non_alphanumeric': 0.11678832116788321, 'fraction_numerical': 0.0530157510564733, 'mean_word_length': 2.6624472573839664, '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': '5004923', 'n_tokens_mistral': 1032, 'n_tokens_neox': 955, 'n_words': 224}